Anthony,

if I set the timescale from unity to 0 (pause), the OneFingerDrag still works but zooming via touch no longer works.

Is it possible that scaled and unscaled time is used here?

Can I influence externally which time is used, in the same way as Unity's ParticleSystem and animations work?

My goal is that the camera control is independent of the pause mode. For this, the camera movements would have to depend on the unscaled time.

Thank you
Dennis

    Dennis I just tried using alt/ctrl + click&drag to simulate the touch pinch gesture and it works fine with timescale = 0. Do you experience the issue only on a touch device?

      I am using a Macbook with a touchpad.

      This two components do not work when I set timeScale to 0:

      1. zoom with 2 fingers
      2. moving camera with
      cameraPerspective.MoveCameraToInstant(
                          manualOffset, 
                          cameraPerspective.FinalDistance, 
                          manualRotation
                      );

        Dennis I will send you an update by email.
        I had to replace Input.GetAxix() by Input.GetAxisRaw() for some reason the first one is affected by time scale.
        I also replaced all instances of Time.deltaTime to unscaledDeltaTime.

        Now I can move the camera when timescale is 0 (check the custom_controls demo scene)
        For the zoom using touch pad or scroll wheel I have no problem at all, so not sure what's wrong there yet on your side.

        Please try the update and keep me posted. Thanks!

          Anthony

          The patch has fixed the problem with MoveCameraToInstant. 🙂
          Thank you very much.

          Unfortunately zooming still doesn't work. I have looked more closely at how I control this.

          I use 2 INPUTS with the Perspective Camera:

          Move: One Finger Drag => Translate (works with timeScale = 0)
          Zoom: Two Finger Drag => Translate (does not work with timeScale = 0, but works with timeScale = 1)

            Dennis
            Do you have the same zoom issue in my custom_controls demo scene ?

            If you don't have it there can you send me a unitypackage containing a scene with your camera config ? thanks

              Anthony,

              in the demo scene, both also work at timeScale = 0f.

              while I was starting to put the test scene together I noticed a raycast target image. That caused the problem and now it's fixed :-)

              I just don't understand why OneFingerDrag wasn't caught by the Raycast Target but TwoFingerDrag was.

              Thank you very much. Problem solved

                Write a Reply...