diff options
Diffstat (limited to 'SmoothRotation.gd')
-rw-r--r-- | SmoothRotation.gd | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/SmoothRotation.gd b/SmoothRotation.gd new file mode 100644 index 0000000..f6df8c7 --- /dev/null +++ b/SmoothRotation.gd @@ -0,0 +1,7 @@ +extends Tween + +func rotate_y(ang, speed): + var parent = get_parent() + remove_all() + interpolate_property(parent, "rotation:y", parent.rotation.y, parent.rotation.y+ang,abs(ang/speed),Tween.TRANS_EXPO,Tween.EASE_OUT) + start() |