It seemed to be the problem of GUI and camera.
I found that the size of the skeleton would change according to the view of the camera. For example, when the camera is closing to the skeleton, the size of the skeleton will be bigger. However, in the case I asked above, because the camera is not working under the canvas render setting (Screen Space - Overlay), the size of the skeleton won't be bigger or smaller when I move the camera. So far, I had no idea how to solve it.
Besides, I found the skeleton was always at the center of the scene, while the gameobject of the skeleton was at the other place. If I move the gameobject, the skeleton is still at the center of the scene. Is it because the coordinate was fixed in the Astra controller script?
void PrintDepth(Astra.DepthFrame depthFrame,
if (depthFrame != null)
int width = depthFrame.Width;
int height = depthFrame.Height;
long frameIndex = depthFrame.FrameIndex;
//determine if buffer needs to be reallocated
if (width != _lastWidth || height != _lastHeight)
_buffer = new short[width * height];
_lastWidth = width;
_lastHeight = height;
int index = (int)((width * (height / 2.0f)) + (width / 2.0f));
short middleDepth = _buffer[index];
Vector3D worldPoint = mapper.MapDepthPointToWorldSpace(new Vector3D(width / 2.0f, height / 2.0f, middleDepth));
Vector3D depthPoint = mapper.MapWorldPointToDepthSpace(worldPoint);