No trace response for spawned actor

Make sure your dynamicly Spawned Actor/Mesh uses the correct Collision settings. Double check that in the Details Panel.

I have encountered a problem whereby traces (in this case sphere trace by object or by channel) produce hit events on an actor which is placed in the world, but not on the same actor when it is spawned via blueprint.

Specifically, I have a ‘metal deposit’ which I want to be able to place a ‘metal extractor’ on top of. To test if the deposit is there, I am using a trace - this is the one which appears to not be working.

^^^ Here you can see the setup - 2 deposits are spawned via a blueprint, and one of them I placed in the world directly.

^^^ Here you can see that the sphere trace is failing to detect the spawned deposit mesh.

^^^ The sphere trace works just fine for the deposit placed in the world. Having done some research, I suspect it might be something to do with the spawned meshes not being ‘added to the world’, which is a prerequisite for traces to operate properly, whereas objects placed directly in the world via the editor are by default ‘added to the world’. Of course it could be something completely different; I have tried manually setting collision responses in event begin play to make sure that nothing has been reset by the spawn node, but to no avail. I have remade the deposit blueprint in case it was due to corruption, but the same thing occurs. Does anyone know of a solution to this, or is this a bug?

Thanks for your time,

David

Yes, the collision settings are correct, the issue is somewhere else.

I had the same problem in 4.26.2 and wasted some time on this. Maybe I can save someone else the trouble now. (For Xarastoph it may be too late after 4 years :D)

Right after spawning the actor, you have to recreate the physics state of the component that is responsible for the collision (in my case it was a skeletal mesh). Don’t ask me why…

ActorComponent::RecreatePhysicsState()