Announcement

Collapse
No announcement yet.

getting 2 overlap events when there should be just one

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    getting 2 overlap events when there should be just one

    Hello everybody. I just started off with UE4 and gamedesign in general, so pls don't blame me for my inexperience

    I followed Romeros Blueprint Tut blog in order to get started and after finishing the simple blueprint game where you collect statues, I noticed that the game is generating 2 overlap events when walking into a statue.
    These are my blueprints:

    Click image for larger version

Name:	GameHUD_eventgraph.JPG
Views:	1
Size:	257.0 KB
ID:	1169012
    Click image for larger version

Name:	GameHUD_StartGame.JPG
Views:	1
Size:	114.5 KB
ID:	1169013
    Click image for larger version

Name:	GameHUD_Clock.JPG
Views:	1
Size:	73.4 KB
ID:	1169014
    Click image for larger version

Name:	GameHUD_StatueCollected.JPG
Views:	1
Size:	227.4 KB
ID:	1169015
    Click image for larger version

Name:	statue_eventgraph.JPG
Views:	1
Size:	242.5 KB
ID:	1169016

    It is always creating 2 overlap events and therefor it doubles the amount that is added to variables 'Score', 'StatueCollected' etc.
    I tried to fix this by using a triggerbox around the statue to trigger the overlap event --> problem persisted, I deleted it. Then I toggled the 'generate overlap event' variable as you can see here:

    Click image for larger version

Name:	overlap_on_off.JPG
Views:	1
Size:	99.0 KB
ID:	1169017

    --> problem persisted, deleted it. After that I set a 'destroy actor' node, just to see if it still does 2 overlap events:

    Click image for larger version

Name:	destroy_actor.JPG
Views:	1
Size:	58.5 KB
ID:	1169018

    and voilá, it only does it once. But, of course, this doesn't solve the problem, because the actor is no longer available.
    Does anybody have an idea how to fix this?

    Big thanks, CCrunch

    #2
    Got a workaround now. I connected 'InitStatue' function to an 'EndOverlap' event and added 2 'Set Actor Hidden in Game' nodes, because I want the statues to disappear at the time you step into it. It works as expected, but I still want to understand why it didn't work the other way.

    Click image for larger version

Name:	hidden01.JPG
Views:	1
Size:	66.7 KB
ID:	1097417
    Click image for larger version

Name:	hidden02.JPG
Views:	1
Size:	63.0 KB
ID:	1097418

    Comment


      #3
      Are you checking overlap with statue's static mesh collision or only some primitive like capsule? Sometimes people add static mesh with collision and then extra collision object and don't switch off overlap events on static mesh.
      Youtube Channel

      Comment


        #4
        Checking this only with statue's static mesh collision. I will try to use a primitive to check for overlap condition and report back.

        Comment


          #5
          I disconnected the 'Set Actor Hidden in Game' nodes, deactivated the 'Generates Overlap Events' var of SM_Statue and added a capsule to the statue for overlapcheck:

          Click image for larger version

Name:	capsule_overlap.JPG
Views:	1
Size:	76.5 KB
ID:	1097424

          Still the same. 2 overlap events when walking into the statue.

          Comment


            #6
            What about your character? Single capsule and no overlap events on skeletal mesh?
            Youtube Channel

            Comment


              #7
              Check.
              I had a conversation with Marcos Romeros, who created the tutorial and it turns out to be an issue that has something to do with the 'Set Actor Location' function in UE 4.10. He experienced the same and solved it by using DoOnce and Delay nodes.

              Click image for larger version

Name:	DoOnce.png
Views:	1
Size:	70.5 KB
ID:	1097427

              Comment

              Working...
              X