Mousepicking not correct after resizing. Starling + away3d

Software: Away3D 4.x

Matej, Jr. Member
Posted: 04 April 2013 07:38 AM   Total Posts: 38

Hello,

I am using mousepicking on multiple meshes and everything is working as it should when I just open the flash window. The problem comes after the resizing. As if the meshes are bigger or smaller depending on making window smaller or bigger.

For example, when I make my windows smaller in width the meshes have the same visuals because that is my desired outcome, but the mousepicking works as if the meshes got bigger on screen.

What I resize is stage3dProxy.width and .height as well as view3d.height, because I need only vertical scaling of away3d content.

Any help on this, or could I post something that could help?

   

Avatar
Greg Caldwell (Greg209), Administrator
Posted: 04 April 2013 10:01 AM   Total Posts: 45   [ # 1 ]

Have you tried using the latest ‘dev’ branch of Away3D 4.1 on Github. There was a fix recently to correct the mousepicking resizing issue.

Cheers

Greg

 Signature 

Home page : http://www.geepers.co.uk
Mobile apps : Sum It All Up

   

Matej, Jr. Member
Posted: 04 April 2013 11:07 AM   Total Posts: 38   [ # 2 ]

I am using the master branch because I still use the objects from prefab that were exported for 4.0 version as Classes.

Is there a hotfix branch that I can merge or so you recommend going to Dev build?

   

Avatar
Greg Caldwell (Greg209), Administrator
Posted: 04 April 2013 11:11 AM   Total Posts: 45   [ # 3 ]

The changes are only in the ‘dev’ branch at the moment, I’m afraid, as this is where the current focus of development is.

It’s only a minor tweak - check out : https://github.com/away3d/away3d-core-fp11/commit/bba0b50bbe228d988a0a3ebece47aa31c11912f4

Greg

 Signature 

Home page : http://www.geepers.co.uk
Mobile apps : Sum It All Up

   

AFCAS, Newbie
Posted: 09 April 2013 08:08 AM   Total Posts: 3   [ # 4 ]

The changes are only in the ‘dev’ branch at the moment


_________________
Runescape Gold|cheap runescape gold|Diablo 3 Gold

   

Matej, Jr. Member
Posted: 09 April 2013 09:08 AM   Total Posts: 38   [ # 5 ]

Hello,

I cherry picked the commit from Greg and it works. One other important thing is that I had to do is this:

starlingUI.stage.stageWidth =
    starlingBackground.stage.stageWidth =
          stage3dProxy.viewPort.width =
              slotReels.viewWidth =
                    stage3dProxy.width = stage.stageWidth;

Only the did the mouse picking work correctly, and still few pixels off after resizing out of original ratio where Y gets resized and x croped.

   
   

X

Away3D Forum

Member Login

Username

Password

Remember_me



X