Skip to content

PhysicsEntity

BETA
PhysicsEntity is a struct containing information of a PhysicsEntity that simulates physics.

Functions

void OnHitEnter(function callback<YaEntity, number, float3>)

SERVER ONLY BETA 
Fired when the entity has been hit by a character.
  • callback callback function
    1. YaEntity The entity that has been hit
    2. int The direction in which the hit comes: 0 from the sides, 1 from the top, -1 from the down side
    3. float3 The normal of contact point

void OnHitExit(function callback<YaEntity>)

SERVER ONLY BETA 
Fired when the entity stops being hit by the character.
  • callback callback function
    1. YaEntity The entity that has been hit

void OnTriggerEnter(function callback<YaEntity>)

BETA 
Fired when the entity enters a trigger box.
  • callback callback function
    1. YaEntity The entity that enters a trigger box

void OnTriggerExit(function callback<YaEntity>)

BETA 
Fired when the entity exits a trigger box.
  • callback callback function
    1. YaEntity The entity that enters a trigger box

void OnContactExit(function callback<YaEntity>)

SERVER ONLY BETA 
Fired when the entity exits another character or rigidbody.