jointWith

inline fun <J : JointDef> Body.jointWith(body: Body, jointDefinition: J, init: J.() -> Unit = {}): Joint

Allows to create a Joint with custom JointDef instance. this Body will be set as the JointDef.bodyA.

Return

a fully constructed Joint based on the customized jointDefinition.

Parameters

body

will be set as the JointDef.bodyB.

jointDefinition

can be customized with init block.

init

inlined. JointDef.bodyA, JointDef.bodyB and JointDef.type must not be changed. Invoked after joint definition default values are preset.

See also