AppTor

Discuss new features and future development.

AppTor

Postby Mixel » Mon Feb 28, 2011 5:51 am

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?
Mixel
 
Posts: 41
Joined: Mon Feb 14, 2011 7:10 am

Re: AppTor

Postby slembcke » Mon Feb 28, 2011 8:05 am

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/
User avatar
slembcke
Site Admin
 
Posts: 4164
Joined: Tue Aug 14, 2007 7:13 pm

Re: AppTor

Postby Mixel » Mon Feb 28, 2011 9:53 am

That is what I currently do. But is not ApplyForce also body->f += force;
Mixel
 
Posts: 41
Joined: Mon Feb 14, 2011 7:10 am

Re: AppTor

Postby slembcke » Mon Feb 28, 2011 10:04 am

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/
User avatar
slembcke
Site Admin
 
Posts: 4164
Joined: Tue Aug 14, 2007 7:13 pm

Re: AppTor

Postby Mixel » Mon Feb 28, 2011 10:08 am

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?
Mixel
 
Posts: 41
Joined: Mon Feb 14, 2011 7:10 am

Re: AppTor

Postby slembcke » Mon Feb 28, 2011 11:09 am

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/
User avatar
slembcke
Site Admin
 
Posts: 4164
Joined: Tue Aug 14, 2007 7:13 pm


Return to Features/Development

Who is online

Users browsing this forum: No registered users and 2 guests

cron