I am currently working on a crate system that you can push around without rotating it. I managed to get a “grab/release” system by parenting the crate to the character, but when the crate is grabbed and moved, it can be pushed through walls. I would like the box to block the character when he pushes it toward a wall, preventing it to clip through.
I looked for a way to “combine” the bounding boxes, or adding another bounding box to the character to his current capsule, but I haven’t found anything yet.
Is there a way to do it in Blueprint? Am I approaching this problem correctly? If not, what would you suggest?
The first screenshot shows what happens when the crate is grabbed by the player and pushed toward a wall : the crate clips through the wall (but not the character).
The second one shows the result of the character “releasing” the crate : it is pushed back into the level bounds.
I forgot to mention that the crate still has collision on its own since it can stop projectiles and push other crates when colliding while being grabbed.
What I would like is the grabbed crate to be blocked by the other collisions like walls, and prevent the character to push it through. That is why I want to add the crate collision to the character capsule.
Thank you for your answer, but for the time being I need to work in full Blueprint. We currently are based on the “Blueprint Third Person” template and thus use the basic character. I haven’t found any *.cpp or *.h files in the project either, so I unfortunately cannot actually try your method…
but I already tried this and it didn’t seem to work. More accurately, it DID have collisions with the other objects and generated overlap events, but it did not change the “solid collision” of the player, as if the capsule was the only thing that was blocked by the level bounds. I did check everything as ‘Block’ in the generated collisions.
However when switching to another character in the scene, that one DID collide and was pushed back by the one that had the new collision box. He could even walk on top of the box and be “carried around” by the other.
Is it possible that it could be a matter of priority of collision computation? Could I have missed some settings regarding that?
In short : the collision boxes collide with the other character’s capsule but not with the other box. It does not collide with the crate box either, but DOES generates overlap events.
PS : sorry, I really must take the habit to present screenshots… Thank you for your patience.