public float2 GetRepulseForce(Actor self, Actor h, Aircraft hAir) { if (self == h) return float2.Zero; if( hAir.Altitude < Altitude ) return float2.Zero; var d = self.CenterLocation - h.CenterLocation; if (d.Length > Info.IdealSeparation) return float2.Zero; if (d.LengthSquared < Epsilon) return float2.FromAngle((float)self.World.SharedRandom.NextDouble() * 3.14f); return (5 / d.LengthSquared) * d; }
public DebugAircraftSubPxY(Actor self) { a = self.Trait <Aircraft>(); }
public DebugAircraftAltitude(Actor self) { a = self.Trait <Aircraft>(); }
public DebugAircraftFacing(Actor self) { a = self.Trait <Aircraft>(); }