I'm currently working on a physical water system for Unreal. To represent the water surface, I have a simple flat grid mesh that I then apply a material to which has a formula for world position offset.
The formula currently is pretty simple, I just have a simple sine wave powered by world X position and elapsed time, however despite both formulas being, as far as I can tell, the same, they give different outputs.
As you can see below, both formulas perform the same operations, and both are powered by the same input, world position and Game Time in Seconds. In theory, the material (second-last image) should be dividing X position by 2000 and multiplying time by 0.1, just as those values are in the material, however instead the closest I could get to having both values line up is 314* and 0.625.
It's important that these values line up, as the blueprint version is meant to be used for buoyant objects to make sure they stay on the surface of the water, and probably other calculations as I progress.
Does anyone know why these formulas don't line up like they should? Does math work differently in the material editor? Does Absolute World Position give values in a different scale compared to Actor Position?
*I thought this might be 100 * PI, but that doesn't seem to line up exactly either so may be a coincidence.