Hey,
I’m creating an ocean shader and need to replicate the water movements in blueprints to achieve buoyancy for actors.
What’s really weird to me is that the Time node in materials and the “Get Time Seconds” (or any other game time blueprint node) seem to not match.
I would understand if they were just offset because they weren’t synced but the blueprint time seems to run significantly slower which is really weird.
By some testing I found that it seems to be exactly 2*PI times slower.
I use the same sine (radians) in both material and blueprint and here are both functions to calculate the water height (I reduced it to the simplest waves possible).
I uploaded both functions as pictures. These versions sync perfectly and as you can see I multiply the time by “2*PI”. The only other difference is the “+ Water Height” in the blueprint version which just shifts the actor to the water plane height. The “Pos” input is the actor’s world position and the “Height” value gets used to update the actor’s Pos.z on tick.
I’ve been staring on this for the past hour and can’t figure it out, it seems so strange to me.
Obviously I could work with the 2*PI Version for now but firstly I want to be sure that they sync perfectly and still do so after an arbitrary amount of time, secondly this just confuses the hell out of me and I’m just interested in a solution.
Has anyone else ever noticed this? Am I just a little tired and am missing an obvious mistake? Is it my engine or does the same thing happen for someone else?
I would appreciate any feedback.
Kind regards,
foodius