class_rayshape2d.rst 2.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465
  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 RayShape2D.xml source instead.
  4. .. The source is found in doc/classes or modules/<name>/doc_classes.
  5. .. _class_RayShape2D:
  6. RayShape2D
  7. ==========
  8. **Inherits:** :ref:`Shape2D<class_Shape2D>` **<** :ref:`Resource<class_Resource>` **<** :ref:`Reference<class_Reference>` **<** :ref:`Object<class_Object>`
  9. **Category:** Core
  10. Brief Description
  11. -----------------
  12. Ray shape for 2D collisions.
  13. Properties
  14. ----------
  15. +---------------------------+-----------------------------------------------------------------+-------+
  16. | :ref:`float<class_float>` | :ref:`length<class_RayShape2D_property_length>` | 20.0 |
  17. +---------------------------+-----------------------------------------------------------------+-------+
  18. | :ref:`bool<class_bool>` | :ref:`slips_on_slope<class_RayShape2D_property_slips_on_slope>` | false |
  19. +---------------------------+-----------------------------------------------------------------+-------+
  20. Description
  21. -----------
  22. Ray shape for 2D collisions. A ray is not really a collision body; instead, it tries to separate itself from whatever is touching its far endpoint. It's often useful for characters.
  23. Property Descriptions
  24. ---------------------
  25. .. _class_RayShape2D_property_length:
  26. - :ref:`float<class_float>` **length**
  27. +-----------+-------------------+
  28. | *Default* | 20.0 |
  29. +-----------+-------------------+
  30. | *Setter* | set_length(value) |
  31. +-----------+-------------------+
  32. | *Getter* | get_length() |
  33. +-----------+-------------------+
  34. The ray's length.
  35. .. _class_RayShape2D_property_slips_on_slope:
  36. - :ref:`bool<class_bool>` **slips_on_slope**
  37. +-----------+---------------------------+
  38. | *Default* | false |
  39. +-----------+---------------------------+
  40. | *Setter* | set_slips_on_slope(value) |
  41. +-----------+---------------------------+
  42. | *Getter* | get_slips_on_slope() |
  43. +-----------+---------------------------+
  44. If ``true``, allow the shape to return the correct normal.