A physical connection between two bodies with two defined axis (normally e.g. (0,0,1) and rotation(1,0,0)), they share the same anchor and have free rotation, but transfer the twist. In reality used in cars to transfer the more stable stationary force on the velocity axis to the bumping, damped moving wheel. Two RigidBodies need to be defined to use it. The two motors can be defined for the two rotation axis, along with springs.

                 
                     anchor - twist is transfered between bodies
        z                   |
        ↑            -----  |  ------------
        |           |     | ↓ |            | 
 -x <---|---> x     |     | x |            |           e.g. wheel can still turn up/down, 
        |           |     |   |            |           left right but transfering it's rotation on to the wheel-axis.
        ↓            -----     ------------
       -z    
                attachedRB          connectedRB
               (e.g. wheel)       (e.g. wheel-axis)

Author

Marko Fehrenbach, HFU, 2020 | Jirka Dell'Oro-Friedl, HFU, 2021

Hierarchy (view full)

Constructors

Properties

baseClass: typeof Joint = Joint

refers back to this class from any subclass e.g. in order to find compatible other resources

iSubclass: number = ...

subclasses get a iSubclass number for identification

subclasses: typeof Joint[] = []

list of all the subclasses derived from this class, if they registered properly

Accessors

  • get breakForce(): number
  • The amount of force needed to break the JOINT, in Newton. 0 equals unbreakable (default)

    Returns number

  • set breakForce(_value): void
  • Parameters

    • _value: number

    Returns void

  • get breakTorque(): number
  • The amount of force needed to break the JOINT, while rotating, in Newton. 0 equals unbreakable (default)

    Returns number

  • set breakTorque(_value): void
  • Parameters

    • _value: number

    Returns void

  • get internalCollision(): boolean
  • If the two connected RigidBodies collide with eath other. (Default = false) On a welding joint the connected bodies should not be colliding with each other, for best results

    Returns boolean

  • set internalCollision(_value): void
  • Parameters

    • _value: boolean

    Returns void

  • get isSingleton(): boolean
  • Is true, when only one instance of the component class can be attached to a node

    Returns boolean

  • get type(): string
  • Retrieves the type of this mutable subclass as the name of the runtime class

    Returns string

    The type of the mutable

Methods

  • Initializing and connecting the two rigidbodies with the configured joint properties is automatically called by the physics system. No user interaction needed.

    Returns void

  • Disconnecting the two rigidbodies and removing them from the physics system, is automatically called by the physics system. No user interaction needed.

    Returns void

  • Collect applicable attributes of the instance and copies of their values in a Mutator-object. By default, a mutator cannot be extended, since extensions are not available in the object the mutator belongs to. A mutator may be reduced by the descendants of Mutable to contain only the properties needed.

    Returns Mutator

  • Returns the original Joint used by the physics engine. Used internally no user interaction needed. Only to be used when functionality that is not added within FUDGE is needed.

    Returns Joint

  • Check if connection is dirty, so when either rb is changed disconnect and reconnect. Internally used no user interaction needed.

    Returns boolean

  • Updates the attribute values of the instance according to the state of the mutator. The mutation may be restricted to a subset of the mutator and the event dispatching suppressed. Uses mutateBase, but can be overwritten in subclasses

    Parameters

    • _mutator: Mutator
    • _selection: string[] = null
    • _dispatchMutate: boolean = true

    Returns Promise<void>