I have a star in space that shines light on all other objects in space. I am using a billboardSceneNode to show a sprite of a star so that it actually looks like a sun. But when the camera moves too far away (about 3500-4000 units) the sprite will dissappear. If I move the camera around then it will reappear only in the edges of the viewing frustrum (in the corners of the screen) and not in the middle when I look directly at it. Whats up with that? Anyone know a work around for this such that the sprite will be visible from further away until it winks away into nothing? Here's the code I'm using to make the star:
light = device->getSceneManager()->addLightSceneNode(0, core::vector3df(0,0,-3000), video::SColor(255, 255, 255, 255), 1500.0f);
star = device->getSceneManager()->addBillboardSceneNode(light, core::dimension2d<f32>(300,300));
star->setMaterialFlag(video::EMF_LIGHTING, false);
star->setMaterialTexture(0, driver->getTexture("particlewhite.jpg"));
star->setMaterialType(video::EMT_TRANSPARENT_ADD_COLOR);
Anyone got any ideas? I thought about just using a model and putting lights all around the model but the model might look kinda cheesey since it's supposed to be a blinding hot star...
Scene node distance too short b4 dissappearing
-
- Posts: 271
- Joined: Sat Aug 23, 2003 5:52 pm
- Location: Hurricane Central, Florida
-
- Posts: 271
- Joined: Sat Aug 23, 2003 5:52 pm
- Location: Hurricane Central, Florida
Awesome Niko, Thanks. That werkx, but I've also noticed that when the camera is moved around with the mouse that a model of, for example, a planet which is just a big round ball, appears to stretch when the model is in the edge of the FOV, but then is perfectly circular when straight ahead. Is this something that can be adjusted and fixed also?