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

Wrong glTF skeleton node calculation #7

Open
mich-dy opened this issue Mar 26, 2024 · 3 comments
Open

Wrong glTF skeleton node calculation #7

mich-dy opened this issue Mar 26, 2024 · 3 comments

Comments

@mich-dy
Copy link
Collaborator

mich-dy commented Mar 26, 2024

Calculation of the skeleton node position is wrong for some models, including the "dq.gltf" file from the example assets.

@mich-dy
Copy link
Collaborator Author

mich-dy commented Mar 26, 2024

gltf_skeleton

@mich-dy
Copy link
Collaborator Author

mich-dy commented Mar 26, 2024

The lines with childNode->getNodeMatrix() * glm::vec4(1.0f) also take rotations and scaling into account.

Better use something like childNode->getNodeMatrix()[3] to extract just the translational part from the matrix.

@mich-dy
Copy link
Collaborator Author

mich-dy commented Mar 26, 2024

Position after change:
gltf_skeleton2

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

When branches are created from issues, their pull requests are automatically linked.

1 participant