WorldViz User Forum

WorldViz User Forum (https://forum.worldviz.com/index.php)
-   Vizard (https://forum.worldviz.com/forumdisplay.php?f=17)
-   -   position of html-file on screen (https://forum.worldviz.com/showthread.php?t=1498)

active_world 05-16-2008 04:31 AM

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

farshizzo 05-16-2008 07:24 PM

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())



All times are GMT -7. The time now is 03:47 AM.

Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2019, vBulletin Solutions, Inc.
Copyright 2002-2018 WorldViz LLC