So I have this player which throws a sword for an infinite distance, and as soon as it passes over an enemy gameObject the enemy would stop it’s movement (rigidbody2d simulation deactivated) and become a child to the sword and fly along with it.
The problem is that along the distance traveled by the sword, the distance between the sword and the enemy child object keeps increasing. Shouldn’t it be stuck to the sword and stay this way no matter where the sword goes?
This is a 2D game using Physics2D and both sword and enemy have RigidBody2D components if that makes a difference. I also made sure they both have the same mass values and gravity is set to 0 in Physics2D settings.