Hello i want to originate Visible 3d line from my node and want to calculate collisions on basis of distance from node to node using line .... is it possible i want to do something like this ..
please check out
http://www.youtube.com/watch?v=FKAULFV8tXw
Drawing Visible 3d Line from Node
Drawing Visible 3d Line from Node
When it's all over, it's not who you were. It's whether you made a difference
Re: Drawing Visible 3d Line from Node
you don't really ask if it is possible to draw simple lines or?
anyway maybe you have a look at this snippet
http://irrlicht.sourceforge.net/forum/v ... eld+effect
anyway maybe you have a look at this snippet
http://irrlicht.sourceforge.net/forum/v ... eld+effect
Re: Drawing Visible 3d Line from Node
@zerochen thanks dude i hope it will give me some startup
When it's all over, it's not who you were. It's whether you made a difference
Re: Drawing Visible 3d Line from Node
Tried This But Failed To Draw Line Whats Problem With This Code ?
Code: Select all
core::line3d<f32> ray;
core::line3d<f32> ray1;
ray.start = camera->getPosition();
ray.end = ray.start + (camera->getTarget() - ray.start).normalize() * 1000.0f;
video::SMaterial m;
m.Lighting=false;
m.Thickness = 1.0f;
driver->setMaterial(m);
driver->setTransform(video::ETS_WORLD, core::matrix4());
driver->draw3DLine(ray.end,ray.start,video::SColor(0,255,255,255));
When it's all over, it's not who you were. It's whether you made a difference
Re: Drawing Visible 3d Line from Node
1. the lines are full transparent
2. maybe the draw call is not between driver->beginScene(true, true, video::SColor(50,50,50,50)); & driver->endScene();?
2. maybe the draw call is not between driver->beginScene(true, true, video::SColor(50,50,50,50)); & driver->endScene();?
Re: Drawing Visible 3d Line from Node
Maybe the line of sight of the camera coincides with the "3d Line". Try offseting ray.end to see whether the line is visible.
Regards
smso
Regards
smso
Re: Drawing Visible 3d Line from Node
A point from camera-start to target is likely only visible as a single pixel in the center. Try moving it up/down/left/right a little and you should probably see a line.
IRC: #irrlicht on irc.libera.chat
Code snippet repository: https://github.com/mzeilfelder/irr-playground-micha
Free racer made with Irrlicht: http://www.irrgheist.com/hcraftsource.htm
Code snippet repository: https://github.com/mzeilfelder/irr-playground-micha
Free racer made with Irrlicht: http://www.irrgheist.com/hcraftsource.htm
Re: Drawing Visible 3d Line from Node
@smso and @CuteAleien Yes that's the problem Finally can see it thanks for help
When it's all over, it's not who you were. It's whether you made a difference