Howto draw SceneNodes in front of other

A forum to store posts deemed exceptionally wise and useful
Post Reply
MasterD
Posts: 153
Joined: Sun Feb 15, 2004 4:17 pm
Location: Lübeck, Germany
Contact:

Howto draw SceneNodes in front of other

Post by MasterD »

I do not know, if this is a real useful topic, but I've seen some topics searching for this and I did not find any useful either.

So:
How to draw Nodes in front / above other nodes, for example a weapon, which should allways be visible, disregarding if it is colliding with a wall.

Code: Select all

irr::video::SMaterial mat = node->getMaterial();
mat->ZBuffer = false;
With this, node will be visible also if other nodes would be technically in front of them.

Note:
With this you won't be able to do several layers of SceneNode rendering. If you got more then one SceneNode in the line of view, only the last rendered node will be visible complete. (Don't blame me on that last sentence, but it's late and I've not tested it and it sounds reasonable.)

Hope someone likes this.
Matthias

p.s. If this is discussed somewhere else allready: flame me and delete this topic.
YASS - Yet another Space Shooter
under Devolpment, see http://yass-engine.de
Post Reply