scarlex
#1
Using the same model:
// in editor
console.log(aabb.center.data); // [-0.7065895199775696, -0.14930999279022217, 0.2446569949388504]
console.log(aabb.halfExtents.data); // [1.6565604209899902, 2.4923899173736572, 1.1943730115890503]
// in engine
console.log(aabb.center.data); // [-70.65899658203125, -14.931249618530273, 24.46554946899414]
console.log(aabb.halfExtents.data); // [165.65609741210938, 249.23875427246094, 119.43714904785156]
It seems the editor use meter as units, the engine use centimeter as units ?
According to user manual, it should be meters both in Editor and Engine.
https://developer.playcanvas.com/en/user-manual/assets/models/units/
2 Likes
scarlex
#3
Maybe it is related to fbx sdk ? I am using fbx sdk to parse fbx files, and generate playcanvas’ file format…
scarlex
#4
Here are two projects using the same model:
Using editor:
https://playcanvas.com/editor/scene/539693
Using engine:
http://jsbin.com/husoxas/20/edit?js,output
You can print its aabb to check it.
dave
#5
Are you generating your own JSON files? If so you are probably not handling the units from FBX correctly.
scarlex
#6
Thanks for your tips, dave. I download the json model from playcanvas, and the result is right.
http://jsbin.com/husoxas/22/edit?js,output
What’s more, the issue of [SOLVED] Skybox will clip model? go away!
Not sure it is related to the units or not.