Attention | Topic was automatically imported from the old Question2Answer platform. | |
Asked By | Flipp3rix |
Hi guys… i’m trying to rotate a KinematicBody on it’s Y axis and for now i have this current setup:
extends KinematicBody
func _ready():
print("Rotation: " , self.rotation.y)
print("Rotation degrees: " , self.rotation_degrees.y)
func _process(delta):
if Input.is_action_just_released("rotate_left"):
rotate_y(deg2rad(int(90)))
print("Rotation: " , self.rotation.y)
print("Rotation degrees: " , self.rotation_degrees.y)
print("Tasto Q premuto")
I want to make the rotation smooth. Also i noticed in the prints that my object @180 degree print a value like
Rotation: -3.141593
Rotation degrees: -179.999985
I understand the first one but not the second. Doesn’t the second be 180 ?