Player raising an object.

Hello everyone,
I wonder to know how to make the player (character), raise an object, I’ve used parent to an empty in the player hands and made the raising action, but the object don’t get placed on the correct position and orientation.

I had seen some videos, and there is some games that the object “teleports” to the correct position, maybe an “set position” script solves the problem.

If someone pass one .blend, I’m gratefull:eyebrowlift:

I cannot help you directly right now, but few days ago I fizzled with a script to copy the location and rotation of the empty you want the item to snap to and add it to the item you want to get snapped.

Also yes, parenting works, however it has some interesting results due the “off-set” depending of your distance and location to the the target object.

Oh, thanks for the tip, but I realy wanted to make something more “realtime”.
That helped me much, i will try to couple an “Set Position” at that.

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.