class_physicsmaterial.rst 4.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105
  1. :github_url: hide
  2. .. DO NOT EDIT THIS FILE!!!
  3. .. Generated automatically from Godot engine sources.
  4. .. Generator: https://github.com/godotengine/godot/tree/master/doc/tools/make_rst.py.
  5. .. XML source: https://github.com/godotengine/godot/tree/master/doc/classes/PhysicsMaterial.xml.
  6. .. _class_PhysicsMaterial:
  7. PhysicsMaterial
  8. ===============
  9. **Inherits:** :ref:`Resource<class_Resource>` **<** :ref:`RefCounted<class_RefCounted>` **<** :ref:`Object<class_Object>`
  10. A material for physics properties.
  11. Description
  12. -----------
  13. Provides a means of modifying the collision properties of a :ref:`PhysicsBody3D<class_PhysicsBody3D>`.
  14. Properties
  15. ----------
  16. +---------------------------+------------------------------------------------------------+-----------+
  17. | :ref:`bool<class_bool>` | :ref:`absorbent<class_PhysicsMaterial_property_absorbent>` | ``false`` |
  18. +---------------------------+------------------------------------------------------------+-----------+
  19. | :ref:`float<class_float>` | :ref:`bounce<class_PhysicsMaterial_property_bounce>` | ``0.0`` |
  20. +---------------------------+------------------------------------------------------------+-----------+
  21. | :ref:`float<class_float>` | :ref:`friction<class_PhysicsMaterial_property_friction>` | ``1.0`` |
  22. +---------------------------+------------------------------------------------------------+-----------+
  23. | :ref:`bool<class_bool>` | :ref:`rough<class_PhysicsMaterial_property_rough>` | ``false`` |
  24. +---------------------------+------------------------------------------------------------+-----------+
  25. Property Descriptions
  26. ---------------------
  27. .. _class_PhysicsMaterial_property_absorbent:
  28. - :ref:`bool<class_bool>` **absorbent**
  29. +-----------+----------------------+
  30. | *Default* | ``false`` |
  31. +-----------+----------------------+
  32. | *Setter* | set_absorbent(value) |
  33. +-----------+----------------------+
  34. | *Getter* | is_absorbent() |
  35. +-----------+----------------------+
  36. If ``true``, subtracts the bounciness from the colliding object's bounciness instead of adding it.
  37. ----
  38. .. _class_PhysicsMaterial_property_bounce:
  39. - :ref:`float<class_float>` **bounce**
  40. +-----------+-------------------+
  41. | *Default* | ``0.0`` |
  42. +-----------+-------------------+
  43. | *Setter* | set_bounce(value) |
  44. +-----------+-------------------+
  45. | *Getter* | get_bounce() |
  46. +-----------+-------------------+
  47. The body's bounciness. Values range from ``0`` (no bounce) to ``1`` (full bounciness).
  48. ----
  49. .. _class_PhysicsMaterial_property_friction:
  50. - :ref:`float<class_float>` **friction**
  51. +-----------+---------------------+
  52. | *Default* | ``1.0`` |
  53. +-----------+---------------------+
  54. | *Setter* | set_friction(value) |
  55. +-----------+---------------------+
  56. | *Getter* | get_friction() |
  57. +-----------+---------------------+
  58. The body's friction. Values range from ``0`` (frictionless) to ``1`` (maximum friction).
  59. ----
  60. .. _class_PhysicsMaterial_property_rough:
  61. - :ref:`bool<class_bool>` **rough**
  62. +-----------+------------------+
  63. | *Default* | ``false`` |
  64. +-----------+------------------+
  65. | *Setter* | set_rough(value) |
  66. +-----------+------------------+
  67. | *Getter* | is_rough() |
  68. +-----------+------------------+
  69. If ``true``, the physics engine will use the friction of the object marked as "rough" when two objects collide. If ``false``, the physics engine will use the lowest friction of all colliding objects instead. If ``true`` for both colliding objects, the physics engine will use the highest friction.
  70. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)`
  71. .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)`
  72. .. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)`
  73. .. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)`
  74. .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)`
  75. .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)`