There must be something simple I’m overlooking, all i’m trying to do is to hid “X” when it collides with “Box”
“X” being a static mesh component, and “Box” a box collision.
two versions I have tried
There must be something simple I’m overlooking, all i’m trying to do is to hid “X” when it collides with “Box”
“X” being a static mesh component, and “Box” a box collision.
You’re checking whether X is overlapping the Box actor.
Does X have collision enabled, and a collision volume?
Also, “hit” versus “overlap” are different – if X “hits” the box, it might not “enter and overlap” the box.
Turn on collision visualization in the viewport to see in more detail what’s going on.
Also, select a node and press F9 to turn on a breakpoint, so you can step through the execution and see what’s going on, to see whether the event is even being triggered.
Hi there,
There are two different events that can be called:
→ on component hit and on component begin overlap.
Both require proper collision settings, including Collision Enabled. In order to detect overlaps, your blueprint component (“box”) must have settings compatible with the actor “X”.
→ For instance, if you want to use on component begin overlap, and if “X” is a “static mesh”, the “Box” settings should have "generate overlap events set to true, collision enabled, and overlap “world static” set to true. Now, if you want to use the event “on component hit”, the “box” needs to be set as “block world static”.
→ Another example, if “X” is simulating physics, it is more correct to set it as “physics body” and your “box” should follow this setting, either for overlaps or blocks.
Based on your screen shots, you’re using “is overlapping actor” with a component hit. So, you want to check is your collision settings are consistent.
Hope that helps.
X have collision enabled, I’m not sure about collision volume, but I would expect it to have.
I have tried to put in X in the box to make sure that it overlap, but with no result.
I think maybe that is it the world static that could be the problem, because i need the Box to have physics, but otherwise everything should be fine. or does I just don’t get it.
Perhaps, if you want the box to have physics, it’s better to change from collision box to static mesh, change the collision settings to physics body, collision enabled type physics, set simulation generates hit events to true, and use the event on component hit.
Perhaps you want to experiment with collision settings. For instance, you may try with the actor that will hit the box must have collision set to block physics body, collision enabled type physics.
See if that clarifies.
Not sure. Can you a short video clip showing how you want to work? What gameplay mechanic you want to implement? And what is the “workflow” in terms of gameplay? It is a projectile? Or actors bumping on each other? If you can give more details would help.
no sorry, It’s almost a finished game and I don’t want to show of too much.
but hey thanks for trying to help so far
Hi,
Don’t worry, I understand.
You may want to take a look at the First Person template, which has a projectile hit event on it. Also, the projectile interacts with static meshes simulating physics. It’s worth checking out.
Do you know where to find the official templates?
all right thanks i will look into it, yes should not be a problem.
no I haven’t, I have solved the problem in an over complicated way (but it seems to work)
but thanks anyway.