Water waves

About advanced scenes, and the Thyme scripting language used in Algodoo.

Water waves

Postby Kilinich » Tue Jan 15, 2013 3:07 pm

I've find that way of simulating waves is the best in term of realistic/lag.

Rating: rated 6.3
Filesize: 37.49 kB
Comments: 5
Ratings: 4
download


Waves simulated by two polygons with scripted pos:

pos = {[(sim.time * 2) % 10 + 10 * math.toInt(Scene.Camera.pan(0) / 10), 0]}
and
pos = {[5 + ( - sim.time * 3) % 10 + 10 * math.toInt(Scene.Camera.pan(0) / 10), 0]}

that waves pattern are always follow camera.
Dream of Algodoo as game development engine...
User avatar
Kilinich
[Best bug reporter 2010]
 
Posts: 2098
Joined: Mon Aug 31, 2009 8:27 pm
Location: South Russia

Return to Thyme scripting

Who is online

Users browsing this forum: No registered users and 3 guests