GLTFPhysicsBody¶
Inherits: Resource < Reference < Object
Represents a GLTF physics body.
Description¶
Represents a physics body as defined by the OMI_physics_body
GLTF extension. This class is an intermediary between the GLTF data and Redot's nodes, and it's abstracted in a way that allows adding support for different GLTF physics extensions in the future.
Tutorials¶
Properties¶
|
||
|
||
|
||
|
Methods¶
to_dictionary ( ) const |
|
to_node ( ) const |
Property Descriptions¶
Vector3 angular_velocity = 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".
String body_type = "static"
The type of the body. Valid values are "static", "kinematic", "character", "rigid", "vehicle", and "trigger".
Vector3 linear_velocity = 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".
float mass = 1.0
The mass of the physics body, in kilograms. This is only used when the body type is "rigid" or "vehicle".
Method Descriptions¶
Dictionary to_dictionary ( ) const
Serializes this GLTFPhysicsBody instance into a Dictionary.
CollisionObject to_node ( ) const
Converts this GLTFPhysicsBody instance into a Redot CollisionObject node.