Search Results for

    Show / Hide Table of Contents

    Class Collider

    A base class for all colliders.

    Inheritance
    System.Object
    Object
    SceneObject
    Actor
    PhysicsColliderActor
    Collider
    BoxCollider
    CapsuleCollider
    CharacterController
    MeshCollider
    SphereCollider
    SplineCollider
    Implements
    ISerializable
    Inherited Members
    PhysicsColliderActor.RayCast(Vector3, Vector3, Single, Single)
    PhysicsColliderActor.RayCast(Vector3, Vector3, RayCastHit, Single)
    PhysicsColliderActor.ClosestPoint(Vector3, Vector3)
    PhysicsColliderActor.ContainsPoint(Vector3)
    PhysicsColliderActor.OnCollisionEnter(Collision)
    PhysicsColliderActor.OnCollisionExit(Collision)
    PhysicsColliderActor.OnTriggerEnter(PhysicsColliderActor)
    PhysicsColliderActor.OnTriggerExit(PhysicsColliderActor)
    PhysicsColliderActor.AttachedRigidBody
    PhysicsColliderActor.CollisionEnter
    PhysicsColliderActor.CollisionExit
    PhysicsColliderActor.TriggerEnter
    PhysicsColliderActor.TriggerExit
    Actor.SetLayerRecursive(Int32)
    Actor.SetLayerNameRecursive(String)
    Actor.HasTag()
    Actor.HasTag(Tag)
    Actor.HasTag(String)
    Actor.AddTag(Tag)
    Actor.AddTagRecursive(Tag)
    Actor.RemoveTag(Tag)
    Actor.SetParent(Actor, Boolean, Boolean)
    Actor.GetChild(Int32)
    Actor.GetChild(String)
    Actor.GetChild(Type)
    Actor.GetChildren(Type)
    Actor.DestroyChildren(Single)
    Actor.GetScript(Int32)
    Actor.GetScript(Type)
    Actor.GetScripts(Type)
    Actor.AddMovement(Vector3)
    Actor.AddMovement(Vector3, Quaternion)
    Actor.GetWorldToLocalMatrix(Matrix)
    Actor.GetLocalToWorldMatrix(Matrix)
    Actor.OnDebugDraw()
    Actor.OnDebugDrawSelected()
    Actor.GetPrefabRoot()
    Actor.FindActor(String)
    Actor.FindActor(Type, Boolean)
    Actor.FindActor(Type, String)
    Actor.FindActor(Type, Tag, Boolean)
    Actor.FindScript(Type)
    Actor.HasActorInHierarchy(Actor)
    Actor.HasActorInChildren(Actor)
    Actor.IntersectsItself(Ray, Single, Vector3)
    Actor.Intersects(Ray, Single, Vector3)
    Actor.LookAt(Vector3)
    Actor.LookAt(Vector3, Vector3)
    Actor.LookingAt(Vector3)
    Actor.LookingAt(Vector3, Vector3)
    Actor.ToBytes(Actor[])
    Actor.FromBytes(Byte[])
    Actor.FromBytes(Byte[], Dictionary<Guid, Guid>)
    Actor.TryGetSerializedObjectsIds(Byte[])
    Actor.ToJson()
    Actor.FromJson(String)
    Actor.Clone()
    Actor.OnEnable()
    Actor.OnDisable()
    Actor.OnParentChanged()
    Actor.OnTransformChanged()
    Actor.OnActiveChanged()
    Actor.OnActiveInTreeChanged()
    Actor.OnOrderInParentChanged()
    Actor.OnStaticFlagsChanged()
    Actor.OnLayerChanged()
    Actor.OnBeginPlay()
    Actor.OnEndPlay()
    Actor.AddStaticFlags(StaticFlags)
    Actor.RemoveStaticFlags(StaticFlags)
    Actor.SetStaticFlag(StaticFlags, Boolean)
    Actor.HasStaticFlag(StaticFlags)
    Actor.ResetLocalTransform()
    Actor.AddChild(Type)
    Actor.AddChild<T>()
    Actor.GetChild<T>()
    Actor.TryGetChild<T>(T)
    Actor.GetOrAddChild<T>()
    Actor.AddScript(Type)
    Actor.AddScript<T>()
    Actor.GetScript<T>()
    Actor.TryGetScript<T>(T)
    Actor.FindScript<T>()
    Actor.FindActor<T>(Boolean)
    Actor.FindActor<T>(String)
    Actor.FindActor<T>(Tag, Boolean)
    Actor.GetChildren<T>()
    Actor.GetScripts<T>()
    Actor.RotateAround(Vector3, Vector3, Single, Boolean)
    Actor.ToString()
    Actor.Children
    Actor.Tags
    Actor.Layer
    Actor.Name
    Actor.IsActive
    Actor.StaticFlags
    Actor.PerInstanceRandom
    Actor.LocalPosition
    Actor.LocalOrientation
    Actor.LocalScale
    Actor.Sphere
    Actor.Box
    Actor.BoxWithChildren
    Actor.EditorBox
    Actor.EditorBoxChildren
    Actor.HasContentLoaded
    Actor.IsPrefabRoot
    Actor.IsStatic
    Actor.IsTransformStatic
    Actor.WorldToLocalMatrix
    Actor.LocalToWorldMatrix
    SceneObject.SetParent(Actor, Boolean)
    SceneObject.LinkPrefab(Guid, Guid)
    SceneObject.BreakPrefabLink()
    SceneObject.GetNamePath(Char)
    SceneObject.IsDuringPlay
    SceneObject.HasParent
    SceneObject.HasPrefabLink
    SceneObject.PrefabID
    SceneObject.PrefabObjectID
    Object.__unmanagedPtr
    Object.__internalId
    Object.Finalize()
    Object.As<T>()
    Object.NewValue(Type)
    Object.New(String)
    Object.Find<T>(Guid, Boolean)
    Object.Find(Guid, Type, Boolean)
    Object.TryFind<T>(Guid)
    Object.TryFind(Guid, Type)
    Object.Destroy(Object, Single)
    Object.DestroyNow(Object)
    Object.Destroy<T>(T, Single)
    Object.Equals(Object)
    Object.GetUnmanagedPtr(Object)
    Object.GetUnmanagedInterface(Object, Type)
    Object.FromUnmanagedPtr(IntPtr)
    Object.MapObjectID(Guid)
    Object.RemapObjectID(Guid)
    Object.GetHashCode()
    Object.ID
    Object.TypeName
    Namespace: FlaxEngine
    Assembly: FlaxEngine.CSharp.dll
    Syntax
    [Unmanaged]
    public abstract class Collider : PhysicsColliderActor, ISerializable

    Constructors

    Collider()

    Initializes a new instance of the Collider.

    Declaration
    protected Collider()

    Properties

    Center

    Gets or sets the center of the collider, measured in the object's local space.

    Declaration
    [EditorOrder(10)]
    [EditorDisplay("Collider", null)]
    [ValueCategory]
    [Unmanaged]
    public Vector3 Center { get; set; }
    Property Value
    Vector3

    ContactOffset

    Gets or sets the contact offset. Colliders whose distance is less than the sum of their ContactOffset values will generate contacts. The contact offset must be positive. Contact offset allows the collision detection system to predictively enforce the contact constraint even when the objects are slightly separated.

    Declaration
    [EditorOrder(1)]
    [Limit(0F, 100F, 1F)]
    [EditorDisplay("Collider", null)]
    [ValueCategory]
    [Unmanaged]
    public float ContactOffset { get; set; }
    Property Value
    System.Single

    IsTrigger

    Gets or sets the 'IsTrigger' flag. A trigger doesn't register a collision with an incoming Rigidbody. Instead, it sends OnTriggerEnter and OnTriggerExit message when a rigidbody enters or exits the trigger volume.

    Declaration
    [EditorOrder(0)]
    [EditorDisplay("Collider", null)]
    [Unmanaged]
    public bool IsTrigger { get; set; }
    Property Value
    System.Boolean

    Material

    The physical material used to define the collider physical properties.

    Declaration
    [EditorOrder(2)]
    [EditorDisplay("Collider", null)]
    [Unmanaged]
    public JsonAssetReference<PhysicalMaterial> Material { get; set; }
    Property Value
    JsonAssetReference<PhysicalMaterial>

    Methods

    ComputePenetration(Collider, Collider, out Vector3, out Single)

    Computes minimum translational distance between two geometry objects. Translating the first collider by direction * distance will separate the colliders apart if the function returned true. Otherwise, direction and distance are not defined. The one of the colliders has to be BoxCollider, SphereCollider CapsuleCollider or a convex MeshCollider. The other one can be any type. If objects do not overlap, the function can not compute the distance and returns false.

    Declaration
    [Unmanaged]
    public static bool ComputePenetration(Collider colliderA, Collider colliderB, out Vector3 direction, out float distance)
    Parameters
    Collider colliderA

    The first collider.

    Collider colliderB

    The second collider.

    Vector3 direction

    The computed direction along which the translation required to separate the colliders apart is minimal. Valid only if function returns true.

    System.Single distance

    The penetration distance along direction that is required to separate the colliders apart. Valid only if function returns true.

    Returns
    System.Boolean

    True if the distance has successfully been computed, i.e. if objects do overlap, otherwise false.

    Extension Methods

    Extensions.ReflectiveCompare<T>(T, T)
    Extensions.RawClone<T>(T)

    See Also

    Actor
    PhysicsColliderActor
    In This Article
    Back to top Copyright © 2012-2024 Wojciech Figat