F
F
FixMyLife2017-12-06 20:43:57
2D
FixMyLife, 2017-12-06 20:43:57

How to compare coordinates?

It is necessary to compare the "y" coordinates of the characters, and if they are equal, then one method works, if one of the characters has a larger coordinate, then another method works. But the problem is that the surface on which they stand is the same, and the "y" coordinates are different, because of this, the second method always works. Screenshots below:
5a282c0971f48349087534.png5a282c10445bc689883090.png5a282c4c335e2344635704.png

Answer the question

In order to leave comments, you need to log in

2 answer(s)
D
Daniil Basmanov, 2017-12-07
@FixMyLife

As a simple solution, you can move the pivot down of the player and enemy sprites in the Sprite Editor so that the player's position on the axis doesn't differ that much when compared.
download?id=jpHqM5kJ4Y8YAtnzYDOPei15AaZf

G
Griboks, 2017-12-06
@Griboks

First, explain how you managed to use 3 different coordinates on a plane ( two-dimensional ).

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question