The cube should settle automatically - you just need to make sure that when in water it's upwards acceleration / force ( bouyancy ) is slightly higher than it's downwards acceleraton / force ( gravity ).
Just vary the bouyancy factor to have objects surface quicker or slower etc..
Having it stop after a set amount of iterations won't look very good imo.
Stevie
const TIMESTEP# = .005 const Gravity# = 9.8 global Bouyancy# = 10.2 [loop] Acceleration = Acceleration - Gravity If entityy( CUBE ) < WATERLEVEL Acceleration = Acceleration + Bouyancy endif translateentity CUBE, 0, Acceleration * TIMESTEP, 0 [loop]
Just vary the bouyancy factor to have objects surface quicker or slower etc..
Having it stop after a set amount of iterations won't look very good imo.
Stevie