WorldViz User Forum  

Go Back   WorldViz User Forum > Vizard

Reply
 
Thread Tools Rate Thread Display Modes
  #1  
Old 06-22-2014, 08:26 PM
shivanangel shivanangel is offline
Member
 
Join Date: Feb 2006
Location: New Jersey
Posts: 182
Question Why does intersection/pick return the geometry object?

I have hopefully an easy question.

I created a menu in 3ds max, where I cut out a series of buttons and want to perform simple intersection tests to make various things happen.
Right now, I'm just trying to properly detect the right object using:

Code:
line = viz.screentoworld( viz.mouse.getPosition() )
intersection = viz.intersect( line[0:3], line[3:] )
print 'intersection:', intersection.object
print 'intersection:', intersection.name
In the inspector, the geometry node takes on the name of the material as seen in the attachment. Therefore, all the objects have the same geometry node name.

I wanted the intersection test to detect each object independently of one another, but all I get is the following on everything I click on:

intersection: __main__.VRC_Auto(1)
intersection: VRC_Auto_M

Now, in the case of a different object with no materials attached, I get the geode returned to me instead. And I am able to easily delineate between the objects by the name and when I perform an intersection I can make all the special events ( such as activate animations happen) just fine. (see the second image).

Thank you,
George
Attached Thumbnails
Click image for larger version

Name:	GUI.png
Views:	1940
Size:	82.9 KB
ID:	654   Click image for larger version

Name:	GUI2.png
Views:	1987
Size:	132.9 KB
ID:	655  
Reply With Quote
  #2  
Old 07-01-2014, 05:52 PM
Jeff Jeff is offline
WorldViz Team Member
 
Join Date: Aug 2008
Posts: 2,471
The intersection test returns the lowest level sub-node in the scene hierarchy. To determine the name of the node above the geometry node set computePath to True when you call the viz.intersect command. The name_path attribute of the returned viz.Intersect object contains a list of sub-node names representing the full path to the intersected object within the scene hierarchy.
Reply With Quote
Reply

Tags
intersection


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
Rotate object around mainView? performlabrit Vizard 3 12-19-2013 06:31 AM
How to render a texture of the transparent object and then blur it whj Vizard 1 09-25-2012 03:15 PM
Intermittent orthographic stereo projection problems AySz88 Vizard 10 02-17-2012 12:50 PM
retrieve Object names Geoffrey Vizard 11 12-11-2009 04:26 AM
rotate to object jargon Vizard 1 08-08-2005 12:20 PM


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


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