Set object direction

  • On 01/03/2017 at 00:36, xxxxxxxx wrote:

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


    I need to set the direction of a spot light based on a 3D position in world space.
    I need the spot light to "look at" that point.
    Is this utility available or do I have to calculate the spot light's HPB manually ?

    Thank you.

  • On 01/03/2017 at 01:24, xxxxxxxx wrote:


    you can calculate a HPB rotation from a direction vector using VectorToHPB() (see Vector Manual). You find an example on this in the lookatcamera.cpp example.

    best wishes,

  • On 24/03/2017 at 09:47, xxxxxxxx wrote:

    Hello peterakos,

    was your question answered?

    best wishes,

Log in to reply