Sets velocity to 0, does not make use of doppler effect atm

This commit is contained in:
stiffly
2016-03-01 14:47:57 +01:00
parent 2c56b03b2b
commit d3ffb9768b
5 changed files with 34 additions and 42 deletions
@@ -86,6 +86,10 @@ void DefenderWeaponBehaviour::fireShell(WeaponInfo& wi)
}
if (weaponModelEntity.Valid()) {
EntityWrapper spawner = weaponModelEntity.FirstChildByName("WeaponMuzzle");
Events::PlaySoundOnEntity e;
e.EmitterID = weaponModelEntity.ID;
e.FilePath = "Audio/laser/laser1.wav";
m_EventBroker->Publish(e);
for (auto& angles : pelletAngles) {
glm::vec3 direction = Transform::AbsoluteOrientation(spawner) * glm::quat(glm::vec3(angles, 0.f)) * glm::vec3(0, 0, -1);
float distance = traceRayDistance(Transform::AbsolutePosition(spawner), direction);