The following code is some ive been playing with to wiggle some verticies up n down. Even with just one quad 32x32 'water' type it slows down real bad. Anyone know why? or is it because the vertexcoords command is slow?
For wa.water=Each water
wa\phase=wa\phase+wa\speed
mesh=wa\h
la=0
n_surf = CountSurfaces(mesh)
For s = 1 To n_surf
surf = GetSurface(mesh,s)
n_vert = CountVertices(surf)-1
For v = 0 To n_vert
la=la+wa\speed
VertexCoords surf,v,VertexX(surf,v),(Sin(wa\phase+la)*wa\amplitude),VertexZ(surf,v)
Next
Next
UpdateNormals mesh
Next
For wa.water=Each water
wa\phase=wa\phase+wa\speed
mesh=wa\h
la=0
n_surf = CountSurfaces(mesh)
For s = 1 To n_surf
surf = GetSurface(mesh,s)
n_vert = CountVertices(surf)-1
For v = 0 To n_vert
la=la+wa\speed
VertexCoords surf,v,VertexX(surf,v),(Sin(wa\phase+la)*wa\amplitude),VertexZ(surf,v)
Next
Next
UpdateNormals mesh
Next