Recommended Posts

How do I setup a matrix for a laser?
You know, given a starting point and an ending point, how do I create a matrix that makes the quad face towards the camera.
I sorta thought some kind of restricted billboard matrix might do it, but I have no idea how to restrict it...
anyone?
thx in advance.
------------------------------
BCB DX Library - RAD C++ Game development for BCB

Share this post

Link to post

Share on other sites

Yeah, you''re looking for billboarding. There are probably tutorials hanging around that explain it pretty well - just search for billboarding tutorial opengl or the like. Basically, you''re going to be getting the modelview matrix and drawing your quad based on the up and right vectors which you can derive from it.