Mixing FPS and Third Person style

I just don’t succeed to create this kind of movement and camera.
I think it’s a mix of FPS movement with third person camera because we move the player left and right with camera, the player only turn his body but don’t rotate, when you go back the player don’t rotate he just go backwards, and if you don’t move, the camera rotate the player ( I don’t want free look camera ).
That’s why I think this is a mix of FPS and TPS, in FPS the player don’t rotate to go backward you make it with mouse and if you go left and right he don’t rotate too, and TPS because this is a third person look:

I tried in so much different way, with and without cinemachine ><

Please help!

It’s just an FPS camera, except the camera is moved backwards. Then you need some strafing animations.

My problem is the camera, not really the movement, the movement are basics, but I have some difficulties with the camera orbit in cinemachine or code.

In cinemachine Free Look not works as expected, and don’t know how to set up virtual camera for it.
I have to do it with code, but a simple FPS camera don’t orbit around the player.
It’s easy if the camera is just fixed in back of the player, but I need to be able to look up and down too.

Now that I think about it, it’s not exactly like FPS. You should setup you player like this:

– Player
----CameraRotator (Position: 0, 1, 0)
------MainCamera (Position: 0, 0, -5)

Basically, “Mouse X” input should rotate Player, “Mouse Y” input should rotate CameraRotator.

This is a basic script that should go on the Player.

using UnityEngine;

public class CameraTest : MonoBehaviour {

    [Header("References")]
    public Transform _camRotatorT;

    void Update()
    {
        float mouseX = Input.GetAxis("Mouse X");
        float mouseY = Input.GetAxis("Mouse Y");
       
        transform.Rotate(0, mouseX, 0); // Rotate player left/right
        _camRotatorT.Rotate(-mouseY, 0, 0); // Rotate camera parent up/down
    }

}

Hm I see! I’ll try this! w

I’ve blend so much part of scripts for test etc I’m a lil’ bit lost now, Its doesn’t work, the probleme must be in my code, but what a mess. I’ll have to restart from 0 I think ><

Ok, now your script is working perfectly, the camera works!
The only issue that I have is that my character go forward, backward, ok, but he go left and right without rotating.
I need to rotate him only when you go left and right, not when you go backward :eyes:

Edit: Rotate with keyboard obviously w