PhysicsEntity
Inherits from GameEntity
Summary
Constructors
Properties
Methods
Constructors
PhysicsEntity
PhysicsEntity(other: EntityBusPeer)
Parameters
PhysicsEntity
PhysicsEntity(other: Entity)
Parameters
Name |
Type |
Description |
other |
Entity |
|
PhysicsEntity
PhysicsEntity(other: SpatialEntity)
Parameters
PhysicsEntity
PhysicsEntity(other: GameEntity)
Parameters
Properties
internalHealth
float
velocity
Vec3
defaultMaterial
DataContainer | nil
belongsInPhysicsWorld
bool
isAnimatable
bool
physicsEntityBase
PhysicsEntityBase | nil
Methods
GetMaterial
GetMaterial(position: Vec3): DataContainer | nil
Parameters
Name |
Type |
Description |
position |
Vec3 |
|
Returns
ReenablePart
ReenablePart(partId: int)
Parameters
Name |
Type |
Description |
partId |
int |
|
ApplyImpulse
ApplyImpulse(impulseData: ImpulseData)
Parameters
RegisterCollisionCallback
RegisterCollisionCallback(callback: callable): int
Parameters
Name |
Type |
Description |
callback |
callable |
A callback in the form function(entity: Entity, info: CollisionInfo): bool . |
Returns
RegisterCollisionCallback
RegisterCollisionCallback(context: any, callback: callable): int
Parameters
Name |
Type |
Description |
context |
any |
A context value to pass to the callback. |
callback |
callable |
A callback in the form function(context: any, entity: Entity, info: CollisionInfo): bool . |
Returns
UnregisterCollisionCallback
UnregisterCollisionCallback(handle: int)
Parameters
Name |
Type |
Description |
handle |
int |
|
RegisterDamageCallback
RegisterDamageCallback(callback: callable): int
Parameters
Name |
Type |
Description |
callback |
callable |
A callback in the form function(entity: Entity, damageInfo: DamageInfo, damageGiverInfo: DamageGiverInfo | nil): bool . |
Returns
RegisterDamageCallback
RegisterDamageCallback(context: any, callback: callable): int
Parameters
Name |
Type |
Description |
context |
any |
A context value to pass to the callback. |
callback |
callable |
A callback in the form function(context: any, entity: Entity, damageInfo: DamageInfo, damageGiverInfo: DamageGiverInfo | nil): bool . |
Returns
UnregisterDamageCallback
UnregisterDamageCallback(handle: int)
Parameters
Name |
Type |
Description |
handle |
int |
|
RegisterImpulseCallback
RegisterImpulseCallback(callback: callable): int
Parameters
Name |
Type |
Description |
callback |
callable |
A callback in the form function(entity: Entity, impulseData: ImpulseData | nil): bool . |
Returns
RegisterImpulseCallback
RegisterImpulseCallback(context: any, callback: callable): int
Parameters
Name |
Type |
Description |
context |
any |
A context value to pass to the callback. |
callback |
callable |
A callback in the form function(context: any, entity: Entity, impulseData: ImpulseData | nil): bool . |
Returns
UnregisterImpulseCallback
UnregisterImpulseCallback(handle: int)
Parameters
Name |
Type |
Description |
handle |
int |
|