playMaker

Author Topic: Making a vehicle move in reverse using touch  (Read 1313 times)

bazzajunior

  • Playmaker Newbie
  • *
  • Posts: 25
    • Molber Games
Making a vehicle move in reverse using touch
« on: May 25, 2016, 06:29:15 PM »
I'm in the process of creating a simple Android game 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.

bazzajunior

  • Playmaker Newbie
  • *
  • Posts: 25
    • Molber Games
Re: Making a vehicle move in reverse using touch
« Reply #1 on: May 26, 2016, 09:26:22 AM »
One thing to add to the above is that my vehicles can move to a tap on the screen or follow a finger being dragged around the screen - to which the z axis points to. There are no forces involved in the movement of the vehicles (the simply move add they're told).