Hi guys!
First time posting. I couldn’t really find any information that could help me with this.
TLDR at the end.
What are good options for ‘stunning’ an NPC? And by that I mean including movement.
I tried Root Motion animation montage, and it worked great as it locks the character in the animation movement but now I’m at a point where it feels very restrictive in terms of knock back distance (stagger), and duration (animation doesn’t feel right if just played faster).
So I’m trying to move away from root montage animation and now faced with challenges.
I tried “Launch Character” but the AI movement nullifies it. NPC just stops for a split second and resumes walking again. Disabling movement doesn’t help since launch character uses the movement component (or it appears to be so).
*I tried adding a ‘stunned state’ in my AI State Tree but the update is too slow. The state tree is setup to switch to the stunned state with “Send State Event”. It takes about half a second to see the state change. Although this part may be poor implementation on my part as I pass the call from the npc Character BP to the AI Controller BP, and from here executes send state event. I couldn’t get it to work if I called the event change from the character bp.
There doesn’t seem to be away to temporarily disable the AI or movement input. I’m out of ideas at this point. Is a stunned state a viable option if implemented correctly? Or are there other alternatives I could explore? Suggestions?
TLDR:
Root Motion Montage - good because have ‘built-in stun’ but not flexible in duration and knockback distance. Will require more set of animation for different needs.
Launch Character - immediately superseded by AI movement
Launch Character + State (State tree) - state transition too slow, like half a second. might be poor implementation (details in the paragraph above with an *).
Looking for suggestion/ideas how to stun the npc AI and movement.
Thanks in advance!