I am trying to make an object hover in mid-air without requiring a base underneath. To clarify what I mean by hover, I mean a simple animation where the object bounces up and down in mid air.
I’m guessing it’s quite simple and that it essentially involves coding a start value and an end value on a Z axis on an Actor’s location, and making it loop, but I’m quite new to Unreal and I’m not sure how to go about this.
Thank you in advance for any help! If any clarification on this question is needed, please let me know.
I will say, though, that I modified my blueprints, which are applied in my EventGraph of my object. You will notice that I’ve used GetWorldLocation rather than GetActorLocation. I’m curious how you created your blueprints as Components seem to not allow Timelines?
Cool. Hey, I’ve noticed that if I move an Actor up and down on the Z axis in the level editor, this blueprint will make the Actor reset its original position on the Z axis. I’m guessing I need to make the Lerp values relative to the Actor’s current WorldLocation, but I’m getting no luck messing around with ‘float - float’ nodes, etc.
Do you know how to edit the Blueprint so that I can move the Actor up and down on the Z axis in the level editor to change its default Z axis position for the hover?
If they’re the same actor, then of course you can just put more than one in the level and instance them that way.
If they are conceptually seperate items, but need to share the floating functionality, then make an actor blueprint which knows how to float ( can be parameterized ), and then inherit from this to make the child blueprints.
( right click on the BP in the content browser, and choose ‘create child blueprint class’ )
EDIT: If you’re just making different meshes float ( for example ), no need to use inheritance there, you can just make the mesh a parameter.
Thanks for that! Again, this blueprint is super useful and is exactly what I was looking for. I have ticked this question as answered - thanks for pointing that out.
Hopefully this is my final question on this topic: I have multiple Actor blueprints, and I want to apply the same hover effect with the same variables that I have made to each individual Actor blueprint. I was wondering if something like making a component is possible, so that I can place the component into each Actor blueprint? Or is it easiest/quickest to simply duplicate the hover effect code into each Actor blueprint?
Please let me know if any clarification is needed on this question.
hey, so i did the same thing, but when i hit play, it disappears but i can tell it’s running cuz i clicked on it before play, and i could see the values on the z axis changing