detect collision object to all object or object to all static mesh

Dear All.

i have cube_bp, for now i move cube_bp by set location x y z.
what i want is. if the cube_bp is hit / collision with the floor, wall or everything object static mesh. there are output log “hit”

cube_bp is not Projectile. cube_bp is not main pawn. there are no blueprint in the floor, wall or everything object static mesh. the blueprint only in cube_bp
is it posible? if yes, how?

many thanks before. :slight_smile:

ps: sorry for bad english

It is possible.

How?
Turn on collision events for cube. It is in collision section in details, something like “generate collision events”
Then hook to “on hit” event.

https://docs.unrealengine.com/latest/INT/Gameplay/HowTo/UseOnHit/Blueprints/index.html

1 Like

Dear Nawrot, Thanks for your reply…

i have try, and still failed. i hope you can give more clue what should I do.

anyway here my blueprint in cube

for now i move the box use F button from my char, simple and here the Blueprint

and here i put the box, anyway i use default ThirdPersonExampleMap

for now, in box, in collision option. i set [generate overlap event] as true (as you suggest). and in [collision preset] = overlap all.

and here the result when i press F button to make box down. and when the box overlap char log output is “begin with” which mean collision success between char and box. :slight_smile:

but. when i move away the char. and continue press F button let the box hit the floor. there are no log anything :frowning: which make me sad.

i have try to change all option in [collision preset] of the box, one by one. repeat the step set box from above and press F button to hit the floor. but still i don’t get any log what i want.

what i want, the cube give log when collision or overlap anything object like floor, wall or every static mesh. (without transform the floor, wall, other object into blueprint)

ps: i dont care it become on hit, on begin overlap or everthing, as long there are some output, it would be okay for me. :slight_smile:

Many thanks.

I think you have problem with not watching this tutorial:Unreal Engine 4 Tutorial - Collision (Quick & Easy) - YouTube
Your collision hull is wrong, watch tutorial and fix it.

Dear Nawrot.

if you assume it wrong because the char go trough the box. it is because I do it purpose. like i said before I set [collision preset] = overlap all.

i can change it the [collision preset] = block all. or [collision preset] = block all dynamic.

so the result, when i press F. and hit the char. the char not into overlap to the box. and there are log output “Hit” which mean the box success hit the char. (like i said before i have try all option)

But when i move the char away. and continue press F. there are no any message when the box hit the floor or wall. I hope you understand what my problem :frowning:

ps:
maybe you ask. why i insist want to such method. check collision object into wall, floor or any static mesh that there are no BP.

well i have create game. but i miss something. mechanism to check surround of char (left bottom, left mid, left up. front bottom, front mid, etc etc) is “free space”
so the first think I get. i would create box. loop into surround char. and check it is “free space” or not. no matter what object.

Anyway thanks for reply :slight_smile:

Post a screenshot of the collision settings for your box. It sounds like the issue may be that it doesn’t collide on all the rigt channels.

EDIT: though only for hits.

Objects CANNOT OVERLAP BSP BRUSHES. I know, it annoys me too. You can Hit BSP, but never Overlap it
Convert your brushes to static mesh or find some other way of doing this check without overlaps.

Dear RhytmScript

Actually the log “hit” appear when box collision with the char. when i choice of the box [collision preset] = block all. or [collision preset] = block all dynamic.
and log “begin over” and “end over” appear when box collision with the char. when i choice of the box [collision preset] = overlap all.

but. the log did not appear when box collision with the floor or wall or any every static mesh (where floor or wall or any every static mesh not have BP)

here my setting. but i have try to choice all (except custom) one by one
689f9988e68307278fffa1d88b2d5a7afd82730d.jpeg

I make it in default ThirdPersonExampleMap so every body can try it.
For the box, i create form Basic > Cube.

Many thanks for your concern

In your “add local offset” node on CubeHitJelek, set “Sweep” to be True.

This SHOULD cause the Hits to register. As it stands you’re not “moving” the box downward thru space, you’re “setting” it tok a lower position in space, ignoring collision. So, you never HIT the BSP, you only Overlap it, and BSP cannot trigger overlaps.

Dear RhythmScript.

Many Thanks!! I am glad hear your suggestion. work like magic.
thanks for all the help guys. :slight_smile:

case closed