
So I created a model, with mesh groups (body, bodycollision, wheel_frontdriver, etc)
When creating the physics entity for the wheel(s) I use the Cylinder shape (just like in the car demo) with a calculated height and radius from the wheel mesh's bounding box.
The problem is the Cylinder shape height is Y and radius is on Z, while the model's wheel height (actual width) is X and radius is Y (if that makes any sense)
So I rotate the shape (like the car demo) using:
Code: Select all
this.Entity.Orientation = Quaternion.CreateFromAxisAngle(Vector3.Forward, MathHelper.PiOver2);
What's the proper/better way of doing this?