View Single Post
# 47 14-06-2004 , 09:52 AM
Registered User
Join Date: Nov 2002
Location: Pakistan
Posts: 57
well this script can help u float particles on ocean surface like a foam and can be manuplate as wake happens u see more control..over ur foam



//float particles on ocean surface (runtime)
//get ocean height at current particle position
vector $ppos = foam_particleShape.position;
float $pu = $ppos.x;
float $pv = $ppos.z;
float $cpoint[] = `colorAtPoint -u $pu -v $pv oceanShader1`;
//when particle position lower than ocean, stick to ocean
if($ppos.y <= $py)
foam_particleShape.position = <<$pu, $cpoint[0], $pv>>;


hope it helps !


Learn the Rules|Then|
Burn the Rules Book