How can I set behavior 8directions on android?
I need to make down and up direction on touch.
Develop games in your browser. Powerful, performant & highly capable.
How do you want the touch to work?
you could try something like:
touch.y > player.y - player simulate pressing down
touch.y is not 0 - player simulate pressing up
On touch object.
I need to make object - move down and up.
It's exactly the same as above..
instead of comparing the y you just use
on touched object - player - 8 direction - simulate control - up
on other touched object - player - 8 direction - simulate control - down