private void Draw(cpDampedRotarySpring constraint) { //Not used }
public float defaultSpringTorque(cpDampedRotarySpring spring, float relativeAngle) { return((relativeAngle - spring.restAngle) * spring.stiffness); }
protected bool Init(CCPhysicsBody a, CCPhysicsBody b, float stiffness, float damping) { if (!base.Init(a, b)) return false; cpConstraint joint = new cpDampedRotarySpring(GetBodyInfo(a).Body, GetBodyInfo(b).Body, _bodyB.GetRotation() - _bodyA.GetRotation(), stiffness, damping); if (joint == null) return false; _info.Add(joint); return true; }
public float defaultSpringTorque(cpDampedRotarySpring spring, float relativeAngle) { return (relativeAngle - spring.restAngle) * spring.stiffness; }