Hello, I'm trying to create an interaction system similar to the one in Amnesia the dark descent. In the game when you pick up an object it will follow your cursor around while still behaving like a physics object. I have tried recreating that in unity using conventional merhods such as simply setting the position of the object directly and setting the velocity of the rigidbody, but I've found that when the object is blocked by an obstacle it will try to move through it ignoring any colliders. Using Addforce I dont have that problem since I'm not setting the position of the object directly. But the problem i do have is that the object will overshoot the empty gameobject I set as the position where i want the held object to be, because it's adding force in the direction of the empty continuosuly. I'm looking for a solution where the held object smoothly moves to the position of the empty gameobject using Addforce, maybe applying a counter-force that slows the object down on arrival?
↧