2
0

PhysicsTestMotionParameters2D.xml 2.0 KB

1234567891011121314151617181920212223242526272829303132
  1. <?xml version="1.0" encoding="UTF-8" ?>
  2. <class name="PhysicsTestMotionParameters2D" inherits="RefCounted" version="4.0">
  3. <brief_description>
  4. Parameters to be sent to a 2D body motion test.
  5. </brief_description>
  6. <description>
  7. This class contains parameters used in [method PhysicsServer2D.body_test_motion].
  8. </description>
  9. <tutorials>
  10. </tutorials>
  11. <members>
  12. <member name="collide_separation_ray" type="bool" setter="set_collide_separation_ray_enabled" getter="is_collide_separation_ray_enabled" default="false">
  13. If set to [code]true[/code], shapes of type [constant PhysicsServer2D.SHAPE_SEPARATION_RAY] are used to detect collisions and can stop the motion. Can be useful when snapping to the ground.
  14. If set to [code]false[/code], shapes of type [constant PhysicsServer2D.SHAPE_SEPARATION_RAY] are only used for separation when overlapping with other bodies. That's the main use for separation ray shapes.
  15. </member>
  16. <member name="exclude_bodies" type="Array" setter="set_exclude_bodies" getter="get_exclude_bodies" default="[]">
  17. Optional array of body [RID] to exclude from collision.
  18. </member>
  19. <member name="exclude_objects" type="Array" setter="set_exclude_objects" getter="get_exclude_objects" default="[]">
  20. Optional array of object unique instance ID to exclude from collision. See [method Object.get_instance_id].
  21. </member>
  22. <member name="from" type="Transform2D" setter="set_from" getter="get_from" default="Transform2D(1, 0, 0, 1, 0, 0)">
  23. Transform in global space where the motion should start. Usually set to [member Node2D.global_transform] for the current body's transform.
  24. </member>
  25. <member name="margin" type="float" setter="set_margin" getter="get_margin" default="0.08">
  26. Increases the size of the shapes involved in the collision detection.
  27. </member>
  28. <member name="motion" type="Vector2" setter="set_motion" getter="get_motion" default="Vector2(0, 0)">
  29. Motion vector to define the length and direction of the motion to test.
  30. </member>
  31. </members>
  32. </class>