StaticBody.xml 3.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. <?xml version="1.0" encoding="UTF-8" ?>
  2. <class name="StaticBody" inherits="PhysicsBody" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
  3. <brief_description>
  4. Physics body for 3D physics which is static or moves only by script. Useful for floor and walls.
  5. </brief_description>
  6. <description>
  7. Static body for 3D physics.
  8. A static body is a simple body that doesn't move under physics simulation, i.e. it can't be moved by external forces or contacts but its transformation can still be updated manually by the user. It is ideal for implementing objects in the environment, such as walls or platforms. In contrast to [RigidBody], it doesn't consume any CPU resources as long as they don't move.
  9. They have extra functionalities to move and affect other bodies:
  10. [i]Static transform change:[/i] Static bodies can be moved by animation or script. In this case, they are just teleported and don't affect other bodies on their path.
  11. [i]Constant velocity:[/i] When [member constant_linear_velocity] or [member constant_angular_velocity] is set, static bodies don't move themselves but affect touching bodies as if they were moving. This is useful for simulating conveyor belts or conveyor wheels.
  12. [b]Warning:[/b] With a non-uniform scale this node will probably not function as expected. Please make sure to keep its scale uniform (i.e. the same on all axes), and change the size(s) of its collision shape(s) instead.
  13. </description>
  14. <tutorials>
  15. <link title="3D Physics Tests Demo">https://godotengine.org/asset-library/asset/675</link>
  16. <link title="Third Person Shooter Demo">https://godotengine.org/asset-library/asset/678</link>
  17. <link title="3D Voxel Demo">https://godotengine.org/asset-library/asset/676</link>
  18. </tutorials>
  19. <methods>
  20. </methods>
  21. <members>
  22. <member name="bounce" type="float" setter="set_bounce" getter="get_bounce">
  23. The body's bounciness. Values range from [code]0[/code] (no bounce) to [code]1[/code] (full bounciness).
  24. Deprecated, use [member PhysicsMaterial.bounce] instead via [member physics_material_override].
  25. </member>
  26. <member name="constant_angular_velocity" type="Vector3" setter="set_constant_angular_velocity" getter="get_constant_angular_velocity" default="Vector3( 0, 0, 0 )">
  27. The body's constant angular velocity. This does not rotate the body, but affects other bodies that touch it, as if it was in a state of rotation.
  28. </member>
  29. <member name="constant_linear_velocity" type="Vector3" setter="set_constant_linear_velocity" getter="get_constant_linear_velocity" default="Vector3( 0, 0, 0 )">
  30. The body's constant linear velocity. This does not move the body, but affects other bodies that touch it, as if it was in a state of movement.
  31. </member>
  32. <member name="friction" type="float" setter="set_friction" getter="get_friction">
  33. The body's friction, from 0 (frictionless) to 1 (full friction).
  34. Deprecated, use [member PhysicsMaterial.friction] instead via [member physics_material_override].
  35. </member>
  36. <member name="physics_material_override" type="PhysicsMaterial" setter="set_physics_material_override" getter="get_physics_material_override">
  37. The physics material override for the body.
  38. If a material is assigned to this property, it will be used instead of any other physics material, such as an inherited one.
  39. </member>
  40. </members>
  41. <constants>
  42. </constants>
  43. </class>