# problem with tokamak and body vs world space

This topic is 5395 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

## Recommended Posts

So basically in trying to make a car, I am trying to apply an impulse perpendicular to the back of the car and well am having trouble doing this as it seems my body to world space conversions are having no effect. In order to convert the vector (0,0,-1) into worldspace I simply multiple the transformation matrix of the car by this vector. For example:
neT3 transform = cube->GetTransform();
neV3 impulse_vector;
impulse_vector.Set(0,0,-1);
cube->ApplyImpulse(transform*impulse_vector);


For some reason, this code will always push the cube into the screen regardless of the cube's rotation...

##### Share on other sites
Hmmm. The code looks right. Have you verified that the transform you're getting is what you are expecting? And, have you verified your matrix-vector "*" operator to be sure the transformation result is something other than (0,0,-1)?

OK, the post may say anonymous poster, but it is really from me, grhodes_at_work. DAMN these stupid 24-hour gamedev cookies!

• 17
• 10
• 21
• 16
• 9