Setting position via Inspector breaks BoneLookController

Hi

I think I have found a minor bug. Chck this out: http://playground.babylonjs.com/#FTD4QV#1. Two issues:

  1. If you change the position of the look target (“LK_Hip”, blue sphere) in the inspector, this has no effect on the mesh.
  2. Changes to the position of the look target in the inspector seem to break the BoneLookController because the DragBehavior of LK_Hip has no effect anymore.

Best wishes
Joe

The “LK_Hip” position vector gets set to a clone when modified in the inspector, so the position used for the BoneLookController target is not the same as the “LK_Hip” mesh’s position anymore.

Using a separate Vector3 for the BoneLookController target that gets updated from the “LK_Hip” mesh’s position on each frame works in this playground.

I don’t know why the inspector clones the position when changing it, but I don’t think it’s a bug.

cc @RaananW or @Deltakosh.

It probably clones to prevent unintended side effects :slight_smile: so I would think by design as well.

1 Like

Just to clarify. I wrote “bug” w/o thinking mcuh about it. A better term might have been “unexptected behavior”. Because at first I thought the BoneLookController was not working and upon googling I found posts that mentioned that the GLTF models are incompatible with the BoneLookController. This has been fixed since then but had I stopped my investigation there…

1 Like