x

Search in
Sort by:

Question Status:

Search help

  • Simple searches use one or more words. Separate the words with spaces (cat dog) to search cat,dog or both. Separate the words with plus signs (cat +dog) to search for items that may contain cat but must contain dog.
  • You can further refine your search on the search results page, where you can search by keywords, author, topic. These can be combined with each other. Examples
    • cat dog --matches anything with cat,dog or both
    • cat +dog --searches for cat +dog where dog is a mandatory term
    • cat -dog -- searches for cat excluding any result containing dog
    • [cats] —will restrict your search to results with topic named "cats"
    • [cats] [dogs] —will restrict your search to results with both topics, "cats", and "dogs"

BeginOverlap called twice for one overlap

I have a simple setup of one blueprint with a box component with an OnComponentBeginOverlap event. When an actor enters the box, it is added to an array. The problem is that sometimes BeginOverlap gets called twice because EndOverlap gets called. This doesn't happen every time and seems to be completely random when it does. EndOverlap shouldn't be getting called because the actor never leaves the box once it enters. In fact, it just stops about half way into the box every time.

Product Version: Not Selected
Tags:
more ▼

asked Jun 25 '14 at 02:02 PM in C++ Programming

avatar image

Kochab
554 59 164 125

(comments are locked)
10|2000 characters needed characters left
Viewable by all users

1 answer: sort voted first

Well, I figured out it has something to do with the movement of the actors as they hit the box. I was interpolating their location and rotation, but if I just teleport them to the box, BeginOverlap only gets called once. It could be they were rotating in and out of the box faster than I could see it.

more ▼

answered Jun 25 '14 at 07:32 PM

avatar image

Kochab
554 59 164 125

avatar image Osama2o1oo Aug 25 '15 at 03:14 AM

thanks man ,, ur answer was helpful ,, i had the same problem trying to do as the tutorials but in my way :(https://www.youtube.com/watch?v=iglZcSaWjcI&list=PLUvPgeSAn6KhG4rv0u_Cz70OQKRc6nDoz∈dex=2) ![alt text

after reading this i added doOnce and a Delay and it worked perfectly :D

alt text

sorry that the 2nd pic (solution) is not clear but here is where i put doOnce and Delay :D

problem.png (256.5 kB)
solved.png (88.5 kB)
(comments are locked)
10|2000 characters needed characters left
Viewable by all users
Your answer
toggle preview:

Up to 5 attachments (including images) can be used with a maximum of 5.2 MB each and 5.2 MB total.

Follow this question

Once you sign in you will be able to subscribe for any updates here

Answers to this question