跳到主要内容

PhysicalBone

继承

PhysicsBody

简要描述

描述

成员

类型属性名默认值
Transformbody_offsetTransform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0 )
floatbounce0.0
floatfriction1.0
floatgravity_scale1.0
Transformjoint_offsetTransform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0 )
intjoint_type0
floatmass1.0
floatweight9.8

方法

返回值类型方法名称
voidapply_central_impulse(impulse: Vector3)
voidapply_impulse(position: Vector3, impulse: Vector3)
intget_bone_id() const
boolget_simulate_physics()
boolis_simulating_physics()
boolis_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
DefaultTransform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0 )
setterset_body_offset(value)
getterget_body_offset
  • float bounce
Default0.0
setterset_bounce(value)
getterget_bounce
  • float friction
Default1.0
setterset_friction(value)
getterget_friction
  • float gravity_scale
Default1.0
setterset_gravity_scale(value)
getterget_gravity_scale
  • Transform joint_offset
DefaultTransform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0 )
setterset_joint_offset(value)
getterget_joint_offset
  • int joint_type
Default0
setterset_joint_type(value)
getterget_joint_type
  • float mass
Default1.0
setterset_mass(value)
getterget_mass
  • float weight
Default9.8
setterset_weight(value)
getterget_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()