class_separationrayshape3d.rst 3.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970
  1. :github_url: hide
  2. .. Generated automatically by doc/tools/make_rst.py in Godot's source tree.
  3. .. DO NOT EDIT THIS FILE, but the SeparationRayShape3D.xml source instead.
  4. .. The source is found in doc/classes or modules/<name>/doc_classes.
  5. .. _class_SeparationRayShape3D:
  6. SeparationRayShape3D
  7. ====================
  8. **Inherits:** :ref:`Shape3D<class_Shape3D>` **<** :ref:`Resource<class_Resource>` **<** :ref:`RefCounted<class_RefCounted>` **<** :ref:`Object<class_Object>`
  9. Separation ray shape for 3D collisions.
  10. Description
  11. -----------
  12. Separation ray shape for 3D collisions, which can be set into a :ref:`PhysicsBody3D<class_PhysicsBody3D>` or :ref:`Area3D<class_Area3D>`. 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.
  13. Properties
  14. ----------
  15. +---------------------------+---------------------------------------------------------------------------+-----------+
  16. | :ref:`float<class_float>` | :ref:`length<class_SeparationRayShape3D_property_length>` | ``1.0`` |
  17. +---------------------------+---------------------------------------------------------------------------+-----------+
  18. | :ref:`bool<class_bool>` | :ref:`slide_on_slope<class_SeparationRayShape3D_property_slide_on_slope>` | ``false`` |
  19. +---------------------------+---------------------------------------------------------------------------+-----------+
  20. Property Descriptions
  21. ---------------------
  22. .. _class_SeparationRayShape3D_property_length:
  23. - :ref:`float<class_float>` **length**
  24. +-----------+-------------------+
  25. | *Default* | ``1.0`` |
  26. +-----------+-------------------+
  27. | *Setter* | set_length(value) |
  28. +-----------+-------------------+
  29. | *Getter* | get_length() |
  30. +-----------+-------------------+
  31. The ray's length.
  32. ----
  33. .. _class_SeparationRayShape3D_property_slide_on_slope:
  34. - :ref:`bool<class_bool>` **slide_on_slope**
  35. +-----------+---------------------------+
  36. | *Default* | ``false`` |
  37. +-----------+---------------------------+
  38. | *Setter* | set_slide_on_slope(value) |
  39. +-----------+---------------------------+
  40. | *Getter* | get_slide_on_slope() |
  41. +-----------+---------------------------+
  42. If ``false`` (default), the shape always separates and returns a normal along its own direction.
  43. If ``true``, the shape can return the correct normal and separate in any direction, allowing sliding motion on slopes.
  44. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)`
  45. .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)`
  46. .. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)`
  47. .. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)`
  48. .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)`
  49. .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)`