UnrealScripterAI
Discord ↗
Link Copied to Clipboard
×
"script for ripple effects on water"
// Code to generate a ripple effect on water surface for (int i = 0; i < VertexCount; i ) { // Get the distance of the vertex from the ripple origin float Distance = (VertexArray[i] - RippleOrigin).Size(); // Calculate the height of each vertex based on a sine wave equation float SinValue = FMath::Sin(Distance / RippleSpeed Time * RippleFrequency) * RippleAmplitude; VertexArray[i].Z = SinValue; }