CollisionShape.xml 2.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. <?xml version="1.0" encoding="UTF-8" ?>
  2. <class name="CollisionShape" inherits="Spatial" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
  3. <brief_description>
  4. Node that represents collision shape data in 3D space.
  5. </brief_description>
  6. <description>
  7. Editor facility for creating and editing collision shapes in 3D space. Set the [member shape] property to configure the shape. [b]IMPORTANT[/b]: this is an Editor-only helper to create shapes, use [method CollisionObject.shape_owner_get_shape] to get the actual shape.
  8. You can use this node to represent all sorts of collision shapes, for example, add this to an [Area] to give it a detection shape, or add it to a [PhysicsBody] to create a solid object.
  9. [b]Warning:[/b] A non-uniformly scaled CollisionShape3D 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 of its [member shape] resource instead.
  10. </description>
  11. <tutorials>
  12. <link title="Physics introduction">$DOCS_URL/tutorials/physics/physics_introduction.html</link>
  13. <link title="3D Kinematic Character Demo">https://godotengine.org/asset-library/asset/126</link>
  14. <link title="3D Platformer Demo">https://godotengine.org/asset-library/asset/125</link>
  15. <link title="Third Person Shooter Demo">https://godotengine.org/asset-library/asset/678</link>
  16. </tutorials>
  17. <methods>
  18. <method name="make_convex_from_brothers">
  19. <return type="void" />
  20. <description>
  21. Sets the collision shape's shape to the addition of all its convexed [MeshInstance] siblings geometry.
  22. </description>
  23. </method>
  24. <method name="resource_changed">
  25. <return type="void" />
  26. <argument index="0" name="resource" type="Resource" />
  27. <description>
  28. If this method exists within a script it will be called whenever the shape resource has been modified.
  29. </description>
  30. </method>
  31. </methods>
  32. <members>
  33. <member name="disabled" type="bool" setter="set_disabled" getter="is_disabled" default="false">
  34. A disabled collision shape has no effect in the world.
  35. </member>
  36. <member name="shape" type="Shape" setter="set_shape" getter="get_shape">
  37. The actual shape owned by this collision shape.
  38. </member>
  39. </members>
  40. <constants>
  41. </constants>
  42. </class>