# Finding actual acceleration

I’d like to find the actual acceleration of a physicsnode or physicsVehicleNode in 3D. I know I can set and read the VehicleNode’s acceleration, but that isn’t a true reflection of the object’s acceleration in the world space. I could figure out the world space Y axis I guess by trying to find the angle of the object and use gravity as the acceleration, but for X and Z I’m confused. The velocity is all I can get directly.

you want to get the current applied forces? or what are you trying to achive?

I’d like to literally acceleration in each dimension. There is a function for getLinearVelocity, and one for getAngularVelocity, taht both return a Vector3f, but I need a getLinearAcceleration that returns a Vector3f.

Isn’t Force = Mass * Acceleration? And since you know the mass of the object and the force it should be enough?

There is no “acceleration”… You can read the nodes current velocity and you can get the force of impacts when listening to the collisions of the physicsspace. Apart from that and the velocity or impulses that you apply there is no such thing as “acceleration” apart from gravity, which you define also.

Cheers,

Normen

But I don’t know the force, I only know the velocity, Unless there is a method for getting the force on an object.

I know the acceleration is teh rate of change of velocity. I guess I could get the velocity from two points, then find the time taken between the measurements:

Accel = (Vfinal - Vinitial) / time

But I don’t know how to get the time between the measurements.

a object stays in it state as longa s no force is applied → if it flys around without gravity there is no acceleration and no force.

Acceleration is the force you apply.

I suspect you want to get the kinetic energy? think that was mass * speed

I found a getContinuousForce method, but I’m not sure if this would be the force I am looking for. If so, then I could simply use F= m*a. There isn’t an in depth description of this method. It just says

“get the currently applied continuous force

Returns: null if no force is applied”

Do you think this is what I am looking for?

No, its the force you are applyig to the node. The thing you wanna compute is the thing that the physics has to calculate each tick… How you expect this value to be available beforehand??

morrowsend said:
But I don't know the force, I only know the velocity, Unless there is a method for getting the force on an object.
I know the acceleration is teh rate of change of velocity. I guess I could get the velocity from two points, then find the time taken between the measurements:

Accel = (Vfinal - Vinitial) / time

But I don't know how to get the time between the measurements.

the time is the tpf you get at simpleUpdate()!
also, not sure, but I would get 3 vector3f positions, one at each simpleUpdate(), I would also make it sure that the distance between these spots are different (otherwise you would be calculating linear velocity), if they are equal I would wait for another simpleUpdate() until it changes,
in the last/3rd spot I would use the variation of the distances to calculate the accelaration. Not tested, just my 1st impression about this :) (my 1 cent heh)... I would even have to research a bit to make a code from this... :>