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

    How to make an object point to another object ?

    Scheduled Pinned Locked Moved PYTHON Development
    3 Posts 0 Posters 260 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 22/10/2014 at 03:53, xxxxxxxx wrote:

      Hi
      I want to make one object point, or look at another object (on any axis).  I'm trying to figure out what vector functions can do it - but I'm struggling,

      I know how to create a 'heading' vector by subtracting the position of one object from the position of the other and then normalising it.  But how do I apply this to the rotation of the object I want pointing to the other ?

      Thanks.

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

        On 22/10/2014 at 05:12, xxxxxxxx wrote:

        Hello,

        you can use the VectorToHPB[URL-REMOVED] function to create the rotation based on a vector. You may also take a look at the LookAtCamera-example[URL-REMOVED].

        Best wishes,
        Sebastian


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

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

          On 22/10/2014 at 05:33, xxxxxxxx wrote:

          Thank you so much 🙂

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