How to make an actor snap to an angle?
I'm making a game, and in this game, I need to have an actor that when it is finished rotating, it will snap to an angle, either 0, 90, 180, or 270. I am having trouble doing this and would really like some help ASAP.
Comments
Use:
round( self.Rotation / 90) *90
Thanks Socks, that worked.
Good !
You can interpolate to that value - or just use a change attribute behaviour depending on your needs, personally I think the interpolate would look nicer.