Examples of rotationRad()


Examples of hype.core.interfaces.HDirectable.rotationRad()

    int numTargets = _targets.size();
    Iterator<HDirectable> it = _targets.iterator();
    for(int i=0; i<numTargets; ++i) {
      HDirectable target = it.next();
     
      float rot = target.rotationRad();
      float tx = target.x();
      float ty = target.y();
     
      float goalx = _idleGoalX;
      float goaly = _idleGoalY;
View Full Code Here

Examples of hype.core.interfaces.HDirectable.rotationRad()

      // Add some random twitching to the rotation via perlin noise
      float noise = app.noise(i*numTargets + app.frameCount/8f);
      rot += HMath.map(noise, 0,1, -_twitchRad,_twitchRad);
     
      // Apply the rotation and move to the direction of its rotation
      target.rotationRad(rot);
      target.x(target.x() + (float)Math.cos(rot)*_speed);
      target.y(target.y() + (float)Math.sin(rot)*_speed);
      target.z(goalz);
    }
  }
 
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.