Search Results for

    Show / Hide Table of Contents

    Class PhysicsColliderActor

    A base class for all physical collider actors.

    Inheritance
    System.Object
    Object
    SceneObject
    Actor
    PhysicsColliderActor
    Collider
    Terrain
    Implements
    ISerializable
    Inherited Members
    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 PhysicsColliderActor : Actor, ISerializable

    Constructors

    PhysicsColliderActor()

    Initializes a new instance of the PhysicsColliderActor.

    Declaration
    protected PhysicsColliderActor()

    Properties

    AttachedRigidBody

    Gets the attached rigid body.

    Declaration
    [Unmanaged]
    public RigidBody AttachedRigidBody { get; }
    Property Value
    RigidBody

    Methods

    ClosestPoint(Vector3, out Vector3)

    Gets a point on the collider that is closest to a given location. Can be used to find a hit location or position to apply explosion force or any other special effects.

    Declaration
    [Unmanaged]
    public void ClosestPoint(Vector3 point, out Vector3 result)
    Parameters
    Vector3 point

    The position to find the closest point to it.

    Vector3 result

    The result point on the collider that is closest to the specified location.

    ContainsPoint(Vector3)

    Checks if a point is inside the collider.

    Declaration
    [Unmanaged]
    public bool ContainsPoint(Vector3 point)
    Parameters
    Vector3 point

    The point to check if is contained by the collider shape (in world-space).

    Returns
    System.Boolean

    True if collider shape contains a given point, otherwise false.

    OnCollisionEnter(Collision)

    Called when a collision start gets registered for this collider (it collides with something).

    Declaration
    [Unmanaged]
    public virtual void OnCollisionEnter(Collision c)
    Parameters
    Collision c

    The collision info.

    OnCollisionExit(Collision)

    Called when a collision end gets registered for this collider (it ends colliding with something).

    Declaration
    [Unmanaged]
    public virtual void OnCollisionExit(Collision c)
    Parameters
    Collision c

    The collision info.

    OnTriggerEnter(PhysicsColliderActor)

    Called when a trigger touching start gets registered for this collider (the other collider enters it and triggers the event).

    Declaration
    [Unmanaged]
    public virtual void OnTriggerEnter(PhysicsColliderActor c)
    Parameters
    PhysicsColliderActor c

    The other collider.

    OnTriggerExit(PhysicsColliderActor)

    Called when a trigger touching end gets registered for this collider (the other collider enters it and triggers the event).

    Declaration
    [Unmanaged]
    public virtual void OnTriggerExit(PhysicsColliderActor c)
    Parameters
    PhysicsColliderActor c

    The other collider.

    RayCast(Vector3, Vector3, out RayCastHit, Single)

    Performs a raycast against this collider, returns results in a RaycastHit structure.

    Declaration
    [Unmanaged]
    public bool RayCast(Vector3 origin, Vector3 direction, out RayCastHit hitInfo, float maxDistance = 3.40282347E+38F)
    Parameters
    Vector3 origin

    The origin of the ray.

    Vector3 direction

    The normalized direction of the ray.

    RayCastHit hitInfo

    The result hit information. Valid only when method returns true.

    System.Single maxDistance

    The maximum distance the ray should check for collisions.

    Returns
    System.Boolean

    True if ray hits an object, otherwise false.

    RayCast(Vector3, Vector3, out Single, Single)

    Performs a raycast against this collider shape.

    Declaration
    [Unmanaged]
    public bool RayCast(Vector3 origin, Vector3 direction, out float resultHitDistance, float maxDistance = 3.40282347E+38F)
    Parameters
    Vector3 origin

    The origin of the ray.

    Vector3 direction

    The normalized direction of the ray.

    System.Single resultHitDistance

    The raycast result hit position distance from the ray origin. Valid only if raycast hits anything.

    System.Single maxDistance

    The maximum distance the ray should check for collisions.

    Returns
    System.Boolean

    True if ray hits an object, otherwise false.

    Events

    CollisionEnter

    Occurs when a collision start gets registered for this collider (it collides with something).

    Declaration
    [Unmanaged]
    public event Action<Collision> CollisionEnter
    Event Type
    System.Action<Collision>

    CollisionExit

    Occurs when a collision end gets registered for this collider (it ends colliding with something).

    Declaration
    [Unmanaged]
    public event Action<Collision> CollisionExit
    Event Type
    System.Action<Collision>

    TriggerEnter

    Occurs when a trigger touching start gets registered for this collider (the other collider enters it and triggers the event).

    Declaration
    [Unmanaged]
    public event Action<PhysicsColliderActor> TriggerEnter
    Event Type
    System.Action<PhysicsColliderActor>

    TriggerExit

    Occurs when a trigger touching end gets registered for this collider (the other collider enters it and triggers the event).

    Declaration
    [Unmanaged]
    public event Action<PhysicsColliderActor> TriggerExit
    Event Type
    System.Action<PhysicsColliderActor>

    Extension Methods

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

    See Also

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