【发布时间】:2013-12-13 15:29:38
【问题描述】:
我最近将项目的物理库 (BulletSharp) 从 2.80 更新到了 2.82,但留下了一堆无效调用(调试抽屉中有大约 20 个构建错误)。除了碰撞检测调用之外,我已经修复了几乎所有这些问题。
来自 CollisionReporter.cs:
PhysicsMain.PreSimulate += new PhysicsSimulateEvent(PreSimulate);
PhysicsMain.PostSimulate += new PhysicsSimulateEvent(PostSimulate);
PhysicsMain.ContactAdded += new ContactAdded(ManifoldPoint_ContactAdded);
LevelManager.OnLevelUnload += new LevelEvent(OnLevelUnload);
然后从 PhysicsMain.cs 中的 CreateWorld() 函数调用它:
ManifoldPoint.ContactAdded += new ContactAdded(ManifoldPoint_ContactAdded);
我在 PhysicsMain.cs 顶部附近也有这条线:
public static event ContactAdded ContactAdded;
我还应该指出 ManifoldPoint_ContactAdded() 是一个布尔值。
bool ManifoldPoint_ContactAdded(ManifoldPoint point, ... ) {
我遇到的问题是 Bullet(无论如何是 BulletSharp)停止使用 BulletSharp.ContentAdded 中断了调用。该文档没有提供有关替代它们的信息。
有人知道我必须使用什么来代替 BulletSharp.ContactAdded 吗?
编辑:这似乎在 PhysicsMain.cs 中引发“无重载匹配委托”错误。
PhysicsMain.ContactMade += ContactMade;
我认为这是罪魁祸首:
public static event /*ContactAdded*/ ContactAddedEventHandler ContactMade;
【问题讨论】:
标签: c# bulletphysics