Okay, so I did some digging into the LookCamera script. I couldn’t find any other script that references movement of the camera without touch input or mouse input.
I noticed the script was using a converter from Rad to degrees. Hoping it would be an easy fix I removed the converter. But it was not the case. Im guessing that the calculations of the the rads/degrees happens before the final conversion. Hence helping in no way shape or form.
LookCamera.prototype._getPitch = function(quat, yaw) {
var quatWithoutYaw = LookCamera.quatWithoutYaw;
var yawOffset = LookCamera.yawOffset;
yawOffset.setFromEulerAngles(0, -yaw, 0);
quatWithoutYaw.mul2(yawOffset, quat);
var transformedForward = new pc.Vec3();
quatWithoutYaw.transformVector(pc.Vec3.FORWARD, transformedForward);
// "* pc.math.RAD_TO_DEG" is gone from below
return Math.atan2(transformedForward.y, -transformedForward.z);
};
LookCamera.transformedForward = new pc.Vec3();
LookCamera.prototype._getYaw = function (quat) {
var transformedForward = LookCamera.transformedForward;
quat.transformVector(pc.Vec3.FORWARD, transformedForward);
// "* pc.math.RAD_TO_DEG" is gone from below
return Math.atan2(-transformedForward.x, -transformedForward.z) /* * pc.math.RAD_TO_DEG */;
};
You said you tried a quick fix. What, where or how did you tinker?
I also enabled WebVR on my phone for chrome. Nothing changed. Except I cannot use the click and tap movement functions either now.
**edit: Just went through the thread again. Remembered to bring up the polyfill.
So is this polyfill a library that playcanvas loads before start up, to which the suggested fix would be to pull the latest repo and then somehow get playcanvas to accept it before/after load? Or change it manually in the build source.
I can’t actually remember I think I changed a couple of lines in the polyfill to use radians but as it’s only Chrome that has this problem, I wasn’t confident that this would be the fix since it is different if you used Firefox.
I hadn’t tried just swapping the polyfill to the latest version after I download a self hosted build.
+1 for an update. This problem has been reported a few times now, and there has been no feedback about a fix ( which could be as simple as updating the polyfill version internally )