Picking Invisible Objects
-
- Posts: 50
- Joined: Thu Aug 13, 2009 7:16 am
- Location: India
Picking Invisible Objects
Hi,
I am Interested in picking invisible objects in Irrlicht.
Is it possible?
I am Interested in picking invisible objects in Irrlicht.
Is it possible?
I think you can pick the triangles of invisible nodes, but you can't use the functions which are using CSceneCollisionManager::getPickedNodeBB (basically all functions for picking nodes) as that has an isVisible check. If you remove that it would work.
I think we should separate visibility from collision some day as I do in my games a lot more checks for invisible nodes and triangles than for visible nodes as I usually have an own collision geometry. And I suppose other people do the same.
I think we should separate visibility from collision some day as I do in my games a lot more checks for invisible nodes and triangles than for visible nodes as I usually have an own collision geometry. And I suppose other people do the same.
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
-
- Posts: 50
- Joined: Thu Aug 13, 2009 7:16 am
- Location: India
You can use some mesh make that invisible and use selectors. The problem with invisibility happens only with node-picking functions. Selectors will work.
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
-
- Posts: 50
- Joined: Thu Aug 13, 2009 7:16 am
- Location: India
greetings for RetroTank3D i needed invisible tanks but still needed collision support. instead of ISceneNode.setVisible, i used:
ISceneNode.setMaterialType(EMT_TRANSPARENT_ALPHA_CHANNEL)
to make them invisible and
ISceneNode.setMaterialType(EMT_SOLID)
to make them visible again. i think the same should work for you well.
HTH.
ISceneNode.setMaterialType(EMT_TRANSPARENT_ALPHA_CHANNEL)
to make them invisible and
ISceneNode.setMaterialType(EMT_SOLID)
to make them visible again. i think the same should work for you well.
HTH.
Very good point. I've currently static collision geometry so that didn't matter. But you are right - it won't register, but probably you could call registerNodeForRendering from ISceneManager to force it to register.spidersharma wrote:If we make a meshNode invisible, will it be even registered for rendering?
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
-
- Admin
- Posts: 14143
- Joined: Wed Apr 19, 2006 9:20 pm
- Location: Oldenburg(Oldb), Germany
- Contact:
If you want to make a scene node invisible, it's much simpler with 1.6 to use the OverrideMaterial. Also, to speed things up, you should disable the color planes instead, which would render only to depth buffer, or also disable that one. Both can be changed with only one (resp. two) calls to the SMaterial Flags, which is much faster than changing all materials. Moreover, it won't mess with transparent materials etc. Hope this helps.
-
- Posts: 50
- Joined: Thu Aug 13, 2009 7:16 am
- Location: India
-
- Posts: 28
- Joined: Mon Nov 02, 2009 9:51 am
-
- Competition winner
- Posts: 1123
- Joined: Sun Jun 10, 2007 11:14 pm