Answer the question
In order to leave comments, you need to log in
Unity swipe movement code, how to fix?
Hello. I have the code that is in the picture. Unfortunately, I don't really understand how it works. I want the sphere (on map 2) to move in the direction of the swipe. But it moves exclusively to the left and right. How to make it move in the direction of the swipe? Thanks in advance for your reply.
Answer the question
In order to leave comments, you need to log in
After positionChange.y add positionChange.x It is possible that z in general, try all the options, I don’t know Unity, so don’t kick me if I made a mistake,
I added what needs to be inserted
positionChange.y = -positionChange.y;
positionChange.x = -positionChange.x;
//возможно что не понадобится
positionChange.z = -positionChange.z;
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question