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"

Raycast for brush.

Is there a way for raycasts to detect geometry brushes because I created a lightswitch using brushes and I want raycast to detect it. Is there a way?

Product Version: UE 4.12
Tags:
more ▼

asked Jun 29 '16 at 09:57 AM in Blueprint Scripting

avatar image

StillAlive039
182 9 10 19

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

2 answers: sort voted first

Solved it. Just converted the brush I was using as a static mesh. If you guys have other idea I would love to hear it,

more ▼

answered Jun 29 '16 at 10:47 AM

avatar image

StillAlive039
182 9 10 19

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

Sorry for digging out a dinosaur, but maybe someone will find it useful - I'm using simple function to get floor and surprisingly it works for brushes too.

  bool AMyCharacter::CheckFloor() {
     FVector TraceStart = GetActorLocation();
     FVector ab = CapsuleComponent->GetScaledCapsuleHalfHeight()*Zaxis*1.05;
     FVector TraceEnd = TraceStart - ab;
     FHitResult OutHit;
     GetWorld()->LineTraceSingleByObjectType(OutHit, TraceStart, TraceEnd, FCollisionObjectQueryParams(ECC_TO_BITFIELD(ECC_WorldStatic) | ECC_TO_BITFIELD(ECC_WorldDynamic)), FCollisionQueryParams(TEXT("IKTrace"), false, this));
 
     if (OutHit.bBlockingHit)return true;
     return false;
 }

I'm tracing for any object below a character, if LineTrace hits something it returns true value. As I said, it worked for brushes too.

more ▼

answered Jan 08 '17 at 12:57 AM

avatar image

Ch3shireCat
186 19 21 26

(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