|  | 
|  | 
| 
			 
			#1  
			
			
			
			
			
		 | |||
| 
 | |||
| 
				
				Getting position of a group of objects
			 
			
			Hello all, I am trying to get the position of a group of objects (a tent composed out of small objects) in Vizard. I have read through the Hierarchical model tutorial and all is well, but it only explains how to get positions of single child objects. Here, a handle is grabbed to the object GEODE. But for a group of object, I cannot create that handle because there is no geode. How can I export the model so that Vizard can grab a handle to the whole object and not just its lowest nodes? Below is an image of the coordinates I got in the Inspector. I need to get the position of the object 'tent' that is composed out of different smaller objects. Ironically, the inspector displays the right coordinates (marked with the red error)! Now I just need to be able to get them with the viz.getPosition() command. Any ideas?   Last edited by mape2k; 10-18-2013 at 01:22 AM. | 
| 
			 
			#2  
			
			
			
			
			
		 | |||
| 
 | |||
| 
			
			For each group of objects, I create a small sphere in the center of the group of objects. I grabbed the sphere handle in Vizard and could get their position.  However, this is very tedious with a lot of objects. Is there no other way? | 
| 
			 
			#3  
			
			
			
			
			
		 | |||
| 
 | |||
| 
			
			You can use the node.getMatrix command to get the transform of a sub-node. In your specific example, you could retrieve the tent position displayed in Inspector using the following code: Code: pos = model.getMatrix(viz.ABS_GLOBAL,node='tent').getPosition() | 
|  | 
| Thread Tools | |
| Display Modes | Rate This Thread | 
| 
 | 
 | 
|  Similar Threads | ||||
| Thread | Thread Starter | Forum | Replies | Last Post | 
| Grouping Objects | javadi | Vizard | 3 | 09-17-2013 07:14 AM | 
| create group of objects | Veronika | Vizard | 4 | 04-02-2012 11:45 PM | 
| Semi-circle array containing target and distractor objects | ptjt255 | Vizard | 3 | 08-04-2009 03:09 AM | 
| Lightwave objects rotation problem | hosier | Vizard | 6 | 02-13-2009 12:04 PM | 
| Could not find plugin to load objects... | halley | Vizard | 1 | 05-30-2006 11:01 AM |