Disable everything but the camera LookAt

sythe

Member
I'm creating a flight behavior and I want to temporary disable all controllers, but the player must be able to keep controlling the look-at-mouse behavior, any help is welcome
 
You can disable positional input on your ability, but keep rotational input active. This way you can't move the character, but the camera still rotates.
 
But how would I move if I disable the positional input? What I need is to change the way that the character move, instead of walking (move forward in a constant direction) I need to fly (move forward based on the direction that I'm looking), also I disabled all the abilities and removed the gravity from the locomotion script but I still not being able to move it up and down using neither inputs nor dragging gizmos os scene, do I have some option to temporary remove the locomotion script?
 
UCC is basically a 2D controller and does not allow vertical movement by default. The most flexible solution is to write your own controller script like for the drive ability. Here the car is moved by a separate controller script while the character is moved with the car. In your case you would have an empty game object that could also be moved vertically.
The alternative is to have an ability that checks the input in the Update method, and moves the character manually through the SetPositionAndRotation method of the character locomotion component.
 
Top