WorldViz User Forum  

Go Back   WorldViz User Forum > Vizard

Reply
 
Thread Tools Rate Thread Display Modes
  #1  
Old 02-19-2018, 08:15 PM
Jeff Jeff is offline
WorldViz Team Member
 
Join Date: Aug 2008
Posts: 2,471
Here's example code of linking both the avatar and view to a virtual tracker. The link operators can be adjusted to change where the viewpoint is in relation to the avatar:

Code:
"""
forward='w',backward='s',left='a',right='d'
"""

import viz
import vizcam
import vizinfo

viz.go()
vizinfo.InfoPanel()

dojo = viz.addChild('dojo.osgb')
avatar = viz.addAvatar('vcc_male2.cfg')
avatar.state(2)

tracker = vizcam.addKeyboard6DOF(forward='w',backward='s',left=None,right=None,up=None,down=None,turnRight='d',turnLeft='a',pitchDown=None,pitchUp=None,rollRight=None,rollLeft=None)
avatarLink = viz.link(tracker,avatar)
viewLink = viz.link(tracker,viz.MainView)
viewLink.preTrans([0,2,-2])
viewLink.preEuler([0,10,0])
Reply With Quote
Reply

Tags
multi user

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
multi user environment tutorial maya Vizard 0 11-23-2013 08:35 AM
multi user maya Vizard 1 11-18-2013 09:31 AM
Problems Ending Animation atalantis Vizard 2 03-01-2013 11:49 AM
Problems using viznet.client.connect fordprefect Vizard 2 10-18-2012 02:34 PM
Multi User Environment moneim230 Vizard 5 05-17-2011 05:56 PM


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


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