Documentation ¶
Overview ¶
Package Area3D provides methods for working with Area3D object instances.
Index ¶
- type Advanced
- type Any
- type Instance
- func (self Instance) AngularDamp() Float.X
- func (self Instance) AngularDampSpaceOverride() gdclass.Area3DSpaceOverride
- func (self Instance) AsArea3D() Instance
- func (self Instance) AsCollisionObject3D() CollisionObject3D.Instance
- func (self Instance) AsNode() Node.Instance
- func (self Instance) AsNode3D() Node3D.Instance
- func (self Instance) AsObject() [1]gd.Object
- func (self Instance) AudioBusName() string
- func (self Instance) AudioBusOverride() bool
- func (self Instance) GetOverlappingAreas() [][1]gdclass.Area3D
- func (self Instance) GetOverlappingBodies() [][1]gdclass.Node3D
- func (self Instance) Gravity() Float.X
- func (self Instance) GravityDirection() Vector3.XYZ
- func (self Instance) GravityPoint() bool
- func (self Instance) GravityPointCenter() Vector3.XYZ
- func (self Instance) GravityPointUnitDistance() Float.X
- func (self Instance) GravitySpaceOverride() gdclass.Area3DSpaceOverride
- func (self Instance) HasOverlappingAreas() bool
- func (self Instance) HasOverlappingBodies() bool
- func (self Instance) LinearDamp() Float.X
- func (self Instance) LinearDampSpaceOverride() gdclass.Area3DSpaceOverride
- func (self Instance) Monitorable() bool
- func (self Instance) Monitoring() bool
- func (self Instance) OnAreaEntered(cb func(area [1]gdclass.Area3D))
- func (self Instance) OnAreaExited(cb func(area [1]gdclass.Area3D))
- func (self Instance) OnAreaShapeEntered(cb func(area_rid RID.Any, area [1]gdclass.Area3D, area_shape_index int, ...))
- func (self Instance) OnAreaShapeExited(cb func(area_rid RID.Any, area [1]gdclass.Area3D, area_shape_index int, ...))
- func (self Instance) OnBodyEntered(cb func(body [1]gdclass.Node3D))
- func (self Instance) OnBodyExited(cb func(body [1]gdclass.Node3D))
- func (self Instance) OnBodyShapeEntered(cb func(body_rid RID.Any, body [1]gdclass.Node3D, body_shape_index int, ...))
- func (self Instance) OnBodyShapeExited(cb func(body_rid RID.Any, body [1]gdclass.Node3D, body_shape_index int, ...))
- func (self Instance) OverlapsArea(area [1]gdclass.Node) bool
- func (self Instance) OverlapsBody(body [1]gdclass.Node) bool
- func (self Instance) Priority() int
- func (self Instance) ReverbBusAmount() Float.X
- func (self Instance) ReverbBusEnabled() bool
- func (self Instance) ReverbBusName() string
- func (self Instance) ReverbBusUniformity() Float.X
- func (self Instance) SetAngularDamp(value Float.X)
- func (self Instance) SetAngularDampSpaceOverride(value gdclass.Area3DSpaceOverride)
- func (self Instance) SetAudioBusName(value string)
- func (self Instance) SetAudioBusOverride(value bool)
- func (self Instance) SetGravity(value Float.X)
- func (self Instance) SetGravityDirection(value Vector3.XYZ)
- func (self Instance) SetGravityPoint(value bool)
- func (self Instance) SetGravityPointCenter(value Vector3.XYZ)
- func (self Instance) SetGravityPointUnitDistance(value Float.X)
- func (self Instance) SetGravitySpaceOverride(value gdclass.Area3DSpaceOverride)
- func (self Instance) SetLinearDamp(value Float.X)
- func (self Instance) SetLinearDampSpaceOverride(value gdclass.Area3DSpaceOverride)
- func (self Instance) SetMonitorable(value bool)
- func (self Instance) SetMonitoring(value bool)
- func (self Instance) SetPriority(value int)
- func (self Instance) SetReverbBusAmount(value Float.X)
- func (self Instance) SetReverbBusEnabled(value bool)
- func (self Instance) SetReverbBusName(value string)
- func (self Instance) SetReverbBusUniformity(value Float.X)
- func (self Instance) SetWindAttenuationFactor(value Float.X)
- func (self Instance) SetWindForceMagnitude(value Float.X)
- func (self Instance) SetWindSourcePath(value string)
- func (self *Instance) UnsafePointer() unsafe.Pointer
- func (self Instance) Virtual(name string) reflect.Value
- func (self Instance) WindAttenuationFactor() Float.X
- func (self Instance) WindForceMagnitude() Float.X
- func (self Instance) WindSourcePath() string
- type SpaceOverride
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Advanced ¶
type Advanced = class
Advanced exposes a 1:1 low-level instance of the class, undocumented, for those who know what they are doing.
type Instance ¶
[Area3D] is a region of 3D space defined by one or multiple [CollisionShape3D] or [CollisionPolygon3D] child nodes. It detects when other [CollisionObject3D]s 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. [b]Note:[/b] Areas and bodies created with [PhysicsServer3D] might not interact as expected with [Area3D]s, and might not emit signals or track objects correctly. [b]Warning:[/b] Using a [ConcavePolygonShape3D] inside a [CollisionShape3D] child of this node (created e.g. by using the [b]Create Trimesh Collision Sibling[/b] option in the [b]Mesh[/b] 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 [ConvexPolygonShape3D]s or primitive shapes like [BoxShape3D], or in some cases it may be replaceable by a [CollisionPolygon3D].
var Nil Instance
Nil is a nil/null instance of the class. Equivalent to the zero value.
func (Instance) AngularDamp ¶
func (Instance) AngularDampSpaceOverride ¶
func (self Instance) AngularDampSpaceOverride() gdclass.Area3DSpaceOverride
func (Instance) AsCollisionObject3D ¶
func (self Instance) AsCollisionObject3D() CollisionObject3D.Instance
func (Instance) AudioBusName ¶
func (Instance) AudioBusOverride ¶
func (Instance) GetOverlappingAreas ¶
Returns a list of intersecting [Area3D]s. The overlapping area's [member CollisionObject3D.collision_layer] must be part of this area's [member CollisionObject3D.collision_mask] 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.
func (Instance) GetOverlappingBodies ¶
Returns a list of intersecting [PhysicsBody3D]s and [GridMap]s. The overlapping body's [member CollisionObject3D.collision_layer] must be part of this area's [member CollisionObject3D.collision_mask] 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.
func (Instance) GravityDirection ¶
func (Instance) GravityPoint ¶
func (Instance) GravityPointCenter ¶
func (Instance) GravityPointUnitDistance ¶
func (Instance) GravitySpaceOverride ¶
func (self Instance) GravitySpaceOverride() gdclass.Area3DSpaceOverride
func (Instance) HasOverlappingAreas ¶
Returns [code]true[/code] if intersecting any [Area3D]s, otherwise returns [code]false[/code]. The overlapping area's [member CollisionObject3D.collision_layer] must be part of this area's [member CollisionObject3D.collision_mask] 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.
func (Instance) HasOverlappingBodies ¶
Returns [code]true[/code] if intersecting any [PhysicsBody3D]s or [GridMap]s, otherwise returns [code]false[/code]. The overlapping body's [member CollisionObject3D.collision_layer] must be part of this area's [member CollisionObject3D.collision_mask] 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.
func (Instance) LinearDamp ¶
func (Instance) LinearDampSpaceOverride ¶
func (self Instance) LinearDampSpaceOverride() gdclass.Area3DSpaceOverride
func (Instance) Monitorable ¶
func (Instance) Monitoring ¶
func (Instance) OnAreaEntered ¶
func (Instance) OnAreaExited ¶
func (Instance) OnAreaShapeEntered ¶
func (Instance) OnAreaShapeExited ¶
func (Instance) OnBodyEntered ¶
func (Instance) OnBodyExited ¶
func (Instance) OnBodyShapeEntered ¶
func (Instance) OnBodyShapeExited ¶
func (Instance) OverlapsArea ¶
Returns [code]true[/code] if the given [Area3D] intersects or overlaps this [Area3D], [code]false[/code] otherwise. [b]Note:[/b] 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.
func (Instance) OverlapsBody ¶
Returns [code]true[/code] if the given physics body intersects or overlaps this [Area3D], [code]false[/code] otherwise. [b]Note:[/b] 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 [param body] argument can either be a [PhysicsBody3D] or a [GridMap] instance. While GridMaps are not physics body themselves, they register their tiles with collision shapes as a virtual physics body.
func (Instance) ReverbBusAmount ¶
func (Instance) ReverbBusEnabled ¶
func (Instance) ReverbBusName ¶
func (Instance) ReverbBusUniformity ¶
func (Instance) SetAngularDamp ¶
func (Instance) SetAngularDampSpaceOverride ¶
func (self Instance) SetAngularDampSpaceOverride(value gdclass.Area3DSpaceOverride)
func (Instance) SetAudioBusName ¶
func (Instance) SetAudioBusOverride ¶
func (Instance) SetGravity ¶
func (Instance) SetGravityDirection ¶
func (Instance) SetGravityPoint ¶
func (Instance) SetGravityPointCenter ¶
func (Instance) SetGravityPointUnitDistance ¶
func (Instance) SetGravitySpaceOverride ¶
func (self Instance) SetGravitySpaceOverride(value gdclass.Area3DSpaceOverride)
func (Instance) SetLinearDamp ¶
func (Instance) SetLinearDampSpaceOverride ¶
func (self Instance) SetLinearDampSpaceOverride(value gdclass.Area3DSpaceOverride)
func (Instance) SetMonitorable ¶
func (Instance) SetMonitoring ¶
func (Instance) SetPriority ¶
func (Instance) SetReverbBusAmount ¶
func (Instance) SetReverbBusEnabled ¶
func (Instance) SetReverbBusName ¶
func (Instance) SetReverbBusUniformity ¶
func (Instance) SetWindAttenuationFactor ¶
func (Instance) SetWindForceMagnitude ¶
func (Instance) SetWindSourcePath ¶
func (*Instance) UnsafePointer ¶
func (Instance) WindAttenuationFactor ¶
func (Instance) WindForceMagnitude ¶
func (Instance) WindSourcePath ¶
type SpaceOverride ¶
type SpaceOverride = gdclass.Area3DSpaceOverride //gd:Area3D.SpaceOverride
const ( /*This area does not affect gravity/damping.*/ SpaceOverrideDisabled SpaceOverride = 0 /*This area adds its gravity/damping values to whatever has been calculated so far (in [member priority] order).*/ SpaceOverrideCombine SpaceOverride = 1 /*This area adds its gravity/damping values to whatever has been calculated so far (in [member priority] order), ignoring any lower priority areas.*/ SpaceOverrideCombineReplace SpaceOverride = 2 /*This area replaces any gravity/damping, even the defaults, ignoring any lower priority areas.*/ SpaceOverrideReplace SpaceOverride = 3 /*This area replaces any gravity/damping calculated so far (in [member priority] order), but keeps calculating the rest of the areas.*/ SpaceOverrideReplaceCombine SpaceOverride = 4 )