custom scene node disappears while FPS camera movement
-
blackMasoon
- Posts: 149
- Joined: Wed Sep 09, 2009 4:57 pm
- Contact:
custom scene node disappears while FPS camera movement
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?'
Re: custom scene node disappears while FPS camera movement
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
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.
Re: custom scene node disappears while FPS camera movement
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
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.