I’m playing around with bullet vehicles and I’m adding drag and downforce and all kinds of fun, which I’m managing to work through, But the physics vehicle has an “accelerate” method that is confusing me, and I can’t find any javadoc or anything to figure this out.
the “accelerate” method calls “applyEngineForce” - but none of the javadoc indicate what that force is. What is is “force”? Newtons?
} // ************************************************************************* // new methods exposed /** * Apply the specified engine force to all wheels. Works continuously. The * vehicle must be added to a PhysicsSpace. * * @param force the desired amount of force (may be negative) */ public void accelerate(float force) { assert isInWorld(); for (VehicleWheel wheel : wheels) { controller.applyEngineForce(wheel, force); } } /** * Apply the given engine force to the indexed wheel. Works continuously. * The vehicle must be added to a PhysicsSpace.
* Apply the given engine force to the indexed wheel. Works continuously. * * @param wheel the index of the wheel to apply the force to (≥0) * @param force the desired amount of force */ public void accelerate(int wheel, float force) { applyEngineForce(vehicleId, wheel, force); } private native void applyEngineForce(long vehicleId, int wheel, float force); /** * Alter the steering angle of all front wheels. * * @param value the desired steering angle (in radians, 0=straight) */ public void steer(float value) { for (int i = 0; i < wheels.size(); i++) { if (getWheel(i).isFrontWheel()) { steer(i, value);
1 Like
I figured it out. I guess sometimes it becomes clearer when you post it.
Force (N) = Torque(N/m) / Wheel radius(m)
1 Like