View Single Post
  #5  
Old 02-12-2009, 06:06 AM
hosier hosier is offline
Member
 
Join Date: Feb 2007
Posts: 31
I was trying to set the center of the object above that, the 005 object, which represents the entire muscle. When I use muscle = model.getChild('005') and perform translations on it, it works like I think it should. When I perform the model.center on that object, that's when my rotations aren't around the new center of the object, even though it reports that the center has been set.

All of the muscles originally have an origin of [0,0,0] and a center of [0,0,0]. I then set the center of the selected muscle to the new rotation point, and the getCenter reports the proper value, but it doesn't rotate around it.

If you run my above program, you'll see that it selects the 005 child object then prints out its position and center. I set the new center, and again print out the information about the object, showing that the new center has been set. I earlier loaded the Vizard ball.wrl and placed it at this new center point. It does show up at what should be the center of the object. When you use the ijkm keys to rotate it, though, it does not rotate around this new center.

If I'm doing this the wrong way, please let me know, but from the documentation, it seems like this should work.

The part where I was talking about setting the center for each object or as a whole was in reference to the fact that each muscle is made up of two surfaces. In my case, I'm working with the 005 object, where you set the center for the 005_bicepsfemoris_1M, which is one surface of two making up the muscle.

Thanks in advance.

Aaron
Reply With Quote