Attention | Topic was automatically imported from the old Question2Answer platform. | |
Asked By | xAkuma69 |
i added leaning and the rotation is smooth but the transform isnt
it works but i want to have it more smooth and cant get it working
export var left_lean : Vector3
export var lean_acceleration = 5
func lean_left(delta):
lean = true
head.transform.origin = lerp(transform.origin, left_lean, 0.5)
head.rotation.z = lerp(head.rotation.z, deg2rad(10), lean_acceleration * delta)