Signal3
Signal support.
XRController3D.swift:333class Signal3
Use the connect(flags:_:)
method to connect to the signal on the container object, and disconnect(_:)
to drop the connection.
You can also await the emitted
property for waiting for a single emission of the signal.
Other members in extension
View members
Hide members
This section is hidden by default because it contains too many (15) members.
Types
class Signal1
Signal support.
class Signal2
Signal support.
class Signal4
Signal support.
class Signal5
Signal support.
Type members
Instance members
var inputFloatChanged: Signal3
Emitted when a trigger or similar input on this controller changes value.
var inputVector2Changed: Signal4
Emitted when a thumbstick or thumbpad on this controller is moved.
var profileChanged: Signal5
Emitted when the interaction profile on this controller is changed.
func getFloat(name: StringName
) -> Double Returns a numeric value for the input with the given
name
. This is used for triggers and grip sensors.func getInput(name: StringName
) -> Variant Returns a
Variant
for the input with the givenname
. This works for any input type, the variant will be typed according to the actions configuration.func getTrackerHand(
) -> XRPositionalTracker.TrackerHand Returns the hand holding this controller, if known. See
XRPositionalTracker.TrackerHand
.func getVector2(name: StringName
) -> Vector2 Returns a
Vector2
for the input with the givenname
. This is used for thumbsticks and thumbpads found on many controllers.func isButtonPressed(name: StringName
) -> Bool Returns
true
if the button with the givenname
is pressed.
Citizens in SwiftGodot
Instance members
var emitted: Void
You can await this property to wait for the signal to be emitted once
func connect(flags: Object.ConnectFlags, @escaping (_ name: String, _ value: Double) -> ()
) -> Object Connects the signal to the specified callback
func disconnect(Object
) Disconnects a signal that was previously connected, the return value from calling
connect(flags:_:)