diff options
author | dusoleil <howcansocksbereal@gmail.com> | 2022-07-23 13:26:21 -0400 |
---|---|---|
committer | dusoleil <howcansocksbereal@gmail.com> | 2022-07-23 13:26:21 -0400 |
commit | 0823c295a3b03d98be356b239a3f74f05795d9c9 (patch) | |
tree | ddc52f71ee5a3ecf08b38c100812fe147417a297 /SmoothRotation.gd | |
parent | 4486f3ace302e709e2cea6329931869438456d69 (diff) | |
download | chicken-chaser-gd-0823c295a3b03d98be356b239a3f74f05795d9c9.tar.gz chicken-chaser-gd-0823c295a3b03d98be356b239a3f74f05795d9c9.zip |
Smooth Rotation of Chickens
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() |