PDA

View Full Version : Object Collision


Mattrat3000
12-13-2017, 12:38 PM
Hi all,
I had a question regarding object collision. Currently, our program is setup to do certain triggers when you reach a certain point within a maze.

For example, when you reach object A, start back at the starting point then go to object B, and reach object B you go back to starting point etc.

However, it is currently setup strictly based on coordinates, so when things get scaled, it gets messed up. For example, end_coordinates = 500,200, 300 when coordinates = 500,200,300 the loop starts over with next trial. I was wondering, if there is a way to call on the objects within the 3ds max file and grab their coordinates within viz/python.

For example, when you reach object A (table.vizgetcoordinates or table.vizdetectcollision) or something like these made up commands but didnt know what the command would be to pull coordinates for an object within the 3ds max created environment.
Thank you,
Matt

Jeff
12-15-2017, 01:30 AM
Take a look at the vizproximity (http://docs.worldviz.com/vizard/#vizproximity.htm) library if you're not already using it. This allows you to detect if the user gets within a certain range of an object. The proximity sensor can be attached to the object so you don't need to know it's coordinates. It's also possible to get the transform of model sub-parts. See the example code at the bottom of the hierarchical models (http://docs.worldviz.com/vizard/#max_hierarchical_models.htm) page.