WorldViz User Forum  

Go Back   WorldViz User Forum > Vizard

Reply
 
Thread Tools Rate Thread Display Modes
  #1  
Old 12-28-2013, 05:29 AM
VirtuallyInsane VirtuallyInsane is offline
Member
 
Join Date: Jan 2013
Posts: 9
Virtual "stepsize" with PPT

Hello everyone,

I was just wondering whether one can set the stepsize in the virtual world with position tracking. Say a person walks one meter in the real world, you could set the step size to two meters in the virtual world (we got restrictions from the size of our lab ).

We couldn't make this work with viz.MainView.stepsize or the viz.phys.setStepSize functions, which seem to do something different that I don't quite understand and we couldn't find any other way.

Can one implement such a thing in the vizard program or via the ppt studio?

Thanks a lot and seasons greetings!
Reply With Quote
  #2  
Old 01-02-2014, 04:47 AM
Frank Verberne Frank Verberne is offline
Member
 
Join Date: Mar 2008
Location: Netherlands
Posts: 148
Hi VirtuallyInsane,

Stepsize is not the thing you're looking for, it determines the maximum height difference allowed when moving through a world. Meaning that if you would like to climb a virtual set of stairs with steps that are higher than the stepsize of Vizard, you would be unable to climb those stairs.

What you're looking for is <link>.preScale. First you have to link your sensor with the mainview of Vizard. Then, you need to preScale the link, so that 1 meter in a certain direction in your lab becomes 2 meters in Vizard. See the code below:
Code:
import viz

viz.go()

#Add your sensor to track the position.
sensor = viz.add('sensor.dle')
#Link the mainview to this sensor.
viewLink = viz.link(sensor, viz.MainView)
#Use preScale to scale the x,y,z of the sensor to apply to the MainView
viewLink.preScale(1,2,1)
In this code, the Y-value of the sensor is multiplied by two, before being applied to the MainView.

Another way of moving 2 meters in the virtual world, when moving 1 meter in the lab is to scale the virtual world. In the code below, the virtual piazza is scaled to half its original size, so if in the original piazza 1 lab meter equaled 1 virtual meter, now 1 lab meter equals 2 virtual meters (in every direction).
Code:
import viz

viz.go()

world = viz.add('piazza.osgb')
world.setScale(.5,.5,.5)
Reply With Quote
  #3  
Old 01-04-2014, 05:31 AM
VirtuallyInsane VirtuallyInsane is offline
Member
 
Join Date: Jan 2013
Posts: 9
Hello Mr Verberne!

thank you very much for your ingenious code and idea! This will work perfectly for our project!

Best regards

Alvin
Reply With Quote
Reply

Thread Tools
Display Modes Rate This Thread
Rate This Thread:

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
how to hide 3D virtual object behind real object? Darkmax Vizard 3 05-29-2012 09:39 AM
why is time faster in my virtual world? billjarrold Vizard 1 11-24-2009 05:33 PM
Question about input from virtual keyboard. yyang Vizard 4 12-23-2008 12:25 PM
Human FOV and VIrtual FOV giancamati Vizard 0 12-14-2006 03:33 AM
reseting a user to virtual West bailenson Vizard 3 09-20-2004 03:29 PM


All times are GMT -7. The time now is 01:02 AM.


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