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"

How get HitResult on Ovelap

Hello

I'm building a tower of blocks. User drags a block and put on other. And I enable physics only after finish dragging. While dragging blocks can't goes through others and don't have physics(can't crash the tower while dragging). I need to detect that one block overlap other. And set position of dragging block upon static. Static blocks have different rotation, so I cant calculate Z based on bounds and location.

I try to:

 FHitResult HitResult;
 if (DraggingBlock->SetActorLocation(NewLocation, true, &HitResult) == false)

Also I saw https://answers.unrealengine.com/questions/219744/component-overlap-hit-position-always-returns-000.html

But all it return nothing.

How I need to setup collisions or use some other functions to get HitResult like I get OnComponentHit event?

Thanks

Product Version: UE 4.10
Tags:
more ▼

asked Mar 27 '16 at 07:50 AM in Using UE4

avatar image

dan-leech
3 2 1 4

(comments are locked)
10|2000 characters needed characters left

1 answer: sort voted first

I find answer :)

I use

 SetActorLocation(NewLocation, true);

and get FHitResult on OnDraggingBlockBeginOverlap

more ▼

answered Mar 29 '16 at 02:08 PM

avatar image

dan-leech
3 2 1 4

(comments are locked)
10|2000 characters needed characters left
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