Help for auto aim to zombie like resident evil 3

hi dears
i wanna have auto aim like resident evil 3
for example if i press x aim to the zombie
how can i do it thanks

1 Like

you can do it like this:

  1. trigger the auto aim with a (button) input event
  2. find the enemies in your view doing a shape trace:
  3. choose the closest or no enemy for your auto aim
  4. move your rotation to look at the selected enemy like this:
    To make it a smooth movement you will need to use a rotation interpolation:
    RInterp To | Unreal Engine Documentation

thank you…
i am very happy if you do it for me by an example in the picture because i didnt understand…
thank you so much

Okay was able to write a simple auto aim for you.

I used blueprint called mannequin as my auto aim targets. It is a blueprint character with the ue4 mannequin from the marketplace as a mesh.

The result of my auto aim looked like this:

My main auto aim function is implemented in the player character and looks like this (it is split into 3 photos to capture it all):

And here are the helper functions I used:

The only flaw in this implementation is that the first enemy found (in the array) is targeted. There are better solutions than this but i couldn’t implement one with my limited time. Maybe someone else here has an idea for a good implementation.

1 Like

thank you so much my friend
your idea is good

no problem. please mark this post as answered if it works for you.

Thank you!!!

This hitresults how to get them?

Yes if you do a Multi Trace, then it will return multiple hit results, one for each object it hits.
Check out Matt Wadstein’s short tutorial to understand it better: WTF Is? Multi Sphere Trace For Objects in Unreal Engine 4 ( UE4 ) - YouTube