AI hits are not accurate.

Hello everyone,

Im new in Unreal Engine 5.
Im making a little game where u have to collect coins and if the enemy hits u, it’ll restart the level.
The issue i get is that when when the enemy “visually” hits me, it looks like the collision doesn’t go along with the animation.


Whenever AI hits, it should appears a sphere collision which indicates the area hit by the AI. So if im inside that box at the exact time it appears, the level restart. However, this collision sphere doesn’t always appear and even if the ai’s animation shows that the punch animation is done, this collision sphere doesn’t show up so it makes it inaccurate.

Is there a way to make this collision sphere appears everytime the punch has been thrown?

All to do with your code.

For punches like shown I’d use anim_notify to call a small sphere trace 10cm forward of the r/l_hand bone.

Here’s the BP Code i made for AI.
And here’s the animation which shows the moment where i want the collision sphere to show:

I see that the sphere takes a lot of time to pop out in game, but i don’t know how can i make it that it pops out everytime the punch is done.
I tried to follow your suggest but i don’t know how to make the sphere shows 10cm forward the r_hand bone. I’ll try to google how to.

Thanks for your reply.

UPDATE: The solution is as simple as deleting the 2nd delay within the comment labelled as “It’ll attack when Notify checkmark starts in the animation BP” in the BP i posted before.
I guess that delay caused the Notify checkmark that i put in the punch animation to execute 1 second late instead of being instantaneous.
Problem solved.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.