‘lookAt’ bug when viewed in browser

Software: Away3D 4.x

seanClusta, Jr. Member
Posted: 02 January 2012 10:12 PM   Total Posts: 38

I’m very new to Away3d so may be doing this all wrong anyway but i think it’s a fairly simple scene setup and i’ve had no luck getting it to work when viewing the scene in a browser.
I am loading in a scene created in 3dStudio called landing.3ds and have a standard camera3d setup in the scene which i view it through, i also have some controls which can change the x, y and z position of the camera as well as changing the camera.lookAt() vector (which starts at 0,0,0 and increments by +/- 1 when i press corresponding keys)

I am publishing this through flashdevelop and am using the latest build of away3d from github, when i view it in the external player in flashdevelop (800x600 window) everything works absolutely fine but when i view it in google chrome (and other browsers) with fp 11.0.1.98.. the lookAt vector seems to be pointing somewhere other than the loaded 3d model and the result is i can’t see anything through the camera.

Could this be due to a co-ordinate/matrix issue? I don’t understand why the scene works fine until i load it through the browser (wmode is set to direct) and only then it’s when i set the

_camera.lookAt(new Vector3D(_target.x_target.y_target.z)); 

where _target is the loaded scene vector that it ‘disappears’

I know there’s an upAxis argument to the lookAt method but that doesn’t seem to change anything (have tried setting this with properties of 1, 0 & -1 to see if it’s a directional issue on the camera)

Any help on this would be fantastic, basically i need to be able to control the position of both the camera and it’s target

Thanks…

   

Arno, Newbie
Posted: 03 January 2012 10:42 AM   Total Posts: 25   [ # 1 ]

Not sure if this is the problem.

Are you loading that landing.3ds in your flash? And are you testing it local? You have to give the flashplayer rights to load things from your harddrive.

Win

go to “control panel”

Not sure if this is the problem.

Are you loading that landing.3ds in your flash? And are you testing it local? You have to give the flashplayer rights to load things from your harddrive.

Win: go to “control panel”

and than see this example: http://tangentlin.files.wordpress.com/2011/12/flash-setting.png?w=780

Mac

Go to “system preferences” -> “flash player” -> click on the last tab -> scroll down and click on “trusted local settings…”

   

seanClusta, Jr. Member
Posted: 03 January 2012 12:46 PM   Total Posts: 38   [ # 2 ]

Thanks for getting back but no that isn’t the issue. My work drive is a trusted location, it does load the model and display it - it’s only when i call the camera’s lookAt method that it disappears (and only when viewing it in a browser, i can change the lookAt vector without an issue when viewing through a standalone player).

Maybe it’s a player/build issue ?

As i say the plugin version in chrome is 11.0.1.98 whereas the player that i’m viewing with via flashdevelop is the ‘11.1 FlashPlayerDebugger’ which comes with the Flex 4.6 SDK.

Does anyone know if the player could be affecting this?

   

John Brookes, Moderator
Posted: 03 January 2012 01:57 PM   Total Posts: 732   [ # 3 ]

There was a change with the matrix row/coll around Beta2 time. So possibly is that.

   

seanClusta, Jr. Member
Posted: 03 January 2012 04:58 PM   Total Posts: 38   [ # 4 ]

Thanks John.
Any idea what would resolve that? Is there some kind of matrix manipulation i can add to set it back?

   

John Brookes, Moderator
Posted: 03 January 2012 05:17 PM   Total Posts: 732   [ # 5 ]

Just update the flash player for chrome.
If its the old one im thinking of then nobody would have it installed.
Except flash devs who havent updated.

   
   

X

Away3D Forum

Member Login

Username

Password

Remember_me



X