![]()  | 
	
| 
		 
			 
			#1  
			
			
			
			
			
		 
		
	 | 
|||
		
		
  | 
|||
| 
		
	
		
		
			
			 
				
				Connect on the fly shapes
			 
			
			
			I would like to build complex shapes out of cubes and then make them behave as one solid body. The add command does not work for vizshapes: 
		
		
		
		
		
		
		
		
	
	AttributeError: 'VizPrimitive' object has no attribute 'split' Is there another way to get the same result for vizshapes as in the carousel example? Greetings, Albert import vizshape viz.go() viz.move(0,0,-10) cube1 = vizshape.addCube() cube2 = vizshape.addCube() cube1.add(cube2) spinForever = vizact.spin(0,1,0, 90, viz.FOREVER) cube1.addAction(spinForever)  | 
| 
		 
			 
			#2  
			
			
			
			
			
		 
		
	 | 
|||
		
		
  | 
|||
| 
		
	
		
		
		
		 
			
			You can set up parent/child relationships between vizshape objects: 
		
		
		
		
		
		
		
		
	
	Code: 
	import viz import vizact import vizshape viz.go() viz.move(0,0,-10) cube1 = vizshape.addCube() cube2 = vizshape.addCube() cube2.parent(cube1) cube2.setPosition([0,2,0]) spinForever = vizact.spin(0,1,0, 90, viz.FOREVER) cube1.addAction(spinForever) Code: 
	import viz import vizact import vizshape viz.go() group = viz.addGroup() group.setPosition([0,1.5,10]) positions = [[0,0,1],[0,0,-1],[-1,0,0],[1,0,0]] for position in positions: cube = vizshape.addCube(size=0.5) cube.parent(group) cube.setPosition(position) spinForever = vizact.spin(0,1,0, 90, viz.FOREVER) group.addAction(spinForever)  | 
![]()  | 
	
	
		
  | 
	
		
  | 
			 
			Similar Threads
		 | 
	||||
| Thread | Thread Starter | Forum | Replies | Last Post | 
| Is it possible to have make my shapes have black borders? | Renato Lima | Vizard | 2 | 11-13-2010 09:35 AM | 
| Cyberglove left hand not able to connect | llqqff | Vizard | 2 | 07-21-2010 12:47 PM | 
| Show Physics Shapes | bloswald | Vizard | 3 | 04-07-2010 04:16 PM | 
| Head tracking, Flock of Birds and vizcave; how do I connect them? | Arandia | Vizard | 2 | 08-26-2009 05:59 PM | 
| PPT talk button error: Failed to connect to COM4 | jpq | Precision Position Tracker (PPT) | 3 | 12-08-2005 03:36 PM |