Search Results for

    Show / Hide Table of Contents

    Class Joint

    A base class for all Joint types. Joints constrain how two rigidbodies move relative to one another (for example a door hinge). One of the bodies in the joint must always be movable (non-kinematic and non-static).

    Inheritance
    System.Object
    Object
    SceneObject
    Actor
    Joint
    D6Joint
    DistanceJoint
    FixedJoint
    HingeJoint
    SliderJoint
    SphericalJoint
    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 Joint : Actor, ISerializable
    Remarks

    Joint constraint is created between the parent physic actor (rigidbody, character controller, etc.) and the specified target actor.

    Constructors

    Joint()

    Initializes a new instance of the Joint.

    Declaration
    protected Joint()

    Properties

    BreakForce

    Gets or sets the break force. Determines the maximum force the joint can apply before breaking. Broken joints no longer participate in physics simulation.

    Declaration
    [EditorOrder(10)]
    [EditorDisplay("Joint", null)]
    [ValueCategory]
    [Unmanaged]
    public float BreakForce { get; set; }
    Property Value
    System.Single

    BreakTorque

    Gets or sets the break torque. Determines the maximum torque the joint can apply before breaking. Broken joints no longer participate in physics simulation.

    Declaration
    [EditorOrder(20)]
    [EditorDisplay("Joint", null)]
    [ValueCategory]
    [Unmanaged]
    public float BreakTorque { get; set; }
    Property Value
    System.Single

    EnableAutoAnchor

    Determines whether use automatic target anchor position and rotation based on the joint world-space frame (computed when creating joint).

    Declaration
    [EditorOrder(39)]
    [EditorDisplay("Joint", null)]
    [Unmanaged]
    public bool EnableAutoAnchor { get; set; }
    Property Value
    System.Boolean

    EnableCollision

    Determines whether collision between the two bodies managed by the joint are enabled.

    Declaration
    [EditorOrder(30)]
    [EditorDisplay("Joint", null)]
    [Unmanaged]
    public bool EnableCollision { get; set; }
    Property Value
    System.Boolean

    Target

    The target actor for the joint. It has to be IPhysicsActor type (eg. RigidBody or CharacterController).

    Declaration
    [EditorOrder(0)]
    [EditorDisplay("Joint", null)]
    [Unmanaged]
    public Actor Target { get; set; }
    Property Value
    Actor

    TargetAnchor

    Gets or sets the target anchor.

    Declaration
    [EditorOrder(40)]
    [EditorDisplay("Joint", null)]
    [VisibleIf("EnableAutoAnchor", true)]
    [Unmanaged]
    public Vector3 TargetAnchor { get; set; }
    Property Value
    Vector3

    Remarks

    This is the relative pose which locates the joint frame relative to the target actor.

    TargetAnchorRotation

    Gets or sets the target anchor rotation.

    Declaration
    [EditorOrder(50)]
    [EditorDisplay("Joint", null)]
    [VisibleIf("EnableAutoAnchor", true)]
    [Unmanaged]
    public Quaternion TargetAnchorRotation { get; set; }
    Property Value
    Quaternion

    Remarks

    This is the relative pose rotation which locates the joint frame relative to the target actor.

    Methods

    GetCurrentForce(out Vector3, out Vector3)

    Gets the current force applied by the solver to maintain all constraints.

    Declaration
    [Unmanaged]
    public void GetCurrentForce(out Vector3 linear, out Vector3 angular)
    Parameters
    Vector3 linear

    The result linear force.

    Vector3 angular

    The result angular force.

    SetJointLocation(Vector3)

    Sets the location of the joint by automatically computing local position and target anchor to place a joint at the given location (world-space).

    Declaration
    [Unmanaged]
    public void SetJointLocation(Vector3 location)
    Parameters
    Vector3 location

    The joint location to set (world-space).

    Remarks

    Use this utility to automatically place joint at the given location after setting up joint parent and target.

    SetJointOrientation(Quaternion)

    Sets the orientation of the joint by automatically computing local orientation and target anchor orientation to orient a joint at the given rotation (world-space).

    Declaration
    [Unmanaged]
    public void SetJointOrientation(Quaternion orientation)
    Parameters
    Quaternion orientation

    The joint orientation to set (world-space).

    Remarks

    Use this utility to automatically rotate joint at the given location after setting up joint parent and target.

    Events

    JointBreak

    Occurs when a joint gets broken during simulation.

    Declaration
    [Unmanaged]
    public event Action JointBreak
    Event Type
    System.Action

    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