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"

Office Holiday

Epic Games' offices will be on holiday from June 22nd to July 7th. During this period support will be limited. Our offices will reopen on Monday, July 8th. 

Checking overlap at the start

I have two meshes that overlap each other at the start of the game. But the On Component Begin Overlap can not pick them up since it only checks moving objects. How do I check overlap at the start of the game without moving objects?

Product Version: UE 4.15
Tags:
more ▼

asked Apr 06 '17 at 09:25 AM in Blueprint Scripting

avatar image

aristides
136 9 13 23

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

2 answers: sort voted first

As I remember, on start overlap check can be problem, but if for you will be enough check collision sphere or cube, try something like this:

alt text

This is documented here https://docs.unrealengine.com/latest/INT/Gameplay/HowTo/UseRaycasts/Blueprints/

My blueprint is only one of possibilities, but should work on start too.

edited

This is simplest way and tested with sphere tracing:

alt text

You can test with print string what is "overlapped". With print string on Out Hit you will have colliding component/actor name

spheretrace.png (150.0 kB)
begin play.png (101.6 kB)
more ▼

answered Apr 06 '17 at 08:55 PM

avatar image

Vaheva
1.3k 24 26 49

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

If your two meshes are setup correctly and they trigger some kind of OnComponentBeginOverlap, you can use this function in BP during BeginPlay to check for overlaps. I think this is simpler than the SphereTrace and should yield proper results depending on your overlap triggers etc.given your overlap settings etc. are set up correctly.

more ▼

answered Apr 06 '17 at 10:10 PM

avatar image

LeFxGuy
384 14 19 38

avatar image aristides Apr 07 '17 at 07:44 AM

You're right. This solution would be simpler if I need to check how many objects overlap each other. However, if I have a bunch of meshes and only need to check with how many meshes does one of them overlap - only the first solution is going to be applicable. Thank you, both answers help me a lot.

avatar image LeFxGuy Apr 07 '17 at 08:51 AM

Hmm, I see. But glad you got your problem solved overall :)

avatar image Nick Jackson Sep 02 '17 at 02:53 AM

That's the best answer

(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