A scene camera node providing perspective or orthographic projection.
Inherits from: Node
Lua full name: lysa.nodes.Camera
|
| Camera | create ()static |
| | Creates a Camera with default perspective settings. More...
|
| |
| Camera | create (name: string)static |
| | Creates a named Camera with default perspective settings. More...
|
| |
| Camera | create (fov: number, near: number, far: number)static |
| | Creates a perspective Camera with the given field-of-view (degrees) and near/far clipping distances. More...
|
| |
| Camera | create (left: number, right: number, top: number, bottom: number, near: number, far: number)static |
| | Creates an orthographic Camera with explicit frustum bounds. More...
|
| |
| nil | set_perspective_projection (fov: number, aspect: number, near: number, far: number) |
| | Switches to perspective projection with the given FOV (degrees), aspect ratio, and clipping distances. More...
|
| |
| nil | set_orthographic_projection (left: number, right: number, bottom: number, top: number, near: number, far: number) |
| | Switches to orthographic projection with explicit frustum bounds. More...
|
| |
| nil | set_fov (fov: number) |
| | Sets the vertical field of view in degrees (perspective mode only). More...
|
| |
| nil | set_aspect_ratio (ratio: number) |
| | Sets the aspect ratio (width / height) of the camera frustum. More...
|
| |
| lysa.Ray | screen_to_world (screen_pos: lysa.float2, screen_size: lysa.float2) |
| | Unprojects a 2-D screen-space position to a world-space ray originating at the camera. More...
|
| |
| MeshInstance|nil | ray_cast (point: lysa.float3, ignore: MeshInstance|nil) |
| | Casts a ray from the camera's world position toward a target world-space point and returns the first MeshInstance hit, optionally ignoring one instance. More...
|
| |
| MeshInstance[] | ray_cast_aabb (target: MeshInstance, all: boolean|nil) |
| | Casts rays from the camera toward all 8 corners of the target's world-space AABB; returns the list of hit MeshInstances. Pass all=true to collect every hit rather than stopping at the first. More...
|
| |
|
| lysa.float4x4 | projection |
| | The current projection matrix. (read-only)
|
| |
| CameraProjectionType | projection_type |
| | The current projection mode (PERSPECTIVE or ORTHOGRAPHIC). (read-only)
|
| |
| number | near_distance |
| | The near clipping plane distance.
|
| |
| number | far_distance |
| | The far clipping plane distance.
|
| |