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 i can align my pawn character up vector to impact normal for any Surface by blueprint ?

alt text

Product Version: UE 4.8
untitled-2.jpg (208.7 kB)
more ▼

asked Jul 21 '15 at 11:14 PM in Blueprint Scripting

avatar image

1 3 5 9

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

1 answer: sort voted first

Hello @malikcgcs,

It took a good bit of experimentation, but I think I have a solution for you. I will post my code and then explain it below.

My Code: alt text

Explanation: Take your Normal vector and plug it into the "RotationFromXVector" node to convert it to a Rotator(the editor will do this step for you whenever you plug a vector into a Rotator input). From here you can rotate that value by 90 degrees because your up vector is always above your pawn. Finally you plug that value into the "Set Actor Rotation" node.

I know this is a really rough explanation, so I included some code below to allow you to draw the up vector of your pawn for debugging purposes.

Show the Up Vector Code: alt text

I hope this answer helps,


more ▼

answered Jul 22 '15 at 01:24 AM

avatar image

493 53 39 57

(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