class_physicsmaterial.rst 3.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394
  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 PhysicsMaterial.xml source instead.
  4. .. The source is found in doc/classes or modules/<name>/doc_classes.
  5. .. _class_PhysicsMaterial:
  6. PhysicsMaterial
  7. ===============
  8. **Inherits:** :ref:`Resource<class_Resource>` **<** :ref:`Reference<class_Reference>` **<** :ref:`Object<class_Object>`
  9. A material for physics properties.
  10. Description
  11. -----------
  12. Provides a means of modifying the collision properties of a :ref:`PhysicsBody<class_PhysicsBody>`.
  13. Properties
  14. ----------
  15. +---------------------------+------------------------------------------------------------+-----------+
  16. | :ref:`bool<class_bool>` | :ref:`absorbent<class_PhysicsMaterial_property_absorbent>` | ``false`` |
  17. +---------------------------+------------------------------------------------------------+-----------+
  18. | :ref:`float<class_float>` | :ref:`bounce<class_PhysicsMaterial_property_bounce>` | ``0.0`` |
  19. +---------------------------+------------------------------------------------------------+-----------+
  20. | :ref:`float<class_float>` | :ref:`friction<class_PhysicsMaterial_property_friction>` | ``1.0`` |
  21. +---------------------------+------------------------------------------------------------+-----------+
  22. | :ref:`bool<class_bool>` | :ref:`rough<class_PhysicsMaterial_property_rough>` | ``false`` |
  23. +---------------------------+------------------------------------------------------------+-----------+
  24. Property Descriptions
  25. ---------------------
  26. .. _class_PhysicsMaterial_property_absorbent:
  27. - :ref:`bool<class_bool>` **absorbent**
  28. +-----------+----------------------+
  29. | *Default* | ``false`` |
  30. +-----------+----------------------+
  31. | *Setter* | set_absorbent(value) |
  32. +-----------+----------------------+
  33. | *Getter* | is_absorbent() |
  34. +-----------+----------------------+
  35. ----
  36. .. _class_PhysicsMaterial_property_bounce:
  37. - :ref:`float<class_float>` **bounce**
  38. +-----------+-------------------+
  39. | *Default* | ``0.0`` |
  40. +-----------+-------------------+
  41. | *Setter* | set_bounce(value) |
  42. +-----------+-------------------+
  43. | *Getter* | get_bounce() |
  44. +-----------+-------------------+
  45. The body's bounciness. Values range from ``0`` (no bounce) to ``1`` (full bounciness).
  46. ----
  47. .. _class_PhysicsMaterial_property_friction:
  48. - :ref:`float<class_float>` **friction**
  49. +-----------+---------------------+
  50. | *Default* | ``1.0`` |
  51. +-----------+---------------------+
  52. | *Setter* | set_friction(value) |
  53. +-----------+---------------------+
  54. | *Getter* | get_friction() |
  55. +-----------+---------------------+
  56. The body's friction. Values range from ``0`` (frictionless) to ``1`` (maximum friction).
  57. ----
  58. .. _class_PhysicsMaterial_property_rough:
  59. - :ref:`bool<class_bool>` **rough**
  60. +-----------+------------------+
  61. | *Default* | ``false`` |
  62. +-----------+------------------+
  63. | *Setter* | set_rough(value) |
  64. +-----------+------------------+
  65. | *Getter* | is_rough() |
  66. +-----------+------------------+