What are the arguments for RigidBody.applyForce ?

Evan407
Posts: 22
Joined: Sun Jan 17, 2016 2:37 am

What are the arguments for RigidBody.applyForce ?

Post by Evan407 »

I searched and searched but all I could find is
applyForce(Vector3f force,
Vector3f rel_pos)
well I assume force is how much x y and z 'force' to apply but what is rel_pos? relative position? the center of mass/object's origin? just leave it 0?

what relative position? - relative to what?
Last edited by Evan407 on Sun Apr 03, 2016 11:14 pm, edited 1 time in total.
Evan407
Posts: 22
Joined: Sun Jan 17, 2016 2:37 am

Re: What are the arguments for RigidBody.applyForce ?

Post by Evan407 »

I found this method applyCentralForce(Vector3f force) I'm trying to use but it doesn't seem to be working. Does the tick function reset the forces and the force has to be applied somewhere in the middle of the tick?
Evan407
Posts: 22
Joined: Sun Jan 17, 2016 2:37 am

Re: What are the arguments for RigidBody.applyForce ?

Post by Evan407 »

I tried applying the force in an InternalTickCallback and it still didn't work.
Evan407
Posts: 22
Joined: Sun Jan 17, 2016 2:37 am

Re: What are the arguments for RigidBody.applyForce ?

Post by Evan407 »

I figured out the issue I was dividing my seconds by 1000 making the simulation very slow.
vanger
Posts: 13
Joined: Sun Feb 21, 2016 2:34 am

Re: What are the arguments for RigidBody.applyForce ?

Post by vanger »

Evan407 wrote:what is rel_pos? relative position? the center of mass/object's origin? just leave it 0?
I didn't use Bullet, but it seems obvious that rel_pos is a point where the force is applied. Likely it's coordinated in the body frame, likely with an origin in the center of mass. So applyForce with 0 rel_pos should be the same as applyCentralForce.