Lysa.nodes  0.0
Lysa 3D Engine
RigidBody Class Referenceabstract

Detailed Description

A fully simulated rigid body driven by the physics engine (mass, forces, impulses).

Inherits from: PhysicsBody

Lua full name: lysa.nodes.RigidBody

Public Member Functions

nil set_density (density: number)
 Sets the density of the body, used to compute mass from the collision shape volume. More...
 
nil set_gravity_factor (factor: number)
 Sets the gravity multiplier (0.0 disables gravity, 1.0 = normal, negative = inverted). More...
 
nil add_force (force: lysa.float3, position: lysa.float3|nil)
 Applies a continuous force for the next physics step at the center of mass, or at a local position if given. More...
 
nil add_impulse (impulse: lysa.float3)
 Applies an instantaneous impulse at the center of mass (changes velocity immediately). More...
 

Properties

lysa.float3 velocity
 Current linear velocity in world space.
 
number mass
 The total mass of the body in kilograms.
 

Member Function Documentation

nil set_density ( number  density)

Sets the density of the body, used to compute mass from the collision shape volume.

Parameters
densitynumber
nil set_gravity_factor ( number  factor)

Sets the gravity multiplier (0.0 disables gravity, 1.0 = normal, negative = inverted).

Parameters
factornumber
nil add_force ( lysa.float3  force,
lysa.float3|nil  position)

Applies a continuous force for the next physics step at the center of mass, or at a local position if given.

Parameters
forcelysa.float3
positionlysa.float3|nil
nil add_impulse ( lysa.float3  impulse)

Applies an instantaneous impulse at the center of mass (changes velocity immediately).

Parameters
impulselysa.float3

Property Documentation

lysa.float3 velocity

Current linear velocity in world space.

number mass

The total mass of the body in kilograms.