![]()  | 
	
| 
	 | 
| 
		 
			 
			#1  
			
			
			
			
			
		 
		
	 | 
|||
		
		
  | 
|||
| 
		
	
		
		
			
			 
				
				Bone Rotations
			 
			
			
			Hello, 
		
		
		
		
		
		
		
		
	
	When I run the following code, I don't get 0,0,0 output as I expect. Code: 
	male = viz.add('vcc_male.cfg')
male.setEuler([0,0,0])
male.setPosition([0,0,0])
male_pelvis = male.getBone('Bip01 Pelvis')
male_pelvis.lock()
male_pelvis.setEuler([0,0,0],viz.ABS_PARENT)
male_pelvis.setEuler([0,0,0],viz.ABS_GLOBAL)
print male_pelvis.getName()
print male_pelvis.getEuler(viz.ABS_PARENT)
print male_pelvis.getEuler(viz.ABS_GLOBAL)
print '\n'
Thanks, Stephen  | 
| 
		 
			 
			#2  
			
			
			
			
			
		 
		
	 | 
|||
		
		
  | 
|||
| 
		
	
		
		
		
		 
			
			I ran the following code: 
		
		
		
		
		
		
		
		
	
	Code: 
	male_pelvis.setEuler([0,0,0],viz.ABS_PARENT) print male_pelvis.getEuler(viz.ABS_PARENT) male_pelvis.setEuler([0,0,0],viz.ABS_GLOBAL) print male_pelvis.getEuler(viz.ABS_GLOBAL) male_pelvis.setEuler([0,0,0],viz.AVATAR_WORLD) print male_pelvis.getEuler(viz.AVATAR_WORLD) Code: 
	[0.0, 0.0, 0.0] [-3.4150864394177916e-006, 0.0, 0.0] [-2.4426660780868525e-012, 6.5951979988376763e-011, 0.0]  | 
| 
		 
			 
			#3  
			
			
			
			
			
		 
		
	 | 
|||
		
		
  | 
|||
| 
		
	
		
		
		
		 
			
			Ok, I think I kinda see.  So each bone has a few different rotations that are combined?  Like, it has its own, then gets rotated by the avatar world rotation?  Since without the WORLD one, the code I originally posted gave me this: 
		
		
		
		
		
		
		
		
	
	[90.0, 8.8792461610864848e-005, -90.0] [-3.4150864394177916e-006, 0.0, 0.0] Even though I set the GLOBAL to 0,0,0. How come?  | 
| 
		 
			 
			#4  
			
			
			
			
			
		 
		
	 | 
|||
		
		
  | 
|||
| 
		
	
		
		
		
		 
			
			No, each bone has a single position/rotation. The different mode options simply specify in which coordinate frame you want to set the value of the bone. In your code the line: 
		
		
		
		
		
		
		
		
	
	Code: 
	male_pelvis.setEuler([0,0,0],viz.ABS_PARENT)  | 
| 
		 
			 
			#5  
			
			
			
			
			
		 
		
	 | 
|||
		
		
  | 
|||
| 
		
	
		
		
		
		 
			
			Ok, that's what I needed to know.  Thanks!
		 
		
		
		
		
		
		
		
		
	
	 | 
| 
		 
			 
			#6  
			
			
			
			
			
		 
		
	 | 
|||
		
		
  | 
|||
| 
		
	
		
		
			
			 
			
			From <node3d>.getEuler() and <node3d>.setEuler(), the viz.ABS_PARENT transform mode works in the PARENT's coordinate system. 
		
		
		
		
		
		
		
		
	
	But for <bone>.getEuler() and <bone>.setEuler(), the viz.ABS_PARENT transform mode works in the LOCAL coordinate system.  | 
![]()  | 
	
	
| Thread Tools | |
| Display Modes | Rate This Thread | 
		
  | 
	
		
  | 
			 
			Similar Threads
		 | 
	||||
| Thread | Thread Starter | Forum | Replies | Last Post | 
| Locking every bone of a character | Frank Verberne | Vizard | 2 | 03-17-2008 11:21 AM | 
| vcc avatars: defining bone length | bjgold | Vizard | 1 | 08-08-2007 12:24 PM | 
| Avatar bone rotations respect to world | MiamiTodd | Vizard | 3 | 02-14-2006 11:41 AM | 
| rotations in vizard | david | Vizard | 7 | 02-24-2005 10:57 AM | 
| vizard rotations | duda | Vizard | 5 | 09-03-2003 03:31 PM |