Click on an object to sit

Hi. I’m trying to make it so if I click on an object ,like say a chair, that it will change the character’s position and rotation and seat the player in it.

I think I can manage to trigger the animation once the player is in the correct position. My problem is how to click the object and have the player move to that position and rotation. Can anyone help me out , or maybe let me know what kind of tutorials I should be looking for to achieve this?

Thanks in advance.

public Transform animationPos;
public Animator anim;
public Transform player;

    private void OnTriggerStay(Collider other)
    {
        if (Input.GetMouseButtonDown(0))
        {
            player.position = animationPos.position;
            player.rotation = animationPos.rotation;

            anim.SetTrigger("your animation trigger name");
        }
    }

Add the script to your chair
Create an empty game object (animationPos) and set its position and rotation to values that work with your sitting animation.
set up a trigger that encompasses the chair
Reference your players animator and trigger the sitting animation when the mouse is clicked