Why doesn't my dynamically spawned actor have collision?

This one should be fairly simple,
but I can’t seem to figure it out.

So to keep things simple…
I have a blueprint which has a static mesh (with collision setup directly onto static mesh) as a component as well as a trigger volume and behavior.
I also set mesh’s collision within Blueprint to “BlockAll”.
So… if I place an instance of BP into world/level and I play same. My character collides and cannot walk through it.

And my problem arises in following scenario…
character can spawn objects and place them onto map.
So a key is pressed and an object is placed in front of him. (an instance of BP explained above)
problem is that now, player walks through it… what happens to collision box?
I even tried to call function : Set Actor Enable Collision : but that does not solve my problem.

Why is it that when I directly place an instance of BP onto map collision is there,
but when player dynamically spawns it in, collision is no longer valid / present?

Thanks :3

Are you sure you’re not spawning mesh instead of blueprint you created?

I just double checked.
I am spawning BLUEPRINT and not mesh.
Any other theories?

It kinda snaps / blocks for a split second and then player walks right through.
Whereas if i place it manually, it completely blocks and I cannot walk through it.

To give more detail:
my function “Spawn Object” takes an input called “Object to Spawn” and it is of type ‘class’ Actor.

Is this cause of problem? Should it be something else?

Hey iNfamous,

I’ve set up a project that does this and didn’t have any problems with collision, so I’d like to go through my setup step by step and we’ll see where yours differs from mine.

First, I set up my object Blueprint. I used a SceneComponent as root, and I have a chair mesh (SM_Chair, from Starter Content, though it shouldn’t matter what mesh you use) attached to it. Root has no collision, and Static Mesh is set to Block All. In EventGraph, I have an Event Tick node with a simple Add Local Rotation of 4.0 on Z axis for Static Mesh. This just rotates chair indefinitely.

Next in my Player Controller, I created a Spawn Object function with a class ‘Actor’ input. This function uses a Spawn Actor from Class node, takes input I gave it and a Transform in front of character. When I call function, I pass it that Blueprint class I created earlier in first step.

That basic functionality works as intended. So if yours is doing something different, we need to see which difference is causing collision to not work. If you set up something as basic as this, does it work in your project?

Blueprint:
Root → static mesh w/collision setup (set to block all)
Attachment → trigger volume (no collision)

Player Controller:

I don’t understand, because when I place a copy of BP into world manually… it works. But when player spawns it in, it doesn’t.
I don’t mess with any of collision nodes inside of Blueprint. What could be causing this?

I’m curious: if you make a SceneComponent in Blueprint and make that root, does this still occur?

If so, would you mind zipping up Blueprint .uasset and attaching it? Maybe if I can take a look at it I can spot what’s going on. Thanks!

Hey iNfamous,

We haven’t heard back from you in awhile, so I am marking this post as resolved for tracking purposes. If you are still experiencing this issue, please provide information and .uasset for your Blueprint as requested below. Thanks!

I have same problem and i tried it with SceneComponent and StaticMesh as Root…

Hey ljms,

Could you also and attach the .uasset for blueprint and for static mesh you’re using? Thanks!

i figured out that i have a little different issue. So i posted a new question:
https://answers.unrealengine.com/questions/102121/spawned-actor-doesnt-affect-navmesh.html