PhysicsActor.cs 23 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686
  1. /*
  2. * Copyright (c) Contributors, http://opensimulator.org/
  3. * See CONTRIBUTORS.TXT for a full list of copyright holders.
  4. *
  5. * Redistribution and use in source and binary forms, with or without
  6. * modification, are permitted provided that the following conditions are met:
  7. * * Redistributions of source code must retain the above copyright
  8. * notice, this list of conditions and the following disclaimer.
  9. * * Redistributions in binary form must reproduce the above copyright
  10. * notice, this list of conditions and the following disclaimer in the
  11. * documentation and/or other materials provided with the distribution.
  12. * * Neither the name of the OpenSimulator Project nor the
  13. * names of its contributors may be used to endorse or promote products
  14. * derived from this software without specific prior written permission.
  15. *
  16. * THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY
  17. * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
  18. * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
  19. * DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
  20. * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
  21. * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
  22. * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
  23. * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
  24. * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
  25. * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  26. */
  27. using log4net;
  28. using System;
  29. using System.Collections.Generic;
  30. using System.Runtime.InteropServices;
  31. using OpenSim.Framework;
  32. using OpenMetaverse;
  33. namespace OpenSim.Region.PhysicsModules.SharedBase
  34. {
  35. public delegate void PositionUpdate(Vector3 position);
  36. public delegate void VelocityUpdate(Vector3 velocity);
  37. public delegate void OrientationUpdate(Quaternion orientation);
  38. public enum ActorTypes : int
  39. {
  40. Unknown = 0,
  41. Agent = 1,
  42. Prim = 2,
  43. Ground = 3,
  44. Water = 4
  45. }
  46. public enum PIDHoverType
  47. {
  48. Ground,
  49. GroundAndWater,
  50. Water,
  51. Absolute
  52. }
  53. public class CameraData
  54. {
  55. public Quaternion CameraRotation;
  56. public Vector3 CameraAtAxis;
  57. public bool MouseLook;
  58. }
  59. [StructLayout(LayoutKind.Sequential, Pack = 16)]
  60. public struct AABB2D
  61. {
  62. public float minx;
  63. public float maxx;
  64. public float miny;
  65. public float maxy;
  66. }
  67. public struct ContactPoint
  68. {
  69. public Vector3 Position;
  70. public Vector3 SurfaceNormal;
  71. public float PenetrationDepth;
  72. public float RelativeSpeed;
  73. public bool CharacterFeet;
  74. public ContactPoint(Vector3 position, Vector3 surfaceNormal, float penetrationDepth)
  75. {
  76. Position = position;
  77. SurfaceNormal = surfaceNormal;
  78. PenetrationDepth = penetrationDepth;
  79. RelativeSpeed = 0f; // for now let this one be set explicity
  80. CharacterFeet = true; // keep other plugins work as before
  81. }
  82. public ContactPoint(Vector3 position, Vector3 surfaceNormal, float penetrationDepth, bool feet)
  83. {
  84. Position = position;
  85. SurfaceNormal = surfaceNormal;
  86. PenetrationDepth = penetrationDepth;
  87. RelativeSpeed = 0f; // for now let this one be set explicity
  88. CharacterFeet = feet; // keep other plugins work as before
  89. }
  90. }
  91. public struct ContactData
  92. {
  93. public float mu;
  94. public float bounce;
  95. public bool softcolide;
  96. public ContactData(float _mu, float _bounce, bool _softcolide)
  97. {
  98. mu = _mu;
  99. bounce = _bounce;
  100. softcolide = _softcolide;
  101. }
  102. }
  103. /// <summary>
  104. /// Used to pass collision information to OnCollisionUpdate listeners.
  105. /// </summary>
  106. public class CollisionEventUpdate : EventArgs
  107. {
  108. /// <summary>
  109. /// Number of collision events in this update.
  110. /// </summary>
  111. public int Count { get { return m_objCollisionList.Count; } }
  112. public bool CollisionsOnPreviousFrame { get; private set; }
  113. public Dictionary<uint, ContactPoint> m_objCollisionList;
  114. public CollisionEventUpdate(Dictionary<uint, ContactPoint> objCollisionList)
  115. {
  116. m_objCollisionList = objCollisionList;
  117. }
  118. public CollisionEventUpdate()
  119. {
  120. m_objCollisionList = new Dictionary<uint, ContactPoint>();
  121. }
  122. public void AddCollider(uint localID, ContactPoint contact)
  123. {
  124. ref ContactPoint curcp = ref CollectionsMarshal.GetValueRefOrAddDefault(m_objCollisionList, localID, out bool ex);
  125. if (ex)
  126. {
  127. if (curcp.PenetrationDepth < contact.PenetrationDepth)
  128. {
  129. if (Math.Abs(curcp.PenetrationDepth) > Math.Abs(contact.RelativeSpeed))
  130. contact.RelativeSpeed = curcp.PenetrationDepth;
  131. curcp = contact;
  132. }
  133. else if (MathF.Abs(curcp.RelativeSpeed) < MathF.Abs(contact.RelativeSpeed))
  134. {
  135. curcp.RelativeSpeed = contact.RelativeSpeed;
  136. }
  137. }
  138. else
  139. curcp = contact;
  140. }
  141. /// <summary>
  142. /// Clear added collision events.
  143. /// </summary>
  144. public void Clear()
  145. {
  146. m_objCollisionList.Clear();
  147. }
  148. }
  149. public abstract class PhysicsActor
  150. {
  151. //private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
  152. public delegate void RequestTerseUpdate();
  153. public delegate void CollisionUpdate(EventArgs e);
  154. public delegate void OutOfBounds(Vector3 pos);
  155. public delegate CameraData GetCameraData();
  156. // disable warning: public events
  157. #pragma warning disable 67
  158. public event PositionUpdate OnPositionUpdate;
  159. public event VelocityUpdate OnVelocityUpdate;
  160. public event OrientationUpdate OnOrientationUpdate;
  161. public event RequestTerseUpdate OnRequestTerseUpdate;
  162. public event GetCameraData OnPhysicsRequestingCameraData;
  163. /// <summary>
  164. /// Subscribers to this event must synchronously handle the dictionary of collisions received, since the event
  165. /// object is reused in subsequent physics frames.
  166. /// </summary>
  167. public event CollisionUpdate OnCollisionUpdate;
  168. public event OutOfBounds OnOutOfBounds;
  169. #pragma warning restore 67
  170. public CameraData TryGetCameraData()
  171. {
  172. GetCameraData handler = OnPhysicsRequestingCameraData;
  173. return (handler == null) ? null : handler();
  174. }
  175. public static PhysicsActor Null
  176. {
  177. get { return new NullPhysicsActor(); }
  178. }
  179. public virtual bool Building { get; set; }
  180. public virtual void getContactData(ref ContactData cdata)
  181. {
  182. cdata.mu = 0;
  183. cdata.bounce = 0;
  184. }
  185. public abstract bool Stopped { get; }
  186. public abstract Vector3 Size { get; set; }
  187. public virtual void setAvatarSize(Vector3 size, float feetOffset)
  188. {
  189. Size = size;
  190. }
  191. public virtual bool Phantom { get; set; }
  192. public virtual bool IsVolumeDtc
  193. {
  194. get { return false; }
  195. set { return; }
  196. }
  197. public virtual byte PhysicsShapeType { get; set; }
  198. public abstract PrimitiveBaseShape Shape { set; }
  199. public uint m_baseLocalID;
  200. public virtual uint LocalID
  201. {
  202. set { m_baseLocalID = value; }
  203. get { return m_baseLocalID; }
  204. }
  205. public abstract bool Grabbed { set; }
  206. public abstract bool Selected { set; }
  207. /// <summary>
  208. /// Name of this actor.
  209. /// </summary>
  210. /// <remarks>
  211. /// XXX: Bizarrely, this cannot be "Terrain" or "Water" right now unless it really is simulating terrain or
  212. /// water. This is not a problem due to the formatting of names given by prims and avatars.
  213. /// </remarks>
  214. public string Name { get; set; }
  215. /// <summary>
  216. /// This is being used by ODE joint code.
  217. /// </summary>
  218. public string SOPName;
  219. public virtual void CrossingStart() { }
  220. public abstract void CrossingFailure();
  221. public abstract void link(PhysicsActor obj);
  222. public abstract void delink();
  223. public abstract void LockAngularMotion(byte axislocks);
  224. public virtual void RequestPhysicsterseUpdate()
  225. {
  226. OnRequestTerseUpdate?.Invoke();
  227. }
  228. public virtual void RaiseOutOfBounds(Vector3 pos)
  229. {
  230. OnOutOfBounds?.Invoke(pos);
  231. }
  232. public virtual void SendCollisionUpdate(EventArgs e)
  233. {
  234. OnCollisionUpdate?.Invoke(e);
  235. }
  236. public virtual void SetMaterial (int material) { }
  237. public virtual float Density { get; set; }
  238. public virtual float GravModifier { get; set; }
  239. public virtual float Friction { get; set; }
  240. public virtual float Restitution { get; set; }
  241. /// <summary>
  242. /// Position of this actor.
  243. /// </summary>
  244. /// <remarks>
  245. /// Setting this directly moves the actor to a given position.
  246. /// Getting this retrieves the position calculated by physics scene updates, using factors such as velocity and
  247. /// collisions.
  248. /// </remarks>
  249. public abstract Vector3 Position { get; set; }
  250. public abstract float Mass { get; }
  251. public abstract Vector3 Force { get; set; }
  252. public abstract int VehicleType { get; set; }
  253. public abstract void VehicleFloatParam(int param, float value);
  254. public abstract void VehicleVectorParam(int param, Vector3 value);
  255. public abstract void VehicleRotationParam(int param, Quaternion rotation);
  256. public abstract void VehicleFlags(int param, bool remove);
  257. // This is an overridable version of SetVehicle() that works for all physics engines.
  258. // This is VERY inefficient. It behoves any physics engine to override this and
  259. // implement a more efficient setting of all the vehicle parameters.
  260. public virtual void SetVehicle(object pvdata)
  261. {
  262. VehicleData vdata = (VehicleData)pvdata;
  263. // vehicleActor.ProcessSetVehicle((VehicleData)vdata);
  264. this.VehicleType = (int)vdata.m_type;
  265. this.VehicleFlags(-1, false); // clears all flags
  266. this.VehicleFlags((int)vdata.m_flags, false);
  267. // Linear properties
  268. this.VehicleVectorParam((int)Vehicle.LINEAR_MOTOR_DIRECTION, vdata.m_linearMotorDirection);
  269. this.VehicleVectorParam((int)Vehicle.LINEAR_FRICTION_TIMESCALE, vdata.m_linearFrictionTimescale);
  270. this.VehicleFloatParam((int)Vehicle.LINEAR_MOTOR_DECAY_TIMESCALE, vdata.m_linearMotorDecayTimescale);
  271. this.VehicleFloatParam((int)Vehicle.LINEAR_MOTOR_TIMESCALE, vdata.m_linearMotorTimescale);
  272. this.VehicleVectorParam((int)Vehicle.LINEAR_MOTOR_OFFSET, vdata.m_linearMotorOffset);
  273. //Angular properties
  274. this.VehicleVectorParam((int)Vehicle.ANGULAR_MOTOR_DIRECTION, vdata.m_angularMotorDirection);
  275. this.VehicleFloatParam((int)Vehicle.ANGULAR_MOTOR_TIMESCALE, vdata.m_angularMotorTimescale);
  276. this.VehicleFloatParam((int)Vehicle.ANGULAR_MOTOR_DECAY_TIMESCALE, vdata.m_angularMotorDecayTimescale);
  277. this.VehicleVectorParam((int)Vehicle.ANGULAR_FRICTION_TIMESCALE, vdata.m_angularFrictionTimescale);
  278. //Deflection properties
  279. this.VehicleFloatParam((int)Vehicle.ANGULAR_DEFLECTION_EFFICIENCY, vdata.m_angularDeflectionEfficiency);
  280. this.VehicleFloatParam((int)Vehicle.ANGULAR_DEFLECTION_TIMESCALE, vdata.m_angularDeflectionTimescale);
  281. this.VehicleFloatParam((int)Vehicle.LINEAR_DEFLECTION_EFFICIENCY, vdata.m_linearDeflectionEfficiency);
  282. this.VehicleFloatParam((int)Vehicle.LINEAR_DEFLECTION_TIMESCALE, vdata.m_linearDeflectionTimescale);
  283. //Banking properties
  284. this.VehicleFloatParam((int)Vehicle.BANKING_EFFICIENCY, vdata.m_bankingEfficiency);
  285. this.VehicleFloatParam((int)Vehicle.BANKING_MIX, vdata.m_bankingMix);
  286. this.VehicleFloatParam((int)Vehicle.BANKING_TIMESCALE, vdata.m_bankingTimescale);
  287. //Hover and Buoyancy properties
  288. this.VehicleFloatParam((int)Vehicle.HOVER_HEIGHT, vdata.m_VhoverHeight);
  289. this.VehicleFloatParam((int)Vehicle.HOVER_EFFICIENCY, vdata.m_VhoverEfficiency);
  290. this.VehicleFloatParam((int)Vehicle.HOVER_TIMESCALE, vdata.m_VhoverTimescale);
  291. this.VehicleFloatParam((int)Vehicle.BUOYANCY, vdata.m_VehicleBuoyancy);
  292. //Attractor properties
  293. this.VehicleFloatParam((int)Vehicle.VERTICAL_ATTRACTION_EFFICIENCY, vdata.m_verticalAttractionEfficiency);
  294. this.VehicleFloatParam((int)Vehicle.VERTICAL_ATTRACTION_TIMESCALE, vdata.m_verticalAttractionTimescale);
  295. this.VehicleRotationParam((int)Vehicle.REFERENCE_FRAME, vdata.m_referenceFrame);
  296. }
  297. /// <summary>
  298. /// Allows the detection of collisions with inherently non-physical prims. see llVolumeDetect for more
  299. /// </summary>
  300. public abstract void SetVolumeDetect(int param);
  301. public abstract Vector3 GeometricCenter { get; }
  302. public abstract Vector3 CenterOfMass { get; }
  303. public virtual float PhysicsCost
  304. {
  305. get
  306. {
  307. return 0.1f;
  308. }
  309. }
  310. public virtual float StreamCost
  311. {
  312. get
  313. {
  314. return 1.0f;
  315. }
  316. }
  317. /// <summary>
  318. /// The desired velocity of this actor.
  319. /// </summary>
  320. /// <remarks>
  321. /// Setting this provides a target velocity for physics scene updates.
  322. /// Getting this returns the last set target. Fetch Velocity to get the current velocity.
  323. /// </remarks>
  324. protected Vector3 m_targetVelocity;
  325. public virtual Vector3 TargetVelocity
  326. {
  327. get { return m_targetVelocity; }
  328. set {
  329. m_targetVelocity = value;
  330. Velocity = m_targetVelocity;
  331. }
  332. }
  333. public abstract Vector3 Velocity { get; set; }
  334. public virtual Vector3 rootVelocity { get { return Vector3.Zero; } }
  335. public abstract Vector3 Torque { get; set; }
  336. public abstract float CollisionScore { get; set;}
  337. public abstract Vector3 Acceleration { get; set; }
  338. public abstract Quaternion Orientation { get; set; }
  339. public abstract int PhysicsActorType { get; set; }
  340. public abstract bool IsPhysical { get; set; }
  341. public abstract bool Flying { get; set; }
  342. public abstract bool SetAlwaysRun { get; set; }
  343. public abstract bool ThrottleUpdates { get; set; }
  344. public abstract bool IsColliding { get; set; }
  345. public abstract bool CollidingGround { get; set; }
  346. public abstract bool CollidingObj { get; set; }
  347. public virtual bool FloatOnWater { set { return; } }
  348. public abstract Vector3 RotationalVelocity { get; set; }
  349. public abstract bool Kinematic { get; set; }
  350. public abstract float Buoyancy { get; set; }
  351. // Used for MoveTo
  352. public abstract Vector3 PIDTarget { set; }
  353. public abstract bool PIDActive { get; set; }
  354. public abstract float PIDTau { set; }
  355. // Used for llSetHoverHeight and maybe vehicle height
  356. // Hover Height will override MoveTo target's Z
  357. public abstract bool PIDHoverActive {get; set;}
  358. public abstract float PIDHoverHeight { set;}
  359. public abstract PIDHoverType PIDHoverType { set;}
  360. public abstract float PIDHoverTau { set;}
  361. // For RotLookAt
  362. public abstract Quaternion APIDTarget { set;}
  363. public abstract bool APIDActive { set;}
  364. public abstract float APIDStrength { set;}
  365. public abstract float APIDDamping { set;}
  366. public abstract void AddForce(Vector3 force, bool pushforce);
  367. public abstract void AvatarJump(float forceZ);
  368. public abstract void AddAngularForce(Vector3 force, bool pushforce);
  369. public abstract void SetMomentum(Vector3 momentum);
  370. public abstract void SubscribeEvents(int ms);
  371. public abstract void UnSubscribeEvents();
  372. public abstract bool SubscribedEvents();
  373. public virtual void AddCollisionEvent(uint CollidedWith, ContactPoint contact) { }
  374. public virtual void AddVDTCCollisionEvent(uint CollidedWith, ContactPoint contact) { }
  375. public virtual PhysicsInertiaData GetInertiaData()
  376. {
  377. PhysicsInertiaData data = new()
  378. {
  379. TotalMass = Mass,
  380. CenterOfMass = CenterOfMass - Position,
  381. Inertia = Vector3.Zero,
  382. InertiaRotation = Vector4.Zero
  383. };
  384. return data;
  385. }
  386. public virtual void SetInertiaData(PhysicsInertiaData inertia)
  387. {
  388. }
  389. public virtual float SimulationSuspended { get; set; }
  390. // Warning in a parent part it returns itself, not null
  391. public virtual PhysicsActor ParentActor { get { return this; } }
  392. // Extendable interface for new, physics engine specific operations
  393. public virtual object Extension(string pFunct, params object[] pParams)
  394. {
  395. // A NOP of the physics engine does not implement this feature
  396. return null;
  397. }
  398. }
  399. public class NullPhysicsActor : PhysicsActor
  400. {
  401. private ActorTypes m_actorType = ActorTypes.Unknown;
  402. public override bool Stopped
  403. {
  404. get{ return true; }
  405. }
  406. public override Vector3 Position
  407. {
  408. get { return Vector3.Zero; }
  409. set { return; }
  410. }
  411. public override bool SetAlwaysRun
  412. {
  413. get { return false; }
  414. set { return; }
  415. }
  416. public override uint LocalID
  417. {
  418. get { return 0; }
  419. set { return; }
  420. }
  421. public override bool Grabbed
  422. {
  423. set { return; }
  424. }
  425. public override bool Selected
  426. {
  427. set { return; }
  428. }
  429. public override float Buoyancy
  430. {
  431. get { return 0f; }
  432. set { return; }
  433. }
  434. public override bool CollidingGround
  435. {
  436. get { return false; }
  437. set { return; }
  438. }
  439. public override bool CollidingObj
  440. {
  441. get { return false; }
  442. set { return; }
  443. }
  444. public override Vector3 Size
  445. {
  446. get { return Vector3.Zero; }
  447. set { return; }
  448. }
  449. public override float Mass
  450. {
  451. get { return 0f; }
  452. }
  453. public override Vector3 Force
  454. {
  455. get { return Vector3.Zero; }
  456. set { return; }
  457. }
  458. public override int VehicleType
  459. {
  460. get { return 0; }
  461. set { return; }
  462. }
  463. public override void VehicleFloatParam(int param, float value) {}
  464. public override void VehicleVectorParam(int param, Vector3 value) { }
  465. public override void VehicleRotationParam(int param, Quaternion rotation) { }
  466. public override void VehicleFlags(int param, bool remove) { }
  467. public override void SetVolumeDetect(int param) {}
  468. public override void SetMaterial(int material) {}
  469. public override Vector3 CenterOfMass { get { return Vector3.Zero; }}
  470. public override Vector3 GeometricCenter { get { return Vector3.Zero; }}
  471. public override PrimitiveBaseShape Shape { set { return; }}
  472. public override Vector3 Velocity
  473. {
  474. get { return Vector3.Zero; }
  475. set { return; }
  476. }
  477. public override Vector3 Torque
  478. {
  479. get { return Vector3.Zero; }
  480. set { return; }
  481. }
  482. public override float CollisionScore
  483. {
  484. get { return 0f; }
  485. set { }
  486. }
  487. public override void CrossingFailure() {}
  488. public override Quaternion Orientation
  489. {
  490. get { return Quaternion.Identity; }
  491. set { }
  492. }
  493. public override Vector3 Acceleration
  494. {
  495. get { return Vector3.Zero; }
  496. set { }
  497. }
  498. public override bool IsPhysical
  499. {
  500. get { return false; }
  501. set { return; }
  502. }
  503. public override bool Flying
  504. {
  505. get { return false; }
  506. set { return; }
  507. }
  508. public override bool ThrottleUpdates
  509. {
  510. get { return false; }
  511. set { return; }
  512. }
  513. public override bool IsColliding
  514. {
  515. get { return false; }
  516. set { return; }
  517. }
  518. public override int PhysicsActorType
  519. {
  520. get { return (int)m_actorType; }
  521. set {
  522. ActorTypes type = (ActorTypes)value;
  523. m_actorType = type switch
  524. {
  525. ActorTypes.Ground or ActorTypes.Water => type,
  526. _ => ActorTypes.Unknown,
  527. };
  528. }
  529. }
  530. public override bool Kinematic
  531. {
  532. get { return true; }
  533. set { return; }
  534. }
  535. public override void link(PhysicsActor obj) { }
  536. public override void delink() { }
  537. public override void LockAngularMotion(byte axislocks) { }
  538. public override void AvatarJump(float forceZ) { }
  539. public override void AddForce(Vector3 force, bool pushforce) { }
  540. public override void AddAngularForce(Vector3 force, bool pushforce) { }
  541. public override Vector3 RotationalVelocity
  542. {
  543. get { return Vector3.Zero; }
  544. set { return; }
  545. }
  546. public override Vector3 PIDTarget { set { return; } }
  547. public override bool PIDActive
  548. {
  549. get { return false; }
  550. set { return; }
  551. }
  552. public override float PIDTau { set { return; } }
  553. public override float PIDHoverHeight { set { return; } }
  554. public override bool PIDHoverActive {get {return false;} set { return; } }
  555. public override PIDHoverType PIDHoverType { set { return; } }
  556. public override float PIDHoverTau { set { return; } }
  557. public override Quaternion APIDTarget { set { return; } }
  558. public override bool APIDActive { set { return; } }
  559. public override float APIDStrength { set { return; } }
  560. public override float APIDDamping { set { return; } }
  561. public override void SetMomentum(Vector3 momentum) { }
  562. public override void SubscribeEvents(int ms) { }
  563. public override void UnSubscribeEvents() { }
  564. public override bool SubscribedEvents() { return false; }
  565. }
  566. }