Set point-to-point rotation

Hi, in summary I am trying to find the rotation between two points. The little bears in the picture should turn towards the big bear. For this I just need to rotate the y rotation, but the question is, with what calculation can I find the correct y value? Please your help.

This code is supposed to be working


Use mesh.lookAt

This applies the rotation to rotationQuaternion on the mesh and there is only a y component so no need to flatten the little guy’s feet.