RemoteTransform2D
RemoteTransform2D pushes its own Transform2D
to another Node2D
derived node in the scene.
class RemoteTransform2D
RemoteTransform2D pushes its own Transform2D
to another Node2D
derived node (called the remote node) in the scene.
It can be set to update another node’s position, rotation and/or scale. It can use either global or local coordinates.
Superclasses
class Node2D
A 2D game object, inherited by all 2D-related nodes. Has a position, rotation, scale, and Z index.
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 remotePath: NodePath
The
NodePath
to the remote node, relative to the RemoteTransform2D’s position in the scene.var updatePosition: Bool
If
true
, the remote node’s position is updated.var updateRotation: Bool
If
true
, the remote node’s rotation is updated.var updateScale: Bool
If
true
, the remote node’s scale is updated.var useGlobalCoordinates: Bool
If
true
, global coordinates are used. Iffalse
, local coordinates are used.func forceUpdateCache(
) RemoteTransform2D
caches the remote node. It may not notice if the remote node disappears;forceUpdateCache
forces it to update the cache again.