PhysicsDirectBodyState.xml 6.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211
  1. <?xml version="1.0" encoding="UTF-8" ?>
  2. <class name="PhysicsDirectBodyState" inherits="Object" category="Core" version="3.1">
  3. <brief_description>
  4. </brief_description>
  5. <description>
  6. </description>
  7. <tutorials>
  8. </tutorials>
  9. <demos>
  10. </demos>
  11. <methods>
  12. <method name="add_central_force">
  13. <return type="void">
  14. </return>
  15. <argument index="0" name="force" type="Vector3">
  16. </argument>
  17. <description>
  18. Adds a constant directional force without affecting rotation.
  19. This is equivalent to [code]add_force(force, Vector3(0,0,0))[/code].
  20. </description>
  21. </method>
  22. <method name="add_force">
  23. <return type="void">
  24. </return>
  25. <argument index="0" name="force" type="Vector3">
  26. </argument>
  27. <argument index="1" name="position" type="Vector3">
  28. </argument>
  29. <description>
  30. Adds a constant force (i.e. acceleration).
  31. </description>
  32. </method>
  33. <method name="add_torque">
  34. <return type="void">
  35. </return>
  36. <argument index="0" name="torque" type="Vector3">
  37. </argument>
  38. <description>
  39. Adds a constant rotational force (i.e. a motor) without affecting position.
  40. </description>
  41. </method>
  42. <method name="apply_central_impulse">
  43. <return type="void">
  44. </return>
  45. <argument index="0" name="j" type="Vector3">
  46. </argument>
  47. <description>
  48. Applies a single directional impulse without affecting rotation.
  49. This is equivalent to [code]apply_impulse(Vector3(0, 0, 0), impulse)[/code].
  50. </description>
  51. </method>
  52. <method name="apply_impulse">
  53. <return type="void">
  54. </return>
  55. <argument index="0" name="position" type="Vector3">
  56. </argument>
  57. <argument index="1" name="j" type="Vector3">
  58. </argument>
  59. <description>
  60. Apply a positioned impulse (which will be affected by the body mass and shape). This is the equivalent of hitting a billiard ball with a cue: a force that is applied once, and only once. Both the impulse and the position are in global coordinates, and the position is relative to the object's origin.
  61. </description>
  62. </method>
  63. <method name="apply_torque_impulse">
  64. <return type="void">
  65. </return>
  66. <argument index="0" name="j" type="Vector3">
  67. </argument>
  68. <description>
  69. Apply a torque impulse (which will be affected by the body mass and shape). This will rotate the body around the passed in vector.
  70. </description>
  71. </method>
  72. <method name="get_contact_collider" qualifiers="const">
  73. <return type="RID">
  74. </return>
  75. <argument index="0" name="contact_idx" type="int">
  76. </argument>
  77. <description>
  78. </description>
  79. </method>
  80. <method name="get_contact_collider_id" qualifiers="const">
  81. <return type="int">
  82. </return>
  83. <argument index="0" name="contact_idx" type="int">
  84. </argument>
  85. <description>
  86. </description>
  87. </method>
  88. <method name="get_contact_collider_object" qualifiers="const">
  89. <return type="Object">
  90. </return>
  91. <argument index="0" name="contact_idx" type="int">
  92. </argument>
  93. <description>
  94. </description>
  95. </method>
  96. <method name="get_contact_collider_position" qualifiers="const">
  97. <return type="Vector3">
  98. </return>
  99. <argument index="0" name="contact_idx" type="int">
  100. </argument>
  101. <description>
  102. </description>
  103. </method>
  104. <method name="get_contact_collider_shape" qualifiers="const">
  105. <return type="int">
  106. </return>
  107. <argument index="0" name="contact_idx" type="int">
  108. </argument>
  109. <description>
  110. </description>
  111. </method>
  112. <method name="get_contact_collider_velocity_at_position" qualifiers="const">
  113. <return type="Vector3">
  114. </return>
  115. <argument index="0" name="contact_idx" type="int">
  116. </argument>
  117. <description>
  118. </description>
  119. </method>
  120. <method name="get_contact_count" qualifiers="const">
  121. <return type="int">
  122. </return>
  123. <description>
  124. </description>
  125. </method>
  126. <method name="get_contact_impulse" qualifiers="const">
  127. <return type="float">
  128. </return>
  129. <argument index="0" name="contact_idx" type="int">
  130. </argument>
  131. <description>
  132. Impulse created by the contact. Only implemented for Bullet physics.
  133. </description>
  134. </method>
  135. <method name="get_contact_local_normal" qualifiers="const">
  136. <return type="Vector3">
  137. </return>
  138. <argument index="0" name="contact_idx" type="int">
  139. </argument>
  140. <description>
  141. </description>
  142. </method>
  143. <method name="get_contact_local_position" qualifiers="const">
  144. <return type="Vector3">
  145. </return>
  146. <argument index="0" name="contact_idx" type="int">
  147. </argument>
  148. <description>
  149. </description>
  150. </method>
  151. <method name="get_contact_local_shape" qualifiers="const">
  152. <return type="int">
  153. </return>
  154. <argument index="0" name="contact_idx" type="int">
  155. </argument>
  156. <description>
  157. </description>
  158. </method>
  159. <method name="get_space_state">
  160. <return type="PhysicsDirectSpaceState">
  161. </return>
  162. <description>
  163. </description>
  164. </method>
  165. <method name="integrate_forces">
  166. <return type="void">
  167. </return>
  168. <description>
  169. </description>
  170. </method>
  171. </methods>
  172. <members>
  173. <member name="angular_velocity" type="Vector3" setter="set_angular_velocity" getter="get_angular_velocity">
  174. The angular velocity of the body.
  175. </member>
  176. <member name="center_of_mass" type="Vector3" setter="" getter="get_center_of_mass">
  177. </member>
  178. <member name="inverse_inertia" type="Vector3" setter="" getter="get_inverse_inertia">
  179. The inverse of the inertia of the body.
  180. </member>
  181. <member name="inverse_mass" type="float" setter="" getter="get_inverse_mass">
  182. The inverse of the mass of the body.
  183. </member>
  184. <member name="linear_velocity" type="Vector3" setter="set_linear_velocity" getter="get_linear_velocity">
  185. The linear velocity of the body.
  186. </member>
  187. <member name="principal_inertia_axes" type="Basis" setter="" getter="get_principal_inertia_axes">
  188. </member>
  189. <member name="sleeping" type="bool" setter="set_sleep_state" getter="is_sleeping">
  190. [code]true[/code] if this body is currently sleeping (not active).
  191. </member>
  192. <member name="step" type="float" setter="" getter="get_step">
  193. The timestep (delta) used for the simulation.
  194. </member>
  195. <member name="total_angular_damp" type="float" setter="" getter="get_total_angular_damp">
  196. The rate at which the body stops rotating, if there are not any other forces moving it.
  197. </member>
  198. <member name="total_gravity" type="Vector3" setter="" getter="get_total_gravity">
  199. The total gravity vector being currently applied to this body.
  200. </member>
  201. <member name="total_linear_damp" type="float" setter="" getter="get_total_linear_damp">
  202. The rate at which the body stops moving, if there are not any other forces moving it.
  203. </member>
  204. <member name="transform" type="Transform" setter="set_transform" getter="get_transform">
  205. The transformation matrix of the body.
  206. </member>
  207. </members>
  208. <constants>
  209. </constants>
  210. </class>