Advertisement

Collider not generating "Event Hit"

Started by September 05, 2017 04:56 AM
4 comments, last by MarcusAseth 7 years, 2 months ago

I really don't understand what I'm doing wron here... :S

 

I have a Box Collision component (I'll call it Collider) Attached to an ArrowComponent (needed only to offset the pivot of the Collider and match the pivot on the mesh) Attached to the player mesh (just a cube).

In the image below you can see my Collider settings:

SMRPUtY.png

As you can see from my blueprint image below, I check the last index of the WormPlayer which is the Head (is made out of blocks) and I predict where it is going to be moved, I set the Collider (technically the Parent Arrow, to keep the 5 unit offset on the Z axis that I need) to that location and I have a Branch in there which I'll eventually use to stop the worm body from updating position when we pick a Pickup (since at the pickup spot is spawned a new Head for the Worm, and the Worm doesn't have to move that turn).

Problem is, even though in SetWorldLocation I have the sweep active, the "Event Hit" node is never being called, I am testing it with a printString that says "COLLISION!!!"...and it never happens.

So why is my Hit check failing? :/

I've also made a video to further prove it is not colliding ->> http://i.imgur.com/CQhMUpb.mp4

This is my  Event Hit code , as you can see there is a PrintString in there which never fires.

xYQMEFg.png

 

Well, I actually got it to work by using the OnBeginOverlap event, but this doesn't explain why the HitEvent doesnt work though...

By the way, even though in the image above is unckeched, I also had tried using "Simulation Generates Hit Events", still didn't trigger the Hit Event node...

Advertisement

You do need Simulation Generates Hit Events on. https://docs.unrealengine.com/latest/INT/Engine/Physics/Collision/Overview/#collisionandsimulationgenerateshitevents

 

What actors are these Blueprints defined on? It looks like you're ading the collision logic to the Pickup, but you're enabling the physics event handling on the Player, so the event doesn't go where you expect it to.

 

16 minutes ago, Kylotan said:

 

3 hours ago, MarcusAseth said:

By the way, even though in the image above is unckeched, I also had tried using "Simulation Generates Hit Events", still didn't trigger the Hit Event node...

Had it on, but didn't solved :/

The WormPlayer is Apawn. I should point out that the MeshComponent which also happen to be the rootComponent is correctly generating HitEvents. Therefore for how I understand it, either Box Collision can't generate hit events, or it has to be the root component for Hit events to work :/

UP: now experimenting I've replaced overlap event with hit event, and they are getting acually fired ò_ò

I have no idea what's going on, either I somehow "bugged" the editor when I opened the topic, or I fixed something without realizing.

Actually, there is 1 obvious thing I have changed, I didn't liked the chain of parents RootComponent->ArrowComponent->Collider therefore I went in the 3d software and fixed the cube gizmo, so I now have only RootComponent->Collider.

Is is possible that only stuff one level below the RootComponent is considered for hit events? 

This topic is closed to new replies.

Advertisement