Click or drag to resize

ASL_ObjectCollider Class

ASL_ObjectCollider: ASL_ObjectCollider detects and handles collisions, via Triggers, between two ASL_Objects with ASL_ObjectColliders. Do NOT set OnTriggerEnter, OnTriggerExit, or OnTriggerStay on the object. Instead set these function by passing in callback functions via this. ASL_ObjectCollider only supports Kinematic colliders, it does NOT support RigidBody colliders. If used with RigidBody colliders it will result in desinking of objct possition due to Unity's built in physics. Currently this only handles Triggers, but not Collisions. The objects must have a collider with IsTrigger set to true, and at least one object involved in the collision must have a RigidBody that with IsKinematic set to true.
Inheritance Hierarchy
SystemObject
  Object
    Component
      Behaviour
        MonoBehaviour
          ASLASL_ObjectCollider

Namespace:  ASL
Assembly:  Assembly-CSharp (in Assembly-CSharp.dll) Version: 0.0.0.0
Syntax
public class ASL_ObjectCollider : MonoBehaviour

The ASL_ObjectCollider type exposes the following members.

Constructors
  NameDescription
Public methodASL_ObjectCollider
Initializes a new instance of the ASL_ObjectCollider class
Top
Properties
  NameDescription
Public propertym_OnCollisionEnterCallback
Callback to be executed on OnCollisionEnter
Public propertym_OnCollisionExitCallback
Callback to be executed on OnCollisionExit
Public propertym_OnTriggerEnterCallback
Callback to be executed on OnTriggerEnter
Public propertym_OnTriggerExitCallback
Callback to be executed on OnTriggerEnter
Public propertym_OnTriggerStayCallback
Callback to be executed on OnTriggerEnter
Top
Methods
  NameDescription
Public methodASL_OnCollisionEnter
Sets the callback function for the ASL_ObjectCollider OnCollisionEnter. This does NOT claim the object. Only a single callback function is stored at a time.
Public methodASL_OnCollisionExit
Sets the callback function for the ASL_ObjectCollider OnCollisionExit. This does NOT claim the object. Only a single callback function is stored at a time.
Public methodASL_OnTriggerEnter
Sets the callback function for the ASL_ObjectCollider OnTriggerEnter. This does NOT claim the object. Only a single callback function is stored at a time.
Public methodASL_OnTriggerExit
Sets the callback function for the ASL_ObjectCollider OnTriggerExit. This does NOT claim the object. Only a single callback function is stored at a time.
Public methodASL_OnTriggerStay
Sets the callback function for the ASL_ObjectCollider OnTriggerStay. This does NOT claim the object. Only a single callback function is stored at a time.
Private methodOnCollisionEnter
Called when object enters the collision of another object. Only exicutes the callback function if this client is the PhysicsMaster.
Private methodOnCollisionExit
Called when object exits the collision of another object. Only exicutes the callback function if this client is the PhysicsMaster.
Private methodOnTriggerEnter
Called when object enters a trigger. Only exicutes the callback function if this client is the PhysicsMaster.
Private methodOnTriggerExit
Called when object exits a trigger. Only exicutes the callback function if this client is the PhysicsMaster.
Private methodOnTriggerStay
Called when object stays in a trigger. Only exicutes the callback function if this client is the PhysicsMaster.
Private methodStart
Top
Fields
  NameDescription
Public fieldObjectCollider
Private fieldphysicsMaster
Reference to the PhysicsMaster in the scene. There should never be more than one PhysicsMaster per client
Top
See Also

Reference