again sorry for my question ,
first of all Thanks a lot for all of your help.
I use your recommend and now I can check the current position and previous position of the camera, now how can I not render the loop when the camera is moving.
I try to invisible the red cube when the camera is moving, and it is worked. but I want to not render the red cube, how can I said to the engine to not render the cube while the camera moving and when camera stoped render the red cube.
here is my PG: https://playground.babylonjs.com/#6XIT28#283
here is My code:
let preCamX = camera.position.x;
let preCamY = camera.position.y;
let preCamZ = camera.position.z;
let curCamX,curCamY,curCamZ;
console.log("1",preCamX)
engine.runRenderLoop(() => {
curCamX = camera.position.x
curCamY = camera.position.y
curCamZ = camera.position.z
if(preCamX == curCamX || preCamY == curCamY || preCamZ == curCamZ){
box2.isVisible = true
console.log(preCamX == curCamX || preCamY == curCamY || preCamZ == curCamZ)
} else{
box2.isVisible = false
}
preCamX = curCamX;
preCamY = curCamY;
preCamZ = curCamZ;
})