Hey!
I spent the last 3 days, 2 without sleep trying to solve my issue.
It might be an easy problem but i can’t seem to think out of my box
The issue: I setup a deforming bone armature for my tank mesh to have realistic track physics.
I tried a heck ton of things, searched for solutions all day, and nothing seem to solve the issue, that when i rotate my tank, the tracks dont follow it
This is started when i switched from .glb file to .babylon
and switched to scene.useRightHandedSystem = false from true.
I know for the glb file the first bone was an armature that if i rotated, everything rotated, but for .babylon the first bone is simply a bone from the armature, and if i rotate it, nothing changes it seems
I even tried different blender exporting, parenting bones, not parenting, but problem still appear the same.
The code needs some reading to understand, here is the PG: Babylon.js Playground
Hello! Could you share your original glb/blend too, so we can compare the behaviors?
Hi! sure!
Tho i think the glb file in itself would be useless, i changed a lot of things since then, but the original work that uses the glb file is here: https://playground.babylonjs.com/#BA06DD#2
here is my blend file that i use in blender v3.6 and export it as babylon:
https://github.com/ThatNotMe/trackphysics/raw/main/models/tank.blend
Good news! and bad news…
After spending my whole time with this, I was able to “solve” it by rotating the main bone in my blender file (the link above is updated).
The bad news… it still has problems but now its different! thats progress at least…
Now when the tank rotates (not on the Y axis) thats when the tracks start to get loose… literally.
I probably didn’t write the code well in scene.registerAfterRender but give me some slack, I didn’t sleep and its 1:00 am.
Here is the updated PG: https://playground.babylonjs.com/#YEA3YV#1
(If you flip upside down with the tank, it gets worse… MUCH WORSE. so this has to be solved)
I appreciate any help, now I finally can sleep for a “few” hours