【发布时间】:2013-04-21 13:47:26
【问题描述】:
我正在编写一个类似于最终幻想的游戏引擎,具有 2D 背景和 Irrlicht 的 3D 模型。 为了计算与背景中物体的碰撞,我使用了这样的不可见网格:
我已尝试使用此代码,但当玩家到达网格边缘时,它会掉下来:
TriangleSelector sel = device.SceneManager.CreateTriangleSelector(Program.field.currentScene.walkmeshLoaded, null);
CollisionResponseSceneNodeAnimator coll = device.SceneManager.CreateCollisionResponseAnimator(sel, playerNode);
playerNode.AddAnimator(coll);
coll.Drop();
sel.Drop();
【问题讨论】:
标签: c# collision-detection irrlicht