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"

Set rotation actor with impact normal

Hello,

I would like to change the rotation of an actor (here a pawn) depending on the impact normal from line trace. It works for a climb but not for a descent because the impact normal is always positive. Someone has an idea to fix that ?

alt text alt text

Product Version: UE 4.8
Tags:
2.jpg (157.0 kB)
img1.jpg (181.6 kB)
more ▼

asked Jul 10 '15 at 02:15 PM in Blueprint Scripting

avatar image

Exxassens
37 8 11 17

avatar image Exxassens Jul 10 '15 at 03:19 PM

ok, I found a solution...

avatar image TonyTwoTone Sep 05 '15 at 03:31 PM

Could you share your solution please? I'm having the same problem!

avatar image Exxassens Sep 05 '15 at 11:23 PM

Of course ! Just check if the value of x from the impact point is positive or negative. My blueprint if it can help :

Line Trace alt text

Event graph alt text

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

1 answer: sort voted first

There is a slightly cleaner way to solve this issue. My answer is a few years late, but found this on a Google search, so leaving a response for people finding this in the future.

Grab the impact normal from your hit result and pass it as the forward vector on a MakeRotationFromAxis node (leave the other two vectors at zero. Apply the resulting rotation to whichever actor you want to match the surface of your hit object.

more ▼

answered Jul 06 '17 at 07:25 PM

avatar image

JamesGMarks
21 1 6

avatar image kevinaboyette Aug 04 '17 at 04:31 AM

James, could you elaborate on this? I gave it a try, but I'm having trouble. I'm trying to get my character to rotate toward the impact point of a line trace (Z-axis only).

alt text

linetrace.jpg (182.0 kB)
avatar image Petro Feb 12 '18 at 08:04 AM

You seem to be making a rotator from the impact normal, then making it a vector only to make a rotator again. I'm working on a slightly similar problem but it's on the X axis of a wall. I'm turning my character to face the same direction as the back-end of the wall he's about to vault. alt text alt text

Now I don't know if you would need to invert the vector like I did in your case. But my works okay so far.

wallexample.jpg (73.9 kB)
wallangle.jpg (214.3 kB)
(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