How To Interact

I would like my character that uses the ue4 skeleton to interact with objects in the physical space. I would like him to actually pick up the item(starting at any position) and actually hold it. I dont want a set animation, I want fluid movement from current position to picking up the object. I looked into IK but I don’t know how to transition from idle to picking up the item (starting at any position) back to idle. If this is possible it would be great for some pointers at where to look.

Your pickup animation could be a Montage. when you play a montage, when set up correctly, it can play over any other animation. So when your state machine is running, playing your idle, you can play a montage on top of that, it blends in and when done it blends out back to the state machine. So that kinda happens automatically, what you need to do is make sure the animation is correct for what you need… etc. for an extra layer of accuracy on pickup, you can use IK on the arm grabbing the object. Blend in the IK as well over some time period, and blend it back out. With all that layered in you can get a seamless pickup that is completely accurate. What you also need to make sure of is that the character is close enough and faces the object before playing the animation so the IK doesn’t need to do so much, you know, so IK is a subtle secondary. You can do that by a bit of auto movement in your pawn, just nudge him into place, basically over riding the inputs.

I’m not gonna go through “how to” here, but that is the general idea there. It’s actually fairly simple if you break it down and just focus on the parts and make them work one by one. First get the character to go into position, then set it up to play the montage and actually pick the thing up, and then deal with IK for the last bit of accuracy on there.