예제 #1
0
        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);
        }
예제 #2
0
        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);
        }