Skip to content

Api > LuaBehaviour > OnTriggerStay()


LuaBehaviour.OnTriggerStay(Collider other)⚓︎

OnTriggerStay is called almost all the frames for every Collider other that is touching the trigger. The function is on the physics timer so it won't necessarily run every frame.

Parameters:⚓︎

Name Type Description
other Collider The other Collider involved in this collision.

Usage⚓︎

local script = LUA.script;

--- OnTriggerStay message from LuaBehaviour
---@param other Collider
function script.OnTriggerStay(other)
   -- your code here 
end