When to use Angle attribute?
Hi All, random question!...
I usually just use Real attributes and adjust the rotation of an object, but am I missing a trick by not using an Angle attribute instead? Is there a particular advantage or quirk of the Angle attribute that makes it easier or more efficient to use when dealing with an object's rotation? Any advise much appreciated as I don't really know anything about Angle?
Cheers
Wayne
I usually just use Real attributes and adjust the rotation of an object, but am I missing a trick by not using an Angle attribute instead? Is there a particular advantage or quirk of the Angle attribute that makes it easier or more efficient to use when dealing with an object's rotation? Any advise much appreciated as I don't really know anything about Angle?
Cheers
Wayne
Comments
It can be useful when working with angles. Personally I never used it, but you never know
and game.angle does equal 380 it would still act like 20 in the behavior/action.
So really, theres pretty much no difference. I would just keep using real attributes.
The only angle based issue I've ever had is while making buttons rock side to side.
The fact that an actor naturally sits with 0 & 360 at the top (pointing up) makes it tricky to do the rocking because you are trying to 'rock' between 340ish to lean left and 20ish to lean right.
Easily solved though by 'pre' rotating the image by 90 so that when you get it into the editor you can then rotate it back again and you are now able to rock between 70ish to lean left and 110ish to lean right.
I'm still not convinced that an Angle attribute could've helped me avoid having to pre-rotate my images in this situation.