Jump to content
  • Advertisement


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


Moving Lights

This topic is 6095 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

I am working on my light engine. I am using the default lighting in Direct X 7. I am tring to make a point light follow my camera so I will be like a tourch that only illuminates the area around the character. I am having trouble trying to move the light. I does not seem to move at all. I am trying to change the light''s position everytime the character moves. It does not seem to work. I was wondering if you have to disable the light then change it and re-enable it again. Thanks in advance for any help you can offer. Minerjr

Share this post

Link to post
Share on other sites
You need to call SetLight() again to pass the updated parameters to the device. D3D takes a copy of the structure you pass to SetLight - it doesn''t keep track of what''s in your D3DLIGHT structure!.

LightEnable purely tells D3D lights which of the currently set lights it should be taking into account for it''s calculations.

Simon O''''Connor
Creative Asylum Ltd

Share this post

Link to post
Share on other sites

  • Advertisement

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!