AppTor

Discuss new features and future development.
Post Reply
Mixel
Posts: 41
Joined: Mon Feb 14, 2011 7:10 am
Contact:

AppTor

Post by Mixel »

When I try to rotate a vehicle's wheel by using ApplyForce on and parallel to its edge, translational movement also occurs, so instead I have to set the shape's torque manually. Could an ApplyTorque function be added?
User avatar
slembcke
Site Admin
Posts: 4166
Joined: Tue Aug 14, 2007 7:13 pm
Contact:

Re: AppTor

Post by slembcke »

I guess I could add one, but it would just be this:

Code: Select all

body->t += torque;
Can't sleep... Chipmunks will eat me...
Check out our latest projects! -> http://howlingmoonsoftware.com/wordpress/
Mixel
Posts: 41
Joined: Mon Feb 14, 2011 7:10 am
Contact:

Re: AppTor

Post by Mixel »

That is what I currently do. But is not ApplyForce also body->f += force;
User avatar
slembcke
Site Admin
Posts: 4166
Joined: Tue Aug 14, 2007 7:13 pm
Contact:

Re: AppTor

Post by slembcke »

If the offset is the zero vecter yes. If it's not, then it also generates a torque. http://code.google.com/p/chipmunk-physi ... Body.c#160
Can't sleep... Chipmunks will eat me...
Check out our latest projects! -> http://howlingmoonsoftware.com/wordpress/
Mixel
Posts: 41
Joined: Mon Feb 14, 2011 7:10 am
Contact:

Re: AppTor

Post by Mixel »

What is the reason that my using ApplyForce on and parallel to a circle's edge also causes translational movement? Is is that a pinjoint and springjoints are attached to its center?
User avatar
slembcke
Site Admin
Posts: 4166
Joined: Tue Aug 14, 2007 7:13 pm
Contact:

Re: AppTor

Post by slembcke »

Applying a force always causes linear acceleration, if the force is off center then it also generates a torque.
Can't sleep... Chipmunks will eat me...
Check out our latest projects! -> http://howlingmoonsoftware.com/wordpress/
Post Reply

Who is online

Users browsing this forum: No registered users and 4 guests