public override void OnUpdate() { if (animatedMesh) { offset += FrameDelta; SetVertexPositions(WaveHeight, offset); //Graphics.MeshFactory.RemoveShape(groundShape); Vector3 worldMin = new Vector3(-1000, -1000, -1000); Vector3 worldMax = new Vector3(1000, 1000, 1000); groundShape.RefitTree(worldMin, worldMax); //clear all contact points involving mesh proxy. Note: this is a slow/unoptimized operation. Broadphase.OverlappingPairCache.CleanProxyFromPairs(staticBody.BroadphaseHandle, Dispatcher); } convexcastBatch.Move(FrameDelta); convexcastBatch.Cast(World); if (IsDebugDrawEnabled) { //convexcastBatch.Draw(World.DebugDrawer); } base.OnUpdate(); }
public override void OnUpdate() { if (animatedMesh) { groundOffset += FrameDelta; SetVertexPositions(waveHeight, groundOffset); Graphics.MeshFactory.RemoveShape(groundShape); groundShape.RefitTree(ref worldMin, ref worldMax); //clear all contact points involving mesh proxy. Note: this is a slow/unoptimized operation. Broadphase.OverlappingPairCache.CleanProxyFromPairs(staticBody.BroadphaseHandle, Dispatcher); } raycastBar.Move(FrameDelta); raycastBar.Cast(World, FrameDelta); if (IsDebugDrawEnabled) { raycastBar.Draw(World.DebugDrawer); } base.OnUpdate(); }