Start a new topic

Scale when Snap - different devices

Scale when Snap - different devices


Hi heba,
As you already mentioned, the snap container needs to be a square. My guess is that the different browsers (iOS, Android) do not interpret your snap container the same. can you please set a background color for your snap container and make sure that it is always a square?

Best regards

Andreas

Now, we use SDK 5, but the problem still there for Android devices especially and latest iOS devices like iPhone 6 (the problem is related to the resolution)

 

What I found after investigation is: the problem is because Wikitude depends on the SnapContainer scale (size in width and height) when snap, so SnapContainer dimentions must be as a Square shape till content can be more normal, and that is not very effective for all devices, sometimes you need to make it as a rectangle shape to cover larger area from screen especially when need interaction with touch events.

 

the two attached files: the first for bad scale on android, and other is for iphone which is good, this difference in results is related to the difference in devices resolutions.

 

I hope that helps you. Also hope Wikitude find a solution for that.

Hi Till,

Can you please provide further details on the exact issue (which SDK version is this happening with? OS version? platform? send screenshots of the behaviour)

Greetings

Nicola

Still a problem, any news ?

Do you mean different iOS/Android devices or a a mix between all of them?

Best regards

Andreas

Hi Andreas,

Can you suggest me a correct way to calculate this scale when snap ?, I tried many ways but it's not good enough for multi devices.

Thank you,

 

Hi heba,
The scale that is used when snapped is different than the scale that is applied when the object moves. The global scene scale is only helpful when objects are not snapped. To ensure the right scale value, calcualte the value based on your dif size which defines the snap area and apply the scale only when the objects is snapped and set it to the original value when snapping ends.

 

Best regards

Andreas

How to do good scale when snap ? I need to handle other devices than iPhone5 "the defualt"

I used AR.context.scene.globalScale = -1.0; 

The tutorial say: "Setting the global scale to -1 indicates that the SDK should calculate the value by itself, so that all drawables are equal in pixel size among different devices."

But the result wasn't good, it stratched in height.

How to handle that correctly ?

Thank you, 

Heba
Login or Signup to post a comment