Making a hovering ship that can follow hill slopes

I have created a ship using blueprints that will hover above the ground. However I can’t figure out how to get it to fly over hills and slopes. It is set up right now to move up more when it gets closer than its desired distance to the floor, but when it is going very fast it doesn’t do it fast enough and hits the floor. Is there some way to detect the slopes or another method to keep it from colliding with the floor?

Hello VoidGoat,

I have an example for you that will get you started in the right direction. Please remember this is an example meant to point you in the correct direction and it’s not meant to be an exact solution. I hope that this information helps.


In this example I am setting the rotation of an object so that it’s relative up direction in perpendicular to the ground. The make Vector node may need to be swapped out for a “Get Actor Up Vector”. From there you will want to multiply it’s result by a negative number equal to the distance you would like the line trace to travel (this will ensure that the line trace always fires out the bottom of the object).

Make it a great day

I have tried to do something similar to this in the past but it didn’t work very well because it would only work at slower speeds. At faster speeds it would rotate but it wouldn’t have time to move the ship in the rotated direction. I will mess with to see if I can get it to work.

  • not relevant, but I’m just wondering whether a real hover ship wouldn’t crash and burn if it ran at a slope at high speed, and if not, what would be the desired behaviour?

Perhaps you would like it to just move up faster, in which case you just need to adjust the interpolation speed. If the desired behaviour is different from just having more agility in changing its height, perhaps you could describe how you would like it to move? Also a screenshot of your current setup would make things clearer :slight_smile:

Hi, resurrecting this thread really quickly because rotators confuse me and this solved my issues but I don’t understand how/why.

In the example, the target rotator is created via a Make Rot from ZX node - why Z and X? Z is clearly the up vector, isn’t X the right vector? How does this result in the correct resulting rotator being created?