How I can stop the camera completely?

There is one way to stop any camera movement like on this site https://www.steidle.net/playground/webgl/shirt/test.html

1 Like

Something like this - Babylon.js Playground
You’ll need to define the best values for your case with
camera.lowerBetaLimit
camera.upperBetaLimit

1 Like

I don’t want anything to move ! because I want to use the mouse event for another thing.
on this playground the camera move to the top.

Just detach the camera controls: camera.detachControl();

not working for me

thats my code

    export const LoadScene = (e: any) => {
  const { canvas, scene, engine } = e;

  var camera = new BABYLON.ArcRotateCamera(
    "camera",
    BABYLON.Tools.ToRadians(180),
    BABYLON.Tools.ToRadians(70),
    10,
    BABYLON.Vector3.Zero(),
    scene
  );

  camera.lowerBetaLimit = 1;
  camera.upperBetaLimit = 1;
  camera.attachControl(canvas, true);
      camera.detachControl();

  //   keyboardRotate"
  var light = new BABYLON.HemisphericLight(
    "light1",
    new BABYLON.Vector3(0, 1, 0),
    scene
  );

  light.intensity = 0.7;

  engine.runRenderLoop(() => {
    if (scene) {

      scene.render();
    }
  });
};

At your example the camera isn’t completely stopped; one can even see it’s changing alpha and beta values while browsing the model.


If you want to disable vertical movement just use the same values for upper and lower beta limit - https://playground.babylonjs.com/#A1GGPI#1
If you want to disable camera competely - use camera.detachControl();

I did what you say, now when I mouse hover the object make something like zoom and go in another side following the mouse.

Do you mean you’d like something like that - https://playground.babylonjs.com/#1JYENJ#10 ?

if you want to drag a bitmap over a terrain: