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 to get rotation from 3 vectors in world space

Hey there, I have three vectors in world space and I want to find a rotation that aligns with them using blueprints. How would i go about finding the rotation?alt text

Product Version: UE 4.16
Tags:
pic.png (56.9 kB)
more ▼

asked Aug 01 '17 at 03:58 AM in Blueprint Scripting

avatar image

MiniTigress
3 1 3 5

avatar image VictorBurgos Aug 01 '17 at 04:35 AM

Draw it out

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

2 answers: sort voted first

there should be something like "Make Rot from Axes"

more ▼

answered Aug 01 '17 at 05:25 AM

avatar image

redbox
4.2k 80 16 103

avatar image MiniTigress Aug 01 '17 at 06:08 AM

I put them in like so

alt text

But the actor still does not align its rotation correctly

https://gyazo.com/61a11bccbde204f037378b9e97856513

bp.png (70.1 kB)
avatar image redbox Aug 01 '17 at 06:18 AM

they must be normalized, and orthogonal to each other, like real axes.

maybe one of this conditions is not met?

avatar image MiniTigress Aug 01 '17 at 06:43 AM

I tried normalizing them but it still doesn't line up so i guess they are not orthogonal. So does that mean i cant just use any 3 vectors?

avatar image RotemS Aug 01 '17 at 06:46 AM

Something about how you're explaining your problem is unclear. Draw a picture.

avatar image redbox Aug 01 '17 at 06:48 AM

Of course you can't.

According to that gif you want character to face black square? Square is a widget right?

avatar image MiniTigress Aug 01 '17 at 07:25 AM

In the gif, the actor I spawn is what I want aligned to the line traced triangle. The triangle is made up of the three vectors i wanted it aligned to. alt text

pic.png (56.9 kB)
avatar image redbox Aug 01 '17 at 07:48 AM

Ok, so you can get triangle normal vector in world space and do MakeRotFromZ axis.

This can be like:

alt text

avatar image MiniTigress Aug 01 '17 at 08:05 AM

Thank you so much! You're amazing, it works perfectly. Going to try and reverse engineer it to understand what is going on better.

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

You can try Get Rotation from (X,Y,Z) Vector or GetRotation(X,Y,Z)Vector after combining them?

more ▼

answered Aug 01 '17 at 04:39 AM

avatar image

VictorBurgos
2.4k 60 27 111

avatar image MiniTigress Aug 01 '17 at 05:00 AM

Do you mean the Make Rot from X,Y and Z nodes in a blueprint?

(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