WorldViz User Forum  

Go Back   WorldViz User Forum > Vizard

Reply
 
Thread Tools Rate Thread Display Modes
  #1  
Old 04-18-2012, 11:34 AM
Lynnifer Lynnifer is offline
Member
 
Join Date: Feb 2012
Posts: 4
Getting Position

How can I find the absolute position in space of a 3d text object. I am using a 3d text "+" sign as a pointer in my program. It is attached to a parent node (handNode) which moves based on a motion tracker.

handNode = viz.add(viz.TEXT3D,'.')
#handNode.visible ( viz.ON )
handNode.color(1,0,0) # red
handNode.scale(.005, .005, .005)
pointer = handNode.add( viz.TEXT3D,'+')
#pointer.visible ( viz.ON )
pointer.translate(0, 0, 12)
pointer.color(1,0,0) # Red
pointer.scale(18, 18, 18)

Right now, I am using " pointer.get(viz.POSITION) " to get its position in 3d space. It can be seen in this statement of the program:

DaAngleBearing = self.findBearing( viz.get(viz.HEAD_POS), pointer.get(viz.POSITION) )
DaAnglePitch = self.findPitch(viz.get(viz.HEAD_POS), pointer.get(viz.POSITION) )


Right now, when I use print outputs to find what the program is doing, it looks like it's giving me the pointers position relative to another object, and that relative position is going into the statement above and being used to calculate the angle and pitch between head and pointer. I need to use the absolute position of the pointer. Any suggestions are appreciated.
Reply With Quote
  #2  
Old 07-16-2012, 09:49 AM
DillonB DillonB is offline
Member
 
Join Date: Jul 2012
Posts: 7
pointer.getPosition(viz.ABS_GLOBAL) should give you the absolute position. Check out this tutorial: http://docs.worldviz.com/vizard/inde...orial_list.htm
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
Dynamic Position and Radius of Sphere hotshotiguana Vizard 1 03-23-2011 12:53 PM
Translate view from sensor position to lens position? Kaminski Vizard 4 03-09-2011 10:36 AM
writing joystick position to a data file Saz Vizard 3 12-17-2008 05:18 AM
default start position erchrastil Vizard 2 06-23-2008 08:15 AM
Avatar always returns in initial position pattie Vizard 2 08-31-2006 08:15 PM


All times are GMT -7. The time now is 02:29 PM.


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