Attention: Here be dragons

This is the latest (unstable) version of this documentation, which may document features not available in or compatible with released stable versions of Godot.

SpringBoneCollision3D

继承: Node3D < Node < Object

派生: SpringBoneCollisionCapsule3D, SpringBoneCollisionPlane3D, SpringBoneCollisionSphere3D

A base class of the collision that interacts with SpringBoneSimulator3D.

描述

A collision can be a child of SpringBoneSimulator3D. If it is not a child of SpringBoneSimulator3D, it has no effect.

The colliding and sliding are done in the SpringBoneSimulator3D's modification process in order of its collision list which is set by SpringBoneSimulator3D.set_collision_path. If SpringBoneSimulator3D.are_all_child_collisions_enabled is true, the order matches SceneTree.

If bone is set, it synchronizes with the bone pose of the ancestor Skeleton3D, which is done in before the SpringBoneSimulator3D's modification process as the pre-process.

Warning: A scaled SpringBoneCollision3D will likely not behave as expected. Make sure that the parent Skeleton3D and its bones are not scaled.

属性

int

bone

-1

String

bone_name

""

Vector3

position_offset

Quaternion

rotation_offset

方法

Skeleton3D

get_skeleton() const


属性说明

int bone = -1 🔗

  • void set_bone(value: int)

  • int get_bone()

所附着骨骼的索引。


String bone_name = "" 🔗

所附着骨骼的名称。


Vector3 position_offset 🔗

  • void set_position_offset(value: Vector3)

  • Vector3 get_position_offset()

The offset of the position from Skeleton3D's bone pose position.


Quaternion rotation_offset 🔗

The offset of the rotation from Skeleton3D's bone pose rotation.


方法说明

Skeleton3D get_skeleton() const 🔗

Get parent Skeleton3D node of the parent SpringBoneSimulator3D if found.