WorldViz User Forum

WorldViz User Forum (https://forum.worldviz.com/index.php)
-   Precision Position Tracker (PPT) (https://forum.worldviz.com/forumdisplay.php?f=9)
-   -   manually attaching opjects to tracked locations (https://forum.worldviz.com/showthread.php?t=323)

mspusch 04-13-2005 09:24 PM

manually attaching opjects to tracked locations
 
Interesting question from Worldviz Support Forum at
http://worldviz.us/tt/index.php:

I would like to spawn objects at the locations of the motion tracking pointers. I can easily import objects and link them to the tracker points, but I don't want the object following the pointer once they are created. What would be the best way to import a current tracking point and assign the location to an object's position that will not change?
how would I attach an object to that location in time without using the Link command? Can I use the 'get' function of the vizppt.dls sensor plugin?

mspusch 04-13-2005 09:25 PM

You can easily do the following in a timer or keyboard event:


# Initialization
obj = viz.add('myobject.wrl')
ppt = viz.add('vizppt.dls')

# In the event
data = ppt.get()
newObj = obj.copy()
newObj.translate(data[0], data[1], data[2])


The event code spawns a new object (without accessing the disk) and then uses the current PPT location assign it's location.


Hope this helps,
WorldViz Team


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

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