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"

Overlap test for a Specific region

To put it simply, I would like to do a kind of 'wide line trace', where I need to know what objects are in between two cursor positions. This is because the cursors input device can't update at the same rate the game does (it isn't a mouse or a locally connected device).

So I figured I could create a triangle region with a UProceduralMeshComponent and by setting it's vertices manually depending on where the cursor is and was and where the camera is. Then I simply call 'Get Overlapping Actors' and just call whatever I need to on the actors it returns. alt text

This works and I can even recreate the section every time the cursor moves with no apparent issues.

The problem is the Get Overlapping Actors node doesn't return actors that are not moving. Using PVD connect I noticed that the physics for the UProceduralMeshComponent section IsSleeping flag was set to True and the units that are also not moving are set to IsSleeping=True. So I tried calling 'Wake All Rigid Bodies' on the UProceduralMeshComponent itself, but that didn't work.

alt text

The blue triangle is the region I want to test. From this I know the triangle is being created in the right locations.

So far the only thing that's worked is when I make all the units move up and down so they never enter a Sleep state and it worked. alt text But i'm worried that when I'll have to many units at the same time it could slow down the game because the PhysX will have too many objects to track.

I'm still trying to find a proper work around but I could use some help, especially with why this is happening. Thanks in advanced

Product Version: UE 4.13
Tags:
more ▼

asked Oct 24 '16 at 04:56 PM in Using UE4

avatar image

dom.leo
36 1 2 3

avatar image Sebastien R Oct 28 '16 at 03:12 PM

I am trying to do the same type of feature to no avail. Did you try to force an update on the physic engine before doing the overlap test ?

Would be greatly appreciated if anyone could help.

Thanks

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

0 answers: sort voted first
Be the first one to answer this question
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