I´m trying to code some Python into a Game Blender menu and got into a few newbie´s brickwalls.
If someone could help me code this…
I have a menu (a map) with some 100 hot sopts (planes). When the user clicks into one, the camera gets set to some position elsewhere.
I was thinking into coding it like this:
|Hotspot |---------| Python script |
- all hotspots are linked to the same script.
The code would check the hotspot name and based on that get the position and orientation of a similar named Empty on the scene.
Like Hotspot.somename would check for Empty.somename properties.
Then the script set the the Camera empty to the position and orientation of the checked empty.
The problem is:
- I dont know how to set some spefific obj pos and ori. I can only do it to a “own” right now…
- How do I process the clicked name (Hotspot.somename to strip the first 7 letters and compose the name Empty.somename?
Thanks! And sorry for such basic questions…