playMaker

Author Topic: how to make a homing missile [SOLVED]  (Read 2112 times)

blackant

  • Hero Member
  • *****
  • Posts: 521
  • http://blackantmaster.com
    • blackantmaster.com
how to make a homing missile [SOLVED]
« on: July 18, 2013, 03:16:01 AM »
well, everything is in the tittle..

i don't know exactly how to proced with this,
when the object is created, it should wait 1 sec before choosing the nearest target.
i think i must use a raycast but i don't really understand how it works.
« Last Edit: July 19, 2013, 03:39:27 PM by blackant »

Fletch

  • Junior Playmaker
  • **
  • Posts: 66
    • SneakOnTheLot.com
Re: how to make a homing missile
« Reply #1 on: July 18, 2013, 12:21:37 PM »
I am no pro at this, to be sure.  But I think I may be able to help you out.

First you can locate the nearest player with the action, Find Closest and set the tag option to Player or some other tag that you've given your enemies.

There are some other actions you'll need to give your character so he's looking at objects that are within a range of his vision.  This way you're not trying to target mobs behind you.  Unless you want that sort of thing.

Once you fire the missile it can chase the mob if you continually update his transform and feed it back to the missile.

blackant

  • Hero Member
  • *****
  • Posts: 521
  • http://blackantmaster.com
    • blackantmaster.com
Re: how to make a homing missile
« Reply #2 on: July 18, 2013, 01:29:41 PM »
thanks!

first time i see this action, it works pretty well.