Search in
Sort by:

Question Status:

Search help

  • Simple searches use one or more words. Separate the words with spaces (cat dog) to search cat,dog or both. Separate the words with plus signs (cat +dog) to search for items that may contain cat but must contain dog.
  • You can further refine your search on the search results page, where you can search by keywords, author, topic. These can be combined with each other. Examples
    • cat dog --matches anything with cat,dog or both
    • cat +dog --searches for cat +dog where dog is a mandatory term
    • cat -dog -- searches for cat excluding any result containing dog
    • [cats] —will restrict your search to results with topic named "cats"
    • [cats] [dogs] —will restrict your search to results with both topics, "cats", and "dogs"

"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.

Product Version: UE 4.22
more ▼

asked Apr 21 '19 at 06:44 AM in Blueprint Scripting

avatar image

1 1 3

avatar image aNorthStar Apr 23 '19 at 02:19 AM

:) maybe you've already considered this... but have you thought about using Child Actor components?

avatar image Jtoomer Apr 23 '19 at 03:32 AM

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.

avatar image aNorthStar Apr 23 '19 at 03:45 AM

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

avatar image Jtoomer Apr 25 '19 at 04:12 AM

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. alt text

alt textalt text

spawnchassis.png (167.9 kB)
spawnmovement.png (311.8 kB)
nodes.png (333.9 kB)
(comments are locked)
10|2000 characters needed characters left
Viewable by all users

1 answer: sort voted first

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 :)

more ▼

answered Apr 24 '19 at 06:59 AM

avatar image

106 1 3 3

(comments are locked)
10|2000 characters needed characters left
Viewable by all users
Your answer
toggle preview:

Up to 5 attachments (including images) can be used with a maximum of 5.2 MB each and 5.2 MB total.

Follow this question

Once you sign in you will be able to subscribe for any updates here

Answers to this question