Lysa.nodes  0.0
Lysa 3D Engine
Character Class Referenceabstract

Detailed Description

A capsule-based character controller for first/third-person movement, driven via velocity each physics tick.

Inherits from: CollisionObject

Lua full name: lysa.nodes.Character

Public Member Functions

nil set_shape (h: number, r: number)
 Sets a new capsule collision shape with the given height and radius, then recreates the character in the physics system. More...
 
nil set_max_slope_angle (angle: number)
 Sets the maximum walkable slope angle in degrees; surfaces steeper than this are treated as walls. More...
 

Properties

boolean is_on_ground
 True if the character is currently standing on a surface. (read-only)
 
boolean is_ground
 True if this collision object is acting as the ground for another character. (read-only)
 
lysa.float3 ground_velocity
 Velocity of the ground surface in world space (useful for standing on moving platforms). (read-only)
 
Node|nil ground
 The node the character is standing on, or nil if airborne. (read-only)
 
lysa.float3 up
 The world-space UP axis used to determine ground detection (default AXIS_UP).
 
any collisions
 List of Collision objects describing all contacts during the last physics step. (read-only)
 
lysa.float3 velocity
 Desired linear velocity for this frame; set each physics tick to drive movement.
 
number height
 Height of the capsule collision shape in meters. (read-only)
 
number radius
 Radius of the capsule collision shape in meters. (read-only)
 

Member Function Documentation

nil set_shape ( number  h,
number  r)

Sets a new capsule collision shape with the given height and radius, then recreates the character in the physics system.

Parameters
hnumber
rnumber
nil set_max_slope_angle ( number  angle)

Sets the maximum walkable slope angle in degrees; surfaces steeper than this are treated as walls.

Parameters
anglenumber

Property Documentation

boolean is_on_ground

True if the character is currently standing on a surface. (read-only)

boolean is_ground

True if this collision object is acting as the ground for another character. (read-only)

lysa.float3 ground_velocity

Velocity of the ground surface in world space (useful for standing on moving platforms). (read-only)

Node|nil ground

The node the character is standing on, or nil if airborne. (read-only)

lysa.float3 up

The world-space UP axis used to determine ground detection (default AXIS_UP).

any collisions

List of Collision objects describing all contacts during the last physics step. (read-only)

lysa.float3 velocity

Desired linear velocity for this frame; set each physics tick to drive movement.

number height

Height of the capsule collision shape in meters. (read-only)

number radius

Radius of the capsule collision shape in meters. (read-only)