If I place the actor in the level, it works fine. However if I try to spawn the actor during play, the anchor field is not set and the GeometryCollection falls to the ground.
I suspect it cannot be done in Blueprints, likely due to interactions between Chaos and other actors. I think I saw a post about somebody doing it in C++, but now I cannot find it!
Hi there, I don’t have a solution sorry but I would like to try what you have here in the construction script! Im stuck at the first part though and I can’t find the ‘clear initialization Fields’ node or the the ‘Add Initialization Field’ node. All help would be appreciated!
Cheers
OK so for my project what i did is
Add geometry collection component
set the mesh
then disable physics.
add a box collision around the GC and when overlapped it enables physics.
now this might not work if you want to partially destroy a mesh.
but for destroying a whole mesh it’s flawless.
So, I’ve been having the same issue. Anchors work if the BP Is already in the level, but doesn’t when I try to spawn. I was able to get it to work though. Make sure Physics is turned off on the GC in your BP. Then add a delay in the BeginPlay node and Set Simulate Physics to true. This worked for me, not sure if it will for anybody else.
So spawning it at actual runtime for example if you want to respawn it, so well after beginplay and then attaching the anchor field is not possible right now? Or is there another way to respawn or reset an existing collection?
So thanks to this hint I got it working for myself. I have BPs of GCs that I wanted to be able to reuse freely. I created box collisions in my BP that serve as points to spawn in anchors points. In the construction script, I loop over each geometry collection component and turn off the physics, then on begin play I loop over each box trigger, spawn an anchor point of the same size, add those new anchors to each GC, and reenable the physics for each GC.
Just a heads up for anybody still messing around with this: For me it wasn’t enough to disable physics in the Construction Script. I had to disable it on the Geometry Collection itself and then enable it later in the blueprint. After that, Luna2442’s post worked.