class_rayshape2d.rst 1.9 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
  1. .. Generated automatically by doc/tools/makerst.py in Godot's source tree.
  2. .. DO NOT EDIT THIS FILE, but the RayShape2D.xml source instead.
  3. .. The source is found in doc/classes or modules/<name>/doc_classes.
  4. .. _class_RayShape2D:
  5. RayShape2D
  6. ==========
  7. **Inherits:** :ref:`Shape2D<class_Shape2D>` **<** :ref:`Resource<class_Resource>` **<** :ref:`Reference<class_Reference>` **<** :ref:`Object<class_Object>`
  8. **Category:** Core
  9. Brief Description
  10. -----------------
  11. Ray shape for 2D collisions.
  12. Properties
  13. ----------
  14. +---------------------------+-----------------------------------------------------------------+
  15. | :ref:`float<class_float>` | :ref:`length<class_RayShape2D_property_length>` |
  16. +---------------------------+-----------------------------------------------------------------+
  17. | :ref:`bool<class_bool>` | :ref:`slips_on_slope<class_RayShape2D_property_slips_on_slope>` |
  18. +---------------------------+-----------------------------------------------------------------+
  19. Description
  20. -----------
  21. 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.
  22. Property Descriptions
  23. ---------------------
  24. .. _class_RayShape2D_property_length:
  25. - :ref:`float<class_float>` **length**
  26. +----------+-------------------+
  27. | *Setter* | set_length(value) |
  28. +----------+-------------------+
  29. | *Getter* | get_length() |
  30. +----------+-------------------+
  31. The ray's length.
  32. .. _class_RayShape2D_property_slips_on_slope:
  33. - :ref:`bool<class_bool>` **slips_on_slope**
  34. +----------+---------------------------+
  35. | *Setter* | set_slips_on_slope(value) |
  36. +----------+---------------------------+
  37. | *Getter* | get_slips_on_slope() |
  38. +----------+---------------------------+
  39. If ``true``, allow the shape to return the correct normal. Default value: ``false``.