- Home /
How to make the first person controller float to the direction it wants?
How to make the first person controller float / go to the direction it wants just by pointing at it? I have a first person controller as a whale in an underwater environment. I want to make it be able to 'swim', so that it is not walking like human at the bottom of the ocean floor. Thanks!
Answer by Loius · Apr 08, 2013 at 05:46 AM
Controllers aren't meant to rotate away from their up-down orientation; you'll probably want to go to a kinematic rigidbody (or you can just rotate the model, but that might run into funky clipping issues).
But, the common way is to use the transform's local directions as movement guides. For example:
if ( Input.GetKey( KeyCode.W ) ) transform.position += transform.forward * speed * Time.deltaTime;
Your answer
![](https://koobas.hobune.stream/wayback/20220613095859im_/https://answers.unity.com/themes/thub/images/avi.jpg)
Follow this Question
Related Questions
Minion floating healthbar over the head 1 Answer
Floating object on the water and stand on it. 2 Answers
How to attach a canvas to a game object properly? 1 Answer
Player floats in air when jumping 1 Answer
first person controller prefab 2 Answers