I am trying to pickup and carry a rigidbody weapon, where it will move to a point in front of the player, and move with the player like a child object would, but still react to physics. Right now, I am simply setting the velocity to move towards the position, and adding the player’s rigidbody velocity to the weapon movement velocity. When I do this, the weapon moves to the correct spot, but when I move around, the weapon jerks around. I want it to stay at the spot once it gets to that point. Here’s a 1 showing the problem. This is the code I have…
void FixedUpdate()
{
if (beingHeld)
{
rb.velocity = ((holdPosition - rb.position + (playerObj.GetComponent <Rigidbody>().velocity / Time.deltaTime / 1500)) * Time.deltaTime * 1500);
}
}