rotate_y() creates a constant rotation. wich is not what im after
i want the weapon model to point-180 degrees( basicly Vector3.Back)
and then i want to add floats (preferably degrees)to the axises based on if the weapon is running or is normal.
so no constant rotation, just a lerp between the normal rotationstate and the runrotationstate values.
i tried setting the eulers in a quat but that gives weird results
if i use the code below and set wantedrotation vector y to say -180 the gun doesnt point forward.
if (player.isrunning == true):
canfire = false
self.transform.origin = self.transform.origin.linear_interpolate(runPos, 10 * delta)
wantedrotation = runRotation
else:
canfire = true
self.transform.origin = self.transform.origin.linear_interpolate(normalPos, 10 * delta)
wantedrotation = normalRotation
var addrotation : Quat = Quat(wantedrotation)
self.transform.basis = Basis(Quat(self.transform.basis).slerp(addrotation, 10* delta))
#self.rotation_degrees = self.rotation_degrees.linear_interpolate(wantedrotation, 10 * delta)