Setting color of object without lighting?
Posted: Tue Apr 24, 2007 2:11 pm
Hey guys, I can't seem to change the color of any objects in my scene. I have no lights in my scene, and I set all objects in my scene to not use lighting. I'd like to be able to simply vary the color each object. I've got a moon that I'd like to make red, but it's not working:
Here's what happens:
The moon stays the default color, regardless of the AmbientColor of the material. Anyone know how I can turn the moon red?
Code: Select all
//add moon
node = engine->scene->addSphereSceneNode(3.0f, 16, 0, -1, vector3df(0,0,SATELLITE_STARTING_RADIUS + SATELLITE_RADIUS_MULTIPLE));
node->setMaterialTexture(0, engine->video->getTexture("moon.jpg"));
node->setMaterialFlag(EMF_LIGHTING, false);
node->getMaterial(0).AmbientColor = SColor(0,255,0,0);
The moon stays the default color, regardless of the AmbientColor of the material. Anyone know how I can turn the moon red?