public static JointSpring GetJointSpring(this Joint.Dynamics dynamics) { JointSpring jointSpring = new JointSpring(); jointSpring.damper = (float)dynamics.damping; jointSpring.spring = (float)dynamics.friction; jointSpring.targetPosition = 0; return(jointSpring); }
public static JointDrive GetJointDrive(this Joint.Dynamics dynamics) { JointDrive jointDrive = new JointDrive(); jointDrive.maximumForce = float.MaxValue; jointDrive.positionDamper = (float)dynamics.damping; jointDrive.positionSpring = (float)dynamics.friction; return(jointDrive); }