StaticBody3D

继承: PhysicsBody3D < CollisionObject3D < Node3D < Node < Object

派生: AnimatableBody3D

A 3D physics body that can't be moved by external forces. When moved manually, it doesn't affect other bodies in its path.

描述

A static 3D physics body. It can't be moved by external forces or contacts, but can be moved manually by other means such as code, AnimationMixer s (with AnimationMixer.callback_mode_process set to AnimationMixer.ANIMATION_CALLBACK_MODE_PROCESS_PHYSICS), and RemoteTransform3D.

When StaticBody3D is moved, it is teleported to its new position without affecting other physics bodies in its path. If this is not desired, use AnimatableBody3D instead.

StaticBody3D is useful for completely static objects like floors and walls, as well as moving surfaces like conveyor belts and circular revolving platforms (by using constant_linear_velocity and constant_angular_velocity).

属性


属性说明

Vector3 constant_angular_velocity = Vector3(0, 0, 0)

  • void set_constant_angular_velocity ( value: Vector3 )
  • Vector3 get_constant_angular_velocity ( )

The body's constant angular velocity. This does not rotate the body, but affects touching bodies, as if it were rotating.


Vector3 constant_linear_velocity = Vector3(0, 0, 0)

  • void set_constant_linear_velocity ( value: Vector3 )
  • Vector3 get_constant_linear_velocity ( )

The body's constant linear velocity. This does not move the body, but affects touching bodies, as if it were moving.


PhysicsMaterial physics_material_override

The physics material override for the body.

If a material is assigned to this property, it will be used instead of any other physics material, such as an inherited one.

1

本方法通常需要用户覆盖才能生效。

2

本方法无副作用,不会修改该实例的任何成员变量。

3

本方法除了能接受在此处描述的参数外,还能够继续接受任意数量的参数。

4

本方法用于构造某个类型。

5

调用本方法无需实例,可直接使用类名进行调用。

6

本方法描述的是使用本类型作为左操作数的有效运算符。

7

这个值是由下列位标志构成位掩码的整数。

8

无返回值。