What exactly is "forward" in UnrealEngine?
Hi, when I add an Mesh to UE4, it looks like +Y is forward, like in this picture:
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.
asked Jun 05 '14 at 02:24 PM in Using UE4
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.
answered Mar 25 '15 at 12:24 AM
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.
answered Jun 06 '14 at 10:37 AM
I tested this with Modo 801 and Maya 2014.
It keeps importing as Y forward, but look-at for example changes X.
answered Jul 06 '14 at 10:53 PM
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.
answered Jul 07 '14 at 12:18 AM
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.
answered Mar 25 '15 at 01:00 AM
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.
Follow this question
Once you sign in you will be able to subscribe for any updates here