Maps on the screen...

Ok, me again…

Part of my project (The Palenque, Chiapas Virtual Visit) is to include a Map, a classical game map, that shows the actual player’s position (visitor in my case) and allows teletransporting on 3D scene by double clicking on the 2D map… (I hope, I had been clear on my explanation…)

My question is easy : How can I do that using PANDA 3D??? :stuck_out_tongue: , i.e. How can I draw a 2D interactive image (my map) over my 3D scene without affect it, and return to the 3D scene after use the map??? it’s possible?

The easiest approach is to draw a map in a different program (say, Photoshop or so) and then show it in Panda using an onscreen image:
panda3d.org/manual/index.php/OnscreenImage
You can call show() and hide() on the image to make it appear and disappear.

Very useful information “pro-soft” thanks…

So… there is a way to use that OnScreen image like an interactive map, that show my actual position and sends to me (the visitor) to other position on the 3D scene by clicking the map???

Or, what kind of alternative can I use to give this function in my project??

You can listen for the mouse1 event when the map is shown (and ignore that event again once the map is closed).
In the event code, you can check the mouse position, and then you just need to translate the mouse position into a 3d x and y (the calculations for this is usually a simple multiplication, but it entirely depends on how the map covers the world and how big the world is).
Then, you can just move the player with a setPos.

Thank you so much Pro-soft, I believe I have enough tools to work in that part, is question of do it, only one more doubt: if I need double click?? what is the right sintax for the event mouse1? I’m using this, but it only works with one click

anyway, if a finish or if I have a problem, you’re gonna know it…

Thanks again…