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.
Checking the stable version of the documentation...
StaticBody3D¶
继承: PhysicsBody3D < CollisionObject3D < Node3D < Node < Object
派生: AnimatableBody3D
无法被外力移动的 3D 物理物体。手动移动时不会影响路径上的其他物体。
描述¶
静态 3D 物理体。无法因外力或接触而移动,但可以通过代码、AnimationMixer(AnimationMixer.callback_mode_process 设为 AnimationMixer.ANIMATION_CALLBACK_MODE_PROCESS_PHYSICS)、RemoteTransform3D 等方法手动移动。
StaticBody3D 发生移动时,是传送到新位置上的,不会影响路径上的其他物理体。如果不想要这样的行为,请改用 AnimatableBody3D。
StaticBody3D 常用于完全静态的地板、墙壁等对象,也可以用于传送带、圆形回转平台等移动的表面(使用 constant_linear_velocity 和 constant_angular_velocity)。
教程¶
属性¶
|
||
|
||
属性说明¶
Vector3 constant_angular_velocity = Vector3(0, 0, 0)
该物体的恒定角速度。不会旋转该物体,但会影响接触的物体,就好像这个物体正在旋转一样。
Vector3 constant_linear_velocity = Vector3(0, 0, 0)
该物体的恒定线速度。不会移动该物体,但会影响接触的物体,就好像这个物体正在移动一样。
PhysicsMaterial physics_material_override
void set_physics_material_override ( PhysicsMaterial value )
PhysicsMaterial get_physics_material_override ( )
物体的物理材质。
如果为该属性指定了一种材质,则将使用该材质代替任何其他物理材质,例如继承的材质。