IsoCollider#

class in UltimateIsometricToolkit.Scripts.Physics / Inherits from MonoBehaviour

Description#

Abstract base class of colliders for isometric objects

See also (IsoBoxCollider,IsoSphereCollider, IsoCapsuleCollider, IsoMeshCollider)

Note

  • If the object with the IsoCollider attached needs to be moved during gameplay then you should also attach an IsoRigidbody component to the object.
  • The IsoRigidbody can be set to be kinematic if you don't want the object to have physical interaction with other objects.
  • If the gameobject is marked as static it will ignore any incoming physics based interaction like movements, forces, etc.

Variables#

Type Name Description
bool IsTrigger Is this IsoCollider a trigger ('pass through object')
PhyscicsMaterial Material PhyscicsMaterial for this IsoCollider

Events#


void OnIsoCollisionEnter(IsoCollision isoCollisionInfo)#

This IsoCollider entered a collision with another IsoCollider

1
2
3
void OnIsoCollisionEnter(IsoCollision isoCollisionInfo) {
            Debug.Log(gameObject.name + " enters collision with " + isoCollisionInfo.isoCollider.name + ", awesome!");
        }

void OnIsoCollisionStay(IsoCollision isoCollisionInfo)#

This IsoCollider stayed on collision with another collider since the last frame

1
2
3
        void OnIsoCollisionStay(IsoCollision isoCollisionInfo) {
            Debug.Log(gameObject.name + " stays on collision with " + isoCollisionInfo.isoCollider.name + ", awesome!");
        }

void OnIsoCollisionExit(IsoCollision isoCollisionInfo)#

This IsoCollider stopped colliding with another IsoCollider since the last frame

1
2
3
        void OnIsoCollisionExit(IsoCollision isoCollisionInfo) {
            Debug.Log(gameObject.name + " exits collision with " + isoCollisionInfo.isoCollider.name + ", awesome!");
        }

void OnIsoTriggerEnter(IsoCollider isoCollider)#

This IsoCollider was triggered by isoCollider

1
2
3
        void OnIsoTriggerEnter(IsoCollider isoCollider) {
            Debug.Log(gameObject.name + " enters trigger with " + isoCollider.gameObject.name + ", awesome!");
        }

void OnIsoTriggerStay(IsoCollider isoCollider)#

This IsoCollider is still triggered by isoCollider relative to the last frame

1
2
3
        void OnIsoTriggerStay(IsoCollider isoCollider) {
            Debug.Log(gameObject.name + " stays on trigger with " + isoCollider.gameObject.name + ", awesome!");
        }

void OnIsoTriggerExit(IsoCollider isoCollider)#

This IsoCollider stopped being triggered by isoCollider

1
2
3
        void OnIsoTriggerExit(IsoCollider isoCollider) {
            Debug.Log(gameObject.name + " exits trigger with " + isoCollider.gameObject.name + ", awesome!");
        }