Text Sine Wave?


So im trying to replicate this effect

And im very much nearly there, I created a new UMG Widget that holds a text character so i can manage each text character location individually and then use sine math to add the " wave " effect, However i cant get it to work well…

So im using this code on my widget

void UGalileaDialogueCharW::NativeTick(const FGeometry& MyGeometry, float DeltaTime)
	Super::NativeTick(MyGeometry, DeltaTime);
	FVector2D NewPos;

	UCanvasPanelSlot* Panel = UWidgetLayoutLibrary::SlotAsCanvasSlot(this);
	NewPos = DefaultLoc;
   // i is a unique identifier for each text character
    NewPos.Y += FMath::Sin(DeltaTime + i * 30.0f) * 6;
	Panel->SetPosition(NewPos );	

And it generates this


So i get the effect i want, however for some reason ( and even though its being done each Tick ) the wave remains static. No movement is done at all, i alredy tried changing the parameters in the FMath::Sin but the result is the same… Any help is certainly appreciated

Yeah, you need like a time or counter to add to the Sin value/offset to make it move… Otherwise it will be static…
Deltatime does not count upwards, its just a value to compensate for movement between frames…
… use a function to get the passed time instead…