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"

Office Holiday

Epic Games' offices will be on holiday from June 22nd to July 7th. During this period support will be limited. Our offices will reopen on Monday, July 8th. 

line trace wont rotate

hello, i am very nooby at using ue4. i'm creating my first ever project and in my endeavors I've been trying to do some line tracing.alt text

this is how my blueprint is set up.

alt text

alt text

it just doesn't seem to rotate even though the capsule does? it seems to be stuck in the direction of player start

if anyone could explain this to me in the SIMPLEST terms or even create a blueprint showing me where my error is, i would really appreciate it

Product Version: UE 4.7
Tags:
more ▼

asked Aug 22 '15 at 02:20 PM in Blueprint Scripting

avatar image

cdott
6 1 2 5

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

3 answers: sort voted first

Hi, your capsule component is world aligned by default so it will always be facing the same direction.

You will need to use the actor rotation. So... GetActorRotation..

Hope that helps! =)

P.S.(But just use the Actor rotation) There are three options for the pitch yaw and roll of the capsule. Only Yaw is set to True by default because it's oriented around Z is up logic and there isn't a need to rotate the capsule along the other two axis's unless your game doesn't stay in Z is up logic. Setting the other two to True will allow the rotation of the capsule in the editor.

more ▼

answered Aug 22 '15 at 02:39 PM

avatar image

Devero
2.3k 114 62 234

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

For further clarification for anyone else who wants to change the rotation of a line trace:

alt text

The easiest way to do this is to add an arrow component to your scene. This gives us a reference point from which to grab rotation information. The arrow should be pointing "forward" relative to your mesh. (usually down X)

As with a normal line trace, start by getting the World Location of the Arrow Component and plug this into the Start of your line trace. Then you get the forward vector of the Arrow Component and multiply this by your trace length (distance you want the line to extend). You then drag a line off your Arrow Component and type "rot" and add a "Add World Rotation" node. In my example I'm rotating 90 degrees on the Y axis so that the line fires to the right instead of forward. You then connect the Add World Rotation node to your line trace and of course call the AddWorldRotation node from whatever you're using to call your line trace. E key for example. In my screenshot its not connected to anything but it needs to be in order to work.

That's it. Really simple way to change the rotation of your line trace. You can even call multiple line traces at once using a sequence to create a radial trace. Not exactly sure how system intensive it is to call multiple line traces at once, but it should be fine.

more ▼

answered Feb 14 '16 at 04:59 PM

avatar image

TorQueMoD
1.2k 83 116 145

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

thank you for your reply, i done what you said and exchanged the world rot for actor rot

alt text

i'm not sure if and or what i need to attach to actor rotation because it's still the same... there probably something really obvious i'm missing but i'm just exhausted with this...

its funny i can blueprint an ai wonder, pawn sense move to but cant draw a line that rotates "sigh"

thank you for your help though

actor rotation.jpg (82.5 kB)
more ▼

answered Aug 24 '15 at 04:03 PM

avatar image

cdott
6 1 2 5

avatar image Devero Aug 24 '15 at 04:09 PM

Yes, you have some of your nodes mixed up, Here check this out and see if it helps:

alt text

avatar image cdott Aug 24 '15 at 04:32 PM

thank you so much, i realize now you have shown me! i really appritiate it

avatar image Devero Aug 24 '15 at 07:26 PM

Awesome.

If you would accept the answer and/or upvote, I would appreciate the karma =) Enjoy your Gamedev!

(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