Laser beam instead of crosshair
Laser beam instead of crosshair
How would you make a laser beam that extends out from the camera.
Thank you very very much.
Thank you very very much.
Last edited by XFactor on Sat Jun 04, 2005 8:30 pm, edited 1 time in total.
IRRLICHT ROCKS!!!!
1) Which one looks nicer?
2) If the the 3d line looks nicer, then could you please post some code?
3) If a model looks nicer, where would you suggest me looking for one, I cant model?
Thanks a lot.
2) If the the 3d line looks nicer, then could you please post some code?
3) If a model looks nicer, where would you suggest me looking for one, I cant model?
Thanks a lot.
Last edited by XFactor on Sat Jun 04, 2005 8:31 pm, edited 1 time in total.
IRRLICHT ROCKS!!!!
I would use the 3d line, and attatch a billboard to the end where it hits on the world... That was a demo for that except no 3d line was drawn, I beleive you could make it work...
something like this
put it inside the loop
something like this
put it inside the loop
Code: Select all
SMaterial mtl;
mtl.AmbientColor = mtl.DiffuseColor =
mtl.EmissiveColor = video::SColor(50,0,0,255);
driver->setMaterial(mtl);
//You will need to position it at the camera, and figure out a way
//To make it stay drawn
driver->draw3DLine(vector3df(0,255,0),cam->getTarget(),mtl.AmbientColor);
perhaps one of these is what you need-
http://irrlicht.sourceforge.net/phpBB2/ ... php?t=6058
http://irrlicht.sourceforge.net/phpBB2/ ... php?t=6058
do you see a question mark in my statement?
of course not if you did that would make it a question not a statement that is the difference between a comment and a question.
not to mention context and I think it was pretty clear the context in which I wrote my comment.
I was pertaining to the above code that attempting to use the ambient lighting will not color a 3dline I have attempted this myself with no luck and have come to the conclusion that this is impossable without using a billboard, model, or other custom means.
If someone can prove me wrong please do.
of course not if you did that would make it a question not a statement that is the difference between a comment and a question.
not to mention context and I think it was pretty clear the context in which I wrote my comment.
I was pertaining to the above code that attempting to use the ambient lighting will not color a 3dline I have attempted this myself with no luck and have come to the conclusion that this is impossable without using a billboard, model, or other custom means.
If someone can prove me wrong please do.
you need the axial billboard scene node someone made a while ago
You do a lot of programming? Really? I try to get some in, but the debugging keeps me pretty busy.
Crucible of Stars
Crucible of Stars
Code: Select all
SMaterial mtl;
mtl.Lighting = false;
driver->setMaterial(mtl);
//You will need to position it at the camera, and figure out a way
//To make it stay drawn
driver->draw3DLine(vector3df(0,255,0),cam->getTarget(),video::SColor(100,255,0,0));