Enemy Sprite Control
I have an enemy that can move in all directions and I need to find some way to decide which sprite to use based on what angle the enemy is moving. I have four directional sprites, any ideas on how to implement this?
Comments
make a self attribute call it "my angle"
now make a constrain :
Constrain "self.my angle" TO vectorToAngle( self.Motion.Linear Velocity.X , self.Motion.Linear Velocity.Y )
This will give you the angle of your enemy's movement and you can do whatever you want with this value