- Home /
Swimming around Underwater? (Not Image effects)
Ok Unity folks I require a bit of help.
So far I made a very simple underwater script.
Activating bubbles,image effects etc; I also added sound for going in and coming out.
But my question is how do I make my character rise from the ground. My character is in FPS and I would like something like this.
The character can swim around freely sort of like 0 gravity.
For this I tried making a boolean and adding a rigidbody to my character. When he was in the water the boolean would be toggled and therefore unchecking the gravity to create an underwater sensation. Unfortunately this did nothing than merely cause complications and leave my player sinking to the bottom.
I am using OnTriggers to check if the player is in the water.
I would appreciate if someone could point me in the right direction. I just need a bit more understanding on this subject.
Answer by GerardQ · Mar 05, 2013 at 03:25 PM
rigidbody.AddRelativeForce (0,your_buoyancy_force_value, 0) should do it for you.
Your answer
Follow this Question
Related Questions
Multiple Cars not working 1 Answer
UnityEngine.Input.GetMouseButton(1)) issue 1 Answer
dont instantiate clones 1 Answer
How can i make artificial gravity for Kinematic Rigidbody? 3 Answers