custom scene node disappears while FPS camera movement

If you are a new Irrlicht Engine user, and have a newbie-question, this is the forum for you. You may also post general programming questions here.
Post Reply
blackMasoon
Posts: 149
Joined: Wed Sep 09, 2009 4:57 pm
Contact:

custom scene node disappears while FPS camera movement

Post by blackMasoon »

I have a strange problem with my custom scene nodes. I create them in the same way as in the tutorial but while moving in the scene with FPS camera there are moments when those nodes dissapear completely and appear when I move and rotate the camera somewhere else. What may cause that problem?'
PhGodinho
Posts: 6
Joined: Tue Oct 25, 2011 1:48 am

Re: custom scene node disappears while FPS camera movement

Post by PhGodinho »

Make sure you are not using SOFTWARE as renderer, this can have strange behavior with 3D.
Lonesome Ducky
Competition winner
Posts: 1123
Joined: Sun Jun 10, 2007 11:14 pm

Re: custom scene node disappears while FPS camera movement

Post by Lonesome Ducky »

This happens quite often when you do not correctly update the bounding box, and the scene manager eroneously culls it. Make absolutely sure that your bounding box is correct, and set the culling type to EAC_FRUSTUM_BOX. You could turn off culling as well, but that's not a good idea.
Mel
Competition winner
Posts: 2293
Joined: Wed May 07, 2008 11:40 am
Location: Granada, Spain

Re: custom scene node disappears while FPS camera movement

Post by Mel »

Turn off the culling, and check if it still disappears. Then, make sure that you have a valid AABB for the scene node, and enable the AABB culling. Also, make sure that the node registers itself for rendering correctly.
"There is nothing truly useless, it always serves as a bad example". Arthur A. Schmitt
blackMasoon
Posts: 149
Joined: Wed Sep 09, 2009 4:57 pm
Contact:

Re: custom scene node disappears while FPS camera movement

Post by blackMasoon »

Thank you, that helped :) One other thing... same happens with lighting. I had some flat horizontal surfaces as custom nodes so setting normals like (0.0f, 1.0f, 0.0f) was working for lighting. What about irregular shapes? How to calculate normals for them? I set (1.0f, 1.0f, 1.0f) but that doesn't work and light doesn't project on those surfaces.
Post Reply