I’m trying to update my aiming system for my top-down game, basically you hold right click to turn on aiming, and the player character turns toward the cursor. It should work like this: when the player isn’t aiming at anything special, the aim points straight forward, but when it’s aimed at an enemy for example, the character skeleton should bend vertically, pointing toward the height of the cursor hit, and I assume this is better achieved with a 1d aim offset.
I got it so far, except for the aim offset part:
I don’t really need horizontal offset cuz the character will always be rotated toward the mouse cursor when aiming, and I should add turn in place animations later. but I do need vertical offset
I believe the catch here is what would be the proper way to calculate the offset amount? as you can see, it can’t be just based on the height of the cursor hit, since when pointing at a foot for example, it should look down more and more the closer to the enemy the player is.
Is this even a decent method? how could I achieve this?