I have a direction, I get as dir = -get_transform().basis.z
and a velocity which is set as dir * speed * delta
and then I move it with: global_translate()
. This works fine, but then I have gravity as grav = Vector3(0,-8,0)
which when I add on via dir * speed + grav * delta
makes it vanish into the distance. Strangely it also does it when I set grav = Vector3(0,0,0)
. Is this somehow translating everything to global coordinates? I tried translating the gravity with transform.basis.xform()
and even transform.basis.xform_inv()
but nothing works. Even if i try dir + grav
and gravity is Vector3(0,0,0)
it fires off into the distance?