Jump to content
  • Advertisement
Sign in to follow this  
patrrr

2D torque?

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

Hello, I have a simple question: I'm trying to apply an impulse to a 2d circle at a specific position with a specific force, I calculate the torque by multiplying the magnitude of the force and the magntiude of the position to origo. But here's the problem: how do I get the direction (positive or negative) in which the torque works?

Share this post


Link to post
Share on other sites
Advertisement
It depends on the direction of the force. You have to use the famous right hand rule, if the force is applied clockwise, the torque goes to "the back".

Keep in mind that you are multiplying vectors.

(I suggest that you check the article on torque on Wikipedia)

Share this post


Link to post
Share on other sites
F x R = T

Anyways, a positive torque gets you a CCW rotation, provided you're looking from the top.

Is that what you were asking?

Share this post


Link to post
Share on other sites
Thanks, I had a hunch it was the cross product that I had to use but I wasn't sure a cross product on two 2D vectors would mean anything.

Share this post


Link to post
Share on other sites
Quote:
Original post by erissian
Anyways, a positive torque gets you a CCW rotation, provided you're looking from the top.


Be careful here since direction of rotation is actualy ambiguous. It is mostly accepted that your statement is correct but this might not always be the case. Essentialy, if you adopt the same handedness between your coordinate system and rotation rule then your statement is correct. This is generaly the case, for example DirectX adopts a left hand system and left hand rule, where as Maya adopts a right hand system with a right hand rule. There are exceptions however. For example the 3DS Max SDK uses a right hand system with a left hand rule, and OpenGL seems to change its mind with blatant disregard as to which coordinate system it's adopting. Of course the biggest problem here is not so much the lack of standard but just that people tend not to see the ambiguity and hence dont document which systems they are using. Just something to be aware of.

Share this post


Link to post
Share on other sites
Okay, I'm still having problems:
I want to calculate some kind of matrix that can be multiplied with the direction vector of the object which will result in an instantly big rotation, which is what I want. But how? I'm lost and my brain won't work properly.

(The direction is in global space, impulse position and force is in object space)

EDIT:
Never mind, I solved it :)
Thanks a bunch for helping me, everyone!

[Edited by - patrrr on May 17, 2007 6:44:36 AM]

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!