Hello all, got a collision question for you.
So I am attempting to make a character that allows the player to swap between different shapes to navigate puzzles. There are 4 different shapes: CUBE, SHPERE, CONE, CYLINDER. When the player wants to swap to a different shape, the collision volume adjusts to better fit the player.
Here’s the problem: the CYLINDER shape is long and wide, and doesn’t fit the CAPSULE COLLISION well in the character blueprint. So to circumvent this, I added a BOX COLLISION to the CAPSULE COLLISION, and tried to set it so that the BOX EXTENT fits the CYLINDER when swapped, and is smaller than the CAPSULE COLLISION when the player is a different shape. This initially didn’t work, as the collision wasn’t blocking anything, just overlapping.
I then discovered that you can get the BOX COLLISION to work by setting the CAPSULE COLLSION to SIMULATE PHYSICS, then immediately turn it off. The problem with this is that now the BOX COLLISION will always block, even when you swap to a different shape - it’ll even remember what the BOX EXTENT was and will disregard a newly set BOX EXTENT that is smaller.
So my question is this: how can I make it so that the BOX COLLISION is only ACTIVE when the CYLINDER is being used, but INACTIVE when any other shape is used?
POST NOTE:
I also tried to build the shapes as separate actors, and combine them into the character using a CHILD ACTOR COMPONENT and swaping the child actor out, however this still isn’t giving me the desired collision I’m looking for either. The BOX COLLISION added in the CHILD ACTORS is not being registered in the PARENT, and the player clips WORLD STATIC objects.
Capsule component in parent component
Box collision in child actor blueprint
Example of swapping blueprints
Example of my custom swapping macro
More screenshots can be provided, but hopefully this is sufficient. Thank you in advance for your help.