Author Topic: Angle to a target  (Read 1618 times)

Nils Anderssen

  • Playmaker Newbie
  • *
  • Posts: 6
    • View Profile
Angle to a target
« on: June 02, 2014, 10:46:48 AM »

I am trying to set up a FSM that can determine if an gameobject is left, right, front or back to another gameobject, but have been able to do this successfully.

I have tried to use the "Get Angle To Target" script that is already in Playmaker, but it only gives me the angle with the shortest route from the front of the object, so I have no idea if it is left or right.

Is there any other way I can do this?

I have tried to install this script, but Unity crashes on load if I do so:

I guess it is not hard to do this, but atm. I am out of clues. Thanks to those who take the time to answer :)


  • Playmaker Newbie
  • *
  • Posts: 2
    • View Profile
Re: Angle to a target
« Reply #1 on: January 08, 2015, 03:01:42 PM »
I used the code to the post you linked and it worked well for me, just gotta fix the comment error on the first line and make sure to use the same name for the file as the script.