Maxon Developers Maxon Developers
    • Documentation
      • Cinema 4D Python API
      • Cinema 4D C++ API
      • Cineware API
      • ZBrush Python API
      • ZBrush GoZ API
      • Code Examples on Github
    • Forum
    • Downloads
    • Support
      • Support Procedures
      • Registered Developer Program
      • Plugin IDs
      • Contact Us
    • Categories
      • Overview
      • News & Information
      • Cinema 4D SDK Support
      • Cineware SDK Support
      • ZBrush 4D SDK Support
      • Bugs
      • General Talk
    • Unread
    • Recent
    • Tags
    • Users
    • Login

    Rotating object, globally

    SDK Help
    0
    3
    215
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • H
      Helper
      last edited by

      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!

      1 Reply Last reply Reply Quote 0
      • H
        Helper
        last edited by

        THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

        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 [URL-REMOVED][URL-REMOVED] for an introduction. (Most of the C.O.F.F.E.E. functions have similarly named C++ counterparts.)


        [URL-REMOVED] @maxon: This section contained a non-resolving link which has been removed.

        1 Reply Last reply Reply Quote 0
        • H
          Helper
          last edited by

          THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

          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

          1 Reply Last reply Reply Quote 0
          • First post
            Last post