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"

Trace doesnt follow static mesh component Rotation

Hello, to keep things short im trying to perform a trace "forward" from a static mesh component inside my blueprint, im using the following code to do so

 bool ATTRoom::DoorDirectionsMatch(ATTRoom* OtherRoom)
     FVector OurLocNorm;
     FVector OtherLocNorm;
     FVector Direction;
     FCollisionQueryParams RV_TraceParams = FCollisionQueryParams(FName(TEXT("RV_Trace")), true, this);
     RV_TraceParams.bTraceComplex = true;
     RV_TraceParams.bTraceAsyncScene = true;
     RV_TraceParams.bReturnPhysicalMaterial = false;
     //Re-initialize hit info
     FHitResult RV_Hit(ForceInit);
     OurLocNorm = GetRoomDoors()->GetComponentLocation();
     OtherLocNorm = OtherRoom->GetRoomDoors()->GetComponentLocation();
     Direction = GetRoomDoors()->GetComponentRotation().Vector().ForwardVector;
     GetWorld()->LineTraceSingle(RV_Hit, OurLocNorm, OurLocNorm + Direction * 500,  ECC_WorldDynamic, RV_TraceParams);
         OurLocNorm + Direction * 1000, // 
         FColor(255, 0, 0),
         false, -1, 0,
 // other code

It gives me the expected result which is a trace forward from the static mesh component ( the wall doors in thsi case )

alt text

Now the issue comes up when i try to rotate the room

alt text

As you can see the trace is still being done but for some reason it doesnt follow along the rotation of the door even tho i am using the rotation for the trace... Any help is always appreciated

Product Version: Not Selected
more ▼

asked Jan 31 '15 at 03:15 PM in C++ Programming

avatar image

95 15 17 24

avatar image Zoc Feb 23 '15 at 01:31 AM

Did you find a solution for this? :)

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

1 answer: sort voted first

Phew i actually did found a solution i took the Room Location and used the .Left() and .Right() vector functions based on its rotation so they would point "forward" . Huge sorry for the delay

more ▼

answered Apr 03 '15 at 12:43 AM

avatar image

95 15 17 24

(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