Graphics

 View Only
  • 1.  Always face the camera

    Posted 10-01-2024 09:25

    Is there an option or API function to have an object face the camera when using a Perspective Camera? I have a bunch of quads that I want to always face the camera, no matter where it is. For example, the quads are moving around in a circle while at the same time the camera is moving randomly about in the scene. No matter where the camera is, I want the quads to rotate to face it, so you only ever see the front face of the quad. I can probably do the math using matrices to do this, but was wondering if there was something built in.

    Thanks.



    ------------------------------
    JohnCorigliano
    Senior Software Engineer
    ISC
    ------------------------------


  • 2.  RE: Always face the camera

    Posted 10-01-2024 11:42

    As far as I know, you are going to have to go into VB.

    Also, if the quad and/or camera is in a hierarchy, you are going to have to calculate the positions, not just taking X,Y,Z positions.

    UPDATE :

    Just looked at the API documentation and there is a GetParent method. This means you could make a recursive function to figure out the positions. Makes life a bit easier.

    ------------------------------
    Azathoth
    Son of Cthulhu
    ------------------------------



  • 3.  RE: Always face the camera

    Posted 10-01-2024 14:14

    So the trick here is to use a Group Object (from the Object Library), and then put the objects you want to face the camera into the Group Object. 

    In the Group Object there is a checkbox for "Always Face Active Camera". 




  • 4.  RE: Always face the camera

    Posted 10-03-2024 10:39

    Thanks. I didn't see that option. I will give it a try.



    ------------------------------
    JohnCorigliano
    Senior Software Engineer
    ISC
    ------------------------------