- Home /
Unity Water (Pro) raycasting for bouyancy
Bouyancy: the ability or tendency to float in water or air or some other fluid.
In unity, many players wish to give objects the ability to float using various bouyancy formulas. The easiest solution is creating a plane, or setting the water at a particular height. With unity's pro water, there are programmatic waves that will not have a collider. The question is, what steps do I need to take to get the height of water from a given point. In the first case, we will use the player camera's location. If the player is on the water surface (swimming && !submerged), we want to apply a snapping technique to keep the player on the water surface. In a future case, we will be adding a boat with multiple point checks.
In addition, the water script seems to ignore natural wave tendencies. I might like to make changes to this at some point with a few algorithms. The most preferable choice so far has been the Water4 Example (Simple).
Your answer
Follow this Question
Related Questions
A node in a childnode? 1 Answer
C# Raycast 2D GameObject follow Mouse 1 Answer
Raycast stops when false, even in update() 1 Answer
First Person Controller Target Shooting With Gun 1 Answer
How to make BIG waves in Unity3D 0 Answers