x


spotAngle won't set Cookie Size on Directional Light?

Hi According to the scripting reference, using the spotAngle parameter should set the cookie size on directional lights, but it doesn't seem to work. Setting the spotAngle within a script has no effect on the light and in fact

print(dirLight.spotAngle);

always shows 1, even if the cookie size is set differently in the inspector.

Is there a workaround to set the cookie size programmatically?

Thanks

more ▼

asked Jan 15 '11 at 09:43 AM

Steve Edwards gravatar image

Steve Edwards
164 30 31 39

(comments are locked)
10|3000 characters needed characters left

1 answer: sort voted first

Directional lights don't use the spot angle parameter, that's only for spotlights. Use cookie size!

more ▼

answered Jan 15 '11 at 11:49 AM

Fishman92 gravatar image

Fishman92
2.4k 101 113 128

Thanks, but the manual states that you use the spotAngle to alter the cookie size of directional lights: "var spotAngle The light's spotlight angle in degrees Used primarily for Spot lights. Alters the light cookie size on Directional lights. No effect for Point light" there doesn't seem to be a cookie size variable.

Jan 15 '11 at 03:43 PM Steve Edwards
(comments are locked)
10|3000 characters needed characters left
Your answer
toggle preview:

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Topics:

x426
x286
x286
x28
x19

asked: Jan 15 '11 at 09:43 AM

Seen: 1055 times

Last Updated: Jan 15 '11 at 09:43 AM