WorldViz User Forum  

Go Back   WorldViz User Forum > Vizard

Reply
 
Thread Tools Rating: Thread Rating: 2 votes, 5.00 average. Display Modes
  #1  
Old 05-16-2008, 04:31 AM
active_world active_world is offline
Member
 
Join Date: May 2008
Posts: 1
Question 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
Reply With Quote
  #2  
Old 05-16-2008, 07:24 PM
farshizzo farshizzo is offline
WorldViz Team Member
 
Join Date: Mar 2003
Posts: 2,849
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())
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

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


All times are GMT -7. The time now is 06:19 AM.


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