2
0

class_staticbody.rst 4.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113
  1. :github_url: hide
  2. .. Generated automatically by doc/tools/makerst.py in Godot's source tree.
  3. .. DO NOT EDIT THIS FILE, but the StaticBody.xml source instead.
  4. .. The source is found in doc/classes or modules/<name>/doc_classes.
  5. .. _class_StaticBody:
  6. StaticBody
  7. ==========
  8. **Inherits:** :ref:`PhysicsBody<class_PhysicsBody>` **<** :ref:`CollisionObject<class_CollisionObject>` **<** :ref:`Spatial<class_Spatial>` **<** :ref:`Node<class_Node>` **<** :ref:`Object<class_Object>`
  9. **Category:** Core
  10. Brief Description
  11. -----------------
  12. Static body for 3D physics.
  13. Properties
  14. ----------
  15. +-----------------------------------------------+---------------------------------------------------------------------------------------+
  16. | :ref:`float<class_float>` | :ref:`bounce<class_StaticBody_property_bounce>` |
  17. +-----------------------------------------------+---------------------------------------------------------------------------------------+
  18. | :ref:`Vector3<class_Vector3>` | :ref:`constant_angular_velocity<class_StaticBody_property_constant_angular_velocity>` |
  19. +-----------------------------------------------+---------------------------------------------------------------------------------------+
  20. | :ref:`Vector3<class_Vector3>` | :ref:`constant_linear_velocity<class_StaticBody_property_constant_linear_velocity>` |
  21. +-----------------------------------------------+---------------------------------------------------------------------------------------+
  22. | :ref:`float<class_float>` | :ref:`friction<class_StaticBody_property_friction>` |
  23. +-----------------------------------------------+---------------------------------------------------------------------------------------+
  24. | :ref:`PhysicsMaterial<class_PhysicsMaterial>` | :ref:`physics_material_override<class_StaticBody_property_physics_material_override>` |
  25. +-----------------------------------------------+---------------------------------------------------------------------------------------+
  26. Description
  27. -----------
  28. Static body for 3D physics. A static body is a simple body that is not intended to move. They don't consume any CPU resources in contrast to a :ref:`RigidBody<class_RigidBody>` so they are great for scenario collision.
  29. A static body can also be animated by using simulated motion mode. This is useful for implementing functionalities such as moving platforms. When this mode is active the body can be animated and automatically computes linear and angular velocity to apply in that frame and to influence other bodies.
  30. Alternatively, a constant linear or angular velocity can be set for the static body, so even if it doesn't move, it affects other bodies as if it was moving (this is useful for simulating conveyor belts or conveyor wheels).
  31. Property Descriptions
  32. ---------------------
  33. .. _class_StaticBody_property_bounce:
  34. - :ref:`float<class_float>` **bounce**
  35. +----------+-------------------+
  36. | *Setter* | set_bounce(value) |
  37. +----------+-------------------+
  38. | *Getter* | get_bounce() |
  39. +----------+-------------------+
  40. The body bounciness.
  41. ----
  42. .. _class_StaticBody_property_constant_angular_velocity:
  43. - :ref:`Vector3<class_Vector3>` **constant_angular_velocity**
  44. +----------+--------------------------------------+
  45. | *Setter* | set_constant_angular_velocity(value) |
  46. +----------+--------------------------------------+
  47. | *Getter* | get_constant_angular_velocity() |
  48. +----------+--------------------------------------+
  49. The constant angular velocity for the body. This does not rotate the body, but affects other bodies that touch it, as if it was in a state of rotation.
  50. ----
  51. .. _class_StaticBody_property_constant_linear_velocity:
  52. - :ref:`Vector3<class_Vector3>` **constant_linear_velocity**
  53. +----------+-------------------------------------+
  54. | *Setter* | set_constant_linear_velocity(value) |
  55. +----------+-------------------------------------+
  56. | *Getter* | get_constant_linear_velocity() |
  57. +----------+-------------------------------------+
  58. The constant linear velocity for the body. This does not move the body, but affects other bodies that touch it, as if it was in a state of movement.
  59. ----
  60. .. _class_StaticBody_property_friction:
  61. - :ref:`float<class_float>` **friction**
  62. +----------+---------------------+
  63. | *Setter* | set_friction(value) |
  64. +----------+---------------------+
  65. | *Getter* | get_friction() |
  66. +----------+---------------------+
  67. The body friction, from 0 (frictionless) to 1 (full friction).
  68. ----
  69. .. _class_StaticBody_property_physics_material_override:
  70. - :ref:`PhysicsMaterial<class_PhysicsMaterial>` **physics_material_override**
  71. +----------+--------------------------------------+
  72. | *Setter* | set_physics_material_override(value) |
  73. +----------+--------------------------------------+
  74. | *Getter* | get_physics_material_override() |
  75. +----------+--------------------------------------+