How to Transform Coordinate with rotation?

How to transform local position to world position with rotation?

the code only can get the world positon without rotation

matrix = box.getWorldMatrix();
local_pos = new BABYLON.Vector3(0, y, 0);
small.position = BABYLON.Vector3.TransformCoordinates(local_pos, matrix);

Maybe the world matrix is not up to date when you call getWorldMatrix. Try to call computeWorldMatrix(true) first.