Topic locked

Using GUI joysticks from StandardAssets(Mobile)...

June 6, 2011 - 10:12am #1

I'd like to use the Dual Joysticks prefab that comes in the Standard Assets (mobile) package that comes with unity. In the editor, the GUI looks fine placing themselves at the lower left and right of the Stage. However, when i publish to my Samsung Galaxy S 4G, the GUI graphics appear stretched and fall off the bottom of the screen a bit. Any thoughts on why this would be happening? To re-create this issue, simply import the StandardAssets(Mobile) package, add the dual joysticks to the game, then publish in landscape mode. Thanks, CapnJ

Using GUI joysticks from StandardAssets(Mobile)...

June 20, 2014 - 5:42am #6

Hi VGSIprog ,

the issue you are observing with GUITexture is connected to the use of the VideoPlayback feature and is discussed in this thread:

https://developer.vuforia.com/forum/unity-3-extension-technical-discussion/guitexture-aspect-ratio-gets-stretched-during-texture-v

Please follow up in that thread, where the solution is also provided.

Using GUI joysticks from StandardAssets(Mobile)...

June 18, 2014 - 10:39am #5

Did the latest vuforia upgrades hinder access to TrackerBehaviour class?

There doesn't seem to be any TrackerBehaviour script anymore.

 

We're having the same issue with GUITexture that get stretched, but when we play video-on-texture. It ruins our user interface. Is there anything that can be done about it?

 

Thanks

Re: Using GUI joysticks from StandardAssets(Mobile)...

June 7, 2011 - 8:36pm #4

Worked like a charm. Thx again!

Re: Using GUI joysticks from StandardAssets(Mobile)...

June 7, 2011 - 7:34am #3

Wooo! I'll try it as soon as I'm home this evening. Thx matey!

Re: Using GUI joysticks from StandardAssets(Mobile)...

June 7, 2011 - 7:28am #2

This is an issue with the aspect ratio of the camera background being slightly different than that of the screen. We set the viewport to match the camera background in the TrackerBehaviour script (see OnPreRender). This is required for 3D objects to match the projection/pose returned from the tracker.

I believe that the Unity GUI elements are drawn after the call to OnPostRender, so you might try resetting the viewport to match the screen size in that call:

void OnPostRender()
{
    GL.Viewport(new Rect(0, 0, Screen.width, Screen.height));
}

- Kim

Topic locked