Can i lock the first person controller rotation?

So, i’m making a 2D game, and I want to have crates rolling around, but when you collide with an object that is like ""… Not straight! Dunno what to call it… anyways, when he collides with it, he turns so slightly, and the camera turns with him, how can i stop HIM, not only the camera, but him, to rotate?

You could use the Freeze Rotation constraints on the crate’s Rigidbody component.

I’ve done that, but the crates look so boring when they don’t spin, that’s the thing.

I assume you’ve tried just constraining 2 of the rotation axis and leaving the z-axis free?

Anyway, why is your camera rotating with the crate? Is your camera a child object of the crate? If that’s how your making your camera follow your crate around the scene, then I suggest handling it by script instead, so you don’t get this rotation problem.

On your camera, have a script with something like this:

public Transform myCrate;  // Reference to your crate object
public Vector3 cameraTrackingOffset = new Vector3(0,0,-10);
public Vector3 cameraEulerRotation = Vector3.zero;

void Update()
{
// Move the camera position to be inline with the crate.
transform.position = myCrate.position + cameraTrackingOffset;
}

Move your camera object in the scene heirarchy so that it is not a child of your crate object, and assign the crate reference to this camera script.

The camera isn’t a child of the crates, its a child of the FPS controller, and when he turns, the camera also turns and just makes it all look wierd.