#1
|
|||
|
|||
position of html-file on screen
Hi!
I am pretty new to Vizard (and to programming in general), but I've been through all the tutorials. I was wondering: I want to give people feedback while walking through a virtual environment. Say, I want to display a small picture in the left corner of the screen when they are in the nothern part of the virtual environment, and another picture when they walk through the southern part of the environment. Preferably, the picture would be animated, so I would like to show a html file in the left upper corner of the screen depending on the users position. I am able to get the animated picture working on the screen by calling the right html files depending on the users position. Now, the problem is that I can't find anywhere how I control the size of the html-file displayed on the screen and it's position. Currently, it is displayed in the middle of the screen and around it you see part of the virtual world. I'd be pleased if anyone has suggestions! Janny Last edited by active_world; 05-16-2008 at 04:31 AM. Reason: typing error |
#2
|
|||
|
|||
There is no way to change the size/position of the html window. It is mainly used to display instructional text. The most common way to display an icon on the screen is to use a texture quad. Here is some sample code that shows how to do it. Let me know if anything is unclear.
Code:
import viz viz.go() #Add environment viz.add('gallery.ive') #Add texture quad and link it to upper left corner of screen quad = viz.addTexQuad(parent=viz.ORTHO,align=viz.TEXT_LEFT_TOP,size=1) viz.link(viz.LeftTop,quad,offset=(20,-20,0)) #Add icon texture icon = viz.add('ball.jpg') #Apply texture to quad and resize quad to size of texture quad.texture(icon) quad.setScale(icon.getSize()) |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Read file....many issues | Uttama_vizard | Vizard | 9 | 07-08-2008 02:16 PM |
Getting object position in screen coordinates | v-Salik | Vizard | 1 | 10-19-2007 03:41 PM |
Avatar always returns in initial position | pattie | Vizard | 2 | 08-31-2006 08:15 PM |
Grabbing screen shots (but not to file) | pbeeson | Vizard | 9 | 08-30-2006 06:14 PM |
file input | vsully | Vizard | 1 | 12-21-2004 10:51 PM |