Kupoman / blendergltf

A glTF exporter for Blender
Apache License 2.0
319 stars 49 forks source link

Objects with bone as parent got position offset after export #154

Open shenzhuxi opened 5 years ago

shenzhuxi commented 5 years ago

In Blender, I set cubes parents to bones as hitboxes/hurtboxes.

screen shot 2019-01-03 at 19 05 10

After export to gltf, I found that their position were different from in Blender.

screen shot 2019-01-03 at 19 06 13

Here is the cause https://github.com/KhronosGroup/glTF-Blender-Exporter/issues/249. GLTF file stores bone head position and its children follow it, while children follow parent bone's tail location in Blender.

It can be solved by moving children and set their locations to the bones' tails after you make things look right in Blender. However, it's still very counterintuitive.