- Home /
How to make vehicles move in forward AND reverse using a touch to move system
I'm in the process of creating a simple Android game using Unity and Hutong Games PlayMaker, and so far it's going really well. The only drawback I've come across is the movement of my vehicles, of which there are three in the game (only one controlled at a time).
The problem I'm having is that I'm using an 'iTween MoveTo' process which works well but when I tap or touch behind the vehicle it spins around in a way that is not realistic (should add, the vehicles are toys so I'm not looking for total realism here).
I've tried using a NavMeshAgent and also using UnitySteer but the best option so far, due to vehicles crashing into one another and into set pieces/props, has been the use of the iTween setup.
My question is, is it possible to setup a process where if the user taps/touches behind the vehicle it can move in reverse to its waypoint rather than spinning around? I've thought about setting up two quads or colliders and working out if these can form some sort of trigger but then the use of empty gameobjects to drive the vehicle in the right direction forms a completely new headache (if one drives off, how does the other stay attached, etc.)
If anyone has tried something similar or knows of a method I would be extremely keen to hear it as this is now holding me back and for the past few weeks I've been banging my head trying to think of a way around it.
I forgot to add, if there's a way to move a Nav$$anonymous$$esh forwards when clicking in front of the GameObject and in reverse when clicking behind, I'd be keen to give this a try. I've tried using the basic $$anonymous$$oveToClick script supplied by Unity in one of their tutorials and it suits my purpose, so if there's a way to apply the above dynamic, I'd be keen to give this a try.
Your answer
![](https://koobas.hobune.stream/wayback/20220612043920im_/https://answers.unity.com/themes/thub/images/avi.jpg)