WorldViz User Forum  

Go Back   WorldViz User Forum > Vizard

 
 
Thread Tools Rating: Thread Rating: 9 votes, 5.00 average. Display Modes
Prev Previous Post   Next Post Next
  #1  
Old 04-08-2008, 02:19 PM
Elittdogg Elittdogg is offline
Member
 
Join Date: Aug 2007
Posts: 77
Laser Pointer Updated

Code:
import viz	
viz.go()

Height = viz.input('Height?')
print "Participant's height is", Height, "inches."

Meters = (Height * (1.0/39.37)) 
print "Participant's height is", Meters, "meters."

RedDot = viz.add(viz.TEXT3D, '.', viz.SCREEN)
RedDot.translate(0.5, 0.57, 0)
RedDot.alignment(viz.TEXT_CENTER_CENTER)
RedDot.color(1,0,0)	# Red
#RedDot.scale(.5, .5, .5)

Ok...so here's my "deal." The RedDotis supposed to mimic the laser pointer (which is going to be positioned on top of a person's head. So I was trying to come up with a way to input how tall the person is, convert it to meters (if necessary), and then use that height to position the RedDot. So instead of

RedDot.translate(0.5, 0.57, 0)

I want: RedDot.translate(0.5, Meters, 0)

That way I can customize the height of the laser pointer in Vizard to each individual's personal height.
Reply With Quote
 


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


All times are GMT -7. The time now is 03:58 PM.


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