Simulating a tube moving into an entrance port

I am tring to simulate a tool that enters from a hole of 2cm and moves inside to hole to grasp some stuff. the tool should be able to slide in and out and do the rotations needed bu respecting the constraint of passing by the entrance point.

do you have any suggestion?

yes, you can animate the object on a spline

I don’t think splines are the answer. It’s a rigid body, imagine like one of those long grasping stick that you insert in a hole to take something that fell from you.
i actually need my body to be able to move along all the straight lines passing by the hole and also be able to rotate them around all axis

Rigidbody physics are poorly-suited to things in a lot of contact, such as something penetrating another opening. Yes you can get it working but generally you will need lots of extra solver iterations in the physics settings.

If you’re driving it externally with a user control, you may need to “soften” that control with some kind of bandpass filtering to prevent it from forcing contacts that the physics system cannot resolve, such as wedging a toothbrush into your throat sideways… :slight_smile:

Another way is to remove axes of control as the object gets close to its target and begin aligning it yourself in only one dimension in-and-out, perhaps with splines, perhaps with simple positional / rotational morphing, analogous to how “aim assist” works: when the crosshairs approach a valid target, they bend towards it to help the player get on target.