How to change the way your actor is facing based on the direction it's moving in
Assistance on this is GREATLY APPRECIATED!
So here is what I currently have an actor doing...
When you touch a location on the screen the actor will then move to that locations. Simple right!
Here is what I need help with...
I can't just have a actor move to a location, I also need to have it face the direction it is moving in.
So for example, you have a little cat on your screen, you touch a location and the cat moves there, but if you touch a location behind the cat he will need to turn around so he is not walking backwards. Get it? I only need the cat to face either left or right, not up or down.
THANK YOU FOR YOUR HELP!!!!
So here is what I currently have an actor doing...
When you touch a location on the screen the actor will then move to that locations. Simple right!
Here is what I need help with...
I can't just have a actor move to a location, I also need to have it face the direction it is moving in.
So for example, you have a little cat on your screen, you touch a location and the cat moves there, but if you touch a location behind the cat he will need to turn around so he is not walking backwards. Get it? I only need the cat to face either left or right, not up or down.
THANK YOU FOR YOUR HELP!!!!
Comments
Thanks man, I will check it out and let you know if it solves my problem. Other wise I am coming back on here and harassing you.
Thanks man, I will check it out and let you know if it solves my problem. Other wise I am coming back on here and harassing you.
For some reason Safari keeps crashing on me when I try to get to the link you posted. Any way you can just email the project.
contact(at)secretgamelab(dot)com
Yes I understand that I need a "walk left" animation
and a "walk right" animation.
But what I need to learn from whom ever knows it is how to switch between the two when my actor is moving to the left or moving to the right.
-Rule when self.Position.X > touch1.Position.X
-- do the Left Animation
Otherwise:
-- do the Right Animation
MH
cheers