Player needs to face towards an object
How to make player face towards an object say a cliff
When it is spawned it needs to be facing a cliff, if on the right side of screen then it will move towards it from right, if left the character animation needs to be flipped.
The problem is that the cliff can be anywhere on screen, so I cannot give a particular x and y value.
So how do I do it?
When it is spawned it needs to be facing a cliff, if on the right side of screen then it will move towards it from right, if left the character animation needs to be flipped.
The problem is that the cliff can be anywhere on screen, so I cannot give a particular x and y value.
So how do I do it?
Comments
I've made you an example file:
http://www.mediafire.com/?f5k8sxt1i5yd7gx
Play the GS file - and then drag the white square around.