having objects float in water

Blitz3D Forums/Blitz3D Beginners Area/having objects float in water

seferey(Posted 2006) [#1]
I've been trying for quite a while to make a entity or object float in water

how would you do it?


Boiled Sweets(Posted 2006) [#2]
There is an excellent example of this in EasyTok.


Bobysait(Posted 2006) [#3]
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 .


gpete(Posted 2006) [#4]
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.