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.

AnimatableBody3D

繼承: StaticBody3D < PhysicsBody3D < CollisionObject3D < Node3D < Node < Object

無法被外力移動的 3D 物理實體;手動移動時會影響途經的其他實體。

說明

可動畫的 3D 物理實體。雖無法因外力或碰撞而移動,但可透過程式碼、AnimationMixerAnimationMixer.callback_mode_process 設為 AnimationMixer.ANIMATION_CALLBACK_MODE_PROCESS_PHYSICS)、RemoteTransform3D 等方式手動移動。

AnimatableBody3D 被移動時,系統會估算其線速度與角速度,並用來影響行徑上的其他物理實體,因此特別適合做為移動平台、門等可動物件。

教學

屬性

bool

sync_to_physics

true


屬性說明

bool sync_to_physics = true 🔗

  • void set_sync_to_physics(value: bool)

  • bool is_sync_to_physics_enabled()

若為 true,此實體的移動將與物理幀同步。當你使用 AnimationPlayer 為移動平台等物件製作移動動畫時很有用。請勿PhysicsBody3D.move_and_collide() 函式同時使用。