Examples of enableAngularMotor()


Examples of com.bulletphysics.dynamics.constraintsolver.HingeConstraint.enableAngularMotor()

        float targetPercent = ((int)(time / 1000) % (int)(cyclePeriod)) / cyclePeriod;
        float targetAngle = 0.5f * (1.0f + (float)Math.sin(BulletGlobals.SIMD_2_PI * targetPercent));
        float targetLimitAngle = hingeC.getLowerLimit() + targetAngle * (hingeC.getUpperLimit() - hingeC.getLowerLimit());
        float angleError = targetLimitAngle - curAngle;
        float desiredAngularVel = 1000000.f * angleError/ms;
        hingeC.enableAngularMotor(true, desiredAngularVel, muscleStrength);
      }
    }
   
    if (dynamicsWorld != null) {
      dynamicsWorld.stepSimulation(ms / 1000000.f);
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.