Setting Up Vector and Still Rotating the Character

I want to set the up vector of my character to match the terrain below, but I also need to be able to rotate it along the local y axis with the mouse, ie a first person controller. I can set the up vector fine, but I don’t know how to rotate the character with the mouse at the same time.

The code that I am using is pretty simple: transform.up = rotations; where rotations is a vector3 direction. Currently I rotate my character using the Rotate method and doing so in local space. Any help would be appreciated!

You could try to rotate the character by using transform.RotateAround.

In update, after setting the characters up vector, just call:

transform.RotateAround(transform.position, transform.up, rotation Input.GetAxis(“Mouse X”) * rotationSpeed * Time.deltaTime);

where rotationSpeed can be used to define the turning speed.