World3D
A resource that holds all components of a 3D world, such as a visual scenario and a physics space.
World3D.swift:11class World3D
Class that has everything pertaining to a world: A physics space, a visual scenario, and a sound space. 3D nodes register their resources into the current 3D world.
Superclasses
class Resource
Base class for serializable objects.
Citizens in SwiftGodot
Conformances
protocol CustomStringConvertible
A type with a customized textual representation.
protocol Equatable
A type that can be compared for value equality.
protocol Hashable
A type that can be hashed into a
Hasher
to produce an integer hash value.protocol Identifiable<ID>
A class of types whose instances hold the value of an entity with stable identity.
protocol VariantRepresentable
Types that conform to VariantRepresentable can be stored directly in
Variant
with no conversion. These include all of the Variant types from Godot (for exampleGString
,Rect
,Plane
), Godot objects (those that subclass SwiftGodot.Object) as well as the built-in Swift types UInt8, Int64 and Double.protocol VariantStorable
Types that conform to VariantStorable can be stored in a Variant and can be extracted back out of a Variant.
Type members
Instance members
var cameraAttributes: CameraAttributes?
The default
CameraAttributes
resource to use if none set on theCamera3D
.var directSpaceState: PhysicsDirectSpaceState3D?
Direct access to the world’s physics 3D space state. Used for querying current and potential collisions. When using multi-threaded physics, access is limited to
_physicsProcess(delta:)
in the main thread.var environment: Environment?
The World3D’s
Environment
.var fallbackEnvironment: Environment?
The World3D’s fallback environment will be used if
environment
fails or is missing.var scenario: RID
The World3D’s visual scenario.
var space: RID
The World3D’s physics space.