Sign in to follow this  

problem with tokamak and body vs world space

This topic is 4813 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
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

This topic is 4813 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.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this