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"

What exactly is "forward" in UnrealEngine?

Hi, when I add an Mesh to UE4, it looks like +Y is forward, like in this picture: alt text

On the other hand, in code/blueprints, +X is the forward axis. Which means that if I use FindLookAtRotation(), my model will be rotated 90° to the right of where it should point.
Am I doing something horribly wrong, or does UE4 use two different definitions for forward?

Product Version: Not Selected
Tags:
front 1.png (26.8 kB)
more ▼

asked Jun 05 '14 at 02:24 PM in Using UE4

avatar image

kat0r
211 4 3 12

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

6 answers: sort voted first

Forward is in the +X direction in Unreal coordinate system terms.

You can find out how the engine defines "forward" simply by looking at the ForwardVector constant on FVector class (there may be a way to inspect this through blueprints, but I haven't tried).

FVector::ForwardVector = FVector(1,0,0); // X is forward

Similarly, you can look at the UpVector constant to get a feel for "up":

FVector::UpVector = FVector(0,0,1); // Z is up

In terms of importing models, I'm not sure how the pipeline handles models made in a different coordinate system, but I would imagine the Engine would somewhat respect/convert it to the right rotation based on the file. But if you are building out your blueprint or construction, you should definitely point the 'front' in the +X direction.

more ▼

answered Mar 25 '15 at 12:24 AM

avatar image

VRDave
6 2

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

I am pretty sure it is X but agree it is not always that clear. The new vehicle stuff uses X, unfortunately meshes from Cinema4D come in with Y forward and if you use Y-Up in Maya I think you get the meshes import with Y Forward too.

more ▼

answered Jun 06 '14 at 10:37 AM

avatar image

Anadin
361 10 17 25

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

I tested this with Modo 801 and Maya 2014.

It keeps importing as Y forward, but look-at for example changes X.

Eugene

more ▼

answered Jul 06 '14 at 10:53 PM

avatar image

FLS-Eugene
16 1 2 2

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

I think this may be a mistake as i can't find a reason for it but skeletal meshes will import with Y forward. Notice though that even in their examples they make sure to rotate the mesh to face X forward in the character blueprint.

So skeletal meshes import Y forward but the controller expects the pawn/character to be X forward. Correct this in the blueprint or by using an offset of your own in C++ i guess.

more ▼

answered Jul 07 '14 at 12:18 AM

avatar image

RimmyD
2.6k 98 15 96

avatar image Anadin Jul 12 '14 at 01:03 AM

Except it breaks vehicles and would have implications with root motion, ideally UE4 needs to do the rotation internally so our meshes end up X Forward

avatar image RimmyD Jul 12 '14 at 01:39 AM

I totally agree. This is a very odd issue. I can only guess this is a left over from UE3 where Epic engineers did some funky rotation on skeletal meshes to accommodate their artists wanting to work Y forward.

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

Yup it is X Forward, Z Up, which is different to everything else (Blender is -Y Forward, +Z Up, Maya (in z-up mode) is +Y Fwd, +Z Up etc.) but now we have the import translate, scale, rotate it has got to be less of a problem, be nice to be able to make those settings a preset though.

more ▼

answered Mar 25 '15 at 01:00 AM

avatar image

Anadin
361 10 17 25

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

Meshes provided by Epic (eg "SK_Mannequin") seem to always face along the +y axis.

Characters provided by Epic (eg "ThirdPersonCharacter") seem to always have the Mesh component rotated 270 degrees around the z-axis so it faces along the +x axis. This then works with the concept that forward means along the +x axis.

Strangely, when using the UnrealEditor .fbx import tool with default settings it orients the imported mesh to point along the +x axis.

To work around this I change the import settings when using the fbx import tool to add a rotation of 90 around the z-axis so my imported mesh faces along the +y axis.

more ▼

answered Aug 22 '18 at 09:38 AM

avatar image

glaucobacchi
1 1

(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