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 does RotateAngleAxis work?

I write simple code:

 FVector Result = FVector::ForwardVector.RotateAngleAxis(90.0, FVector::UpVector);

And expect what result will be

{X=-1.0 Y=0.0 Z=0.0 }

But in fact i get

{X=-1.19209290e-07 Y=0.999999881 Z=0.000000000 } (about 45 degrees)

I try to reproduce it in Wolfram Alpha and get correct result https://www.wolframalpha.com/input/?i=rotate+(0,1,0)+by+90+degrees+around+z-axis

What i do wrong?

One of the answers: Speak in English :)

Thanks!

Product Version: UE 4.12
Tags:
more ▼

asked Jul 23 '16 at 10:32 PM in Using UE4

avatar image

SteelTeeth
1 1 1 1

avatar image NoobsDeSroobs Jul 24 '16 at 03:41 AM

Well, the forward vector can be anything because it depends on the orientation of your actor. Your idea is correct, you will rotate it as you believe it should, but you lack information to find out what is actually happening. Log what it is before you rotate it, what the length is before you rotate it and the same for after. Then you can compare to see exactly what changes. If you cant figure it out, post these values as an edit in your post or at least as a comment. Also, I wont see it again unless you comment to me so do that anyways.

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

0 answers: sort voted first
Be the first one to answer this question
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