SkinnedMesh far from the origin gets weird

I’ve noticed that when using a SkinnedMesh if I move it quite far from (0,0,0) things start getting wacky. The animations go all crazy and far enough away the object just disappears, or at least renders somewhere else. I’m using r92 and the marine .json file from here: If I create a basic scene with the model at (0, 0, 0) and the camera at (0, 150, -200) set to lookAt(0, 100, 0) the model loads fine and will play the ‘walk’ animation just fine. However, if I move the camera to (50000, 150, -200), lookAt(50000, 100, 0) and use mesh.position.set(50000, 0, 0) the animation gets really weird.

Close to the origin
Far away from the origin

It gets worse the farther you are from the origin, but this example seems to be a sweet spot for this particular animation where it is super creepy.

THREE never throws an error or anything, it’s like it just can’t handle the math with bigger numbers. Anybody have any idea if this is a known issue or just an accepted limitation of SkinnedMeshes?


Supplemental note: The machine where I’m seeing this is an old Ubuntu box with integrated Intel G41 graphics. I’m using Chrome. Strangely enough, I see equally disturbing but slightly different behavior on my iPhone (also with Chrome), so your mileage may vary on exactly what you see in the examples.

That’s great. Thanks for pointing that out. Guess I’ll be anxiously awaiting r94.

1 Like