-
-
Notifications
You must be signed in to change notification settings - Fork 97
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Setting to Swap Y/Z axes to Increase rather than decrease per convention #2048
Comments
ResolvedFor reference, here is a coordinate systems cheat sheet:Source: https://twitter.com/FreyaHolmer/status/1325556229410861056 EDIT: I realized that this graphic is not applicable here.
How do you know that most people find this counterintuitive?
There is no industry standard. Every application uses the coordinate system that fits their needs. I'm against such a setting, as it breaks addons and tutorials if you use the wrong system, and it isn't present in any other game engine I know of. |
Hence the suggestion for the default. I'd expect it'd be transparent to most addons and all tutorials.
Probably because no other game engine does it in such a squiffy way. ;-) |
If it were an Option, I would agree but if it were set by the Editor and did not allow the user to change, nearly every existing project will be being destroyed. |
Been asked several times (in various variants - there is really no "standard" convention here) and core devs have said multiple times that this won't happen. |
use v_flip property of a viewport when needed also, your explanations with 3D/2D are mixed without specifying what in which is inverted relatively to what. basic maths as you say can acommodate with y down for 2D this is theory crafting about best coordinate systems |
A prime example of where the current situation becomes a gotcha: AnimationTreeBlendSpaces2D.
Yep, it's a hard thing to convey, why I tried to explain it 3 different ways.
Sure it can, but once you start reversing axis values it's not really "basic maths" any more. Just like I can use innumerable archaic brobdingnagian lexicographic oddities in place of their lilliputian synonyms (translation: It's possible to use fancy/long words to say the exact same thing as simple/short words). You don't do it as a matter of course because most people (even native speakers) don't understand it intuitively despite it being accommodated by basic English. |
i myself am using 2d transforms/operations at the moment, then project to 3d, i know how this is annoying by default adding an option to change core axis, is too much trouble and inefficient for computation chain, that's why all tools need to choose one |
I will copy-paste my explanation from here. The TL;DR is that this won't happen.
|
Describe the project you are working on
n/a
Describe the problem or limitation you are having in your project
Godot increases the Y and the Z axis in the "negative" direction. Or put another way, for 2D projects, the origin (0,0) is the top left, rather than the usually-expected bottom-left.
This is counterintuitive to most people, runs counter to the game industry norm, and increases the likelihood of mistakes by most users.
For example, these are how Godot declares these things:
As an image (from http://kidscancode.org/godot_recipes/math/transforms/)
It's unintuitive for "UP" to be a negative value, if I give you the number 5, and say "go up 3", you'll tell me 8, not 2 because people equate "up" (and "forward") with "add". The current approach is akin to defining:
Compass.East == Left
Compass.West == Right
While I appreciate some domains of computing do have this odd "increase by decreasing" behaviour (i.e. raster handling software), this is not the game industry standard. Below are the random selection I looked up of OS and proprietary engines:
Unity uses bottom-left: https://docs.unity3d.com/ScriptReference/Vector3.html
Gamemake studio - as Unity - https://docs.yoyogames.com/source/dadiospice/002_reference/maths/vector%20functions/vectors.html
Unreal also increases the axis (but different axis order; probably because a 3D-only engine): https://docs.unrealengine.com/en-US/BlueprintAPI/Math/Vector/index.html
CryEngine - https://docs.cryengine.com/display/CS/CryEngine.Vector3 - as Unreal
Ogre - Not obvious from the API - https://www.ogre3d.org/docs/api/1.7/class_ogre_1_1_vector3.html#details
Solar2D - No Vector type
Wikipedia also concurs that this is the "standard" orientation for cartesian coordinate systems - https://en.wikipedia.org/wiki/Cartesian_coordinate_system#In_two_dimensions
This is also how it's taught in basic maths (the level most folks have).
Describe the feature / enhancement and how it helps to overcome the problem or limitation
The ability for the user to specify what how the Y/Z coordinates work in the engine. These could be either a Project setting or an Engine Setting.
Two options should probably be sufficient, at least for 2D:
Godot: Default; what it is now (although longer term I'd suggest it shouldn't be the default; i.e. change at a major point release)
Industry Standard: Y goes up from bottom left, Z increases.
(from https://en.wikipedia.org/wiki/File:Cartesian-coordinate-system-with-circle.svg )
Describe how your proposal will work, with code, pseudo-code, mock-ups, and/or diagrams
As above
If this enhancement will not be used often, can it be worked around with a few lines of script?
Doesn't seem to be any consistent way to switch it around at the script level.
Is there a reason why this should be core and not an add-on in the asset library?
It's an engine thing
The text was updated successfully, but these errors were encountered: