PhysicsMaterial.xml 1.5 KB

1234567891011121314151617181920212223242526272829
  1. <?xml version="1.0" encoding="UTF-8" ?>
  2. <class name="PhysicsMaterial" inherits="Resource" version="3.4">
  3. <brief_description>
  4. A material for physics properties.
  5. </brief_description>
  6. <description>
  7. Provides a means of modifying the collision properties of a [PhysicsBody].
  8. </description>
  9. <tutorials>
  10. </tutorials>
  11. <methods>
  12. </methods>
  13. <members>
  14. <member name="absorbent" type="bool" setter="set_absorbent" getter="is_absorbent" default="false">
  15. If [code]true[/code], subtracts the bounciness from the colliding object's bounciness instead of adding it.
  16. </member>
  17. <member name="bounce" type="float" setter="set_bounce" getter="get_bounce" default="0.0">
  18. The body's bounciness. Values range from [code]0[/code] (no bounce) to [code]1[/code] (full bounciness).
  19. </member>
  20. <member name="friction" type="float" setter="set_friction" getter="get_friction" default="1.0">
  21. The body's friction. Values range from [code]0[/code] (frictionless) to [code]1[/code] (maximum friction).
  22. </member>
  23. <member name="rough" type="bool" setter="set_rough" getter="is_rough" default="false">
  24. If [code]true[/code], the physics engine will use the friction of the object marked as "rough" when two objects collide. If [code]false[/code], the physics engine will use the lowest friction of all colliding objects instead. If [code]true[/code] for both colliding objects, the physics engine will use the highest friction.
  25. </member>
  26. </members>
  27. <constants>
  28. </constants>
  29. </class>