Automatically scale of master field box shape based on parent actor

Hello people,

I have to bother you with my noob questions again,

I am trying to automatically set the master field box shape size to that of the actor I attached it to which can be any arbitrary geometry collection I generated from any arbitrary 3D asset.

For that I needed to do 3 things:

  1. Set the world location to the origin aka center of an actor in the world which seems to work fine.

  2. FIX the initial scale somehow because for some reason the initial scale when dragging the actor into another and making it its child, the master fields scale is not 1.0 across the board instead its some value that makes the box equally as large initially in absolute value anywhere you put it. So if your parent actor is large the scale value intially is low.

    → setting that scale to 1.0 at begin play does not seem to work.

  3. Scale the master field up to the size of the parent actor based on relating the absolute bounds of both actors → does work partially.

For 2 Masterfield Blueprint:

You can see here I attempt to just set the scale to 1.0 immediately of the box volume.
Doesn’t seem to have any effect. What node would one want to use? To set this value:

For 3 also masterfield blueprint:


I then attempt to calculate the scale difference and just set that scale on the masterfield.

Which worked fine with objects I created inside unreal via the “Modeling” tool.

However:

This asset: Industrial Brick Ruin Wall Brick Straight 02 | Fab
You can see on the bottom right, does seem to have Y and Z axises swapped.

So my two questions as a noob here would be:

  1. Which node (tried many different ones relating to “scale”) would one use to set the scale that masterfields box shape to 1.0 automatically which seems to by default relate to the parent actor and attempt to achieve the Box Volume initial absolute size setting and therefore not start at 1.0?

  2. How can one fix an apparently accidentally swapped Axis of an imported 3D asset inside unreal? I have absolutely zero clue about modelling etc.

and maybe 3. Since the goal is:
→ I just take this reusable actor, drag it onto any arbitrary fractured 3D asset actor
→ it shapeshifts the master field to the actors dimensions (or a factor beyond them)

given I am a developer (not games tho obviously) not a designer, would it be wiser to just attempt doing this in C++ instead of this blueprint stuff?

Thanks a lot in advance for any help <3

Ok… Try to figure out your code with simpler setup.

If you have errors, scale discrepancies, turned axis, etc. it will be very hard to figure out weather your code works or not.

This is my initial setup and the two objects:

This is my function called in BeginPlay for the ring:

This is the result:

The fixing of the axis is just taking the parent with swapped axis and then rotating your child object properly.

1 Like

Yeah I simply set the absolute box size to the absolute size of some bounding box of the geometry gollection actor now.

That was my solution that I am happy with for now. Thanks for the reply though. The scale gets â– â– â– â– â– â–  up because internal transformations happen automatically at runtime which I have taken a look at in the engine files. The absolute setting overrides that â– â– â– â–  although the debug box I need to draw manually now because that does not get properly updated at runtime.

Additionally I am running from one issue into the next.

Now with Chaos Caching there seems to be literally no way to play the cache back aka in reverse at runtime like you can literally do by simply moving the “start time” variable LIVE in the editor it gets updated in real time in the viewport.

It’s mental you cannot achieve this in blueprints easily apparently given it is very obviously already implemented in the editor. Literally copy pasta.

I got this working by using the timeline node.

This was clearly just a skill issue.

So Solution for me personally:

→ Set absolute box sizes instead for runtime destruction via chaos field shapeshifting to different assets automatically

→ use child actor for this you can drag and drop which is a derivation from the master field blueprint class and put the logic for it in there

→ avoid / override all the internal in-engine transformations the master field does by setting the absolute box size

→ for debug lines you need to manually draw them because at runtime it does not update

For the replay / caching:

→ Cache manager on actor

→ record once

→ delete cache manager

→ pull in cache collection → creates chaos cache player

→ use a timeline node to set the start time at runtime over a certain time like you would in an animation via keyframes

→ freely repair or break object as needed

→ profit