Please don't post Bullet support questions here, use the above forums instead.
Johnnylightbulb
Posts: 4
Joined: Mon Jan 14, 2008 4:44 pm

Am I incorrect in thinking that the quasi-standard implementation of an "ApplyForce" method I see in physics code incorrectly adds energy to the simulation? Typically, in many engines I see:

Code: Select all

``````void ApplyForce(Vector3 force, Vector3 relative)
{
this.Force += force;
this.Torque += Vector3.Cross(relative, force);
}``````
Wouldn't this pattern add too much linear force when a purely torque force is applied? (When 'relative' is tangential to the COM)

I would expect that in increase in force would be less to compensate for the energy transformed into torque. Am I missing something?

Thanks

Nathanael
Posts: 78
Joined: Mon Nov 13, 2006 1:44 am

### Re: ApplyForce() adds excess energy

Its a common observation, I think the best explanation can be found here: http://www.cs.cmu.edu/~baraff/sigcourse/notesd1.pdf page 29, section 5.5

Hope it help,
Nathanael.

Johnnylightbulb
Posts: 4
Joined: Mon Jan 14, 2008 4:44 pm

### Re: ApplyForce() adds excess energy

Nathanael wrote:page 29, section 5.5
Ah. I have some reading to do. Thank you very much!!

ewjordan
Posts: 26
Joined: Sat Jun 30, 2007 4:34 am

### Re: ApplyForce() adds excess energy

While that whole thing is probably worth reading anyways, the quick answer is that there's no requirement that the same force over the same time adds the same amount of energy; change in energy is the integral of the force over distance (dotted appropriately, of course), not time, so the answer is that over a given period of time the force is applied over a greater distance when it's applied off-center, due to the rotational motion that it adds.