WorldViz User Forum  

Go Back   WorldViz User Forum > Vizard

 
 
Thread Tools Rate Thread Display Modes
Prev Previous Post   Next Post Next
  #2  
Old 01-12-2016, 02:51 AM
Jeff Jeff is offline
WorldViz Team Member
 
Join Date: Aug 2008
Posts: 2,471
The command returns a point in global coordinates but you could convert this into local coordinates of the object that is picked:

Code:
import viz
import vizact
viz.go()

viz.addChild('piazza.osgb')
ball = viz.addChild('beachball.osgb',pos=[0,1.5,3])

def updatePick():
	info = viz.pick(info=True)
	if info.object == ball:
		print 'global',info.point
		helper = viz.addGroup(parent=ball)
		helper.setPosition(info.point, viz.ABS_GLOBAL)
		print 'local',helper.getPosition() #mode defaults to viz.ABS_PARENT
		
vizact.ontimer(1,updatePick)
Reply With Quote
 


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
viz intersect object point chris2307 Vizard 1 10-10-2014 02:31 PM
animate an object using 5dt data glove 5 ultra agrima Vizard 3 07-01-2014 11:17 AM
Find collision point of line and arbitrary object asdf Vizard 2 01-28-2013 10:04 AM
how to pick up the object, move and rotate using mouse nasr Vizard 5 05-05-2009 03:11 AM
Getting object position in screen coordinates v-Salik Vizard 1 10-19-2007 03:41 PM


All times are GMT -7. The time now is 03:42 AM.


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