Topic: Rotation Hiccups on iOS

Hi Alex,
yesterday, I upgraded from 2.5.16.1 version to the last one (2.5.37.1). And now, I receive camera HICCUPS in every map rotation that I do (in 3D view). This issue didn't happen before on my iPhone 6s

What can be caused this?

Thanks in advance!

Re: Rotation Hiccups on iOS

Hello.

I've never seen such a problem.
In addition, I checked the change log and nothing of the changes should affect it.
Please send a video of the bug so I know exactly what to find.

Kind Regards,
Infinity Code Team

Re: Rotation Hiccups on iOS

Hi,
I found only one difference in the plugin settings (see the attached image) but even increasing these values the hiccups continues.
What are the recommended values??

thanks.

Post's attachments

Attachment icon capt.png 35.59 kb, 5 downloads since 2018-07-25 

Re: Rotation Hiccups on iOS

The cache is not related to this problem.

I think I was able to reproduce the problem.
This happens with "Allow Camera Control - On" + "Smooth Zoom - ON", right?
The problem occurs because mathematically every touch interaction is a little bit of rotation and a little bit of scaling at the same time.
Unfortunately, I right now do not have any ideas how to fix this.
I tried to work around this in several ways, but this makes the problem even worse.
It takes some time for experiments. Unfortunately, it is impossible to say exactly how much.

What can I suggest right now:
Handle gestures with some gesture framework (for example, TouchScript or EasyTouch).
I think this should help.
If such a way is suitable for your project, I can make such a script for you.

Kind Regards,
Infinity Code Team

Re: Rotation Hiccups on iOS

Ok, but with version 2.5.16 and "Allow Camera Control - ON" + "Smooth Zoom - ON" these hiccups did not happen, then, some change in the new scripts produced the issue.
Even, in the 2.5.37 version it is not solved by switching "Smooth Zoom" to OFF

Thanks!!

Re: Rotation Hiccups on iOS

I visually compared the rotation on the device in v2.5.16 and v2.5.37.
At least for me, they work exactly the same way.

Please send a video that demonstrates the problem, and a full screenshot of your settings.
Right now I'm looking for a problem with my eyes closed trying to guess what you meant in the first post.
Maybe I'm just looking in the wrong direction.

Kind Regards,
Infinity Code Team

7 (edited by maurogarcia 2018-07-30 18:48:08)

Re: Rotation Hiccups on iOS

Hi,
I'm rotating the camera according de iPhone compass, using the "OnCompassChanged" action of OnlineMapsLocationServiceBase.cs, maybe something change with the new version, for example, how do you take the values of the compass? or the capture frequency?

thanks!

Re: Rotation Hiccups on iOS

You did not mention the compass before.
Yes, with 2.5.16 there were changes in Online Maps Location Service, but this affects to rotation of the marker.

Try this way:

using UnityEngine;

public class RotateCameraByCompassExample2 : MonoBehaviour
{
    public float rotationSpeed = 1f;

    private float rotation;
    private bool isFirstValue = true;
    private OnlineMapsTileSetControl control;

    private void Start()
    {
        control = OnlineMapsTileSetControl.instance;
        OnlineMapsLocationService.instance.OnCompassChanged += OnCompassChanged;
        OnlineMapsLocationService.instance.compassThreshold = 0;
    }

    private void OnCompassChanged(float f)
    {
        rotation = f * 360;
        if (isFirstValue)
        {
            control.cameraRotation.y = rotation;
            isFirstValue = false;
        }
    }

    private void Update()
    {
        float newRotation = Mathf.LerpAngle(control.cameraRotation.y, rotation, rotationSpeed * Time.deltaTime);
        control.cameraRotation.y = newRotation;
    }
}
Kind Regards,
Infinity Code Team