Download

Need help with collision issue

Hello, I have a character with my root capsule collision default and child collision( gun). I got an issue when I move my character the wall not block my child collision but it block only root capsule collision. See some pictures:
1

3
Here’s my character struct:
image

Yet, one of the first disappointments the first time you make a game, adding collisions to the capsule does not affect the capsule. The capsule is a magic / special object that does not use the normal physics system.

1 Like

It’s not about the capsules per se - nothing magical here; it’s the Movement Component - it only accounts for the root element of the actor, and here the capsule happens to be the root.

The Gun Capsule is ignored when the movement component calculates final movement position for the frame.

You’d need manually detect / track gun capsule and force the movement component to act accordingly.

Yet, one of the first disappointments the first time you make a game, adding collisions to the capsule does not affect the capsule. The capsule is a magic / special object that does not use the normal physics system.

(edit: I think you really meant: attaching collision components to the root component)

You do not add collision to the capsule - the capsule is the collision and it works fine with physics:

Image from Gyazo

Irrelevant to the topic at hand but since it was mentioned - attaching collision to the root would work pretty well for physics sim. Welding kicks in and allows the root to take advantage of the attached elements’ collision - example.

attaching collision to the root would work pretty well for physics sim

The problem with this is that moving the character has little to do with physical simulation :expressionless: - so this does not apply.


From the component:

* 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, attached components will teleport to the end location ignoring collision.

I’ve yet to play with this for anything serious but it might be worth looking into SetUpdatedComponent.

The capsules not, everything you say is correct, but the character Capsule yes.
I always refer to the capsule that you inherit from the character along with CharMoveComp. You can’t change the root, that’s why it said to add colliders to the capsule.
The capsule looks like a physical object that includes gravity, and blocks movement when it collides (and that’s pure Magic = C ++). Touching in CharMoveCompthere is not trivial and the op image is a BP.
BTW You can also make it weigh less than a goose feather, which is witchcraft, and it will have the same behavior.

1 Like

Thank you so much!

I realise the main reason child capsule was not working because the character movement component.
I was tested in many cases.