FPS to move on air ? How ??

Hi,

i want my fps character controller to be able to move on air and not on ay surface, how is it possible ?
any simplest solution to it ??

Thanks in advance

Just comment out that line where gravity is applied.
It should be like this:

movement.y+=Physics.gravtiy.y;

thank bro, worked, 1 more thing…

i want no collision in my scene, what to do ?? i dont want to disable collision of each object manually

You want to disable the collision only for the gameObject having character controller attached to it, right?

every object, whatever is on the scene i wanna disable collision so that my fps cam move anywhere without any barrier

You can enable the isTrigger property of every collider in your scene then you would not get the collision feeling but can still get the collisions(if require in any case.)

i dont want to do each 1 of them, i want to do all in 1 line of code

only tick your FPS Player as a trigger, or temporarily remove collider of your FPS Player.

The trigger trick does not work with CharacterController. All you can do is you could use Physics.IgnoreCollision. But then you have to add this code to every object except the object CharacterController.

create a new physics layer for your player and set the collision matrix to not collide with anything