centerParams and zoomview

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

Moderators: Lapo, Bax

Post Reply
radiateur
Posts: 62
Joined: 15 Aug 2011, 08:14

centerParams and zoomview

Post by radiateur »

Hi,

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));
openSpace.zoomView(1.3,true,centerParams);
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
Bax
Site Admin
Posts: 4626
Joined: 29 Mar 2005, 09:50
Location: Italy
Contact:

Re: centerParams and zoomview

Post by Bax »

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
radiateur
Posts: 62
Joined: 15 Aug 2011, 08:14

Re: centerParams and zoomview

Post by radiateur »

Thank you Bax -_-

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