GLTFPhysicsBody.xml 2.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. <?xml version="1.0" encoding="UTF-8" ?>
  2. <class name="GLTFPhysicsBody" inherits="Resource" version="3.6" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../doc/class.xsd">
  3. <brief_description>
  4. Represents a GLTF physics body.
  5. </brief_description>
  6. <description>
  7. Represents a physics body as defined by the [code]OMI_physics_body[/code] GLTF extension. This class is an intermediary between the GLTF data and Godot's nodes, and it's abstracted in a way that allows adding support for different GLTF physics extensions in the future.
  8. </description>
  9. <tutorials>
  10. <link title="OMI_physics_body GLTF extension">https://github.com/omigroup/gltf-extensions/tree/main/extensions/2.0/OMI_physics_body</link>
  11. </tutorials>
  12. <methods>
  13. <method name="to_dictionary" qualifiers="const">
  14. <return type="Dictionary" />
  15. <description>
  16. Serializes this GLTFPhysicsBody instance into a [Dictionary].
  17. </description>
  18. </method>
  19. <method name="to_node" qualifiers="const">
  20. <return type="CollisionObject" />
  21. <description>
  22. Converts this GLTFPhysicsBody instance into a Godot [CollisionObject] node.
  23. </description>
  24. </method>
  25. </methods>
  26. <members>
  27. <member name="angular_velocity" type="Vector3" setter="set_angular_velocity" getter="get_angular_velocity" default="Vector3( 0, 0, 0 )">
  28. The angular velocity of the physics body, in radians per second. This is only used when the body type is "rigid" or "vehicle".
  29. </member>
  30. <member name="body_type" type="String" setter="set_body_type" getter="get_body_type" default="&quot;static&quot;">
  31. The type of the body. Valid values are "static", "kinematic", "character", "rigid", "vehicle", and "trigger".
  32. </member>
  33. <member name="linear_velocity" type="Vector3" setter="set_linear_velocity" getter="get_linear_velocity" default="Vector3( 0, 0, 0 )">
  34. The linear velocity of the physics body, in meters per second. This is only used when the body type is "rigid" or "vehicle".
  35. </member>
  36. <member name="mass" type="float" setter="set_mass" getter="get_mass" default="1.0">
  37. The mass of the physics body, in kilograms. This is only used when the body type is "rigid" or "vehicle".
  38. </member>
  39. </members>
  40. <constants>
  41. </constants>
  42. </class>