Box Collision not able to block?

Cube (player pawn) is not being blocked by the box collision component i added.

  1. have collision set up for Cube
  2. Have Box Collision Component collision set up (overlap event is working fine)
  3. on some conditions changing the Box Collision’s collision response to block the cube from entering it (this is not working)…

please find the setup for collisions

alt text

Am i missing some thing?

How are you moving the pawn?

What did you select as the default response when you added a new object channel in the project settings? Check the pawn collision: it may be set to ignore BlockCube, and it overrides the box collision settings.

I added some input action mappings. Then added movement logic using timeline in cube bp.

tl;dr:

How collision works depends on how you move the actors.

Then added movement logic using
timeline in cube bp.

This - can you show the blueprint of where the movement is being applied?


What I really meant to ask was whether you’re using a movement component in the pawn. If you’re just setting actor location or adding world offset, no collision is ever going to work as you expect.

If I just keep adding an offset to an actor (both are blocking each other) nothing is going to happen:

Image from Gyazo

To clarify, things will happen but you’ll not have a sliding or blocking collision in this case.

Default response in project settings is set to block.
Pawn collision is set to block all object types. Including block cube. Shared this blueprint’s collision set up in images.

Is it possible to change the collision preset of an actor in construction script based on some conditions.

Just asking bcaz this is what i am doing and it isn’t working

The pawn is not having any movement component. I am using set world location in timeline.
Overlapping event is working but not the block.

There’s your answer.

The engine will not prevent you from doing that - forcing actor into other actors. If you want movement that automatically detects collision:

  • use physics
  • use a movement component
  • write your own movement components with Sweep (not worth it unless you’re after some unique game mechanics - then it’s totally 100% worth it)

The pawn is not having any movement
component. I am using set world
location in timeline. Overlapping
event is working but not the block.

Here’s how you can do it without movement component / physics or anything too fancy:

Do note the Sweep tickbox. Essentially, you are responsible for handling what happens when things collide, as opposed to having it handled by the movement component / physics.

Yes, it works for custom movements. Thanks.
One thing: sweep only works for root component! So, your collision box (or… what you use for collisions) must be on top (parent).