Vacation time: I will be on vacation from November 26th to December 7th, please expect a delay in my support. Thank you for your understanding.

Rotating on IOS does not work.

Just purchased touch camera pro, and it does not work on IOS under webgl builds.

Everything is OKish on PC, but on IOS it always translates, although I have rotation selected, and two finger shows three dots, but does not rotate the camera.

I would like to show you in a teams session, if that's possible, when you return from vacation.

    kulitorum Hi!

    This case is a bit tricky as webgl for mobile is not officially supported by Unity and the default input will be the mouse instead of touch.
    Can you try to UNCHECK « use mouse » and « use simulator » in order to force the touch inputs ? it’s on the TouchCameraInputs object on your scene.

    If this is working you may have to keep 2 builds, one for mobile one for desktop and display the correct build (using js or server side code, to detect the current device)

    Keep me posted,
    Thanks

      Disabling "use mouse" makes it work on IOS, so I just added this to LeanTouch.cs:

      	void Start()
      	{
      		if (Application.isMobilePlatform)
      			useMouse = false;
      		else
      			useMouse = true;
      	}

      And now it works on both platforms. (Use simulator disabled)

      thank you.

        How do I set the initial camera position and orientation?

          Thanks I will add that check inside Inputs.cs

          you can set initial values on the components parameters in the editor. Or during play time with SetResetValues() and ResetCamera() on any component,

            "On the component parameters"... What component? - what parameters?

            If I select the "touch camera" component and set the camera there, it does not transfer to runtime. At runtime the camera is moved to 0,0,-10,0,0,0 even if I set other parameters.

              kulitorum I will have a look today. Normally the position is taken from the Transform the first time but there could be an issue.
              Thanks for reporting.

                Yes, indeed this was broken,
                Here is a quick fix, if you don't want to wait for the update, you just have to define the finalOffset variable

                in CameraTopDownOrtho.cs:

                        override protected void Init()
                        {
                            base.Init();
                            finalOffset = transform.position.SetY(0);
                            finalPosition = transform.position.SetY(fixedDistance);
                            finalRotation = transform.rotation = CalculateInitialRotation();
                        }

                In CameraPerspective.cs:

                        override protected void Init()
                        {
                            base.Init();
                            currentPitch = Pitch = initialRotation.x;
                            currentYaw = Yaw = initialRotation.y;
                            finalOffset = transform.position.SetY(0);
                            finalRotation = Quaternion.Euler(currentPitch, currentYaw, 0.0f);
                            finalPosition = CalculateNewPosition(finalOffset, finalRotation, finalDistance);
                        }

                Keep me posted, thanks!

                  This makes no difference.

                  The code in CameraTopDownOrtho.cs does not compile, "CameraTopDownOrthoEditor.cs(11,33): error CS0115: 'CameraTopDownOrthoEditor.Init()': no suitable method found to override" But I dont use Ortho yet.

                  The code in CameraPerspective.cs compiles, but when it's run, initialRotation is (0,0) so it's not taken from the camera.

                  Mind you, in line 15 it says "public Vector2 initialRotation= new Vector2(0,0);"

                  Kulitorum

                    Well, Disabling the "Camera Top Down Ortho" script form TouchCamera fixes it, and then it works.

                      Hmmm, but then I get an error in cameraorthobase.....

                        Ah, scratch the earlier comment about "CameraTopDownOrtho" - I pasted it in CameraTopDownOrthoEditor.cs

                        Still don't work though.

                          kulitorum Hi! You may have done something wrong editing the files, so try to reimport the plugin and re add these lines ? It's really just this line that needs to be added: " finalOffset = transform.position.SetY(0);"

                          Otherwise I can send you the updated scripts.

                            Ok, I reimported everything, including Lean.

                            I replaced the init functions.

                            I then select the "TouchCamera" (only camera in my scene) and move it to:
                            -3.26, 10.35, -6.03
                            35, 38.19, 0
                            1,1,1

                            And play.

                            Result:
                            -3.259782, 7.633153, -16.9334
                            35,0,0
                            1,1,1

                            So I load your demo, "Camera Modes/Perspective_Only_Demo"

                            Select the "TouchCamera" and move it to:
                            10,10,10
                            30,30,0
                            1,1,1

                            And play. Same result, camera is at:
                            10,5.73, 1.0
                            35,0,0
                            1,1,1

                            Can you please fix it?

                              kulitorum
                              I understand your point, basically right now, the transform position is used as offset in the plugin, and the "init rotation" variable is taken from the camera component parameters, instead of the transform rotation.

                              What you request is to keep the exact same transform (position+rotation) and convert it to the plugin's settings at start.
                              I will work on that and keep you posted!

                              Thanks!

                                So is there any way I can hack it in the meantime? - I just want my initial view to look good, that's all.
                                Can I setup the start viewport somewhere else?

                                Thank you.

                                  kulitorum I understand, then on the camera's component, locate the "initial rotation" parameters and edit them, for example if you're using CameraPerspective mode :

                                  You can also change the init distance :

                                  this is the distance between the camera view's center point on the ground and the camera along the it's z axis.

                                  then you will have to change the camera's Transform position, it will be applied as the "offset" setting. The offset is the camera view's center point position on the ground.

                                  I agree it's a bit tricky, so you're point makes complete sense, I'll work on that asap.
                                  Thanks!

                                    With this information I got to a usable result.

                                    Thank you.

                                      If you are updating the script, can you add a function to move the Y coordinate of the camera? - Like a mode where you move the camera target in a plane perpendicular to the camera view vector (camera->target) ?

                                      Thank you