reckfellENGINE

Area3D

A region of 3D space that detects other CollisionObject3Ds entering or exiting it.

On this page
class Area3DReckfellSharpInherits CollisionObject3D

A region of 3D space that detects other CollisionObject3Ds entering or exiting it.

Area3D is a region of 3D space defined by one or multiple CollisionShape3D or CollisionPolygon3D child nodes. It detects when other CollisionObject3Ds enter or exit it, and it also keeps track of which collision objects haven't exited it yet (i.e. which one are overlapping it). This node can also locally alter or override physics parameters (gravity, damping) and route audio to custom audio buses. Note: Areas and bodies created with PhysicsServer3D might not interact as expected with Area3Ds, and might not emit signals or track objects correctly. Warning: Using a ConcavePolygonShape3D inside a CollisionShape3D child of this node (created e.g. by using the Create Trimesh Collision Sibling option in the Mesh menu that appears when selecting a MeshInstance3D node) may give unexpected results, since this collision shape is hollow. If this is not desired, it has to be split into multiple ConvexPolygonShape3Ds or primitive shapes like BoxShape3D, or in some cases it may be replaceable by a CollisionPolygon3D.

Declarations checked against C# SDK 1.0.0. Expand a name to see declarations and documentation.

Constructors1

Area3DConstructor
# Area3D
C#
public Area3D();

Properties22

AngularDampProperty
# AngularDamp
C#
public float AngularDamp { get; set; }

The rate at which objects stop spinning in this area. Represents the angular velocity lost per second. See ProjectSettings.physics/3d/default_angular_damp for more details about damping.

AngularDampSpaceOverrideProperty
# AngularDampSpaceOverride
C#
public Area3D.SpaceOverride AngularDampSpaceOverride { get; set; }

Override mode for angular damping calculations within this area.

AudioBusNameProperty
# AudioBusName
C#
public StringName AudioBusName { get; set; }

The name of the area's audio bus.

AudioBusOverrideProperty
# AudioBusOverride
C#
public bool AudioBusOverride { get; set; }

If true, the area's audio bus overrides the default audio bus.

GravityProperty
# Gravity
C#
public float Gravity { get; set; }

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.

GravityDirectionProperty
# GravityDirection
C#
public Vector3 GravityDirection { get; set; }

The area's gravity vector (not normalized).

GravityPointProperty
# GravityPoint
C#
public bool GravityPoint { get; set; }

If true, gravity is calculated from a point (set via Area3D.GravityPointCenter). See also Area3D.GravitySpaceOverride.

GravityPointCenterProperty
# GravityPointCenter
C#
public Vector3 GravityPointCenter { get; set; }

If gravity is a point (see Area3D.GravityPoint), this will be the point of attraction.

GravityPointUnitDistanceProperty
# GravityPointUnitDistance
C#
public float GravityPointUnitDistance { get; set; }

The distance at which the gravity strength is equal to Area3D.Gravity. For example, on a planet 100 meters in radius with a surface gravity of 4.0 m/s², set the Area3D.Gravity 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, 4× the gravity), and so on. The above is true only when the unit distance is a positive number. When this is set to 0.0, the gravity will be constant regardless of distance.

GravitySpaceOverrideProperty
# GravitySpaceOverride
C#
public Area3D.SpaceOverride GravitySpaceOverride { get; set; }

Override mode for gravity calculations within this area.

LinearDampProperty
# LinearDamp
C#
public float LinearDamp { get; set; }

The rate at which objects stop moving in this area. Represents the linear velocity lost per second. See ProjectSettings.physics/3d/default_linear_damp for more details about damping.

LinearDampSpaceOverrideProperty
# LinearDampSpaceOverride
C#
public Area3D.SpaceOverride LinearDampSpaceOverride { get; set; }

Override mode for linear damping calculations within this area.

MonitorableProperty
# Monitorable
C#
public bool Monitorable { get; set; }

If true, other monitoring areas can detect this area.

MonitoringProperty
# Monitoring
C#
public bool Monitoring { get; set; }

If true, the area detects bodies or areas entering and exiting it.

PriorityProperty
# Priority
C#
public int Priority { get; set; }

The area's priority. Higher priority areas are processed first. The World3D's physics is always processed last, after all areas.

ReverbBusAmountProperty
# ReverbBusAmount
C#
public float ReverbBusAmount { get; set; }

The degree to which this area applies reverb to its associated audio. Ranges from 0 to 1 with 0.1 precision.

ReverbBusEnabledProperty
# ReverbBusEnabled
C#
public bool ReverbBusEnabled { get; set; }

If true, the area applies reverb to its associated audio.

ReverbBusNameProperty
# ReverbBusName
C#
public StringName ReverbBusName { get; set; }

The name of the reverb bus to use for this area's associated audio.

ReverbBusUniformityProperty
# ReverbBusUniformity
C#
public float ReverbBusUniformity { get; set; }

The degree to which this area's reverb is a uniform effect. Ranges from 0 to 1 with 0.1 precision.

WindAttenuationFactorProperty
# WindAttenuationFactor
C#
public float WindAttenuationFactor { get; set; }

The exponential rate at which wind force decreases with distance from its origin. Note: This wind force only applies to SoftBody3D nodes. Other physics bodies are currently not affected by wind.

WindForceMagnitudeProperty
# WindForceMagnitude
C#
public float WindForceMagnitude { get; set; }

The magnitude of area-specific wind force. Note: This wind force only applies to SoftBody3D nodes. Other physics bodies are currently not affected by wind.

WindSourcePathProperty
# WindSourcePath
C#
public EntityPath WindSourcePath { get; set; }

The Entity3D which is used to specify the direction and origin of an area-specific wind force. The direction is opposite to the z-axis of the Entity3D's local transform, and its origin is the origin of the Entity3D's local transform. Note: This wind force only applies to SoftBody3D nodes. Other physics bodies are currently not affected by wind.

Methods50

GetAngularDampfloat
# GetAngularDamp
C#
public float GetAngularDamp();
Returns float
GetAngularDampSpaceOverrideModeArea3D.SpaceOverride
# GetAngularDampSpaceOverrideMode
C#
public Area3D.SpaceOverride GetAngularDampSpaceOverrideMode();
Returns Area3D.SpaceOverride
GetAudioBusNameStringName
# GetAudioBusName
C#
public StringName GetAudioBusName();
Returns StringName
GetGravityfloat
# GetGravity
C#
public float GetGravity();
Returns float
GetGravityDirectionVector3
# GetGravityDirection
C#
public Vector3 GetGravityDirection();
Returns Vector3
GetGravityPointCenterVector3
# GetGravityPointCenter
C#
public Vector3 GetGravityPointCenter();
Returns Vector3
GetGravityPointUnitDistancefloat
# GetGravityPointUnitDistance
C#
public float GetGravityPointUnitDistance();
Returns float
GetGravitySpaceOverrideModeArea3D.SpaceOverride
# GetGravitySpaceOverrideMode
C#
public Area3D.SpaceOverride GetGravitySpaceOverrideMode();
Returns Area3D.SpaceOverride
GetLinearDampfloat
# GetLinearDamp
C#
public float GetLinearDamp();
Returns float
GetLinearDampSpaceOverrideModeArea3D.SpaceOverride
# GetLinearDampSpaceOverrideMode
C#
public Area3D.SpaceOverride GetLinearDampSpaceOverrideMode();
Returns Area3D.SpaceOverride
GetOverlappingAreasReckfell.Collections.Array<Area3D>
# GetOverlappingAreas
C#
public Reckfell.Collections.Array<Area3D> GetOverlappingAreas();

Returns a list of intersecting Area3Ds. The overlapping area's CollisionObject3D.CollisionLayer must be part of this area's CollisionObject3D.CollisionMask in order to be detected. 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.

Returns Reckfell.Collections.Array<Area3D>
GetOverlappingBodiesReckfell.Collections.Array<Entity3D>
# GetOverlappingBodies
C#
public Reckfell.Collections.Array<Entity3D> GetOverlappingBodies();

Returns detected collision objects as Entity3D; test the required gameplay type with is. The object layer must match the area mask and monitoring must be enabled. The list updates on physics steps, not immediately after creation or movement. When a response depends on changing state during an existing overlap, polling the list can remain necessary after the initial BodyEntered().

Returns Reckfell.Collections.Array<Entity3D>
GetPriorityint
# GetPriority
C#
public int GetPriority();
Returns int
GetReverbAmountfloat
# GetReverbAmount
C#
public float GetReverbAmount();
Returns float
GetReverbBusNameStringName
# GetReverbBusName
C#
public StringName GetReverbBusName();
Returns StringName
GetReverbUniformityfloat
# GetReverbUniformity
C#
public float GetReverbUniformity();
Returns float
GetWindAttenuationFactorfloat
# GetWindAttenuationFactor
C#
public float GetWindAttenuationFactor();
Returns float
GetWindForceMagnitudefloat
# GetWindForceMagnitude
C#
public float GetWindForceMagnitude();
Returns float
GetWindSourcePathEntityPath
# GetWindSourcePath
C#
public EntityPath GetWindSourcePath();
Returns EntityPath
HasOverlappingAreasbool
# HasOverlappingAreas
C#
public bool HasOverlappingAreas();

Returns true if intersecting any Area3Ds, otherwise returns false. The overlapping area's CollisionObject3D.CollisionLayer must be part of this area's CollisionObject3D.CollisionMask in order to be detected. For performance reasons (collisions are all processed at the same time) the list of overlapping areas is modified once during the physics step, not immediately after objects are moved. Consider using signals instead.

Returns bool
HasOverlappingBodiesbool
# HasOverlappingBodies
C#
public bool HasOverlappingBodies();

Returns true if intersecting any PhysicsBody3Ds, SoftBody3Ds, or GridMaps, otherwise returns false. The overlapping body's CollisionObject3D.CollisionLayer must be part of this area's CollisionObject3D.CollisionMask in order to be detected. For performance reasons (collisions are all processed at the same time) the list of overlapping bodies is modified once during the physics step, not immediately after objects are moved. Consider using signals instead. Note: Reckfell Physics does not support reporting overlaps with SoftBody3D, so will not consider such bodies.

Returns bool
IsGravityAPointbool
# IsGravityAPoint
C#
public bool IsGravityAPoint();
Returns bool
IsMonitorablebool
# IsMonitorable
C#
public bool IsMonitorable();
Returns bool
IsMonitoringbool
# IsMonitoring
C#
public bool IsMonitoring();
Returns bool
IsOverridingAudioBusbool
# IsOverridingAudioBus
C#
public bool IsOverridingAudioBus();
Returns bool
IsUsingReverbBusbool
# IsUsingReverbBus
C#
public bool IsUsingReverbBus();
Returns bool
OverlapsAreabool
# OverlapsArea
C#
public bool OverlapsArea(Entity area);

Returns true if the given Area3D intersects or overlaps this Area3D, false otherwise. 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.

Parameters
NameTypeDefault
areaEntity—
Returns bool
OverlapsBodybool
# OverlapsBody
C#
public bool OverlapsBody(Entity body);

Returns true if the given physics body intersects or overlaps this Area3D, false otherwise. body argument can either be a PhysicsBody3D, SoftBody3D, or a GridMap instance. While GridMaps are not physics body themselves, they register their tiles with collision shapes as a virtual physics body. 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. Note: Reckfell Physics does not support reporting overlaps with SoftBody3D, so will return false in such cases.

Parameters
NameTypeDefault
bodyEntity—
Returns bool
SetAngularDampvoid
# SetAngularDamp
C#
public void SetAngularDamp(float angularDamp);
Parameters
NameTypeDefault
angularDampfloat—
SetAngularDampSpaceOverrideModevoid
# SetAngularDampSpaceOverrideMode
C#
public void SetAngularDampSpaceOverrideMode(Area3D.SpaceOverride spaceOverrideMode);
Parameters
NameTypeDefault
spaceOverrideModeArea3D.SpaceOverride—
SetAudioBusNamevoid
# SetAudioBusName
C#
public void SetAudioBusName(StringName name);
Parameters
NameTypeDefault
nameStringName—
SetAudioBusOverridevoid
# SetAudioBusOverride
C#
public void SetAudioBusOverride(bool enable);
Parameters
NameTypeDefault
enablebool—
SetGravityvoid
# SetGravity
C#
public void SetGravity(float gravity);
Parameters
NameTypeDefault
gravityfloat—
SetGravityDirectionvoid
# SetGravityDirection
C#
public void SetGravityDirection(Vector3 direction);
Parameters
NameTypeDefault
directionVector3—
SetGravityIsPointvoid
# SetGravityIsPoint
C#
public void SetGravityIsPoint(bool enable);
Parameters
NameTypeDefault
enablebool—
SetGravityPointCentervoid
# SetGravityPointCenter
C#
public void SetGravityPointCenter(Vector3 center);
Parameters
NameTypeDefault
centerVector3—
SetGravityPointUnitDistancevoid
# SetGravityPointUnitDistance
C#
public void SetGravityPointUnitDistance(float distanceScale);
Parameters
NameTypeDefault
distanceScalefloat—
SetGravitySpaceOverrideModevoid
# SetGravitySpaceOverrideMode
C#
public void SetGravitySpaceOverrideMode(Area3D.SpaceOverride spaceOverrideMode);
Parameters
NameTypeDefault
spaceOverrideModeArea3D.SpaceOverride—
SetLinearDampvoid
# SetLinearDamp
C#
public void SetLinearDamp(float linearDamp);
Parameters
NameTypeDefault
linearDampfloat—
SetLinearDampSpaceOverrideModevoid
# SetLinearDampSpaceOverrideMode
C#
public void SetLinearDampSpaceOverrideMode(Area3D.SpaceOverride spaceOverrideMode);
Parameters
NameTypeDefault
spaceOverrideModeArea3D.SpaceOverride—
SetMonitorablevoid
# SetMonitorable
C#
public void SetMonitorable(bool enable);
Parameters
NameTypeDefault
enablebool—
SetMonitoringvoid
# SetMonitoring
C#
public void SetMonitoring(bool enable);
Parameters
NameTypeDefault
enablebool—
SetPriorityvoid
# SetPriority
C#
public void SetPriority(int priority);
Parameters
NameTypeDefault
priorityint—
SetReverbAmountvoid
# SetReverbAmount
C#
public void SetReverbAmount(float amount);
Parameters
NameTypeDefault
amountfloat—
SetReverbBusNamevoid
# SetReverbBusName
C#
public void SetReverbBusName(StringName name);
Parameters
NameTypeDefault
nameStringName—
SetReverbUniformityvoid
# SetReverbUniformity
C#
public void SetReverbUniformity(float amount);
Parameters
NameTypeDefault
amountfloat—
SetUseReverbBusvoid
# SetUseReverbBus
C#
public void SetUseReverbBus(bool enable);
Parameters
NameTypeDefault
enablebool—
SetWindAttenuationFactorvoid
# SetWindAttenuationFactor
C#
public void SetWindAttenuationFactor(float windAttenuationFactor);
Parameters
NameTypeDefault
windAttenuationFactorfloat—
SetWindForceMagnitudevoid
# SetWindForceMagnitude
C#
public void SetWindForceMagnitude(float windForceMagnitude);
Parameters
NameTypeDefault
windForceMagnitudefloat—
SetWindSourcePathvoid
# SetWindSourcePath
C#
public void SetWindSourcePath(EntityPath windSourcePath);
Parameters
NameTypeDefault
windSourcePathEntityPath—

Signals and events8

AreaEnteredEvent
# AreaEntered
C#
public event Area3D.AreaEnteredEventHandler AreaEntered;

Emitted when the received area enters this area. Requires Area3D.Monitoring to be set to true.

Handler parameters
NameTypeDefault
areaArea3D—
AreaExitedEvent
# AreaExited
C#
public event Area3D.AreaExitedEventHandler AreaExited;

Emitted when the received area exits this area. Requires Area3D.Monitoring to be set to true.

Handler parameters
NameTypeDefault
areaArea3D—
AreaShapeEnteredEvent
# AreaShapeEntered
C#
public event Area3D.AreaShapeEnteredEventHandler AreaShapeEntered;

Emitted when a Shape3D of the received area enters a shape of this area. Requires Area3D.Monitoring to be set to true. local_shape_index and area_shape_index contain indices of the interacting shapes from this area and the other area, respectively. area_rid contains the Rid of the other area. These values can be used with the PhysicsServer3D. Example: Get the CollisionShape3D node from the shape index:

Handler parameters
NameTypeDefault
areaRidRid—
areaArea3D—
areaShapeIndexlong—
localShapeIndexlong—
AreaShapeExitedEvent
# AreaShapeExited
C#
public event Area3D.AreaShapeExitedEventHandler AreaShapeExited;

Emitted when a Shape3D of the received area exits a shape of this area. Requires Area3D.Monitoring to be set to true. See also Area3D.AreaShapeEntered.

Handler parameters
NameTypeDefault
areaRidRid—
areaArea3D—
areaShapeIndexlong—
localShapeIndexlong—
BodyEnteredEvent
# BodyEntered
C#
public event Area3D.BodyEnteredEventHandler BodyEntered;

Emitted when the received body enters this area. body can be a PhysicsBody3D, SoftBody3D or GridMap. GridMaps are detected if their MeshLibrary has collision shapes configured. Requires Area3D.Monitoring to be set to true. Note: Reckfell Physics does not support reporting overlaps with SoftBody3D, so will not emit this signal in such cases.

Handler parameters
NameTypeDefault
bodyEntity3D—
BodyExitedEvent
# BodyExited
C#
public event Area3D.BodyExitedEventHandler BodyExited;

Emitted when the received body exits this area. body can be a PhysicsBody3D, SoftBody3D or GridMap. GridMaps are detected if their MeshLibrary has collision shapes configured. Requires Area3D.Monitoring to be set to true. Note: Reckfell Physics does not support reporting overlaps with SoftBody3D, so will not emit this signal in such cases.

Handler parameters
NameTypeDefault
bodyEntity3D—
BodyShapeEnteredEvent
# BodyShapeEntered
C#
public event Area3D.BodyShapeEnteredEventHandler BodyShapeEntered;

Emitted when a Shape3D of the received body enters a shape of this area. body can be a PhysicsBody3D, SoftBody3D or GridMap. GridMaps are detected if their MeshLibrary has collision shapes configured. Requires Area3D.Monitoring to be set to true. local_shape_index and body_shape_index contain indices of the interacting shapes from this area and the interacting body, respectively. body_rid contains the Rid of the body. These values can be used with the PhysicsServer3D. Note: Reckfell Physics does not support reporting overlaps with SoftBody3D, so will not emit this signal in such cases. Example: Get the CollisionShape3D node from the shape index:

Handler parameters
NameTypeDefault
bodyRidRid—
bodyEntity3D—
bodyShapeIndexlong—
localShapeIndexlong—
BodyShapeExitedEvent
# BodyShapeExited
C#
public event Area3D.BodyShapeExitedEventHandler BodyShapeExited;

Emitted when a Shape3D of the received body exits a shape of this area. body can be a PhysicsBody3D, SoftBody3D or GridMap. GridMaps are detected if their MeshLibrary has collision shapes configured. Requires Area3D.Monitoring to be set to true. See also Area3D.BodyShapeEntered. Note: Reckfell Physics does not support reporting overlaps with SoftBody3D, so will not emit this signal in such cases.

Handler parameters
NameTypeDefault
bodyRidRid—
bodyEntity3D—
bodyShapeIndexlong—
localShapeIndexlong—

Area3D.SpaceOverride

ValueDescription
Combine = 1

This area adds its gravity/damping values to whatever has been calculated so far (in Area3D.Priority order).

CombineReplace = 2

This area adds its gravity/damping values to whatever has been calculated so far (in Area3D.Priority order), ignoring any lower priority areas.

Disabled = 0

This area does not affect gravity/damping.

Replace = 3

This area replaces any gravity/damping, even the defaults, ignoring any lower priority areas.

ReplaceCombine = 4

This area replaces any gravity/damping calculated so far (in Area3D.Priority order), but keeps calculating the rest of the areas.

Reckfell Engine documentationBack to top ↑
QUICK LINKSGetting startedEntity hierarchyC# & .NET 10Scenes and prefabs
Reckfell guides and full API K
reckfellENGINE
RECKFELL ACCOUNT

Sign in

Sign in to your Reckfell account.

One account for the entire Reckfell platform.