WorldViz User Forum  

Go Back   WorldViz User Forum > Vizard

Thread Tools Rate Thread Display Modes
Prev Previous Post   Next Post Next
Old 10-08-2009, 02:34 PM
JimC JimC is offline
Join Date: Jun 2009
Posts: 42
Question CAVE, navigation, tracked wand, coordinate systems

I have Vizard running on two walls of a CAVE. Head-tracking is working perfectly, and I can use a tracked wand to point and fly around. Here's a code fragment to indicate what I've done so far:

# SyzygyTracker subclasses viz.VizNode+viz.EventClass
viewtracker = SyzygyTracker( service, matrixIndex=0 )
# Ditto for SyzygyNagivator
navTracker = SyzygyNagivator( service, matrixIndex=1, xIndex=0, zIndex=1, speed=1. )
# Create and configure a Cave object
cave = vizcave.Cave()
makeCAVE( cave )

# Attach the head tracker
cave.setTracker( pos=viewtracker, ori=viewtracker )

# Attach the navigation (wand) tracker.
caveorigin = vizcave.CaveView( viewtracker )
navLink = navTracker, caveorigin )
I want to have a virtual object attached to the wand. I defined another tracker object tied to the wand and tried the following:

wandTracker = SyzygyTracker( service, matrixIndex=1 )
wandRender = viz.add('box.wrl')
wandRender.setScale( .02, .02, 2. )
wandLink = wandTracker, wandRender )
...which initially works great, I end up with a virtual rod attached to the wand. However, its position is being set in world coordinates, so as soon as I start flying around it gets left behind. I've tried setting various Src and Dest flags on the link, or add()ing it to the caveorigin, but I don't really understand what I'm doing and the things I've tried so far haven't worked. What's the right way to do this?

Reply With Quote

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
navigation in cave environment Andy Vizard 4 03-28-2008 01:32 AM

All times are GMT -7. The time now is 12:23 AM.

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