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
    • Login

    Velocity V and HPB Q [SOLVED]

    Scheduled Pinned Locked Moved PYTHON Development
    6 Posts 0 Posters 798 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

      On 08/08/2014 at 05:24, xxxxxxxx wrote:

      I have a particles velocity vector

      I want to change that to a new velocity vector  - by changing the Pitch Angle

      From the Velocity Vector  I can get the HPB

      I can then change the HPB angles

      Q: How do get the new velocity vector, given the updated HPB.

      tia

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

        On 12/08/2014 at 08:44, xxxxxxxx wrote:

        I've got a little further with this, but the more I read the more I think I'll need quaternions.

        And it doesn't appear that they are supported in C4Ds Python SDK.

        Any chance of that happening for R16?

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

          On 13/08/2014 at 05:49, xxxxxxxx wrote:

          Anybody there?

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

            On 19/11/2014 at 06:44, xxxxxxxx wrote:

            All I can tell you is I've been looking for them too and it seems they are not in the Python API...

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

              On 20/11/2014 at 03:36, xxxxxxxx wrote:

              I think you might need to get into Matrix transformations for that..

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

                On 20/11/2014 at 08:53, xxxxxxxx wrote:

                Hello,

                you can create a vector by creating a Matrix from your HPB values and applying this Matrix to a default vector:

                  
                  # create Matrix  
                  m = c4d.utils.HPBToMatrix(hpb)  
                    
                  # default vector  
                  vec = c4d.Vector(0,0,1)  
                    
                  # apply  
                  vec = m * vec  
                

                best wishes,
                Sebastian

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