How implement vertical auto-aiming.?

what the title say.
When the camera position is set to a top down style game, and the player must aim target that could be up or down (for example, down a stair).
what is a good way to implement vertical auto aiming?

thanks!!

Get all enemy pawns infront of player character via traces or collision box or whatever. Compare their distance from player. Get nearest. Use find look at rotation node and use the result to drive your base aim pose/aimoffset.

Thanks for the response.
However I don’t understand how that would work. Maybe I didn’t explain very well my problem.
I dont want a complete auto-aiming but an “ignore z up or down aiming”. If the player is pointing successfully to a target taking into account only de x/y plane, I want that the target get hit.
mmm something similar to the old fps like Doom, but in a top-down camera view.
In Games like Diablo, this isn’t a problem due the player is pointing click over the desired target. In my case I don’t have that mechanic. The player control the pawn with WASD and only rotate the character with mouse, like in a third view person game.
Hope someone could help me.

Thanks!!

The thing I wrote would only make your character to aim up or down, if like you said, the enemy is above or below the player. It wouldn’t automatically rotate your character to enemy, it would just adjust the pitch of the upper body.

You would have traces in front of your character, so the player would have to turn the character to the enemy. Then if that enemy is higher or lower than the player character, you would adjust the pitch/aimoffset accordingly.

Or maybe I misunderstood you completely? :slight_smile: