Signal5
Signal support.
Area3D.swift:1818class Signal5
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 (45) members.
Types
class Signal1
Signal support.
class Signal2
Signal support.
class Signal3
Signal support.
class Signal4
Signal support.
class Signal6
Signal support.
class Signal7
Signal support.
class Signal8
Signal support.
enum SpaceOverride
Type members
Instance members
var angularDamp: Double
The rate at which objects stop spinning in this area. Represents the angular velocity lost per second.
var angularDampSpaceOverride: Area3D.SpaceOverride
Override mode for angular damping calculations within this area. See
SpaceOverride
for possible values.var areaEntered: Signal7
Emitted when the received
area
enters this area. Requiresmonitoring
to be set totrue
.var areaExited: Signal8
Emitted when the received
area
exits this area. Requiresmonitoring
to be set totrue
.var areaShapeEntered: Signal5
Emitted when a
Shape3D
of the receivedarea
enters a shape of this area. Requiresmonitoring
to be set totrue
.var areaShapeExited: Signal6
Emitted when a
Shape3D
of the receivedarea
exits a shape of this area. Requiresmonitoring
to be set totrue
.var audioBusName: StringName
The name of the area’s audio bus.
var audioBusOverride: Bool
If
true
, the area’s audio bus overrides the default audio bus.var bodyEntered: Signal3
Emitted when the received
body
enters this area.body
can be aPhysicsBody3D
or aGridMap
.GridMap
s are detected if theirMeshLibrary
has collision shapes configured. Requiresmonitoring
to be set totrue
.var bodyExited: Signal4
Emitted when the received
body
exits this area.body
can be aPhysicsBody3D
or aGridMap
.GridMap
s are detected if theirMeshLibrary
has collision shapes configured. Requiresmonitoring
to be set totrue
.var bodyShapeEntered: Signal1
Emitted when a
Shape3D
of the receivedbody
enters a shape of this area.body
can be aPhysicsBody3D
or aGridMap
.GridMap
s are detected if theirMeshLibrary
has collision shapes configured. Requiresmonitoring
to be set totrue
.var bodyShapeExited: Signal2
Emitted when a
Shape3D
of the receivedbody
exits a shape of this area.body
can be aPhysicsBody3D
or aGridMap
.GridMap
s are detected if theirMeshLibrary
has collision shapes configured. Requiresmonitoring
to be set totrue
.var gravity: Double
The area’s gravity intensity (in meters per second squared). This value multiplies the gravity direction. This is useful to alter the force of gravity without altering its direction.
var gravityDirection: Vector3
The area’s gravity vector (not normalized).
var gravityPoint: Bool
If
true
, gravity is calculated from a point (set viagravityPointCenter
). See alsogravitySpaceOverride
.var gravityPointCenter: Vector3
If gravity is a point (see
gravityPoint
), this will be the point of attraction.var gravityPointUnitDistance: Double
The distance at which the gravity strength is equal to
gravity
. For example, on a planet 100 meters in radius with a surface gravity of 4.0 m/s², set thegravity
to 4.0 and the unit distance to 100.0. The gravity will have falloff according to the inverse square law, so in the example, at 200 meters from the center the gravity will be 1.0 m/s² (twice the distance, 1/4th the gravity), at 50 meters it will be 16.0 m/s² (half the distance, 4x the gravity), and so on.var gravitySpaceOverride: Area3D.SpaceOverride
Override mode for gravity calculations within this area. See
SpaceOverride
for possible values.var linearDamp: Double
The rate at which objects stop moving in this area. Represents the linear velocity lost per second.
var linearDampSpaceOverride: Area3D.SpaceOverride
Override mode for linear damping calculations within this area. See
SpaceOverride
for possible values.var monitorable: Bool
If
true
, other monitoring areas can detect this area.var monitoring: Bool
If
true
, the area detects bodies or areas entering and exiting it.var priority: Int32
The area’s priority. Higher priority areas are processed first. The
World3D
’s physics is always processed last, after all areas.var reverbBusAmount: Double
The degree to which this area applies reverb to its associated audio. Ranges from
0
to1
with0.1
precision.var reverbBusEnabled: Bool
If
true
, the area applies reverb to its associated audio.var reverbBusName: StringName
The name of the reverb bus to use for this area’s associated audio.
var reverbBusUniformity: Double
The degree to which this area’s reverb is a uniform effect. Ranges from
0
to1
with0.1
precision.var windAttenuationFactor: Double
The exponential rate at which wind force decreases with distance from its origin.
var windForceMagnitude: Double
The magnitude of area-specific wind force.
var windSourcePath: NodePath
The
Node3D
which is used to specify the direction and origin of an area-specific wind force. The direction is opposite to the z-axis of theNode3D
’s local transform, and its origin is the origin of theNode3D
’s local transform.func getOverlappingAreas(
) -> ObjectCollection<Area3D> Returns a list of intersecting
Area3D
s. The overlapping area’scollisionLayer
must be part of this area’scollisionMask
in order to be detected.func getOverlappingBodies(
) -> ObjectCollection<Node3D> Returns a list of intersecting
PhysicsBody3D
s andGridMap
s. The overlapping body’scollisionLayer
must be part of this area’scollisionMask
in order to be detected.func hasOverlappingAreas(
) -> Bool Returns
true
if intersecting anyArea3D
s, otherwise returnsfalse
. The overlapping area’scollisionLayer
must be part of this area’scollisionMask
in order to be detected.func hasOverlappingBodies(
) -> Bool Returns
true
if intersecting anyPhysicsBody3D
s orGridMap
s, otherwise returnsfalse
. The overlapping body’scollisionLayer
must be part of this area’scollisionMask
in order to be detected.func overlapsArea(Node?
) -> Bool Returns
true
if the givenArea3D
intersects or overlaps thisArea3D
,false
otherwise.func overlapsBody(Node?
) -> Bool Returns
true
if the given physics body intersects or overlaps thisArea3D
,false
otherwise.
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 (_ areaRid: RID, _ area: Area3D, _ areaShapeIndex: Int64, _ localShapeIndex: Int64) -> ()
) -> 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:_:)