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...
World3D
繼承: Resource < RefCounted < Object
包含 3D 世界所有元件的資源,例如可視場景和物理空間。
說明
這個類包含所有與世界相關的內容:物理空間、可視場景和音訊空間。3D 節點會將它們的資源註冊到目前的 3D 世界中。
教學
屬性
屬性說明
CameraAttributes camera_attributes 🔗
void set_camera_attributes(value: CameraAttributes)
CameraAttributes get_camera_attributes()
Camera3D 上未設定時 CameraAttributes 時預設使用的資源。
PhysicsDirectSpaceState3D direct_space_state 🔗
PhysicsDirectSpaceState3D get_direct_space_state()
直接存取該世界的物理 3D 空間狀態。可用於查詢目前和可能的碰撞。在多執行緒物理中使用時,僅可在主執行緒的 Node._physics_process() 中存取。
Environment environment 🔗
void set_environment(value: Environment)
Environment get_environment()
該 World3D 的 Environment。
Environment fallback_environment 🔗
void set_fallback_environment(value: Environment)
Environment get_fallback_environment()
在 environment 失敗或丟失時,World3D 所使用的退回環境。
RID get_navigation_map()
這個世界的導覽地圖的 RID。由 NavigationServer3D 使用。
RID get_scenario()
該 World3D 的可視場景。
RID get_space()
該 World3D 的物理空間。