LockConstraint Class
锁定两个刚体之间的相对位置和旋转。
构造器
LockConstraint
(
-
bodyA -
bodyB -
[options]
参数:
Example:
// Locks the relative position and rotation between bodyA and bodyB
var constraint = new LockConstraint(bodyA, bodyB);
world.addConstraint(constraint);
项目索引
Methods
getMaxForce
()
Number
获取最大作用力.
Returns:
Number:
setMaxForce
(
-
force
设置施加的最大作用力
参数:
-
forceNumber
setRelaxation
(
-
relaxation
为这个约束设置弛豫度
参数:
-
relaxationNumber
setStiffness
(
-
stiffness
为这个约束设置刚度
参数:
-
stiffnessNumber
update
()
在求解之前更新内部约束参数
Properties
collideConnected
Boolean
如果你想将连接的刚体碰撞,将其设置为true
Default: true
equations
Array
用于求解约束的方程
localAngleB
Number
bodyB 在BodyA 范围中的角度,如果没有给出则从当前角度得出
localOffsetB
Array
bodyB 在BodyA 范围中的偏移,如果没有给出则从当前位置得出
