Attach Player to Cube using Fixed Joint on Collider enter

I tried making a script looking like this:

private void OnTriggerEnter(Collider other)
    {
        if (other.gameObject.CompareTag(Constants.TAG_PLAYER))
        {
            Debug.Log("Attaching");
            GetComponent<FixedJoint>().connectedBody = other.gameObject.GetComponent<Rigidbody>();
        }
    }

I then add this to a simple 3D Cube with a default box collider. However when I then walk onto this cube with my player, it start behaving really weirdly, the connected body is correctly added on enter, but the physics of the Cube start acting really strange, jumping all over. Which it doesnt without an attached joint.

1 Like

did you solved it?