Make Flying Pawn Land?

As the title says I want to make the Airplane / Ship/ Pawn drop from flying.

I can describe it as this:

I have an actor called “LANDING ZONE”.

A separate actor with a Sphere Collision component.

Pawn / Ship approaches a a sphere.

Here’s what I want to happen:

Once pawn overlaps the sphere, the sphere sends the message to landing zone to attach the ship / pawn to the location of the Sphere, and the Sphere with the Ship attached to it, will attach to / move to the location of the Landing Zone.

Any tips on how to approach this would be greatly appreciated.

I will post up photos of the setup I had in Blueprints

You only need one actor, the landing zone, which has an overlap sphere.

When it detects the ship overlapping, it disables the player controls, and uses a timeline to correct the coordinates of the ship and land it.

Honestly I do not know how to do that.
I had done a setup for an Elevator and thought it’d be the same thing; just making an object move in a different direction, right?

Like this:

What if I want to control when the Timeline plays? I tried making the Timelines a custom event and making the Ship actor activate the Timeline but this led to no effect.

I meant when the Actor overlaps the over I press a button and then Timeline starts?

like for instance I have the timeline as a Custom event, and in the overlapping Actor I assign a button that when pressed, casts to the Landing Zone to call that custom event.

It should be able to play that timeline then shouldn’t it?

It you’re still controlling when the timeline is playing, it will have no effect.

Easiest thing is put the code in your spaceship. When it overlaps a landing pad, stop doing all the control code, and just play a timeline to assume the position of the landing pad.

EDIT: You could also associate it with a keystroke.

Okay I managed to get something; I put in a get all actors of class instead of casting to the landing zone actor. I am wondering if this get all actors of class is safe to use though … it worked but is this approach best recommended?

You don’t need ‘all actors’. Make the landing zone one big collision sphere. When your ship gets an overlap, it can cast to check it’s a landing zone, then use a timeline to land.

1 Like

Everywhere in the ship where there is code that controls movement, you need to put:

I made a ‘landing pad’, which is basically just an enourmous collision sphere in a blueprint ( you can see it ). Then, in the ship, I put this:

Result:

336234-ezgifcom-gif-maker.gif

Tried that; didn’t work.

I tried using a button to do this and nothing happens.

I had an interaction system setup but it’s not responding.

Also my timeline jumps too quick. I set the rate and it’s still quick.

Okay, I managed to do something else.

I made the Landing zone an actor that can be attached to the flying pawn as a component.

Basically when I press a button, it will spawn the actor component.

If the actor hits nothing, the pawn is not cleared to land, if it does hit a solid ground, the pawn will land. Works really well.

I got a timeline to smooth the transition.

My only issue is the rotation of the ship. I set the pawn rotation to 0,0,0, so when it lands its leveled, but it instantly snaps to the rotation axis too quickly. I wanna make the pawns’ rotation much smoother when rotating, basically.

Ok, so you can just add the rotation change to the timeline chain.

Great! I tried this before with ease and Rinterp and float and it snapped to the rotation too quickly; this wouldn’t bother me but the ship is quite big for its size and just made it seem off.

Now I added ease and fine tuned the A and B float values and its so much smoother now. Thank you!

on a separate note, when I enter my ship and start to move forward it will move forward, but once I get out of the ship and return to it, it barely moves. Just drifts off VERY slowly.

The last part I’m not sure about I’m afraid.

Is there something you’re doing to land it, that you haven’t turned off afterwards?

Well it has been doing this before I had even began working on the landing zone actor.

Can you show the code you use to make the ship move along?

It’s basically the Pawn Default. Everything worked from the start so I tried to not tinker with it too much.

][1]