Jump to content
  • Advertisement
Sign in to follow this  

Spotlight please help.

This topic is 5476 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

Hello. Why does not this work:
OuterSpace.device.Lights(1).Type = LightType.Spot
                OuterSpace.device.Lights(1).Position = New Vector3(1, 1, -3.0F)
                OuterSpace.device.Lights(1).Direction = New Vector3(1, 1, 25.0F) 
                OuterSpace.device.Lights(1).InnerConeAngle = 0.5F
                OuterSpace.device.Lights(1).OuterConeAngle = 1.0F
                OuterSpace.device.Lights(1).Falloff = 1.0F
                OuterSpace.device.Lights(1).Attenuation0 = 1.0F
                OuterSpace.device.Lights(1).Diffuse = Color.WhiteSmoke
                OuterSpace.device.Lights(1).Range = 800.0F
                OuterSpace.device.Lights(1).Enabled = True

It's pointed at a highly tesselated flat square (about 20K triangles, 140x by 70y) with an origin of 0,0,0 that's parralell to the x/y axis. Nothing, ever.. I've tried all things and read 3 or 4 tutorials. I've even tried setting my normals all to (0,0,-1) The ambient material color is a dark grey.

Share this post

Link to post
Share on other sites
I've figured it out 5 minutes after I post it.
My normals were all inverted because when I flattened my geosphere
after the spherical trig blah blah blah there was one little negative sign.

THe ambient material light worked and setting my normals to 0,0,-1 was misleading because I had left the other light on (the sun shinning on my planets, and that washed out the spot)

No simple soultutions today I guess.
Back to coding.
I'll throw a couple rating points your way for the quick reply.

Share this post

Link to post
Share on other sites
Sign in to follow this  

  • Advertisement

Important Information

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

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!