How do you make a floating enemy? Can it be done with interp to movement?

I’m trying to make an enemy that floats up and down. I tried using Intep to Movement to make it move between to points (One in the air and one just off the ground) however it is very glitch and vibrates as it moves.

I have made sure gravity is turned off on all components as is simulate physics.

If anyone knows how to make it either not glitch or another way to achieve this it would be greatly appreciated.

This seems to work but using this blueprint in my game the enemy just seems to vibrate on the spot. I think it is because The values for the Z are wrong.

I wanted it to start at 6000cm and then hover up to 7000cm.
I used these numbers for the Start/Stop values.

I changed the blueprint to see what was going on. For some reason he embeds himself in the floor (Even though both simulate physics and enable gravity are off. When the blueprint then begins he move to where I placed him in the scene and vibrates on the spot.

I have a couple of questions that will help me narrow down your issue!

  1. Can you reproduce this issue in a new project?
  2. If so, could you provide a detailed list of steps so I can recreate the issue on our end?
  3. Could you provide screenshots of your enemy’s event graph and anything else related to your issue?

Thanks!

I created an new project using the 2D sidescroller default.

I created the blueprint twice times. Once for a 2d character blueprint and again for an actor blueprint.

The 2D sidescroller character vibrated in the air meanwhile the actor floated in the air motionless.

After playing with the variables I have found they are floating at the Z Start variable

Gibospartan,

Im going to make this post a new answer since I will be posting new information for your issue!

For your 2D sprite, you will want to use interp to movement, I tested mine using one of the platforms in the 2D sidescroller template to check. Here are my repro steps to get a platform moving

  1. Select your sprite / your 2D enemy
  2. make sure the object is set to movable
  3. add an interp to movement component to it
  4. Click on the newly created component to bring up its details panel
  5. Add 2 members to control points
  6. Leave the first point alone, set the second point to its highest point via the Z axis
  7. set your duration (this will control how long it takes to get from point 1 to point 2)
  8. Play in Editor to test

Hope this helps!

You missed one thing. I did what you said and the character floated up and then disappeared. I however realised that the interp to movement behaviour type was set to one shot by default. I just changed it to ping pong and now it is working perfectly. Figured it out between the two of us :wink:

I will point out however that their seems to be a bug with when making 2d character blueprints float with interp to movement. Because of this I have had to make the enemy a different kind of blueprint.