missiles can now be attacked

This commit is contained in:
devZoGok
2025-11-29 20:36:20 +02:00
parent 4fa5d73c1b
commit fbe1be2b93
14 changed files with 81 additions and 33 deletions
+4 -1
View File
@@ -7,7 +7,10 @@ namespace battleship{
Missile::Missile(Unit *un, int id, Vector3 tp, Vector3 pos, Quaternion rot) :
Projectile(un, id, pos, rot),
Destructable(un->getPlayer(), id, GameObject::Type::PROJECTILE, pos, rot),
targetPos(tp){}
targetPos(tp)
{
Destructable::initProperties();
}
void Missile::update(){
Vector3 targDir = (targetPos - Projectile::pos).norm();