playMaker

Author Topic: Navmesh Agent Zigzag towards player  (Read 2330 times)

autumnboy

  • Junior Playmaker
  • **
  • Posts: 73
Navmesh Agent Zigzag towards player
« on: June 22, 2017, 09:15:15 PM »
Hi all,
I've spent the last few hours trying to figure this out but just can't get it right.
I'm trying to get the a Navmesh agent zigzag towards the player but I can't seem to get the right calculations, but I think I may be going about it the wrong way. 

Does anyone know of a way I can get the Agent zigzaging regardless of the direction they're moving?

Thanks,
Josh

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Re: Navmesh Agent Zigzag towards player
« Reply #1 on: June 23, 2017, 03:50:34 AM »
Hi,

 uhm, that sounds very tricky to do indeed...

Maybe I would simply move the destination target left and right to make the agent seeking the target zig zag, but how effective this will be in your level I don't know.

 I would ask this question on Unity forums and UA, if they have a solution let me know, I'll look at it and see how it can be done in PlayMaker.

 Bye,

 Jean

terri

  • Sr. Member
  • ****
  • Posts: 386
    • terrivellmann.tumblr.com
Re: Navmesh Agent Zigzag towards player
« Reply #2 on: June 23, 2017, 10:47:11 AM »
Not exactly this but I once got some fun results by having a target constantly rotating around the player, and then set the enemy's target to that.

Maybe try something like that?

autumnboy

  • Junior Playmaker
  • **
  • Posts: 73
Re: Navmesh Agent Zigzag towards player
« Reply #3 on: July 02, 2017, 09:33:17 PM »
Cool thanks for the replies guys will test it out.

-Josh