Hi, Thanks for the help, I GPT the problem and I got these answers. I implemented and now it works. Here is for reference:
Thank you all anyway
"The default look-controls implementation handles touch input with the onTouchMove function. In version 1.7.0 of A‑Frame, the source shows that onTouchMove only adjusts yaw (horizontal rotation):
onTouchMove: function (evt) {
var direction;
var canvas = this.el.sceneEl.canvas;
var deltaY;
var yawObject = this.yawObject;
if (!this.touchStarted || !this.data.touchEnabled) { return; }
deltaY = 2 * Math.PI * (evt.touches[0].pageX - this.touchStart.x) /
canvas.clientWidth;
direction = this.data.reverseTouchDrag ? 1 : -1;
// Limit touch orientation to yaw (y axis).
yawObject.rotation.y -= deltaY * 0.5 * direction;
this.touchStart = { x: evt.touches[0].pageX, y: evt.touches[0].pageY };
},
Because the onTouchMove handler only updates yawObject.rotation.y, vertical pitch is not affected by dragging. The device’s gyroscope still changes orientation (magicWindowTrackingEnabled defaults to true when the attribute isn’t parsed), so the view moves when you physically tilt the device, but dragging up or down doesn’t modify pitch. To allow pitch rotation from dragging, you would need to customize or extend the look-controls component to apply movement to pitchObject.rotation.x as well.
AFRAME.components["look-controls"].Component.prototype.onTouchMove = function (evt) {
var canvas = this.el.sceneEl.canvas;
if (!this.touchStarted || !this.data.touchEnabled) { return; }
var touch = evt.touches[0];
var deltaX = 2 * Math.PI * (touch.pageX - this.touchStart.x) / canvas.clientWidth;
var deltaY = 2 * Math.PI * (touch.pageY - this.touchStart.y) / canvas.clientHeight;
var direction = this.data.reverseTouchDrag ? 1 : -1;
this.yawObject.rotation.y -= deltaX * 0.5 * direction;
this.pitchObject.rotation.x -= deltaY * 0.5 * direction;
var PI_2 = Math.PI / 2;
this.pitchObject.rotation.x = Math.max(-PI_2, Math.min(PI_2, this.pitchObject.rotation.x));
this.touchStart = { x: touch.pageX, y: touch.pageY };
};
"