Hey, I have a related question:
I got the wheels to render in their correct locations and with the help of the physicsDemos got the back 2 to start spinning, but they do it in the wrong direction, perpendicular to the car.
Code I used to create the wheels,:
Code: Select all
Matrix wheelGraphicRotation = Matrix.CreateFromAxisAngle(Vector3.Forward, MathHelper.PiOver2);
car.AddWheel(new Wheel(
new RaycastWheelShape(.375f, wheelGraphicRotation),
new WheelSuspension(2000, 100f, Vector3.Down, .8f, new Vector3(-1.8f, 0.5f, 1f)),
new WheelDrivingMotor(2.5f, 30000, 10000),
new WheelBrake(1.5f, 2, .02f),
new WheelSlidingFriction(4, 5)));
car.AddWheel(new Wheel(
new RaycastWheelShape(.375f, Matrix.CreateRotationY(MathHelper.Pi)),
new WheelSuspension(2000, 100f, Vector3.Down, .8f, new Vector3(-1.8f, 0.5f, -1f)),
new WheelDrivingMotor(2.5f, 30000, 10000),
new WheelBrake(1.5f, 2, .02f),
new WheelSlidingFriction(4, 5)));
car.AddWheel(new Wheel(
new RaycastWheelShape(.375f, wheelGraphicRotation),
new WheelSuspension(2000, 100f, Vector3.Down, .8f, new Vector3(1.8f, 0.5f, 1f)),
new WheelDrivingMotor(2.5f, 30000, 10000),
new WheelBrake(1.5f, 2, .02f),
new WheelSlidingFriction(4, 5)));
car.AddWheel(new Wheel(
new RaycastWheelShape(.375f, Matrix.CreateRotationY(MathHelper.Pi)),
new WheelSuspension(2000, 100f, Vector3.Down, .8f, new Vector3(1.8f, 0.5f, -1f)),
new WheelDrivingMotor(2.5f, 30000, 10000),
new WheelBrake(1.5f, 2, .02f),
new WheelSlidingFriction(4, 5)));
Also I know this isn't what this forum is for, but if you could help me it would be nice; my models are too small for the terrain I've created. I've tried using Matrix.CreateScale() to scale the worldMatrix on each mesh, but nothing happens.
Thanks in advance, and thanks for the engine.