React Fiber/Drei and CCDIKSolver scaling issues

185 Views Asked by At

Problem: the bones of the CCDIKSolver seem to scale down when the target is further away.

I've run into an issue that I can't figure out. I have a 3d asset that is based on this example https://threejs.org/docs/#examples/en/animations/CCDIKSolver.

When loading the model (useGLTF) the basics seem to work, except that the bones seem to scale when the target moves away

https://codesandbox.io/s/bones-without-html-n05nzo

I added a Drei <Html> component to the scene for some debugging, and low and behold, it stoped the scaling!

https://codesandbox.io/s/bones-with-html-serbpg

I'd love to understand 2 things:

  1. is my approach correct
  2. Any idea why the rendering of that Drei Html component fixes the issue?
0

There are 0 best solutions below