Esempio n. 1
0
        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 void Convexcast(float frameDelta)
 {
     _convexcastBatch.Move(frameDelta);
     _convexcastBatch.Cast(World, _callback, frameDelta);
     _convexcastBatch.Draw(World.DebugDrawer);
 }