Beam scenenode
-
- Posts: 1
- Joined: Thu Oct 21, 2010 5:16 pm
- Location: Belgium
[EDIT] sorry, figured it out, used wrong materials on the billboards...
Last edited by salligtatorp on Thu Jun 02, 2011 10:32 pm, edited 1 time in total.
Hi
Just checked the code of the Beam scene node, and I noticed there's the bounding box "Box" member object, which is not being initialized anywhere in the code provided.
Should be initialized inside the setLine method, I pressume?
I suspect if that's the case, it's been working for most people because it's being initialised with random values, probably generating a quite large bounding box.
Just checked the code of the Beam scene node, and I noticed there's the bounding box "Box" member object, which is not being initialized anywhere in the code provided.
Should be initialized inside the setLine method, I pressume?
I suspect if that's the case, it's been working for most people because it's being initialised with random values, probably generating a quite large bounding box.
If you're having trouble with the beam disappearing it's because the backspace culling is incorrectly removing it.
The bounding box is incorrectly set so irrlicht thinks the beam is behind the camera. To fix this change Saudi's solution thusly:
The bounding box is incorrectly set so irrlicht thinks the beam is behind the camera. To fix this change Saudi's solution thusly:
Code: Select all
void CBeamNode::setLine(core::vector3df start, core::vector3df end, f32 thickness)
{
m_start = start;
m_end = end;
m_thickness = thickness;
Box.addInternalPoint (start);
Box.addInternalPoint (end);
}
-
- Posts: 1
- Joined: Wed Apr 13, 2011 4:40 pm
- Location: 224