Control different parts inside a blueprint (ship)

I am making a space ship and I want to have it to be in a single blueprint that the player can walk into and presses a button to start the ship and control it from inside. My issue is that I cannot figure out how to but a button inside that the player can press with a line trace. I tried to compare the hit components, but that can get pretty complicated and spaghetti-esque.

The only thing I can think of to be similar to this, is the Lethal Company ship (the only game I played)

If anyone can help, I would be very appreciative.

1 Like

There’s probably a hundred answers to this, but it’s totally possible without a big mess.

Basically, the player does a line trace and can pass the component hit to the spaceship BP. The spaceship then compares this with a list of known interactive components. If it’s one in the list, call the appropriate event.

It’s also worth noting, that if you write a standalone blueprint that responds to having items clicked ( like a button ), you can add this as a child actor to the spaceship blueprint, but still use it as if it’s standalone. What I mean is, no messing with child actor casting and so on.

If there’s < 10 interactive things in the spaceship, that’s fine. If there are hundreds, this would not be good :slight_smile:

2 Likes

Thanks. I’ll try to compare components such as, button mesh or wheel mesh and see if it’ll be efficient.

1 Like

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.