How to make an object point to another object ?

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.

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

Hello,

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

Best wishes,
Sebastian

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

Thank you so much :)