Simple hover-effect on Z-axis

Hi all

I try to do a hovereffect in midair.
I followed the tutorial here: [Adding a Hover Component | Live Training | Unreal Engine - YouTube][1]

My problem with this is that i don’t have any ground/floor. I want my objects to just hover anywhere on the z-axis.
-10/+10 up and down.
It seems that this is somehow not so easy to do. I tried to do it with a set location but the problem here is the object just jumps and doesent hover. Plus I have to do it for every object.

Any idea how to do this? Other than the one in the tutorial?

Thank you and all the best

2 Likes

I’d do this:

Create a timeline with a sinusoidal curve:

Make sure to set the right length and tick the “Loop” box.

Next, this:

You can use Lerp instead of Ease if you want. Note that my example is in a Level BP, that’s why I have a reference to Cube. In your Actor BP you have your Target as Self and it should work.

P.S. To split a vector variable into float components, right click on the yellow output pin and select Split Struct Pin.

Thank you! This helpt me to solve the problem.
My Actor_BP: