Update Drone.cs

This commit is contained in:
2025-06-30 11:56:40 +03:00
parent 3ce096ba33
commit 5a2f0cc807

View File

@ -350,7 +350,11 @@ namespace DroneSimulator
RealBar.Update(PosXYZ.Z, tick);
RealPos.Update(PosXYZ, tick);
bool of = RealOF.Update(new Vector2(SpdXYZ.X / range - Gyr.Y, SpdXYZ.Y / range + Gyr.X), LaserRange, tick);
Vector2 of_xy;
if (range > 0.1) of_xy = new Vector2(SpdXYZ.X / range - Gyr.Y, SpdXYZ.Y / range + Gyr.X);
else of_xy = Vector2.Zero;
bool of = RealOF.Update(of_xy, LaserRange, tick);
if(of) lock (this)
{