Honestly, one of the easiest ways to prototype this out is using “Stage Freezes” through matinee (UE4 - Blueprints). I have done this many times in UE3 in order to show an idea. (And it works rather well).
A “stage freeze” is where a series of matinee’s (or in UE4 - Blueprints / detailed sequences), hold their current status until something occurs which either tells them to cancel, backtrack, or continue to the next phase.
The Final Desired Effect: When the player gets close enough to an item and they look at it, their hand raises and waits for me to click the X button to tell them to pick the item up. Once the button is clicked, then the hand will grab the item. After grabbing the item, the player will either put it in their jacket, eat it if it is food, or hold onto it in their hand for later use.
** A set of animations needs to be created with each animation ending where the next will pick up. **
- Animate the hand reaching out and freezing in front of the player
- Animate a simple breathing loop with the hand in the extended position from the ^above] animation end point.
- Animate the hand reaching out and making a grabbing motion
- Animate the hand placing the object in the players jacket
**Interaction Methods: **
(For this demonstration) the interaction of the objects is most likely going to be determined based upon (If the player is looking at an item or not) and (If the player is close enough to the item to interact with it)
Knowing that, some type of look-at triggering needs to take place, but be limited to the distance of the player. (e.g. If the player is too far away, the look-at trigger won’t initiate, and therefore interaction is disabled).
The reason it is broken up like this, is so that if/else conditions can be implemented into the break points (Between each animation condition). If you were to try and visualize what is happening here, it would look something like this (Not accurate script syntax - simply an example):
if player.distance IS <= 100 then
play animation (‘Raise Hand’) and hold
if input.controller.x pressed then do
if look-at state == true then
play animation (‘grab item’) and hold
reverse animation (‘Raise Hand’)
This will allow for proper animation splits to conform to the progression of blueprints or detailed sequences.