WorldViz User Forum  

Go Back   WorldViz User Forum > Precision Position Tracker (PPT)

Thread Tools Rate Thread Display Modes
Old 05-05-2016, 02:48 AM
rajnishv rajnishv is offline
Join Date: Jan 2016
Location: Kalina,Sanatcruz(East),Mumbai,Maharashtra,India
Posts: 94
Smile Regarding Viconnect viewpoint

Hi Jeff,
#-----------------First Query------------------------------#

1) I want to move my viewpoint to specific point on keyboard event.
I tried using :-

This is a very simple demo, but it also illustrates the use of viewpoints with

Viewpoints are a method for forcing a display to be at a particular location.
The sample viewpoint in this script places the user at the top of a balcony.

You can test the effect of setting the viewpoint by adjusting the position values
for the viewpoint at the bottom of the script

import viz
import vizact
import vizconnect

# start the vizconnect session stored in the given directory

# oriMode sets what the viewpoint is resetting to. For example...
# matches orientation of the display to the orientation of the viewpoint
# matches orientation of the feet to the orientation of the viewpoint
# matches orientation of the base object (transport, avatar, tracker) to the orientation of the viewpoint
# Similar for posMode
oriMode = vizconnect.VIEWPOINT_MATCH_DISPLAY
posMode = vizconnect.VIEWPOINT_MATCH_FEET

# Add a viewpoint.
vp = vizconnect.addViewpoint( pos=[-13.24803, 12.28260, 8.83578],
euler=[90, 0, 0],

# Displays are added to viewpoints, the viewpoint will traverse the scenegraph to
# determine if the display is attached to an avatar, tracker, etc in order to
# perform the requested resets.

# Call reset viewpoints, which forces the display into the viewpoint position.
# This function can be called as often as desired, it is currently also mapped
# onto the insert button.
# add a reset key so when r is pressed the user is moved back back to the viewpoint
vizact.onkeydown('r', vizconnect.resetViewpoints)

# add an environment

def onKeyDown(key):
global vp
print key, ' is down.'
if key == viz.KEY_TAB:
print 'you hit the tab key'
vp1 = vizconnect.addViewpoint(pos=[-16.24803, 8.28260, 8.83578],euler=[90, 0, 0],posMode=posMode,oriMode=oriMode,constant=False)


But the viewpoint doesn't change the position on event..for the above code.

#------------------2nd query---------------------#

Secondly i want to change and animate viewpoint(view point of vizconnect not the main view)

And i want to apply action on the viewpoint(viewpoint of vizconnect)
I dont want to apply actions on MainView..

I have tried using and will use the example of dcoumentaion

#link =, viz.MainView)
#Set the animation speed and mode
SPEED = 4.5

def SetRotateMode(mode):

def AnimateView(pos):
action = vizact.goto(pos,SPEED,MODE,pivot=(0,1,0),rotate_mo de=ROTATE_MODE)
viz.MainView.runAction(action)(here i want vizconnect viewpoint instead of main view)

#Setup keyboard events

#Start off by moving to the first location
AnimateView([-16.24803, 8.28260, 8.83578])

Thank You
waiting for ur reply
Reply With Quote
Old 05-05-2016, 04:28 AM
rajnishv rajnishv is offline
Join Date: Jan 2016
Location: Kalina,Sanatcruz(East),Mumbai,Maharashtra,India
Posts: 94
Smile Vizconnect Viewpoint animation via transport.

Thank you Jeff, I managed it via Transport..:

The updated code to move the viewpoint...


#Set the animation speed and mode
SPEED = 12,000

def gotoViewPointAmeniteis(pos):
global vp
#action = vizact.goto(pos,SPEED,MODE,pivot=(0,1,0),rotate_mo de=ROTATE_MODE)
action = vizact.goto(pos,SPEED,MODE,pivot=vizconnect.getVie wpointDict(),rotate_mode=ROTATE_MODE)
vizconnect.getTransport().getNode3d().runAction(ac tion)

Thank you
World Viz
Especially Jeff and Kevin
Reply With Quote
Old 03-20-2017, 07:50 AM
arshbot arshbot is offline
Join Date: Mar 2017
Posts: 8
Is gotoViewPointAmeniteis a callback? How is it run? Should the method be called where a trigger occurs?
Reply With Quote
Old 03-20-2017, 11:03 PM
rajnishv rajnishv is offline
Join Date: Jan 2016
Location: Kalina,Sanatcruz(East),Mumbai,Maharashtra,India
Posts: 94
Hi ArshBot,

I have replied to ur post,pls refer the link:


In the above code you have written which links the model and the transports node(containing viewpoint) that is, candela).
That the reason user along with the model is moving.
Pls remove this line of code or comment it.

To understand better on using transports in vizconnect,pls refer tutorials from documentation on Inputs and Transports from Vizconnect Section.

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
How to track the actual viewpoint Jerry Vizard 3 05-25-2016 09:44 AM
Moving main viewpoint when linked to PPT v-clizzin Precision Position Tracker (PPT) 1 04-20-2010 04:09 PM
Avatar w/ hat cannot look at viewpoint TrashcanPatrol Vizard 5 08-19-2008 08:26 AM
3d viewpoint movement spacefarer Vizard 9 07-25-2006 03:37 PM
VRML Viewpoint error bstankie Vizard 1 03-11-2003 02:10 PM

All times are GMT -7. The time now is 06:30 PM.

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