Inherits: Resource < RefCounted < Object
Represents a GLTF physics body.
Represents a physics body as defined by the OMI_physics_body 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.
| ||
| ||
| ||
| ||
| ||
|
from_dictionary ( Dictionary dictionary ) static | |
from_node ( CollisionObject3D body_node ) static | |
to_dictionary ( ) const | |
to_node ( ) const |
Vector3(0, 0, 0)
The angular velocity of the physics body, in radians per second. This is only used when the body type is "rigid" or "vehicle".
"static"
The type of the body. When importing, this controls what type of CollisionObject3D node Godot should generate. Valid values are "static", "kinematic", "character", "rigid", "vehicle", and "trigger".
Vector3(0, 0, 0)
The center of mass of the body, in meters. This is in local space relative to the body. By default, the center of the mass is the body's origin.
Basis(0, 0, 0, 0, 0, 0, 0, 0, 0)
The inertia tensor of the physics body, in kilogram meter squared (kg⋅m²). This is only used when the body type is "rigid" or "vehicle".
When converted to a Godot RigidBody3D node, if this value is zero, then the inertia will be calculated automatically.
Vector3(0, 0, 0)
The linear velocity of the physics body, in meters per second. This is only used when the body type is "rigid" or "vehicle".
1.0
The mass of the physics body, in kilograms. This is only used when the body type is "rigid" or "vehicle".
Creates a new GLTFPhysicsBody instance by parsing the given Dictionary.
Create a new GLTFPhysicsBody instance from the given Godot CollisionObject3D node.
Serializes this GLTFPhysicsBody instance into a Dictionary.
Converts this GLTFPhysicsBody instance into a Godot CollisionObject3D node.
© 2014–present Juan Linietsky, Ariel Manzur and the Godot community
Licensed under the Creative Commons Attribution Unported License v3.0.
https://docs.godotengine.org/en/4.2/classes/class_gltfphysicsbody.html