love.physics.newMotorJoint

love.physics.newMotorJoint

Available since LÖVE 0.9.0
This function is not supported in earlier versions.

Creates a joint between two bodies which controls the relative motion between them.

Position and rotation offsets can be specified once the MotorJoint has been created, as well as the maximum motor force and torque that will be be applied to reach the target offsets.

Function

Synopsis

joint = love.physics.newMotorJoint( body1, body2, correctionFactor )

Arguments

Body body1
The first body to attach to the joint.
Body body2
The second body to attach to the joint.
number correctionFactor (0.3)
The joint's initial position correction factor, in the range of [0, 1].

Returns

MotorJoint joint
The new MotorJoint.

Function

Available since LÖVE 0.10.1
This variant is not supported in earlier versions.

Synopsis

joint = love.physics.newMotorJoint( body1, body2, correctionFactor, collideConnected )

Arguments

Body body1
The first body to attach to the joint.
Body body2
The second body to attach to the joint.
number correctionFactor (0.3)
The joint's initial position correction factor, in the range of [0, 1].
boolean collideConnected (false)
Specifies whether the two bodies should collide with each other.

Returns

MotorJoint joint
The new MotorJoint.

See Also

© 2006–2016 LÖVE Development Team
Licensed under the GNU Free Documentation License, Version 1.3.
https://love2d.org/wiki/love.physics.newMotorJoint

在线笔记
App下载
App下载

扫描二维码

下载编程狮App

公众号
微信公众号

编程狮公众号

意见反馈
返回顶部