#How can I flip my enemy character according to player's position

1 messages · Page 1 of 1 (latest)

deft mantle
#

I am also in LD 53 so pls pls help ASAP!

cunning stone
#

Compare the x positions of your enemy and your player, and set the enemy's x scale to 1 or -1, depending on the result.

deft mantle
#

okay but how do we compare it

#

any methods to use??

cunning stone
#

You literally just need to check if (transform.position.x > target.position.x)