class_vehiclebody.rst 5.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899
  1. .. Generated automatically by doc/tools/makerst.py in Godot's source tree.
  2. .. DO NOT EDIT THIS FILE, but the doc/base/classes.xml source instead.
  3. .. _class_VehicleBody:
  4. VehicleBody
  5. ===========
  6. **Inherits:** :ref:`PhysicsBody<class_physicsbody>` **<** :ref:`CollisionObject<class_collisionobject>` **<** :ref:`Spatial<class_spatial>` **<** :ref:`Node<class_node>` **<** :ref:`Object<class_object>`
  7. **Category:** Core
  8. Brief Description
  9. -----------------
  10. Member Functions
  11. ----------------
  12. +--------------------------------+------------------------------------------------------------------------------------------------------------------+
  13. | :ref:`float<class_float>` | :ref:`get_brake<class_VehicleBody_get_brake>` **(** **)** const |
  14. +--------------------------------+------------------------------------------------------------------------------------------------------------------+
  15. | :ref:`float<class_float>` | :ref:`get_engine_force<class_VehicleBody_get_engine_force>` **(** **)** const |
  16. +--------------------------------+------------------------------------------------------------------------------------------------------------------+
  17. | :ref:`float<class_float>` | :ref:`get_friction<class_VehicleBody_get_friction>` **(** **)** const |
  18. +--------------------------------+------------------------------------------------------------------------------------------------------------------+
  19. | :ref:`Vector3<class_vector3>` | :ref:`get_linear_velocity<class_VehicleBody_get_linear_velocity>` **(** **)** const |
  20. +--------------------------------+------------------------------------------------------------------------------------------------------------------+
  21. | :ref:`float<class_float>` | :ref:`get_mass<class_VehicleBody_get_mass>` **(** **)** const |
  22. +--------------------------------+------------------------------------------------------------------------------------------------------------------+
  23. | :ref:`float<class_float>` | :ref:`get_steering<class_VehicleBody_get_steering>` **(** **)** const |
  24. +--------------------------------+------------------------------------------------------------------------------------------------------------------+
  25. | void | :ref:`set_brake<class_VehicleBody_set_brake>` **(** :ref:`float<class_float>` brake **)** |
  26. +--------------------------------+------------------------------------------------------------------------------------------------------------------+
  27. | void | :ref:`set_engine_force<class_VehicleBody_set_engine_force>` **(** :ref:`float<class_float>` engine_force **)** |
  28. +--------------------------------+------------------------------------------------------------------------------------------------------------------+
  29. | void | :ref:`set_friction<class_VehicleBody_set_friction>` **(** :ref:`float<class_float>` friction **)** |
  30. +--------------------------------+------------------------------------------------------------------------------------------------------------------+
  31. | void | :ref:`set_mass<class_VehicleBody_set_mass>` **(** :ref:`float<class_float>` mass **)** |
  32. +--------------------------------+------------------------------------------------------------------------------------------------------------------+
  33. | void | :ref:`set_steering<class_VehicleBody_set_steering>` **(** :ref:`float<class_float>` steering **)** |
  34. +--------------------------------+------------------------------------------------------------------------------------------------------------------+
  35. Member Function Description
  36. ---------------------------
  37. .. _class_VehicleBody_get_brake:
  38. - :ref:`float<class_float>` **get_brake** **(** **)** const
  39. .. _class_VehicleBody_get_engine_force:
  40. - :ref:`float<class_float>` **get_engine_force** **(** **)** const
  41. .. _class_VehicleBody_get_friction:
  42. - :ref:`float<class_float>` **get_friction** **(** **)** const
  43. .. _class_VehicleBody_get_linear_velocity:
  44. - :ref:`Vector3<class_vector3>` **get_linear_velocity** **(** **)** const
  45. Returns the VehicleBody's velocity vector. To get the absolute speed in scalar value, get the length of the return vector in pixels/second. Example:
  46. ::
  47. # vehicle is an instance of VehicleBody
  48. var speed = vehicle.get_linear_velocity().length()
  49. .. _class_VehicleBody_get_mass:
  50. - :ref:`float<class_float>` **get_mass** **(** **)** const
  51. .. _class_VehicleBody_get_steering:
  52. - :ref:`float<class_float>` **get_steering** **(** **)** const
  53. .. _class_VehicleBody_set_brake:
  54. - void **set_brake** **(** :ref:`float<class_float>` brake **)**
  55. .. _class_VehicleBody_set_engine_force:
  56. - void **set_engine_force** **(** :ref:`float<class_float>` engine_force **)**
  57. .. _class_VehicleBody_set_friction:
  58. - void **set_friction** **(** :ref:`float<class_float>` friction **)**
  59. .. _class_VehicleBody_set_mass:
  60. - void **set_mass** **(** :ref:`float<class_float>` mass **)**
  61. .. _class_VehicleBody_set_steering:
  62. - void **set_steering** **(** :ref:`float<class_float>` steering **)**