Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Newcomers DBPro Corner / Water Code?

Author
Message
Kandlaker
21
Years of Service
User Offline
Joined: 11th Feb 2003
Location:
Posted: 17th Jun 2003 01:58
Hello,

What's the shortest way to create water waves using the matrix?

Jacob
hexGEAR
21
Years of Service
User Offline
Joined: 3rd Nov 2002
Location: Naytonia
Posted: 17th Jun 2003 04:58
the problem with a matrix is that you can't really scroll it's texture like an object. However you can ghost a matrix so using multiple layers you can pull off a pretty descent fx. If you want to create waves then i'd suggest you play around with SIN() and COS() functions applying them to the individual matrix points in sequence.

to live is to suffer, to survive, well, thats to find meaning in the sufferening.....
GameKit
21
Years of Service
User Offline
Joined: 6th Mar 2003
Location: USA, Staring Blankly at a Computer
Posted: 17th Jun 2003 06:59
to make it look like the tide is going in and out try something like...

position matrix [matrix number],0,(sin(timer())*[crest - trough])+[average wave height],0

crest being the highest point of the tide and trough being the lowest point...so the code would look something like...

position matrix 1,0,(sin(timer())*10)+30,0

this will only simulate the tides...not waves... but i hope it helps anyways...

Anyone Can Destroy...But Few Can Create...

Login to post a reply

Server time is: 2024-09-20 11:53:44
Your offset time is: 2024-09-20 11:53:44