Freezing Transforms

Hi everyone, is it possible to freeze a gameobject’s transform axes? I have a standard first person controller and I would like to make it so it can’t fall in the y axis.

If you are using de First Person Controller, go to the Character Motor Script (Inside your First Person Controller) open the Movement, clicking on the arrow, and set Gravity to 0.

But if you want to freeze another gameobject you can use transform.position.y = 0; and change the y value, or using rigidbody, just freeze on the constrains options

If you have a First Person from the Standard Assets then you should be able to disable jumping and set the gravity to 0 in the inspector variables.

If your making yourself a custom First Person Controller be sure to put this in your script:

function Update ()
        transform.position.y = 0; //Or whatever height you want