2
0

PhysicsTestMotionResult2D.xml 3.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091
  1. <?xml version="1.0" encoding="UTF-8" ?>
  2. <class name="PhysicsTestMotionResult2D" inherits="RefCounted" version="4.0">
  3. <brief_description>
  4. Result from a 2D body motion test.
  5. </brief_description>
  6. <description>
  7. This class contains the motion and collision result from [method PhysicsServer2D.body_test_motion].
  8. </description>
  9. <tutorials>
  10. </tutorials>
  11. <methods>
  12. <method name="get_collider" qualifiers="const">
  13. <return type="Object" />
  14. <description>
  15. Returns the colliding body's attached [Object], if a collision occured.
  16. </description>
  17. </method>
  18. <method name="get_collider_id" qualifiers="const">
  19. <return type="int" />
  20. <description>
  21. Returns the unique instance ID of the colliding body's attached [Object], if a collision occured. See [method Object.get_instance_id].
  22. </description>
  23. </method>
  24. <method name="get_collider_rid" qualifiers="const">
  25. <return type="RID" />
  26. <description>
  27. Returns the colliding body's [RID] used by the [PhysicsServer2D], if a collision occured.
  28. </description>
  29. </method>
  30. <method name="get_collider_shape" qualifiers="const">
  31. <return type="int" />
  32. <description>
  33. Returns the colliding body's shape index, if a collision occured. See [CollisionObject2D].
  34. </description>
  35. </method>
  36. <method name="get_collider_velocity" qualifiers="const">
  37. <return type="Vector2" />
  38. <description>
  39. Returns the colliding body's velocity, if a collision occured.
  40. </description>
  41. </method>
  42. <method name="get_collision_depth" qualifiers="const">
  43. <return type="float" />
  44. <description>
  45. Returns the length of overlap along the collision normal, if a collision occured.
  46. </description>
  47. </method>
  48. <method name="get_collision_local_shape" qualifiers="const">
  49. <return type="int" />
  50. <description>
  51. Returns the moving object's colliding shape, if a collision occured.
  52. </description>
  53. </method>
  54. <method name="get_collision_normal" qualifiers="const">
  55. <return type="Vector2" />
  56. <description>
  57. Returns the colliding body's shape's normal at the point of collision, if a collision occured.
  58. </description>
  59. </method>
  60. <method name="get_collision_point" qualifiers="const">
  61. <return type="Vector2" />
  62. <description>
  63. Returns the point of collision in global coordinates, if a collision occured.
  64. </description>
  65. </method>
  66. <method name="get_collision_safe_fraction" qualifiers="const">
  67. <return type="float" />
  68. <description>
  69. Returns the maximum fraction of the motion that can occur without a collision, between [code]0[/code] and [code]1[/code].
  70. </description>
  71. </method>
  72. <method name="get_collision_unsafe_fraction" qualifiers="const">
  73. <return type="float" />
  74. <description>
  75. Returns the minimum fraction of the motion needed to collide, if a collision occured, between [code]0[/code] and [code]1[/code].
  76. </description>
  77. </method>
  78. <method name="get_remainder" qualifiers="const">
  79. <return type="Vector2" />
  80. <description>
  81. Returns the moving object's remaining movement vector.
  82. </description>
  83. </method>
  84. <method name="get_travel" qualifiers="const">
  85. <return type="Vector2" />
  86. <description>
  87. Returns the moving object's travel before collision.
  88. </description>
  89. </method>
  90. </methods>
  91. </class>