I would think there a better way to do:
[lua] if math.floor(object.rotation) == targetangle+1 or math.floor(object.rotation) == targetangle-1 then [/lua]
I can’t use:
object.rotation == targetangle
because object.rotation gives values such as 55.44444444444444881
It seams stupid to use an OR statement. [import]uid: 79135 topic_id: 16097 reply_id: 316097[/import]