In UE5.3.2 .Set rest collection in construction script or begin play ,the geometry collection actor will no collision

hi,everyone.i want to spawn a geomotry collection actor,but it will no collision .Although I have already enabled physical simulation and enable collision

Can anyone answer this question?thanks

By the way, if I set the rest collection in advance, the generated geometry collection actor will have collisions, but I hope to be able to freely configure the collection of this object

this is bp.


and i want to spawn geometry collection actor at run time.but it will no collision.

2024-02-05 19-24-00.mkv (15.3 MB)

The same bug will also occur in UE5.3.2.

@CedUE Brother, please forgive me @ you, because I can’t find anyone who can help me. Please make sure to take a look at this issue. I’m not sure if it’s a bug or if the design just doesn’t work this way?

1

If you want to set the rest collection later i would suggest disabling Simulate Physics in the default properties of the geometry collection component
So when you spawn it the physics state won’t be created and when you set simulate physics after spawning it should properly pickup the collision settings

In 5.4 you should also be able to set a collision profile on the actor and have the physics state to properly update

I hope this help

I’ve turned phys/gravity off before setting the rest and turning them on after but it doesn’t work. The mesh does not behave as expected, and falls through the landscape while ignoring explosion forces.

Is there really no reliable way to set a rest collection during runtime?

I investigated this a bit more and effectively there’s issues in the way geometry collection initialize the physics state and collision that conflict with setting the rest collection at a later stage
Unfortunately there’s no easy code workaround for it ( It’s on my list to fix )

For the time being you will need to spawn geometry collection with a predefined RestCollection
A way to do that could be to set Blueprints that inherit from GeometryCollectionActor and set the rest collection of them
Then you can have a blueprint that basically spawn those GeometryCollectionActor blueprints on demand ( depending on your logic )