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"

Overlap event only works for some parts of collision box

I am working on a RTS building system where a preview building is shown during placement.

If the preview building is overlapping other buildings, the build process shall be blocked until the preview mesh of the new building is on open land again.

I need complex collision for nav generation and therefore (as far as I read and tested) cannot use overlaps of simple collisions for the meshes (which would work). Therefore, I created a basic collision box along the bounds of my mesh to check collision with existing buildings. All existing buildings keep this collision box after the build process.

Those boxes do not generate overlap events directly on first contact. I am pretty sure by now that the overlap event is triggered if the middle of one of two parallel sides of the box (in my case the shorter ones) are moving inside of the other box. I wonder especially why only two sides are affected by this. Does anyone know if there is a specific reason for that? The used function for collision check is "GetOverlappingActors". I also tried "GetOverlappingComponents" and tested the functions for my preview actor and for the collision box component in my preview actor.

I already checked the collision settings and everything is overlapping each other correctly. Since the event is also generated (just not early enough), I don't see the issue here. Attached are some pictures to show different situations.

If there is any (other?) way to check for collision in this case, I would appreciate some hints from you since I am still learning :)

not working even though the longer side is almost completely in the other box working and middle of shorter side is in the box not working even though much is already in the box working after slightly moving the new building to the left

Product Version: UE 4.22
more ▼

asked Apr 21 '19 at 05:56 PM in Blueprint Scripting

avatar image

1 1 3

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

1 answer: sort voted first

Fixed it as follows: In the component hierarchy, I had always tried to put the static mesh or the collision box as root. Then, I tried to put both on the same hierarchy level below a Scene component (see image). With this structure, collision is now calculated correctly.


hierarchy.png (7.1 kB)
more ▼

answered May 19 '19 at 04:17 PM

avatar image

1 1 3

(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