EDIT3:
The TL;DR version: The linear velocity is capped at 120m/s, which at scale 1 translates to 120px/s. To get things to move faster than that on screen, you just scale the physics so that your GO in essence becomes “physically” smaller.
Original question:
I’m trying to have a spaceship controlled by applying force to a dynamic collision object.
I would like to have the ship fairly quick and easy to control, but no matter how much forward force I apply the ship moves very slowly and seems to get too much inertia.
I use this code in Update to apply force when the forward key is pressed. I have tried multiplying by very large numbers, but there is a kind of diminishing return effect, where I can get it to go a little faster, but still very slow.
local forwardForce = vmath.rotate(go.get_rotation("."), vmath.vector3(0, 1, 0))*10000
msg.post("#collisionobject", "apply_force", {force = forwardForce*dt, position = go.get_world_position()})
Anyone have any ideas as to what I’m doing wrong?
EDIT: I tested a bit more with very high forces (millions) and there definitely is a “roof” effect. Like there is a max speed. Increasing the force makes the ship reach that faster, but it’s still a very low max speed.
Could it be a limitation in the speed of the physics engine?
EDIT 2:
Further testing shows that the linear velocity seems to be capped at 120 no matter how much force is applied.
DEBUG:SCRIPT: linear velocity: vmath.vector3(0, 119.99999237061, 0)