Light Angle

Advanced game related topics
spike0314
User
User
Posts: 17
Joined: Wed Oct 24, 2007 12:28 pm

Light Angle

Post by spike0314 »

Hi
Ive been trying to rotate a light. but there is no function for that only LightLookAt but i don't want it to look at anything just turn. so how can this be done?

Cheers
User avatar
Shield
Addict
Addict
Posts: 1021
Joined: Fri Jan 21, 2011 8:25 am
Location: 'stralia!
Contact:

Re: Light Angle

Post by Shield »

Just use an imaginary point in space at an arbitrary distance from the light and rotate that point around
the center of the light yourself using Sin / Cos functions and then use LightLookAt to rotate it. :)

Don't have time to create an example at the moment, sorry.
Image
Blog: Why Does It Suck? (http://whydoesitsuck.com/)
"You can disagree with me as much as you want, but during this talk, by definition, anybody who disagrees is stupid and ugly."
- Linus Torvalds
User avatar
Comtois
Addict
Addict
Posts: 1431
Joined: Tue Aug 19, 2003 11:36 am
Location: Doubs - France

Re: Light Angle

Post by Comtois »

You can attach a light to a node and rotate the node.
Please correct my english
http://purebasic.developpez.com/
spike0314
User
User
Posts: 17
Joined: Wed Oct 24, 2007 12:28 pm

Re: Light Angle

Post by spike0314 »

yeah just found that out :D
Thank you.
Post Reply