playMaker

Author Topic: Transform "Move Towards" Question  (Read 2258 times)

adamrobertson

  • Playmaker Newbie
  • *
  • Posts: 9
Transform "Move Towards" Question
« on: August 19, 2013, 03:46:25 PM »
Hi,

So i have an object that i want to follow the player on collision. Currently i have a "move towards" transform state which ends with (If distance is 3 or less move to next state)

Is there anyway of having a state that works in reverse?

So would be (If distance is 3 or more move to next state)

Thanks in advance for any help or hints

sebaslive

  • Hero Member
  • *****
  • Posts: 572
    • Frame Tale Studios
Re: Transform "Move Towards" Question
« Reply #1 on: August 19, 2013, 03:58:16 PM »
Hey Adam, i am going to plug the unity package i uploaded on here http://hutonggames.com/playmakerforum/index.php?topic=4025.0 its free haha and say that what you can use is a get position. Use a get position on target and another on self and float subract it to a new variable to check the difference. Set that difference to abs float and end with a float compare of difference to 3 so if its more or less than 3 transition to next action.
All my VR games use Steam VR Playmaker Toolkit: http://u3d.as/u20
And Oculus Touch Playmaker Toolkit: http://u3d.as/QT5


Follow me @sebasRez

adamrobertson

  • Playmaker Newbie
  • *
  • Posts: 9
Re: Transform "Move Towards" Question
« Reply #2 on: August 19, 2013, 03:59:57 PM »
Thank you for your help :) This is a huge help