oh, it is realtime.
The implementation is up to you. A Python solution makes it very flexible, but it is also possible with other methods.
Important is that you know where both objects are when interacting.
I leave it to you to solve this problem:
- how to place and orientate both objects in a way that the animation fits (before the pickup happens).
My solution is:
- each object on the ground has a marker where the character hast to stand and what direction to look.
- the character goes to this point, and turns into the right direction.
After that the animation looks perfect.
Keep in mind the user might want to abort the pickup in between.
An we approach but not implemented is a special case on small objects (like an apple) where it does not matter from what side to pickup:
The character can walk an any position at a specific distance and turn into a specified direction.
E.g. a circle around the oject, looking to the center. With that parenting is the only solution to make it seemless (except the object is hidden by the hand when grapping.