Your browser does not seem to support JavaScript. As a result, your viewing experience will be diminished, and you have been placed in read-only mode.
Please download a browser that supports JavaScript, or enable it if it's disabled (i.e. NoScript).
THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 23/06/2004 at 04:31, xxxxxxxx wrote:
User Information: Cinema 4D Version: 8.206 Platform: Language(s) : C++ ;
--------- Hi, I am trying to force a bones direction to point in the X axis in world space. To do this I use this simple code
Vector vDir = Vector(Rad(270.0),0,0); oBone->SetRot(VectorToHPB(vDir));
Running that code on a bone, faces the bone along the X axis. But when the bone is a child of another bone, it will no longer point along the X axis because SetRot() is working locally. For the life of me I can work out how to make that bone point in the X axis in world space no matter what the bone is a child of. help!
On 24/06/2004 at 04:37, xxxxxxxx wrote:
You need to do the rotation in world space, using matrices. Please see the tutorial at http://www.maxoncomputer.com/tutorial_detail.asp?site=CAFE-DEV&tutorialID=136 for an introduction. (Most of the C.O.F.F.E.E. functions have similarly named C++ counterparts.)
On 25/06/2004 at 02:51, xxxxxxxx wrote:
Thanks Mikael, Got it sorted I infact did already read that link, but it was due to a good programmer error (i.e me) that I was having troubles. I was setting the global rotation of a bone, THEN adding it as a child of another bone. I had to add the bone first, then do the rotation. Logical when I think about it Thanks again