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

    Hows does Rotations work?

    SDK Help
    0
    3
    275
    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 02/03/2004 at 15:23, xxxxxxxx wrote:

      User Information:
      Cinema 4D Version:   8.206 
      Platform:      
      Language(s) :     C++  ;

      ---------
      Hi,
      This might be a standard maths question but I can't work it out.

      I want to simulate the rotation tool in my plugin, the problem is that I can't work out the rotation tool works.

      If I create a cube in C4D and click rotate, and rotate 30 degrees along the Bank. The cube rotates like it should, around the bank axis.
      Now I want to rotate the cube around only the pitch axis (this I want to be done through code, but using c4d as an example)
      If i use the AM and increase the Pitch field, the cube rotates around the pitch but in a wonky fashion.
      If I use the Pitch handle in the viewport, the cube rotates around the pitch axis perfectly, but all the axis values are changing.

      I want to simulate this through code, but I don't understand why it changes all the axis values, when I just want to rotate around the Pitch.

      This is probably a basic math problem, but my 3D math is quite poor and still learning it.

      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 02/03/2004 at 23:54, xxxxxxxx wrote:

        I believe there's a basic explanation for this in the main C4D manual. Look for the "Use HPB" option, which is what makes C4D behave in the way you describe. (IIRC there's a picture of an airplane on the page.)

        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 04/03/2004 at 15:54, xxxxxxxx wrote:

          Thanks, I found the page.

          But I'm confused how I can rotate an object with the same behaviour as the rotate tool in c4d.
          I have been experimenting with rotating, and I just can't get it to work

          My plugin is rotating an object like this (the c++ equivalent)

            
          main(doc,op)  
          {  
          var r = op->GetRotation();  
          r.y+=Radians(1);  
          op->SetRotation(r);  
          }  
          

          but if the object is rotated a few degree's on the Bank axis first, then the object will 'tumble' using the above code.

          The SDK description for BaseObject->SetRot() says:
          Set the HPB rotation of the object relative to any parent object.

          Which is why the object tumbles, how can I set the rotation of an object using the non HPB rotation system?
          (which im guessing would solve my tumble problem)

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