Oops, forgot 2 calls to clamp()

This commit is contained in:
Julian Murgia
2016-05-17 10:41:25 +02:00
parent a2a5ae6cde
commit c62f18956f

View File

@@ -232,8 +232,8 @@ In our case, we simply need to multiply our 'rotation_ang' variable by 'delta' i
func _process(delta):
angle_from += rotation_ang * delta
angle_to += rotation_ang * delta
angle_from = clamp(angle_from, 0, 360)
angle_to = clamp(angle_to, 0, 360)
angle_from = wrap(angle_from, 0, 360)
angle_to = wrap(angle_to, 0, 360)
update()
Let's run again! This time, the rotation displays fine!