BabylonJS - 删除相机上的平滑动画

BabylonJS - Remove smooth animation on the camera

我正在使用 BabylonJS 制作一个小游戏。
我正在使用此代码构建相机:

this.cam = new BABYLON.FreeCamera("playerCamera", new BABYLON.Vector3(x, y, z), s);
this.cam.checkCollisions = true;
this.cam.applyGravity = false;
this.cam.keysUp    = [90]; // Z
this.cam.keysDown  = [83]; // S
this.cam.keysLeft  = [81]; // Q
this.cam.keysRight = [68]; // D
this.cam.speed = v;
this.cam.ellipsoid = new BABYLON.Vector3(1, h, 1);
this.cam.angularSensibility = a;

很管用,我有相机,我可以四处走动等等...
但我的问题在这里:默认情况下,当移动和改变相机的方向时,它们是一个流畅的动画。
让我解释一下:当我用箭头键移动时(向左大约 20 像素),它将变为 25 像素(20 像素 + 5 平滑像素)。
我不想要它:/你知道如何禁用它吗? (移动和更改相机的方向)。

这是由于自由相机中定义的惯性。

要删除此 "smooth" 运动,只需禁用惯性即可:

this.cam.inertia = 0;