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

Method setInitialVelocity

source/game/StarProjectile.cpp:430–433  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

428}
429
430void Projectile::setInitialVelocity(Vec2F const& velocity) {
431 m_movementController->setVelocity(velocity + m_referenceVelocity.value());
432 m_movementController->setRotation(velocity.angle());
433}
434
435void Projectile::setSourceEntity(EntityId source, bool trackSource) {
436 m_sourceEntity = source;

Callers 1

Calls 4

setVelocityMethod · 0.45
valueMethod · 0.45
setRotationMethod · 0.45
angleMethod · 0.45

Tested by

no test coverage detected