FirstPersonMovement.prototype.onTouchStart = function (event) {
// We only care about the first touch. As the user touches the screen,
// we stored the current touch position
const touch = event.touches[0];
this.lastTouchPosition.set(touch.x, touch.y);
};
FirstPersonMovement.prototype.onTouchMove = function (event) {
// We only care about the first touch. Work out the difference moved since the last event
// and use that to update the camera target position
const touch = event.touches[0];
const touchSensitivity = 0.15;
this.eulers.x -= (touch.x - this.lastTouchPosition.x) * touchSensitivity;
this.eulers.y -= (touch.y - this.lastTouchPosition.y) * touchSensitivity;
this.lastTouchPosition.set(touch.x, touch.y);
};
The important bit is onTouchMove doesn’t receive delta x/y, but you need to get that manually. Store the touch start position onTouchStart and calculate deltas on your own.