Advertisement

'Lasers'?

Started by March 17, 2002 04:15 PM
1 comment, last by risingdragon3 22 years, 10 months ago
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
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
~V'lionBugle4d
Advertisement
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.]

[twitter]warrenm[/twitter]

This topic is closed to new replies.

Advertisement