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"

Identify the direction of a face.

Hi i have a (maybe silly) question.

If i do a line trace and i hit an object, is there a way to find out in which direction the hit polygon is facing and align an object to it? I have build some kind of interior editor and specially with wall objects it would be nice if i could align them directly to the wall.

Oh our project is BP only atm.

Product Version: UE 4.9
Tags:
more ▼

asked Nov 20 '15 at 10:16 PM in Blueprint Scripting

avatar image

Rexaka
101 14 20 24

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

3 answers: sort voted first

The resulting hit record contains the normal for the impact point. I think you could use that to help solve your problem.

more ▼

answered Nov 20 '15 at 10:39 PM

avatar image

Slayemin
824 50 29 73

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

Kind of old but I stumbled on it while making my Portal-Gun. I fire a projectile which creates a portal Sprite "onHit" and I want that portal to have a rotation that is exactly like the walls polygon the projectile hit. (Long story short: just like in the game "Portal")

The “rotationFromXVector” Node really solves that. Here is an example of my BP which delivers a Transform with location of the projectile (Can easily be replayed with "hit location") and the rotation of the "polygon" (mesh) that was hit.

Projectile that spawns a portal on hit (only at worldStatic and worldDynamic):

alt text

In my example the Sprite of the spawned portal behaves like a decal (has the right rotation compared to the "wall" it's laying on)

This is just a start to solve the problem in the question but I thought I share a pic so maybe others get an idea of what is going on.

alt text alt text

more ▼

answered Jan 31 '17 at 10:52 PM

avatar image

Lord7even
178 6 12 11

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

thanks i have managed it. There was a rotationFromXVector Node that that solfved it :)

more ▼

answered Nov 21 '15 at 04:16 PM

avatar image

Rexaka
101 14 20 24

avatar image 0vr Mar 07 '16 at 12:39 AM

could you elaborate please? maybe a screenshot? I'm not sure how to use that node

avatar image Sentura Mar 07 '16 at 01:48 AM

Rotation from XVector just gives you the forward vector of the actor in degrees.

(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