self:look_at_from_position
Client
Moves the area light to the given position and rotates it to look at the target
Syntax
local status = self:look_at_from_position(
position,
target,
up
)Parameters
| Type | Name | Description |
|---|---|---|
vector3 | position | World-space position to move to as {x, y, z} |
vector3 | target | World-space position to look at as {x, y, z} |
vector3 | up | Up vector used to determine orientation as {x, y, z} |
Returns
| Type | Name | Description |
|---|---|---|
bool | status | true on successful execution, false otherwise |
Examples
local entity = light.area.create()
entity:look_at_from_position({0, 10, 0}, {0, 0, 0}, {0, 1, 0})