Follow Player with front view and rotation - newbie

Hi Guys, iam a newbie and need help. i want to show my player in the inventory and i use rendertexture for that. I want the camera to always follow my player and also rotate with them. The camera should always look at the player from the front. I need to see the player from the front to be able to display him well in my inventory.

Thanks for the help :slight_smile:

Thats my code;

using UnityEngine;

public class FollowRender : MonoBehaviour
{
    private Player player;
    public Vector3 offset;
    public float turnspeed = 30.0f;
    public Quaternion target;

    void Start()
    {
        player = GameObject.FindGameObjectWithTag("Player").GetComponent<Player>();
    }

    void Update()
    {
        target = player.transform.rotation;
        transform.rotation = Quaternion.Slerp(transform.rotation, target, Time.deltaTime * turnspeed);
        transform.position = player.transform.position - new Vector3(3, 0.9f, 3);
    }

}

Can you just make the camera a child object of the player? It will then always keep the same rotation/position relative to the player