WorldViz User Forum  

Go Back   WorldViz User Forum > Vizard

 
 
Thread Tools Rate Thread Display Modes
Prev Previous Post   Next Post Next
  #5  
Old 08-27-2021, 11:24 AM
sado_rabaudi sado_rabaudi is offline
WorldViz Team Member
 
Join Date: Jul 2016
Posts: 40
One way to do this is to first create a group tracker in vizconnect that will contain the modified tracking data without roll. Next, in the avatar animator set the avatar head to move with this group tracker. Then in a callback function, which could be in the postInit or the application script, set the group tracker's position,yaw, and pitch using data coming from the Oculus tracker. Here's an example function:

def postInit():
"""Add any code here which should be called after all of the initialization of this configuration is complete.
Returned values can be obtained by calling getPostInitResult for this file's vizconnect.Configuration instance."""

Group tracker need to be added to vizconnect and used in animator
groupTracker = vizconnect.getRawTracker('headTrackerGroup')
steamHeadTracker = vizconnect.getRawTracker('head_tracker')

def onUpdate():
pos = oculusHeadTracker.getPosition(viz.ABS_GLOBAL)
ori = oculusHeadTracker.getEuler(viz.ABS_GLOBAL)

Set roll to 0
ori = [ori[0], ori[1], 0]
groupTracker.setPosition(pos, viz.ABS_GLOBAL)
groupTracker.setEuler(ori, viz.ABS_GLOBAL)

vizact.onupdate(vizconnect.PRIORITY_ANIMATOR+1, onUpdate)

return None
Reply With Quote
 

Tags
combining trackers, motion sickness, mouse & keyboard walking, oculus dk2


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
Walking is reversed in X and Z axes with motion capture. amir Vizard 2 07-31-2018 07:18 PM
motion tracker changes Vizard timing jelly Vizard 4 06-13-2016 11:34 AM
how to reduce motion sickness with Oculus rift+logitech driving force hzhao Vizard 2 09-23-2015 06:34 AM
Oculus runtime disrupts clustering to mirror DK2 display performlabrit Vizard 1 01-23-2015 07:00 AM
Intermittent orthographic stereo projection problems AySz88 Vizard 10 02-17-2012 12:50 PM


All times are GMT -7. The time now is 04:22 AM.


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