Rotate entities to the right angle when forming a formation
This was SVN commit r14909.
This commit is contained in:
parent
4ddf1ac4dc
commit
1f63325ede
@ -250,6 +250,12 @@ Formation.prototype.SetInPosition = function(ent)
|
||||
if (this.inPosition.indexOf(ent) != -1)
|
||||
return;
|
||||
|
||||
// Rotate the entity to the right angle
|
||||
var cmpPosition = Engine.QueryInterface(this.entity, IID_Position);
|
||||
var cmpEntPosition = Engine.QueryInterface(ent, IID_Position);
|
||||
if (cmpEntPosition && cmpEntPosition.IsInWorld() && cmpPosition && cmpPosition.IsInWorld)
|
||||
cmpEntPosition.TurnTo(cmpPosition.GetRotation().y);
|
||||
|
||||
this.inPosition.push(ent);
|
||||
};
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user