GLTF Model doesn't move with skeleton when using datGUI on mobile only.
See original GitHub issueGLTF Model doesn’t move with skeleton when using datGUI on mobile only.
Describe the bug or feature request in detail. I have used GLTFLoader to load the model that was exported from blender with gltf-IO and datGUI to control the skeleton. It works flawlessly on desktop, but not on mobile. This for sure is true for Chrome 80 on Android 8. With SkeletonHealper I can see that bones are in fact moving, just not the mesh. Also, the light controls work.
function render() {
spotLight.position.x = guiControls.lightX;
spotLight.position.y = guiControls.lightY;
spotLight.position.z = guiControls.lightZ;
scene.traverse(function(child){
if (child instanceof THREE.SkinnedMesh){
child.skeleton.bones[123].rotation.x = guiControls.head_x;
child.skeleton.bones[123].rotation.y = guiControls.head_y;
}
//Seems to only produce errors
// else if (child instanceof THREE.SkeletonHelper){
// child.update();
// }
});
}
Please also include a live example if possible. You can start from these templates:
Three.js version
- Dev
- r115
- 110 fron cdnjs
Browser
- All of them
- Chrome
- Firefox
- Internet Explorer
OS
- All of them
- Windows
- macOS
- Linux
- Android
- iOS
Hardware Requirements (graphics card, VR Device, …)
Huawei P9 Lite 2017
Issue Analytics
- State:
- Created 3 years ago
- Comments:11
Top Results From Across the Web
Three.js select GLTF object from a dropdown with DAT.gui
I want to load a model selected from a dropdown list. There is only one model displayed at once, so I didnt want...
Read more >How to load the same gltf model in threejs or react-three-fiber ...
the solution is gltfjsx. this is what allows you to re-use models. there is no counterpart for this in vanilla three, and they...
Read more >Three.js Making a Game
So, first we need to include the utils. Above for each model we clone the gltf. scene we loaded and we parent that...
Read more >Learn Three.js - Third Edition - Packt
Finally, you will learn to use morph and skeleton-based animation, ... The only browser where you have to take care of is the...
Read more >Help with dat.gui and issues in Animation - three.js forum
I am rendering an animated 3D model from https://sketchfab.com/3d-models/hoverboard-d93296d2412b4997ae8cb96baaba5ccd which has 3 animations and 1 static ...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Confirmed - working with 200 bones
It seems floating point textures are not supported. Depending on the amount of available vertex uniforms, complex skeletons won’t work on your device.
Your model has 556 bones which is noticeable more than the models from the official examples (e.g. the soldier has just 51 bones).
I suggest you use WebGL 2 if possible or simplify our model. In any event, it seems unlikely that this can be fixed on engine level.