Update Drone.cs
This commit is contained in:
@ -350,7 +350,11 @@ namespace DroneSimulator
|
|||||||
RealBar.Update(PosXYZ.Z, tick);
|
RealBar.Update(PosXYZ.Z, tick);
|
||||||
RealPos.Update(PosXYZ, 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)
|
if(of) lock (this)
|
||||||
{
|
{
|
||||||
|
Reference in New Issue
Block a user