- Home /
How to find the height of a mesh at any point (x,z)?
Hello, im trying to make a buoyancy model and for a flat plane it works well, however i want it to be able to react to waves and any water surface simulation so i need to find a way to find the height of the mesh at any point so that the volume is correctly calculated as well as the center of buoyancy.
I used perlin noise to modify the mesh quickly (just for testing). The collider stays flat while the mesh has been modified. so (unless there is a way to raycast agaisnt meshes) any raycasting wont work.
I could try use the y values for modifying the mesh to use in the calculations but i worry that this is too rigid and would have to be recoded for different surface simulations.
Any help would be much appreciated.
Thanks.
Your answer
Follow this Question
Related Questions
Object buoyancy in water on different water levels? 1 Answer
How to implement water buoyancy 1 Answer
3d Water Simulator 1 Answer
Making an object float in water 2 Answers