Archived

This topic is now archived and is closed to further replies.

TheProx

still confused on NOT moving the lights

Recommended Posts

Using this .... the lights should not move, right? But they follow the camera! cameras[currentCam].render(); glPushMatrix(); light1.setPosition(-cameras[currentCam].returnPos(0), -cameras[currentCam].returnPos(1), -cameras[currentCam].returnPos(2)); visLight.show(3, light1.position[0], light1.position[1], light1.position[2]); // put a sphere so i can see where the light is visually glPopMatrix(); for(int i = 0; i < numberWorlds; i++) { worlds.render(); } please help!

Share this post


Link to post
Share on other sites
I''m getting some very interesting things to happen by slightly changing the code, for example, the code above with push and pop matrix commented out, puts me in the wrong place somehow, and the light is in the right place, but i cant move but i can still look around, all is quite interesting. But I still don''t know how to keep the light in one place according to world coords. if anyone knows how, please let me know!

Share this post


Link to post
Share on other sites
ok, i resolved that myself ... now, for anyone one out there, who has messed with lighting before, is it reliable? This is so frustrating, because I cant SEE where it is ... when ever i get near the light, it just cuts off ... im going to give up on account of lights lol. actually, prolly just start over

Share this post


Link to post
Share on other sites