Wrapping Collision component in scene component breaks "Hit" Event Triggering in Blueprints

While there was previously a similar question posted…

…it failed to actually acquire a definite solution for the problem with Blueprints.

The issue is that if you have an object with a collision component, it will collide with other objects just fine, triggering a hit event. The moment you parent the collision component under a scene component, this perfect functionality is negated. It wouldn’t be TOO much of a problem accept that if I wish to make my colliding object the child of something else abstract purely within Blueprints, then I have to make a new Actor. The most “basic” component I can add is a scene component because if I add another collision component or a mesh, then the bounds of that component will automatically create constraints on the collision of the child component. However, it appears that even with a scene component, the child’s collision component will be unable to trigger events.

Is there an alternate component that I could use as a root for the parent object to prevent this loss of collision functionality? Or is there perhaps something else I am missing that will make the scene component in the parent not break the child’s collision component?

I am in a case almost similar:

I am implementing some Components derived from the SceneComponent.
This component was previously derived from ActorComponent. Which does not offer the ability to hook anything on it. But the meshes it was creating on the parent were working.

From the moment I changed to SceneComponent (in the hope of attaching the meshes I was creating in the actor to this component), all the collisions stopped working.

It seems that anything that gets attached to a SceneComponent gets its collisions canceled.

I think that this has to do with something like “no sweep on the childs of SceneComponents” or something of the like. I will try to investigate a bit the C++ but without knowing what and where to search. I doubt I could find anything. :slight_smile:

Any answer would be welcome. :slight_smile:

I think I found the reason!!!

In the source code of the engine, if you take a look at SceneComponent.cpp line 1619, you will see that to “GetCollisionEnable”, SceneComponent returns…

ECollisionEnable::NoCollision

From what I’ve seen and experimented, if you set an actor/component to NoCollision, all its childs will be forced to NoCollision too!

If you set it to NoPhysCollision, this is something else. (collisions for childs still work :wink: )

I will try to see where I can try to modify that in a way that the SceneComponent is using NoPhysCollision and not NoCollision by default. Recompile my engine and get back to you with the changes! :slight_smile:

If this works, I will pull-request it to save a lot of people in distress with SceneComponents! :smiley:

I can’t recall exactly where I read this, but a staff member responded to a question on this topic elsewhere and stated that, in conversing with the programming team, it appeared that collisions are only processed according to the root component and that all other components are simply teleported to the end location. As a result, a Scene Component root, with no collision capabilities whatsoever, would of course pass through everything. A Collision or StaticMesh component on the other hand would fully be capable of running into stuff since they have that functionality built in.

The thing I am currently unsure of is whether the root’s collision settings can somehow be overridden in components. For example, having a root with one type of collision and a sub-component with different collision settings. My initial assumption would be that the sub-component’s collision would never be processed (since it isn’t the root), but that you could work around that by having the sub component actually be an entirely different actor that is swept towards a relative location from the “root actor” as it were. It’s collision could then be processed individually from the first actor since both of them have different root components.

Is this where you saw it? Pawn ability to collide dependent on root. CollisionComponent = yes, SceneComponent = no - World Creation - Unreal Engine Forums I also just had this problem and have been poking around the internet to find it. For my purposes I was able to use the Collision Component as the root, but I doubt that would work for everyone.