Playmaker Forum

PlayMaker Updates & Downloads => Share New Actions => Topic started by: mdotstrange on July 16, 2016, 12:47:44 PM

Title: NavMeshAgent knockback action
Post by: mdotstrange on July 16, 2016, 12:47:44 PM
Feed this action the game object that has hit your agent and it will knock the agent back according to the hit object-
(http://i.imgur.com/R5QrFsj.gif)
(http://i.imgur.com/GFYNCqF.png)

On Snipt and ecosystem
https://snipt.net/raw/c20faa081bfa909176e4389d6ddf9063/?nice (https://snipt.net/raw/c20faa081bfa909176e4389d6ddf9063/?nice)
Title: Re: NavMeshAgent knockback action
Post by: fletcherkildren on March 08, 2017, 09:18:15 AM
is this still available? I can't find it on Ecosystem! never mind- just saw you uploaded your actions to github!
Title: Re: NavMeshAgent knockback action
Post by: SPACE GAMER on April 28, 2017, 12:52:07 AM
NICE!
Title: Re: NavMeshAgent knockback action
Post by: christougher on September 16, 2017, 12:27:21 AM
Hi, I can't seem to find this specific action on your GitHub. I found one similar at
https://github.com/mdotstrange/MdotsCustomPlaymakerActions/blob/master/KnockbackAction.cs

however this action lacks the smoothing.  Any chance I could peek at the code?  Thx!
Chris
Title: Re: NavMeshAgent knockback action
Post by: Microfox on October 24, 2017, 08:13:18 AM
Any chance this action is still around somewhere? I can't seem to find it on the GitHub.
Title: Re: NavMeshAgent knockback action
Post by: mdotstrange on October 29, 2017, 08:35:33 PM
Are you using a Navmesh agent?

I found the proper way to do it with a NavMesh agent is to also use a rigidbody- this is the way I do it now-

So when the agent is hit you switch off the NavmeshAgent- then enable the rigidbody + add a physics force and let that play out for a bit- this way agents can fall from heights etc-

I'll make a new version of this that incorporates that and post it here soon-
Title: Re: NavMeshAgent knockback action
Post by: christougher on November 05, 2017, 01:36:36 AM
Looking forward to it!  yes, I'm using a navmesh agent and have a rigidbody as well.  I've tried setting the navmesh agent's updateposition to false and applying force and seem to get inconsistent results...  sometimes it works perfect, sometimes it doesn't seem to click... so, looking forward to seeing it.
Title: Re: NavMeshAgent knockback action
Post by: christougher on November 21, 2017, 03:38:46 PM
Ever get around to making this?  :D
Title: Re: NavMeshAgent knockback action
Post by: Nateprinceaudio on February 12, 2022, 10:18:59 AM
Hear is a simple Knock Back Action for navmesh agents i made hope it helps.
it uses the navmeshagent.move so offsets the current path of the agent
you just plug in the players Game object and it works out the knockback via the players position to the enemy.