Archived

This topic is now archived and is closed to further replies.

risingdragon3

'Lasers'?

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
I don`t know what you just said.
But...if you need a quad to face toward a line, you are simply taking a normal and finding a quad that fits its parameters.
Might that help ?

Bugle4d

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.

Later,
ZE.

//email me.//zealouselixir software.//msdn.//n00biez.//
miscellaneous links

[if you have a link proposal, email me.]

Share this post


Link to post
Share on other sites