How can I draw an object in openGL that always faces the camera?

14,145

I answered this already here: Inverting rotation in 3D, to make an object always face the camera?

Share:
14,145
Bartvbl
Author by

Bartvbl

Hobby graphics programmer

Updated on June 20, 2022

Comments

  • Bartvbl
    Bartvbl almost 2 years

    Possible Duplicate:
    Inverting rotation in 3D, to make an object always face the camera?

    I have some 2D images in 3D space that I would like to face the camera at all times. These objects are inside a stack of transformations (since I want them to move relative to another object, to keep a long story short). What would be the easiest way to implement this?

    • Nick Weaver
      Nick Weaver about 13 years
      Mathematics, it's been too long, so this won't suffice for an answer. You can use the surface normal of your 2d images to point to the camera. Assuming that your 2D images are on a simple plane.
  • datenwolf
    datenwolf about 13 years
    While this would work in principle, this method is a lot more complicated, than it needs to be. See my post.
  • pmr
    pmr about 13 years
    So why not mark the question as a duplicate and vote to close?
  • datenwolf
    datenwolf over 9 years
    @pmr: Good point, I wish I could delete it; now that it has been accepted I can't…