A simple wave simulation, a strange problem occurred when using time

I implemented a simple wave simulation.
I use a float to control the angle

When I use time instead of angle, after a period of time, the Plane will shake violently.

In my understanding, there should be no difference between time and float, why does this happen?
What happened?

Hello and welcome :slight_smile:

First of all, using Y compute directly on a cube is not the best to debug.
In the shape selector, you can add a custom, for example I used this grid :
grid.zip (15.0 KB)
(Unzip to grid.glb)


Now about your wave :

I think problem come from your wave compute. Your angle is not right, depending on its value, the speed changed, which is why it goes crazy using time…

Here is a simpler way of doing it :

Taking X & Z → Put in a 2D Vector → Rotate 2D with angle → Use X → Compute Sin with speed, time, etc


And now, with time in place if the angle, it’s ok :

3 Likes