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