Prefabs such as PickupItem or PickupDocument use a a subprefab called Interaction which allows and handles the player interaction. This prefab has attached a component called Interactive which contains a variable Data referencing a ScriptableObject.

This ScriptableObject is of type InteractionData, which determines how the player will behave when interacting with the object.

https://lh3.googleusercontent.com/HoYvwI5Bu6k_dSxBTNIFe9x10NR7Y3asWmQmjxDS0BLj9gTpbUp1bgVSqfiCxX1-u9NRuIyYE51sL5NLrusvudwEpTjGSAjTQFsQiVcFgMzzR5_3HhRIC5nFQuHofr-8bXrTNIkQ2myMAc9S2KC_u4ccuJC2N7ZayslgoTGbVWREIRTjijNgaR2gBg

By default, these interactions use the InteractionData Pickup, which plays a default pickup animation. We could make a new interaction type if we wanted, for example, to pick up an item from the ground with a different animation.

Creating a new InteractionData can be done by right clicking the Project View and selecting Create/Horror Engine/Interaction

https://lh5.googleusercontent.com/buyAPbPH0tkNrZ9PAIDYvpB4oiWif5rBq2PDXqEmTjY4Ol4pQBBE2gmI8nH9-65QOFEUaJcK9KwcKgC2zOMV5LKbaLETYfo_D2PkjAiMrPfp8ScmKxabWanotBfcdo5g0bjBX3Cj7eIx5WVlcGgl1G8hTWy5OxCGCvIwVyev_cZp2vkNcNlIxDo4ow

The parameters Name and Icon are not used at the moment but could be used for example if we wanted to show a prompt indicating the focused interaction to the player.

To add a new interaction animation, it first has to be imported in the project and added to the character Animation with a descriptive name, such as PickUpFromGround.

https://lh5.googleusercontent.com/sjzfngomtytTWwfEOPDUXx68obVERVx21Eq3PKE_YJvdISVsOz3jcEARjRJA-yv3B3E9tRqZP_D2tg1e1CSxvjDabtcFfG7IjAK_GOwyScShJthzZm6yRB1jcVQ3M0edaCFqQ-Xq_d9K7K5a9ikdDMk4U2S8NN4wC4G2dmCrQH248Tp_Dw1Kdw0jQg

To reference the animation from our InteractionData, we have to create a new AnimatorStateHandle as explained here.

Back on the InteractionData, assign the created Animator State Handle to the variable AnimState.

https://lh5.googleusercontent.com/iqjydEMuAZRufowJCNZJT0nBp5tTp5LNqbWPHsqWQfwoaqfMMByalIKARkOw5QlmBnq3RSqccrVbnrnn8XIAL5lrXBs40jHJlFYhJr-32-1MBd7TvNorClOrdxE8BpcgipprGJPwkr_WgjRfpnBxZrgfPU8bujaL-C1Yyen24UT7gFE-MGS04bPrdA

InteractionDuration should be adjusted to the desired time in the interaction state.

InteractionDelay is the time passed playing the animation before the interaction is triggered.

RotateToInteractive determines if the character rotates automatically towards the interacted object.

Remember to assign your new InteractionData on the Interaction component to use the new interaction behaviour.