Pawn ability to collide dependent on root. CollisionComponent = yes, SceneComponent = no

While this might be by design (and if so, then could you offer an explanation / solution?), I believe I have confirmed a bug where, given a similar basic structure, Pawns with a scene component will never collide with anything. They must instead have a collision component as the root component.

[Assuming you have some basic movement implemented within the current player controller]

  1. Create a new Pawn. Attach an explicit SceneComponent as the root. Attach child BoxCollision, StaticMeshComponent, and FloatingPawnMovement components (all on an equal level).
  2. Create a new Pawn. Attach a BoxCollision component as the root. Attach child StaticMeshComponent, and FloatingPawnMovement components (both on an equal level).
  3. Set both of the collision components to be “Pawn” and both of the StaticMeshComponents to be “NoCollision”.
    The 1st pawn will pass right on through any obstacles you have, including “BlockAll” walls while the 2nd pawn will collide properly.

Any explanation for this?

Hi, can you explain some unclear thing:

by “create a new pawn” did you mean create new bluprint based on pawn or just put already exist character blueprint on level?

note that character blueprint isn’t pawn based, it’s “character” class based blueprint, in this case you may see that character have “capsule component” that have collision instead of mesh itself, because character mesh too complex and simple capsule won’t waste so much resources as mesh

No, I mean the literal “Pawn” class. I created 2 new Blueprint Classes, each derived from the Pawn class (not DefaultPawn). I set the root of one to be a scene component and the root of the other to be a collision component. Even if you attach a collision component to the SceneComponent-rooted Pawn, only the Pawn with the collision component as its actual root will end up having hard-collisions (triggering “hit” events) with other blocking objects.

check in detail panel of your components that you have enabled “generate overlap events” in collition tab for components you want

I already have both Generate Overlap Events and Generate Hit Events checked. Both events for both components (mesh and collision) are all hooked up to print string functions. Nothing prints at all when the scene component is the root. Everything works properly when the collision component is the root.

can you explain how attach explicit SceneComponent? when i enter “scene” in add component menu there are only 3 types:

  1. scene capture component 2D
  2. scene capture component Cube
  3. scene (at utility tab)

Hey ,

I created the pawns as similar as I was able to based on the information that you provided. After placing these two blueprints within my project, I realize that one is not able to be walked through by a Pawn while the other is. So are you stating that these individual pawn blueprints used as character pawns will walk through objects, but not when placed around the scene?

Looking forward to hearing back from you, thanks!

I am referring to the 3rd option. By “explicitly” I simply meant

  1. Add a “Scene” component in the utility tab
  2. Replace the DefaultSceneRoot with the newly added SceneComponent. (Probably doesn’t really make much of a difference).

Hey ,

I wanted to let you know that I reached out to our Developers and the behavior from these blueprints are expected. By default, the root component is selected to be moved (it’s the UpdatedComponent of the MovementComponent), which can have another component selected if desired. However, we only support collision for the component that is selected (attached components are teleported).

We plan to update the comment on MovementComponent, FloatingPawnMovement and RotatingMovementComponent in 4.9.

Normally the root component of the owning actor is moved, however another component may be selected (see SetUpdatedComponent()).

During swept (non-teleporting) movement, only collision of UpdatedComponent is considered, child components will be teleported to the end location.

Also, by selecting something other than the root component, you’d move that component and its children, not the root component (and therefore not the entire actor). It would be a relative change in location of the selected component.

I hope this information is useful to you and if you have any further questions, please let us know! Have a great day!

5 Likes

Just wanted to say thank you from the future for this stellar answer! “Set Update Component” was exactly what I needed, as soon as you set the collision sub-component with that, it works just as expected. Thanks again!

You’re very welcome! Feel free to ask any additional questions in a new thread on AnswerHub. :slight_smile:

Hey from the future! I’m having the same issue so thanks for having looked into this. I have 3 scene components in a pawn followed by a mesh in that hierarchical order. It’s this mesh I want to have collisions happening on but do my moves with the top/root scene component.

I’ve tried to attach the ‘set component update’ to my mesh but it will not recognize it as it’s not of the right type.

Can you explain a bit further how you set this up please? I’m using blueprint only. I also can’t access this without having a movement component in my pawn… so for ‘normal’ movements this won’t work?

Thanks in advance.