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

Method setInitialDirection

source/game/StarProjectile.cpp:425–428  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

423}
424
425void Projectile::setInitialDirection(Vec2F const& direction) {
426 m_movementController->setVelocity(vnorm(direction) * m_initialSpeed + m_referenceVelocity.value());
427 m_movementController->setRotation(direction.angle());
428}
429
430void Projectile::setInitialVelocity(Vec2F const& velocity) {
431 m_movementController->setVelocity(velocity + m_referenceVelocity.value());

Callers 4

processActionMethod · 0.80
reloadPlayerMethod · 0.80
fireTriggeredMethod · 0.80
spawnProjectileMethod · 0.80

Calls 5

vnormFunction · 0.85
setVelocityMethod · 0.45
valueMethod · 0.45
setRotationMethod · 0.45
angleMethod · 0.45

Tested by

no test coverage detected