views:

162

answers:

1

I'm using the NxWheelShape to simulate wheels on my car. When I render the wheel model, I use shape->getGlobalPose() to get a 4x4 matrix and render the wheel there. However this gives me the position of the shape, not where the casted ray hits other geomnetry, so even if the car behaves properly, the wheels are stationary (don't even rotate). What is the proper method of getting the wheel position?

A: 

Found it. Should have used shape->getContact(MyContactDesc); MyContactDesc.contactPosition is how far along Y- the ray hit something.