public static void InitializePhysXEngine() { Engine = new PEngine(); Engine.AddPlane(new StillDesign.PhysX.PlaneShapeDescription()); Engine.OnSimulationReady += new PEngine.SimulationReadyDelegate(Engine_OnSimulationReady); }
public static void Engine_OnSimulationReady(PEngine e, float time) { foreach (Actor a in e.Actors) { if (BoxMatrices.ContainsKey(a)) { BoxMatrices[a] = a.GlobalPose.As <Matrix>(); } if (BallMatrices.ContainsKey(a)) { BallMatrices[a] = a.GlobalPose.As <Matrix>(); } } // e.Scene.FlushCaches(); }