"Scene" Component Equivalent that can be used with Physics-Based Meshes

I’ve been working on a modular vehicle system that will attach different modules via “Module Attach Points” which I was using Scene objects for (I couldn’t get the Socket system standardized enough to work the way I wanted). I recently learned that physics-based Static Meshes that are children of Scene objects will detach as soon as the game starts.

I’m about to start my third total-rework of this system so I would immensely appreciate if anyone could point me in the right direction. The idea is that a parent actor will spawn in all the modules which will have standardized Attach Points (Parent class for each module contains all the Attach Points, each derivative class changes their positions)

The Attach Points themselves really only need to provide a transform so that’s why Scene objects seemed like a perfect solution.

I tried to but it would either not attach at all (Actors are attached to same parent but even using “Attach To Actor” would just fall apart) or would collide with each other no matter how I set up the collision profiles.

Edit: I probably was just doing it wrong. I’ll try again for a bit and see if I can figure out a method.

:slight_smile: maybe you’ve already considered this… but have you thought about using Child Actor components?

I understand… I’ve found Child Actor Components (not just Attach Actor) easy to work with… but I was using cameras so collision and physics werent issues

As you mentioned,

I recently learned that physics-based Static Meshes that are children of Scene objects will detach as soon as the game starts.

The detaching happens when a component begins to simulate physics. The hierarchy of what is a parent and what is child is still maintained though, which is still useful. So my suggestion, when the child simulates you will probably want to make a new physics constraint component to attach the child body to the parent body.

Hope that helps you with your system rework :slight_smile:

It took me a few days to find the time to work on the project again sadly but I got a rework that has worked great.

I swapped out the Scene objects for Static Meshes that will be hidden in game (makes it a lot nicer when setting up positions). But the biggest thing that fixed a lot of issues is that I set it up so after the VehicleParent spawns the Chassis it attaches itself to the Chassis as a child pawn. This allows the Chassis to act as the primary mesh for physics.

I also set up modules such as the wheels to spawn using the world transform of the attach point but attach directly to the chassis (using “Keep World Position” on Attach To Actor)

Images attached show the process I used. as well as an example of what the new ModuleAttachNodes look like in the editor.

Thanks for the help though, I probably wouldn’t have gone back to look at the hierarchy of the actors if you hadn’t mentioned it.