View Single Post
  #1  
Old 09-04-2009, 07:45 AM
Elittdogg Elittdogg is offline
Member
 
Join Date: Aug 2007
Posts: 77
Laser Pointer Question (Again)

I'm having a new problem. My previous laser pointer worked with this code
Code:
RedDot = viz.add(viz.TEXT3D, '.', viz.SCREEN)
RedDot.translate(0.5, 0.5)
RedDot.alignment(viz.TEXT_CENTER_CENTER)
RedDot.color(1,0,0)	# Red

However, now I'm running into a new problem. Now I need the laser pointer to be tied to the viewpoint and still appear on the screen. So basically, I need to be able to use the laser pointer to navigate from object to object in space so that when the laser pointer (tied to the viewpoint) is within a certain range of a target it will trigger some function. Ideally, the laser pointer would be tied to the center of my viewpoint that way when I move my head to look at the object the laser pointer will always be in the center of my field of view.

I tried linking the object but that didn't work:
RedDot = viz.LINK_OBJECT(viz.MAIN_VIEWPOINT)

The way my program is running right now (with the laser pointer linked to the screen) is that I'm trigger some functions when the laser pointer is above some targets and I'm triggering others when the laser pointer is below some targets. I need it to be exactly on top of those objects.

Any ideas??? PLEASE help!
Reply With Quote