@cybereality said:
You probably want that button code to either be a signal on the button, or handled in _input(). Otherwise there could be effects from the framerate. Also, that method only works for a single click. If you are holding the button, you will need to use delta (time) so the object rotates the same speed at differing fps.
Yes! and for all comments it works in _physics_process... but laggy on slower cpus.
how can i use delta in this case?
rotation_degrees = Vector3(0,lerp_angle(rotation_degrees.z, rotation_degrees.z - 1.0, 1.0 * delta),0)
rotate_z(rotation_degrees.z - 1.0)#multiplied by delta?
i've been tried the codes above but you cant change by angles in the docs they say to don't think in angles...
they say the code
rotation_degrees is for the editor only but it works when running so.... i use that method xD
i'm struggling with the rotation to be the same on lower cpu's