Struct Area
General-purpose area node for detection and 3D physics influence.
struct Area
;
3D area that detects CollisionObject
nodes overlapping, entering, or exiting. Can also alter or override local physics parameters (gravity, damping).
Properties
Name | Type | Description |
---|---|---|
angularDamp [get, set]
|
double | The rate at which objects stop spinning in this area. Represents the angular velocity lost per second. Values range from 0 (no damping) to 1 (full damping).
|
audioBusName [get, set]
|
String | The name of the area's audio bus. |
audioBusOverride [get, set]
|
bool | If true , the area's audio bus overrides the default audio bus.
|
collisionLayer [get, set]
|
long | The area's physics layer(s). Collidable objects can exist in any of 32 different layers. A contact is detected if object A is in any of the layers that object B scans, or object B is in any layers that object A scans. See also collisionMask .
|
collisionMask [get, set]
|
long | The physics layers this area scans to determine collision detection. |
gravity [get, set]
|
double | The area's gravity intensity (ranges from -1024 to 1024). This value multiplies the gravity vector. This is useful to alter the force of gravity without altering its direction. |
gravityDistanceScale [get, set]
|
double | The falloff factor for point gravity. The greater the value, the faster gravity decreases with distance. |
gravityPoint [get, set]
|
bool | If true , gravity is calculated from a point (set via gravityVec ). See also spaceOverride .
|
gravityVec [get, set]
|
Vector3 | The area's gravity vector (not normalized). If gravity is a point (see gravityPoint ), this will be the point of attraction.
|
linearDamp [get, set]
|
double | The rate at which objects stop moving in this area. Represents the linear velocity lost per second. Values range from 0 (no damping) to 1 (full damping).
|
monitorable [get, set]
|
bool | If true , other monitoring areas can detect this area.
|
monitoring [get, set]
|
bool | If true , the area detects bodies or areas entering and exiting it.
|
priority [get, set]
|
double | The area's priority. Higher priority areas are processed first. |
reverbBusAmount [get, set]
|
double | The degree to which this area applies reverb to its associated audio. Ranges from 0 to 1 with 0.1 precision.
|
reverbBusEnable [get, set]
|
bool | If true , the area applies reverb to its associated audio.
|
reverbBusName [get, set]
|
String | The reverb bus name to use for this area's associated audio. |
reverbBusUniformity [get, set]
|
double | The degree to which this area's reverb is a uniform effect. Ranges from 0 to 1 with 0.1 precision.
|
spaceOverride [get, set]
|
Area | Override mode for gravity and damping calculations within this area. See spaceoverride for possible values.
|
Methods
Name | Description |
---|---|
_areaEnterTree
|
|
_areaExitTree
|
|
_areaInout
|
|
_bodyEnterTree
|
|
_bodyExitTree
|
|
_bodyInout
|
|
getAngularDamp
|
|
getAudioBus
|
|
getCollisionLayer
|
|
getCollisionLayerBit
|
Returns an individual bit on the layer mask. |
getCollisionMask
|
|
getCollisionMaskBit
|
Returns an individual bit on the collision mask. |
getGravity
|
|
getGravityDistanceScale
|
|
getGravityVector
|
|
getLinearDamp
|
|
getOverlappingAreas
|
Returns a list of intersecting Area s. For performance reasons (collisions are all processed at the same time) this list is modified once during the physics step, not immediately after objects are moved. Consider using signals instead.
|
getOverlappingBodies
|
Returns a list of intersecting PhysicsBody s. For performance reasons (collisions are all processed at the same time) this list is modified once during the physics step, not immediately after objects are moved. Consider using signals instead.
|
getPriority
|
|
getReverbAmount
|
|
getReverbBus
|
|
getReverbUniformity
|
|
getSpaceOverrideMode
|
|
isGravityAPoint
|
|
isMonitorable
|
|
isMonitoring
|
|
isOverridingAudioBus
|
|
isUsingReverbBus
|
|
overlapsArea
|
If true , the given area overlaps the Area.
Note: The result of this test is not immediate after moving objects. For performance, list of overlaps is updated once per frame and before the physics step. Consider using signals instead.
|
overlapsBody
|
If true , the given physics body overlaps the Area.
Note: The result of this test is not immediate after moving objects. For performance, list of overlaps is updated once per frame and before the physics step. Consider using signals instead.
The body argument can either be a PhysicsBody or a GridMap instance (while GridMaps are not physics body themselves, they register their tiles with collision shapes as a virtual physics body).
|
setAngularDamp
|
|
setAudioBus
|
|
setAudioBusOverride
|
|
setCollisionLayer
|
|
setCollisionLayerBit
|
Set/clear individual bits on the layer mask. This simplifies editing this Area 's layers.
|
setCollisionMask
|
|
setCollisionMaskBit
|
Set/clear individual bits on the collision mask. This simplifies editing which Area layers this Area scans.
|
setGravity
|
|
setGravityDistanceScale
|
|
setGravityIsPoint
|
|
setGravityVector
|
|
setLinearDamp
|
|
setMonitorable
|
|
setMonitoring
|
|
setPriority
|
|
setReverbAmount
|
|
setReverbBus
|
|
setReverbUniformity
|
|
setSpaceOverrideMode
|
|
setUseReverbBus
|
Enums
Name | Description |
---|---|
Constants
|
|
SpaceOverride
|