Jump to content
  • Advertisement
MarcusAseth

Collider not generating "Event Hit"

This topic is 383 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

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

 

Edited by MarcusAseth

Share this post


Link to post
Share on other sites
Advertisement

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...

Share this post


Link to post
Share on other sites

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.

 

Share this post


Link to post
Share on other sites
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 :/

Edited by MarcusAseth

Share this post


Link to post
Share on other sites

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? 

Share this post


Link to post
Share on other sites

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!