Just off the top of my head, I'd say:
You need to set the light's type
type = "spot",
Also:
viewtopic.php?f=22&t=14711&p=110343#p110343
Just off the top of my head, I'd say:
Code: Select all
{
class = "Light",
type = "spot",
range = 12,
color = vec(1.3, 0.68, 0.35),
brightness = 8,
spotAngle = 60,
spotSharpness = 0.4,
castShadow = true,
staticShadows = true,
destroyObject = true,
shadowMapSize = 256,
offset = vec(0, 1.5, -0.4),
onUpdate = function(self)
local noise = math.noise(Time.currentTime()*3 + 123) * 0.5 + 0.9
self:setBrightness(noise * 6)
end,
},
Code: Select all
defineObject{
name = "party",
baseObject = "party",
components = {
{
class = "Party",
onDrawGui = function(party, g)
end,
{
class = "Light",
type = "spot",
range = 12,
color = vec(1.3, 0.68, 0.35),
brightness = 8,
spotAngle = 60,
spotSharpness = 0.4,
castShadow = true,
staticShadows = true,
destroyObject = true,
shadowMapSize = 256,
offset = vec(0, 1.5, -0.4),
onUpdate = function(self)
local noise = math.noise(Time.currentTime()*3 + 123) * 0.5 + 0.9
self:setBrightness(noise * 6)
end,
},
},
}
1.