PhysicalBone
继承
简要描述
描述
成员
类型 | 属性名 | 默认值 |
---|---|---|
Transform | body_offset | Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0 ) |
float | bounce | 0.0 |
float | friction | 1.0 |
float | gravity_scale | 1.0 |
Transform | joint_offset | Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0 ) |
int | joint_type | 0 |
float | mass | 1.0 |
float | weight | 9.8 |
方法
返回值类型 | 方法名称 |
---|---|
void | apply_central_impulse(impulse: Vector3) |
void | apply_impulse(position: Vector3, impulse: Vector3) |
int | get_bone_id() const |
bool | get_simulate_physics() |
bool | is_simulating_physics() |
bool | is_static_body() |
枚举
enum JointType:
- **JOINT_TYPE_NONE = 0**
- **JOINT_TYPE_PIN = 1**
- **JOINT_TYPE_CONE = 2**
- **JOINT_TYPE_HINGE = 3**
- **JOINT_TYPE_SLIDER = 4**
- **JOINT_TYPE_6DOF = 5**
常量
成员说明
- Transform body_offset
Default | Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0 ) |
---|---|
setter | set_body_offset(value) |
getter | get_body_offset |
- float bounce
Default | 0.0 |
---|---|
setter | set_bounce(value) |
getter | get_bounce |
- float friction
Default | 1.0 |
---|---|
setter | set_friction(value) |
getter | get_friction |
- float gravity_scale
Default | 1.0 |
---|---|
setter | set_gravity_scale(value) |
getter | get_gravity_scale |
- Transform joint_offset
Default | Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0 ) |
---|---|
setter | set_joint_offset(value) |
getter | get_joint_offset |
- int joint_type
Default | 0 |
---|---|
setter | set_joint_type(value) |
getter | get_joint_type |
- float mass
Default | 1.0 |
---|---|
setter | set_mass(value) |
getter | get_mass |
- float weight
Default | 9.8 |
---|---|
setter | set_weight(value) |
getter | get_weight |
方法说明
- apply_central_impulse apply_central_impulse(impulse: Vector3)
- apply_impulse apply_impulse(position: Vector3, impulse: Vector3)
- get_bone_id get_bone_id() const
- get_simulate_physics get_simulate_physics()
- is_simulating_physics is_simulating_physics()
- is_static_body is_static_body()