Replies: 1 comment 3 replies
-
This is a controversial area (see godotengine/godot#76060, godotengine/godot#72753 and other PRs). Most changes revolving around the Forward direction historically have shown to add more confusion than they resolve, since they introduce inconsistencies across Godot versions that weren't here before. |
Beta Was this translation helpful? Give feedback.
3 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Quick note: Blender also has the problem I'll be describing; I understand preferring to keep Godot in line with the way it handles this for consistency. I also acknowledge that direction is relative.
For the sake of example, imagine a humanoid mesh. Let's call him Chuck. He was modeled in Blender, and imported into Godot. In both programs, if the user presses 1 on the keypad, the camera view aligns so that chuck is looking straight at you. You can see his face, along with the front of his body. In both Blender and Godot, this is called the "front" view, which makes sense because we are looking at the front of Chuck.
However, if we select the "left" camera view, Chuck's right side will be displayed. Conversely, selecting the "right" camera view will display his left side.
The "forward" vector in Godot is -Z. By this definition, Chuck is not currently facing forwards. Let's rotate Chuck, so that his front side faces the forward vector. Now, the "front" camera view is displaying Chuck's rear, while the "rear" camera view is displaying his front. However, the left and right views are now correct in what they display of the mesh.
I know most people probably don't care, but this discrepancy bugs me when I'm coding a "forwards" direction for Ai, NPCs, or whatever else needs it; if -Z is forwards in Godot, then I should use the -Z basis of a given node to define forwards. But, currently, my meshes all face +Z which leaves me with a conundrum: Does it make more sense to rotate all of my meshes 180 degrees in Blender, or to write in code defining +Z as forwards? I'd appreciate seeing this addressed.
I suggest swapping the names of the "front" and "rear" camera views to be consistent with Godot's forward axis. However, another more generic solution would be renaming the camera views after the axis they display (Examples: Front View -> -Z View, Left View -> +X View).
Beta Was this translation helpful? Give feedback.
All reactions