I have an animation of a character aiming a handgun 'straight', and firing a handgun from that straight pose. I want to have the character be able to aim up and down and fire from those poses too. Think Resident Evil 1/2/3, Alone in the dark, etc. I want to save time on my animator by not having him do the aim/up down.

I'm trying to find a way to dynamically achieve this effect from code. Do I have to write an IK solver system or is there a more straight-forward way to do it?

I'm pretty sure there's a technical name for this kind of thing, I Googled aim offset, aim target, lookat target etc but all I came up with was UE4 links. We're using our own engine.

Looking at UE4 'aim offset' it looks very similar to what I want. I wonder how it's implemented internally.

I'm not asking for code but just ideas, hints or pointers are appreciated.


You're thinking of inverse kinematics. The effort you'd have to go to to do this 'simple' thing in code is actually quite extensive.

You are better off to have your animator do it, it should take him very little time compared to the time you'll spend.

If you can't afford that it's still going to be much faster to just learn how to make a pose yourself and export it to your engine.

|improve this answer|||||

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.