PhysicsActor.cs 23 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692
  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. if (m_objCollisionList.TryGetValue(localID, out ContactPoint oldcp))
  125. {
  126. float lastVel = oldcp.RelativeSpeed;
  127. if (oldcp.PenetrationDepth < contact.PenetrationDepth)
  128. {
  129. if (Math.Abs(lastVel) > Math.Abs(contact.RelativeSpeed))
  130. contact.RelativeSpeed = lastVel;
  131. m_objCollisionList[localID] = contact;
  132. }
  133. else if (Math.Abs(lastVel) < Math.Abs(contact.RelativeSpeed))
  134. {
  135. oldcp.RelativeSpeed = contact.RelativeSpeed;
  136. m_objCollisionList[localID] = oldcp;
  137. }
  138. }
  139. else
  140. m_objCollisionList.Add(localID, contact);
  141. }
  142. /// <summary>
  143. /// Clear added collision events.
  144. /// </summary>
  145. public void Clear()
  146. {
  147. m_objCollisionList.Clear();
  148. }
  149. }
  150. public abstract class PhysicsActor
  151. {
  152. //private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
  153. public delegate void RequestTerseUpdate();
  154. public delegate void CollisionUpdate(EventArgs e);
  155. public delegate void OutOfBounds(Vector3 pos);
  156. public delegate CameraData GetCameraData();
  157. // disable warning: public events
  158. #pragma warning disable 67
  159. public event PositionUpdate OnPositionUpdate;
  160. public event VelocityUpdate OnVelocityUpdate;
  161. public event OrientationUpdate OnOrientationUpdate;
  162. public event RequestTerseUpdate OnRequestTerseUpdate;
  163. public event GetCameraData OnPhysicsRequestingCameraData;
  164. /// <summary>
  165. /// Subscribers to this event must synchronously handle the dictionary of collisions received, since the event
  166. /// object is reused in subsequent physics frames.
  167. /// </summary>
  168. public event CollisionUpdate OnCollisionUpdate;
  169. public event OutOfBounds OnOutOfBounds;
  170. #pragma warning restore 67
  171. public CameraData TryGetCameraData()
  172. {
  173. GetCameraData handler = OnPhysicsRequestingCameraData;
  174. return (handler == null) ? null : handler();
  175. }
  176. public static PhysicsActor Null
  177. {
  178. get { return new NullPhysicsActor(); }
  179. }
  180. public virtual bool Building { get; set; }
  181. public virtual void getContactData(ref ContactData cdata)
  182. {
  183. cdata.mu = 0;
  184. cdata.bounce = 0;
  185. }
  186. public AABB2D _AABB2D;
  187. public abstract bool Stopped { get; }
  188. public abstract Vector3 Size { get; set; }
  189. public virtual void setAvatarSize(Vector3 size, float feetOffset)
  190. {
  191. Size = size;
  192. }
  193. public virtual bool Phantom { get; set; }
  194. public virtual bool IsVolumeDtc
  195. {
  196. get { return false; }
  197. set { return; }
  198. }
  199. public virtual byte PhysicsShapeType { get; set; }
  200. public abstract PrimitiveBaseShape Shape { set; }
  201. public uint m_baseLocalID;
  202. public virtual uint LocalID
  203. {
  204. set { m_baseLocalID = value; }
  205. get { return m_baseLocalID; }
  206. }
  207. public abstract bool Grabbed { set; }
  208. public abstract bool Selected { set; }
  209. /// <summary>
  210. /// Name of this actor.
  211. /// </summary>
  212. /// <remarks>
  213. /// XXX: Bizarrely, this cannot be "Terrain" or "Water" right now unless it really is simulating terrain or
  214. /// water. This is not a problem due to the formatting of names given by prims and avatars.
  215. /// </remarks>
  216. public string Name { get; set; }
  217. /// <summary>
  218. /// This is being used by ODE joint code.
  219. /// </summary>
  220. public string SOPName;
  221. public virtual void CrossingStart() { }
  222. public abstract void CrossingFailure();
  223. public abstract void link(PhysicsActor obj);
  224. public abstract void delink();
  225. public abstract void LockAngularMotion(byte axislocks);
  226. public virtual void RequestPhysicsterseUpdate()
  227. {
  228. OnRequestTerseUpdate?.Invoke();
  229. }
  230. public virtual void RaiseOutOfBounds(Vector3 pos)
  231. {
  232. OnOutOfBounds?.Invoke(pos);
  233. }
  234. public virtual void SendCollisionUpdate(EventArgs e)
  235. {
  236. OnCollisionUpdate?.Invoke(e);
  237. }
  238. public virtual void SetMaterial (int material) { }
  239. public virtual float Density { get; set; }
  240. public virtual float GravModifier { get; set; }
  241. public virtual float Friction { get; set; }
  242. public virtual float Restitution { get; set; }
  243. /// <summary>
  244. /// Position of this actor.
  245. /// </summary>
  246. /// <remarks>
  247. /// Setting this directly moves the actor to a given position.
  248. /// Getting this retrieves the position calculated by physics scene updates, using factors such as velocity and
  249. /// collisions.
  250. /// </remarks>
  251. public abstract Vector3 Position { get; set; }
  252. public abstract float Mass { get; }
  253. public abstract Vector3 Force { get; set; }
  254. public abstract int VehicleType { get; set; }
  255. public abstract void VehicleFloatParam(int param, float value);
  256. public abstract void VehicleVectorParam(int param, Vector3 value);
  257. public abstract void VehicleRotationParam(int param, Quaternion rotation);
  258. public abstract void VehicleFlags(int param, bool remove);
  259. // This is an overridable version of SetVehicle() that works for all physics engines.
  260. // This is VERY inefficient. It behoves any physics engine to override this and
  261. // implement a more efficient setting of all the vehicle parameters.
  262. public virtual void SetVehicle(object pvdata)
  263. {
  264. VehicleData vdata = (VehicleData)pvdata;
  265. // vehicleActor.ProcessSetVehicle((VehicleData)vdata);
  266. this.VehicleType = (int)vdata.m_type;
  267. this.VehicleFlags(-1, false); // clears all flags
  268. this.VehicleFlags((int)vdata.m_flags, false);
  269. // Linear properties
  270. this.VehicleVectorParam((int)Vehicle.LINEAR_MOTOR_DIRECTION, vdata.m_linearMotorDirection);
  271. this.VehicleVectorParam((int)Vehicle.LINEAR_FRICTION_TIMESCALE, vdata.m_linearFrictionTimescale);
  272. this.VehicleFloatParam((int)Vehicle.LINEAR_MOTOR_DECAY_TIMESCALE, vdata.m_linearMotorDecayTimescale);
  273. this.VehicleFloatParam((int)Vehicle.LINEAR_MOTOR_TIMESCALE, vdata.m_linearMotorTimescale);
  274. this.VehicleVectorParam((int)Vehicle.LINEAR_MOTOR_OFFSET, vdata.m_linearMotorOffset);
  275. //Angular properties
  276. this.VehicleVectorParam((int)Vehicle.ANGULAR_MOTOR_DIRECTION, vdata.m_angularMotorDirection);
  277. this.VehicleFloatParam((int)Vehicle.ANGULAR_MOTOR_TIMESCALE, vdata.m_angularMotorTimescale);
  278. this.VehicleFloatParam((int)Vehicle.ANGULAR_MOTOR_DECAY_TIMESCALE, vdata.m_angularMotorDecayTimescale);
  279. this.VehicleVectorParam((int)Vehicle.ANGULAR_FRICTION_TIMESCALE, vdata.m_angularFrictionTimescale);
  280. //Deflection properties
  281. this.VehicleFloatParam((int)Vehicle.ANGULAR_DEFLECTION_EFFICIENCY, vdata.m_angularDeflectionEfficiency);
  282. this.VehicleFloatParam((int)Vehicle.ANGULAR_DEFLECTION_TIMESCALE, vdata.m_angularDeflectionTimescale);
  283. this.VehicleFloatParam((int)Vehicle.LINEAR_DEFLECTION_EFFICIENCY, vdata.m_linearDeflectionEfficiency);
  284. this.VehicleFloatParam((int)Vehicle.LINEAR_DEFLECTION_TIMESCALE, vdata.m_linearDeflectionTimescale);
  285. //Banking properties
  286. this.VehicleFloatParam((int)Vehicle.BANKING_EFFICIENCY, vdata.m_bankingEfficiency);
  287. this.VehicleFloatParam((int)Vehicle.BANKING_MIX, vdata.m_bankingMix);
  288. this.VehicleFloatParam((int)Vehicle.BANKING_TIMESCALE, vdata.m_bankingTimescale);
  289. //Hover and Buoyancy properties
  290. this.VehicleFloatParam((int)Vehicle.HOVER_HEIGHT, vdata.m_VhoverHeight);
  291. this.VehicleFloatParam((int)Vehicle.HOVER_EFFICIENCY, vdata.m_VhoverEfficiency);
  292. this.VehicleFloatParam((int)Vehicle.HOVER_TIMESCALE, vdata.m_VhoverTimescale);
  293. this.VehicleFloatParam((int)Vehicle.BUOYANCY, vdata.m_VehicleBuoyancy);
  294. //Attractor properties
  295. this.VehicleFloatParam((int)Vehicle.VERTICAL_ATTRACTION_EFFICIENCY, vdata.m_verticalAttractionEfficiency);
  296. this.VehicleFloatParam((int)Vehicle.VERTICAL_ATTRACTION_TIMESCALE, vdata.m_verticalAttractionTimescale);
  297. this.VehicleRotationParam((int)Vehicle.REFERENCE_FRAME, vdata.m_referenceFrame);
  298. }
  299. /// <summary>
  300. /// Allows the detection of collisions with inherently non-physical prims. see llVolumeDetect for more
  301. /// </summary>
  302. public abstract void SetVolumeDetect(int param);
  303. public abstract Vector3 GeometricCenter { get; }
  304. public abstract Vector3 CenterOfMass { get; }
  305. public virtual float PhysicsCost
  306. {
  307. get
  308. {
  309. return 0.1f;
  310. }
  311. }
  312. public virtual float StreamCost
  313. {
  314. get
  315. {
  316. return 1.0f;
  317. }
  318. }
  319. /// <summary>
  320. /// The desired velocity of this actor.
  321. /// </summary>
  322. /// <remarks>
  323. /// Setting this provides a target velocity for physics scene updates.
  324. /// Getting this returns the last set target. Fetch Velocity to get the current velocity.
  325. /// </remarks>
  326. protected Vector3 m_targetVelocity;
  327. public virtual Vector3 TargetVelocity
  328. {
  329. get { return m_targetVelocity; }
  330. set {
  331. m_targetVelocity = value;
  332. Velocity = m_targetVelocity;
  333. }
  334. }
  335. public abstract Vector3 Velocity { get; set; }
  336. public virtual Vector3 rootVelocity { get { return Vector3.Zero; } }
  337. public abstract Vector3 Torque { get; set; }
  338. public abstract float CollisionScore { get; set;}
  339. public abstract Vector3 Acceleration { get; set; }
  340. public abstract Quaternion Orientation { get; set; }
  341. public abstract int PhysicsActorType { get; set; }
  342. public abstract bool IsPhysical { get; set; }
  343. public abstract bool Flying { get; set; }
  344. public abstract bool SetAlwaysRun { get; set; }
  345. public abstract bool ThrottleUpdates { get; set; }
  346. public abstract bool IsColliding { get; set; }
  347. public abstract bool CollidingGround { get; set; }
  348. public abstract bool CollidingObj { get; set; }
  349. public abstract bool FloatOnWater { set; }
  350. public abstract Vector3 RotationalVelocity { get; set; }
  351. public abstract bool Kinematic { get; set; }
  352. public abstract float Buoyancy { get; set; }
  353. // Used for MoveTo
  354. public abstract Vector3 PIDTarget { set; }
  355. public abstract bool PIDActive { get; set; }
  356. public abstract float PIDTau { set; }
  357. // Used for llSetHoverHeight and maybe vehicle height
  358. // Hover Height will override MoveTo target's Z
  359. public abstract bool PIDHoverActive {get; set;}
  360. public abstract float PIDHoverHeight { set;}
  361. public abstract PIDHoverType PIDHoverType { set;}
  362. public abstract float PIDHoverTau { set;}
  363. // For RotLookAt
  364. public abstract Quaternion APIDTarget { set;}
  365. public abstract bool APIDActive { set;}
  366. public abstract float APIDStrength { set;}
  367. public abstract float APIDDamping { set;}
  368. public abstract void AddForce(Vector3 force, bool pushforce);
  369. public abstract void AvatarJump(float forceZ);
  370. public abstract void AddAngularForce(Vector3 force, bool pushforce);
  371. public abstract void SetMomentum(Vector3 momentum);
  372. public abstract void SubscribeEvents(int ms);
  373. public abstract void UnSubscribeEvents();
  374. public abstract bool SubscribedEvents();
  375. public virtual void AddCollisionEvent(uint CollidedWith, ContactPoint contact) { }
  376. public virtual void AddVDTCCollisionEvent(uint CollidedWith, ContactPoint contact) { }
  377. public virtual PhysicsInertiaData GetInertiaData()
  378. {
  379. PhysicsInertiaData data = new PhysicsInertiaData();
  380. data.TotalMass = this.Mass;
  381. data.CenterOfMass = CenterOfMass - Position;
  382. data.Inertia = Vector3.Zero;
  383. data.InertiaRotation = Vector4.Zero;
  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 FloatOnWater
  435. {
  436. set { return; }
  437. }
  438. public override bool CollidingGround
  439. {
  440. get { return false; }
  441. set { return; }
  442. }
  443. public override bool CollidingObj
  444. {
  445. get { return false; }
  446. set { return; }
  447. }
  448. public override Vector3 Size
  449. {
  450. get { return Vector3.Zero; }
  451. set { return; }
  452. }
  453. public override float Mass
  454. {
  455. get { return 0f; }
  456. }
  457. public override Vector3 Force
  458. {
  459. get { return Vector3.Zero; }
  460. set { return; }
  461. }
  462. public override int VehicleType
  463. {
  464. get { return 0; }
  465. set { return; }
  466. }
  467. public override void VehicleFloatParam(int param, float value) {}
  468. public override void VehicleVectorParam(int param, Vector3 value) { }
  469. public override void VehicleRotationParam(int param, Quaternion rotation) { }
  470. public override void VehicleFlags(int param, bool remove) { }
  471. public override void SetVolumeDetect(int param) {}
  472. public override void SetMaterial(int material) {}
  473. public override Vector3 CenterOfMass { get { return Vector3.Zero; }}
  474. public override Vector3 GeometricCenter { get { return Vector3.Zero; }}
  475. public override PrimitiveBaseShape Shape { set { return; }}
  476. public override Vector3 Velocity
  477. {
  478. get { return Vector3.Zero; }
  479. set { return; }
  480. }
  481. public override Vector3 Torque
  482. {
  483. get { return Vector3.Zero; }
  484. set { return; }
  485. }
  486. public override float CollisionScore
  487. {
  488. get { return 0f; }
  489. set { }
  490. }
  491. public override void CrossingFailure() {}
  492. public override Quaternion Orientation
  493. {
  494. get { return Quaternion.Identity; }
  495. set { }
  496. }
  497. public override Vector3 Acceleration
  498. {
  499. get { return Vector3.Zero; }
  500. set { }
  501. }
  502. public override bool IsPhysical
  503. {
  504. get { return false; }
  505. set { return; }
  506. }
  507. public override bool Flying
  508. {
  509. get { return false; }
  510. set { return; }
  511. }
  512. public override bool ThrottleUpdates
  513. {
  514. get { return false; }
  515. set { return; }
  516. }
  517. public override bool IsColliding
  518. {
  519. get { return false; }
  520. set { return; }
  521. }
  522. public override int PhysicsActorType
  523. {
  524. get { return (int)m_actorType; }
  525. set {
  526. ActorTypes type = (ActorTypes)value;
  527. switch (type)
  528. {
  529. case ActorTypes.Ground:
  530. case ActorTypes.Water:
  531. m_actorType = type;
  532. break;
  533. default:
  534. m_actorType = ActorTypes.Unknown;
  535. break;
  536. }
  537. }
  538. }
  539. public override bool Kinematic
  540. {
  541. get { return true; }
  542. set { return; }
  543. }
  544. public override void link(PhysicsActor obj) { }
  545. public override void delink() { }
  546. public override void LockAngularMotion(byte axislocks) { }
  547. public override void AvatarJump(float forceZ) { }
  548. public override void AddForce(Vector3 force, bool pushforce) { }
  549. public override void AddAngularForce(Vector3 force, bool pushforce) { }
  550. public override Vector3 RotationalVelocity
  551. {
  552. get { return Vector3.Zero; }
  553. set { return; }
  554. }
  555. public override Vector3 PIDTarget { set { return; } }
  556. public override bool PIDActive
  557. {
  558. get { return false; }
  559. set { return; }
  560. }
  561. public override float PIDTau { set { return; } }
  562. public override float PIDHoverHeight { set { return; } }
  563. public override bool PIDHoverActive {get {return false;} set { return; } }
  564. public override PIDHoverType PIDHoverType { set { return; } }
  565. public override float PIDHoverTau { set { return; } }
  566. public override Quaternion APIDTarget { set { return; } }
  567. public override bool APIDActive { set { return; } }
  568. public override float APIDStrength { set { return; } }
  569. public override float APIDDamping { set { return; } }
  570. public override void SetMomentum(Vector3 momentum) { }
  571. public override void SubscribeEvents(int ms) { }
  572. public override void UnSubscribeEvents() { }
  573. public override bool SubscribedEvents() { return false; }
  574. }
  575. }