Mechs and getting in them

Hey everyone, I really want to make a system where I can enter a mech and have it move about but I cant figure out how to do it, I have tried making it like a vehicle you can drive but cant get that to work and I have also tried making it a pawn but I cant understand any of it

Hey @J0SHCRAPS!

If the mech’s gonna behave like a normal character, utilizing the movement component, you should have it as a character class instead of a pawn. (Actor is not an option btw) You can handle the equipment process just like how you’d do for a vehicle tho.

So what you wanna do is to first possess the mech, and then either destroy the unpossessed character or adjust its transform if you want it to sit on top of the mech, for example. (But even in that case I’d recommend destroying it)

You can check out this tutorial on switching characters:

And add the optional adjustments we went over if you like :blush:


Oh and of course, you might ask how to spawn the character back after destroying it. Here’s an older screenshot of mine from another topic:

Handle this inside the level blueprint, not inside a character blueprint.

Like I said I made this for something else so you shouldn’t replicate this exactly. Remove the first Spawn Actor node, and just possess the mech from the reference. To get a reference of it, you can select your mech from the viewport, head to the level blueprint, right click on an empty space inside the Event Graph, and there you’ll see it. This should also be shown in the tutorial I provided btw. And also, you might wanna first check the distance between the two characters and only allow a switch if they’re close enough to each other. Or an overlap check if you like, or any other method of your choice.

Hope this helps! :innocent: