[SOLVED] FPS Camera Rotation Glitch

Me and @koalastrikermi are working on a multiplayer fps project, but there’s currently some glitches with the fps rotation. I’ve checked the code multiple times, and it’s the same as the tutorial project. The problem is that when rotating the camera, there’s some weird glitches, namely that the tilts as you move it from side to side. At first we thought that it was the uneven terrain, but after jumping onto the wall, we discovered that it happens even on completely flat hitboxes. As I said, I’ve checked the code multiple times, and it seems to be a perfect copy of the original tutorial project (aside from all of the extra stuff we’ve added). Do note that some of movement code is different, but the looking around code is the same, and it happens even when still.

Here’s the project: https://playcanvas.com/project/585801/overview/caeds-hostis-battle-royal

The code is contained within the Movement.js script inside of the scripts folder.

1 Like

It’s the scale of the player that is causing to behave oddly due to how the transformation matrix works:

image

Reset that to 1, 1, 1 and it will behave correctly

3 Likes

Hmm, definitely something I wouldn’t normally think of. It fixed it. Thanks for the help!

1 Like