[Solved] getOption("PageGetTileVertexData_2",..) f

vagrant

18-02-2008 13:08:37

Dear all,
I'm trying to get vertices on a certain Page. It went well when I tried to retrieve vertices from Page 0 0. But the problem occurred when I tried to retrieve from page other than 0 0. The getOption returned a false. The code that I used is pretty much the same as the code in http://www.ogre3d.org/wiki/index.php/Using_PLSM2_with_Newton.

I tried it on grand canyon map but reduce its Height into 1 and Width into 2. It was not the cause of this problem, was it?

I did search the forum, but didn't seems to find any insight. did I miss something?

Nodrev

18-02-2008 16:33:21

Are you affecting the x and z values of the pages instead of using event values:
int pageX=event->mPagex;
int pageZ=event->mPagez;
int tileX=event->mTilex;
int tileZ=event->mTilez;
?

vagrant

19-02-2008 02:30:20

I get the value of the pages from event. As for the tile, since I want to get all tiles in a page, I didn't set it from event, instead I iterate it from 0 to (pagesize-1)/(width-1).

I remember something, I used a float to save the value of the page, is it a problem?

vagrant

11-03-2008 16:17:49

apparently, it is a problem. If i cast the floats to int, it works out fine. Shame on me :)