|
I'm trying to implement very very simple water bouyancy. My script checks whether the object is under the water level, and then applies a force upwards if so, or not at all if it is not. Here's my script:
My problem is that with gravity enabled on my bouyant object, the object goes underwater, the boolean returns true, but no force is being applied back upwards again. This exerpt of code is in a Can you help me please?
(comments are locked)
|
|
Force 10 Vector3.up * -Physics.gravity.y can do nothing visible to object with mass 1000+.... use rigidbody.AddForce(Vector3.up * -Physics.gravity.y, ForceMode.VelocityChange); instead Perfect. Thankyou!
Aug 07 '12 at 09:27 PM
Fishman92
(comments are locked)
|
