MCPcopy Create free account
hub / github.com/OpenStarbound/OpenStarbound / rotate

Method rotate

source/game/StarMovementController.cpp:396–402  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

394}
395
396void MovementController::rotate(float rotationRate) {
397 if (rotationRate == 0.0)
398 return;
399
400 m_resting = false;
401 m_rotation.set(fmod(rotation() + rotationRate * m_timeStep, 2 * Constants::pi));
402}
403
404void MovementController::accelerate(Vec2F const& acceleration) {
405 setVelocity(velocity() + acceleration * m_timeStep);

Callers 2

collisionBodyMethod · 0.45
localBoundBoxMethod · 0.45

Calls 1

setMethod · 0.45

Tested by

no test coverage detected