Linker

Work in Progress, please check back later for more detail.

A Linker is a feature of the Outline menu. Similar to a physics constraint, it “links” two physics-enabled entities together, connected by a joint.
Note: Currently if you want to access a Linker in the start() function of a script, you’ll need to call .init() on it first.

Function Description
enableMotor(value)

Enables/disables the Linker.

entityA()

Returns the first entity linked by the Linker. Whichever one is considered “entity A” depends on which one is higher in the scene editor at the time of creating the Linker.

entityB()

Returns the second entity linked by the Linker. Whichever one is considered “entity B” depends on which one is higher in the scene editor at the time of creating the Linker.

hingeAxis() Returns the hinge axis of the Linker.
init()

Initializes the Linker. This is necessary for accessing a Linker in the start() method.

isRemoved()

Returns true if the Linker is removed, false if not.

maxMotorImpulse()
motorVelocity()
position() Returns the position of the Linker.
remove()

Removes the Linker.

setEntities()
setHingeAxis() Set the hinge axis of the Linker.
setMaxMotorImpulse()
setMotorVelocity()
setPosition() Sets the position of the Linker.
setType() Sets the Linker type. Accepted values are `kPoint`, `kFixed`, `kHinged`.
type() Returns the type of the Linker. Possible values: `kPoint`, `kFixed`, `kHinged`.

enableMotor(value)

Enables/disables the Linker.

Parameters

boolean value – true to enable, false to disable

↑ Back to top


entityA()

Returns

Entity

↑ Back to top


entityB()

↑ Back to top


hingeAxis()

↑ Back to top


init()

Initializes the Linker. This is necessary for accessing a Linker in the start() method.

function start(){
  let linker = this.scene().find("Linker")[0];
  linker.init();
  // do whatever you need to with your linker now.
}

↑ Back to top


isRemoved()

Returns true if the Linker is removed, false if not.

Returns

boolean true if Linker is removed, false if not

↑ Back to top


maxMotorImpulse()

↑ Back to top


motorVelocity()

↑ Back to top


position()

↑ Back to top


remove()

Removes the Linker.

↑ Back to top


setEntities()

↑ Back to top


setHingeAxis()

↑ Back to top


setMaxMotorImpulse()

↑ Back to top


setMotorVelocity()

↑ Back to top


setPosition()

↑ Back to top


setType()

↑ Back to top


type()

↑ Back to top

Did you find this page useful?

Please give it a rating:

Please provide some feedback!

This is very helpful to us.