Axis Aligned Billboard: how to make the object look at camera
Posted
by
user19787
on Game Development
See other posts from Game Development
or by user19787
Published on 2012-09-12T16:57:30Z
Indexed on
2012/09/12
21:51 UTC
Read the original article
Hit count: 2643858
I am trying to make an Axis Aligned Billboard with Pyglet. I have looked at several tutorials, but they only show me how to get the Up,Right,and Look vectors. So far this is what I have:
target = cam.pos
look = norm( target - billboard.pos )
right = norm( Vector3(0,1,0)*look )
up = look*right
gluLookAt(
look.x, look.y, look.z,
self.pos.x, self.pos.y, self.pos.z,
up.x, up.y, up.z
)
This does nothing for me visibly. Any idea what I'm doing wrong?
© Game Development or respective owner