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
    • Recent
    • Tags
    • Users
    • Register
    • Login

    SetRotation

    Scheduled Pinned Locked Moved SDK Help
    3 Posts 0 Posters 325 Views
    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 Offline
      Helper
      last edited by

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

      On 17/03/2005 at 08:13, xxxxxxxx wrote:

      User Information:
      Cinema 4D Version:   9.1 
      Platform:      Mac OSX  ; 
      Language(s) :   C.O.F.F.E.E  ;

      ---------
      I have problems using the "SetRotation" command.

      I want to set the rotation on the b-axis by using:

      var hObj = doc->FindObject("stundenzeiger");
      var h   = 10;
      hObj->SetRotation(vector(0,0,30*h));

      in this case the result should be 300 degrees.
      by checking the object´s rotation using the "GetRotation" command
      i get the correct vector [0.000000,0.000000,300.000000].

      but still my object seems to have the wrong rotation.
      in the "coordinate manager" my b-rotation is 10313.24 degrees.

      who can help me?
      thanx in advance...

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

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

        On 17/03/2005 at 09:29, xxxxxxxx wrote:

        hObj->SetRotation(vector(0,0,Radians(30*h)));

        The rotatin is in Radians. 300 is in degrees. You can convert values from Deg to Radians with Radians(degree);

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

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

          On 17/03/2005 at 23:19, xxxxxxxx wrote:

          That´s exactly what I needed.

          Thans a million Katachi!

          Regards

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