centerParams and zoomview

Post here your questions about the OpenSpace 2.x or notify bugs and suggestions.

Moderators: Lapo, Bax

Posts: 62
Joined: 15 Aug 2011, 08:14

centerParams and zoomview

Postby radiateur » 24 Apr 2013, 12:28


I use zoomView and it works nice i do it like the doc says :

Code: Select all

var centerParams:MapCenteringParams = new MapCenteringParams(Number(clickedTile.x), Number(clickedTile.y), Number(Tile.z));

But i'd like to retrieve and store the previous centerParams of the openspace view, before i Zoomed on a clicked tile.
In order to dezoom at the end of a dialog and recenter the camera view as it was just before. (it is unfortunatly not default coordinates like 0,0,0 because scrollview is active on the map).

But i don't find the way to retrieve these coords values, i read all the doc, but i can't find a propety or a method to retrive this. I also managed to check for Position3D, but i don't find the answer.

Please help.
User avatar
Site Admin
Posts: 4535
Joined: 29 Mar 2005, 09:50
Location: Italy

Re: centerParams and zoomview

Postby Bax » 24 Apr 2013, 14:59

The information you are looking for doesn't exist. In fact OpenSpace doesn't keep the "currently-centered-tile" coordinates in memory during camera panning/zooming. The best you can do is un-zoom centering back on the avatar coordinates.
Paolo Bax
The SmartFoxServer Team
Posts: 62
Joined: 15 Aug 2011, 08:14

Re: centerParams and zoomview

Postby radiateur » 25 Apr 2013, 10:32

Thank you Bax -_-

Well I couldn't believe that something missed from openspace ;)

Return to “OpenSpace v2 discussions and help”

Who is online

Users browsing this forum: No registered users and 4 guests