Jump to content
  • Advertisement
Sign in to follow this  
Khaos Dragon

problem with tokamak and body vs world space

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

If you intended to correct an error in the post then please contact us.

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 this post


Link to post
Share on other sites
Advertisement
Guest Anonymous Poster
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!

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!