Is Sprite.Bullet.AngleOfMotion supposed to return a number between -180 and 180?
Sprite.Angle returns a number between 0 and 360.
I just think it's a bit confusing, I kinda expected it to return a value between 0 and 360. If it is supposed to do this then please mention it in the manual. :)
Is it especially important? An angle of -90 is mathematically equivalent to an angle of 270.
Yes, I understand that. But if you want to check if AngleOfMotion > 270 you have to check if AngleOfMotion is > -90. That's not a problem in itself unless it's not mentioned anywhere that AngleOfMotion is a value between -180 and 180.. :-)
Oh cool, that's good to know.
soren - you should never make angle comparisons like that, because it doesn't understand the fact different angles are mathematically identical. Rely on the 'is clockwise' condition instead.
You can convert it to 0-360 like so:
(Sprite.Bullet.AngleOfMotion + 360) % 360
Ashley, but 'is clockwise' is only for the object's angle, right? There's no equivalent for Bullet.AngleOfMotion, is there?
Develop games in your browser. Powerful, performant & highly capable.
For bullet behaviour you can have the sprite have an angle independent from the AOM, so using the sprite angle conditions won't help.