public override void Build() { terrain = new Primitives3D.TerrainPrimitive(Demo.GraphicsDevice, ((a,b)=> { return (float)(Math.Cos(a * 0.2f) * Math.Sin(b * 0.2f) * 2.0f); })); TerrainShape shape = new TerrainShape(terrain.heights, 1.0f, 1.0f); RigidBody body = new RigidBody(shape); body.Position -= new JVector(50, 0, 50); body.IsStatic = true; body.Tag = BodyTag.DontDrawMe; //body.EnableDebugDraw = true; Demo.World.AddBody(body); AddCar(new JVector(0, 4, 0)); }
public override void Build() { terrain = new Primitives3D.TerrainPrimitive(Demo.GraphicsDevice, ((a, b) => { return((float)(Math.Cos(a * 0.2f) * Math.Sin(b * 0.2f) * 2.0f)); })); TerrainShape shape = new TerrainShape(terrain.heights, 1.0f, 1.0f); RigidBody body = new RigidBody(shape); body.Position -= new JVector(50, 0, 50); body.IsStatic = true; body.Tag = BodyTag.DontDrawMe; //body.EnableDebugDraw = true; Demo.World.AddBody(body); AddCar(new JVector(0, 4, 0)); }