I have a sprite that has 3 animations: Default, Left and Right.
Left is a unicorn running toward left. Right animation is similar.
I am stuck on what condition i need to use to detect when the object hit solid and bounce back and therefore change direction.
I only care about X direction (left, right).
I disabled Bullet's 'set angle' because the object can move in any direction but i only have left or right animation.
Things i have tried:
1. Check the object's angle between -90 and 90 to detect facing right and else for left.. It always think it is facing right...
2. remember the object's last X. Basically i have 2 'on every tick' event, and on the first one, compare the last X to current X and if the last X is less than current X, i assume it is facing right. in the 2nd 'every tick' event (it is right below the first 'on every tick'), i update the instance's last X variable. Doesn't work for some reason.
3. Debugger shows that bullet behavior has vector X but i don't know how i can use it in Event sheet.
There gotta be an easier way to do this...