Hi,
I am working on a map that displays a region's map image on a prim. I add some points of interest in some vectors and rez markers on the map.
Everything works perfectly, as long as the rotation of the map texture on the prim matches the map texture as it is as a result of getting it from submova.com/secondlife/map.php.
I need the map to work so that I can rotate the texture and still have the markers on the map rez at right places.
Here's the code I use to rez markers on the map:
vector scale = llGetScale(); //get prim size
vector targetPos = <100,10,0>; // location of the marker in-world
float xpos = (targetPos * scale.x) - (scale.x / 2.0); // convert x to relative coordinate on prim
float ypos = (targetPos * scale.y) - (scale.y / 2.0); // convert y to relative coordinate on prim
vector rezAt = llGetPos() + <xpos, ypos, 0.0> * llGetRot()); // current pos of prim + marker pos * current rotation
Obviously I need to do *something* with the rotation in the last line, but I have no idea what to do.
For simplicity and for now, I just want to flip the texture horizontally and vertically, so I guess I need to reverse the rotation.
Any suggestions?
Thanks -2fast
