Skip to content
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

Use fbx global_config axis to properly rotate scenes #14

Open
nicopap opened this issue Jul 15, 2022 · 0 comments
Open

Use fbx global_config axis to properly rotate scenes #14

nicopap opened this issue Jul 15, 2022 · 0 comments
Assignees
Labels
enhancement New feature or request priority next Next thing that will be worked on most likely.

Comments

@nicopap
Copy link
Owner

nicopap commented Jul 15, 2022

FBX has configurable coordinate space, the file itself specify which axis is up, forward etc. Most things that export to FBX currently uses the same coordinate space as bevy, so no further action is required for most models. But when bevy_mod_fbx encounters a file that doesn't use the same coordinate space as bevy, the model will not look properly forward.

Solutions

Models in bevy_mod_fbx are already spawned with a parent transform, to accommodate scale declared with UnitScale. So we should probably rotate this transform to properly align the model into the bevy coordinate space.

Issue with that solution is situations where the model is mirrored, in which case we'll probably create a shear, which will prevent using the transform_scale_rotation methods on GlobalTransform

@nicopap nicopap added enhancement New feature or request priority next Next thing that will be worked on most likely. labels Jul 26, 2022
@nicopap nicopap self-assigned this Jul 28, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request priority next Next thing that will be worked on most likely.
Projects
None yet
Development

No branches or pull requests

1 participant