WillsCreative

  • Aug 1, 2024
  • Joined Jan 8, 2022
  • I have a min/max yaw setup on my camera, which works find when I just do a "rotate around" with a single touch. However when using the two finger pinch to zoom and rotate, it will let me rotate 360 degrees instead of the limit I have set.

    Please advise

    • Can you please send me updated documentation? There are new fields and changes to existing fields on the different cameras, which are not mentioned at all in the documention so there's no explainer to what anything does

      • There seems to be a bug when focusing the camera on a game object that has children that are particles. When I don't have any particles spawned under my object as children, the zoom works as intended. However if I spawn a particle system as a child under my object, and then try to focus the parent object, the camera zooms all the way out and doesnt respect the focus distance I have set.

        Please advise

        • Thank you, this works! One more question though... how do you adjust pitch on mobile? I can use 1 finger to translate, 2 fingers to zoom and rotate... but how do I adjust the pitch?

          • I added that code, but now when I try to rotate or touch the screen, the camera locks into a set position and i can't rotate at all (I can still zoom in and out).
            https://ibb.co/bdzBWDH

            here's a screenshot of my camera settings if it helps.

            If I set the camera input right click to drag, in the game window I can right click and move the mouse up and down, and it will rotate and pitch within the bounds. However if I try the 2 finger rotate (by holding ctrl and left clicking, or using two fingers on my device) it only zooms in and out, twist motion doesn't rotate at all.

            On my device there's no way to get the same input as right click and drag unless I set 1 finger drag to rotate... but then I can't translate

            • Anthony I implemented this and it seems to work fine when using one finger to rotate, but when I use 2 fingers on my device, it lets me rotate a full 360 degrees even though I have the clamp set. It seems like the TouchCameraInputs override the restrictions of the camera script on TouchCamera.

              For example, if on the TouchCamera I set the 'One Finger Drag' setting to rotate, and then try to rotate with 1 finger, it's restricted by clamp. But if I switch this setting back to translate, and then use 2 fingers to pinch and twist, I'm able to rotate full 360 degrees without a clamp

              Is there a way to adjust this so even when I use 2 fingers to rotate, it respects the clamp?

              • Anthony That worked perfect, very useful thank you!

                One last question; I'm setting a game object as the follow and focus when they move, and the camera follows them correctly. However if they move up and down in elevation along the move the camera is very jerky, and when they make a turn the camera wiggles almost like it's trying to spin to follow the character (2D sprite moving in a3D space). Which settings can I adjust to smoothen out the follow distance to resolve this?

                • I'm using the isometric ortho camera, and I'd like to limit the rotation on the Y axis, but there's no option to clamp the yaw only the pitch.

                  How can I go about limiting the horizontal rotation of my camera?