having objects float in water
Blitz3D Forums/Blitz3D Beginners Area/having objects float in water
| ||
I've been trying for quite a while to make a entity or object float in water how would you do it? |
| ||
There is an excellent example of this in EasyTok. |
| ||
if water is a dynamic mesh: maybe depending of the size of the mesh => one or more linepick to get the position of the water, and the normal of the picked surface , and then align the mesh to the coordinates returned. If more picked tested, just have to get the middle of each . If static water, you'll want to simulate the roll ... => just use a sinusoidal rotation depending on time . |
| ||
http://www.blitzbasic.com/codearcs/codearcs.php?code=67 try this..its the MADJACK pitch & roll demo- you set up pivots at the front, back and two sides of the object and set it collide with the terrain mesh. If you have water mesh with animation, ( a rolling wave ) the ship will rise, fall and tilt with the water mesh surface. |