Efficient, Multiple Interactable Components.

Hello!

I am trying to create a ship that has lots of doors and buttons. My goal is to be able to control each door and button with a simple “Use” key. I currently have a line trace that initiates a blueprint interface and sends the component hit into the interface part. Inside the interface the scene component is checked for the tag “Interactable”. If it has it, it will call an event inside the ships Event Graph to do something e.g. Open the door.

This feels like a very sloppy and inefficient solution.

What I really want to do is to have a door blueprint pre-made, add it to the ship and that is that. But since you cant add a blueprint to a blueprint this is not possible, my current solution only supports one kind of interactable object and the more I add the messier it gets. If someone has a solution or suggestion, please help! :smiley:

Thanks in advance!

I would suggest making the ship a skeletal mesh and having a bone on each door “side rotation point (Where it swings)” and then when needed just rotate that bone to open it.

Alternatively you can add static meshes in, with the pivot point center, on the edge where it swings open from anywhere you want and then take them all and create an array out of them then you could do on interact/line trace/beginoverlap it does a ForEach loop to find out which door it is and then rotate that door along its Z axis.

It does get to be a very messy solution when you need a moving vehicle with many doors. What I did in my submarine game is on the deck it was a seperate model that just had a few usable doors then down below where there was more doors I switched to a different, static mesh whne the player climbed down the hatch (since you cant se the water anymore). This mesh wasnt moving in the physdical sense, only the guages and UI “faked” the movement and looking through the periscope faked the appearance of movement.

This makes it easier to place blueprint doors in a level since you ship is stationary. You could have that level preloaded at all times and then just switch to it when the player goes below.

No matter what way you look at it its going to be

  • a) messy
  • b) a long time to create
  • c) complicated

Pick at least 3 :smiley:

Hope this helps
Don’t forget to accept an answer that best clears your question up or answers it so when the community finds your question in the future via search/google they know exactly what you did to fix it/get it going.

Even if this is not the answer I wanted, I’m still marking it as correct because I get the point. The main issue is that i want the spaceship to be in the same level as everything else since enemies are always attacking it. The ship wont be moving when you are walking around in it but it will be movable from the cockpit. Thanks for your time.

Maybe I’m a little late but the way I would approach this is to make everything modular (import doors with the pivot in the corner for rotation, floors ready to copy and paste in big chunks, etc) and with blueprint interfaces you can make each interactable object react the way you want it to interact like toggling lights, openning doors, turn on the galactic projector :v