Class InteractionSensor
An Area3D based collision detection system for detecting interactable objects. Useful for a variety of things. Mainly, a distance based interactable detector. So the closest available IInteractable that is detected by the Area3D is set to CurrentInteraction
[GlobalClass]
[ScriptPath("res://Core/Modules/Interaction/InteractionSensor.cs")]
public class InteractionSensor : Area3D, IDisposable
- Inheritance
-
GodotObjectNodeNode3DCollisionObject3DArea3DInteractionSensor
- Implements
- Inherited Members
-
Area3D.GetOverlappingBodies()Area3D.GetOverlappingAreas()Area3D.HasOverlappingBodies()Area3D.HasOverlappingAreas()Area3D.OverlapsBody(Node)Area3D.OverlapsArea(Node)Area3D.MonitoringArea3D.MonitorableArea3D.PriorityArea3D.GravitySpaceOverrideArea3D.GravityPointArea3D.GravityPointUnitDistanceArea3D.GravityPointCenterArea3D.GravityDirectionArea3D.GravityArea3D.LinearDampSpaceOverrideArea3D.LinearDampArea3D.AngularDampSpaceOverrideArea3D.AngularDampArea3D.WindForceMagnitudeArea3D.WindAttenuationFactorArea3D.WindSourcePathArea3D.AudioBusOverrideArea3D.AudioBusNameArea3D.ReverbBusEnabledArea3D.ReverbBusNameArea3D.ReverbBusAmountArea3D.ReverbBusUniformityArea3D.BodyShapeEnteredArea3D.BodyShapeExitedArea3D.BodyEnteredArea3D.BodyExitedArea3D.AreaShapeEnteredArea3D.AreaShapeExitedArea3D.AreaEnteredArea3D.AreaExitedCollisionObject3D._MouseEnter()CollisionObject3D._MouseExit()CollisionObject3D.GetRid()CollisionObject3D.GetShapeOwners()CollisionObject3D.DisableModeCollisionObject3D.CollisionLayerCollisionObject3D.CollisionMaskCollisionObject3D.CollisionPriorityCollisionObject3D.InputRayPickableCollisionObject3D.InputCaptureOnDragCollisionObject3D.InputEventCollisionObject3D.MouseEnteredCollisionObject3D.MouseExitedNode3D.NotificationTransformChangedNode3D.NotificationEnterWorldNode3D.NotificationExitWorldNode3D.NotificationVisibilityChangedNode3D.NotificationLocalTransformChangedNode3D.GetParentNode3D()Node3D.IsScaleDisabled()Node3D.GetWorld3D()Node3D.ForceUpdateTransform()Node3D.UpdateGizmos()Node3D.AddGizmo(Node3DGizmo)Node3D.GetGizmos()Node3D.ClearGizmos()Node3D.ClearSubgizmoSelection()Node3D.IsVisibleInTree()Node3D.Show()Node3D.Hide()Node3D.IsLocalTransformNotificationEnabled()Node3D.IsTransformNotificationEnabled()Node3D.GlobalScale(Vector3)Node3D.GlobalTranslate(Vector3)Node3D.ScaleObjectLocal(Vector3)Node3D.TranslateObjectLocal(Vector3)Node3D.Translate(Vector3)Node3D.Orthonormalize()Node3D.SetIdentity()Node3D.ToLocal(Vector3)Node3D.ToGlobal(Vector3)Node3D.TransformNode3D.GlobalTransformNode3D.PositionNode3D.RotationNode3D.RotationDegreesNode3D.QuaternionNode3D.BasisNode3D.ScaleNode3D.RotationEditModeNode3D.RotationOrderNode3D.TopLevelNode3D.GlobalPositionNode3D.GlobalRotationNode3D.GlobalRotationDegreesNode3D.VisibleNode3D.VisibilityParentNode3D.VisibilityChangedNode.NotificationEnterTreeNode.NotificationExitTreeNode.NotificationMovedInParentNode.NotificationReadyNode.NotificationPausedNode.NotificationUnpausedNode.NotificationPhysicsProcessNode.NotificationProcessNode.NotificationParentedNode.NotificationUnparentedNode.NotificationSceneInstantiatedNode.NotificationDragBeginNode.NotificationDragEndNode.NotificationPathRenamedNode.NotificationChildOrderChangedNode.NotificationInternalProcessNode.NotificationInternalPhysicsProcessNode.NotificationPostEnterTreeNode.NotificationDisabledNode.NotificationEnabledNode.NotificationNodeRecacheRequestedNode.NotificationEditorPreSaveNode.NotificationEditorPostSaveNode.NotificationWMMouseEnterNode.NotificationWMMouseExitNode.NotificationWMWindowFocusInNode.NotificationWMWindowFocusOutNode.NotificationWMCloseRequestNode.NotificationWMGoBackRequestNode.NotificationWMSizeChangedNode.NotificationWMDpiChangeNode.NotificationVpMouseEnterNode.NotificationVpMouseExitNode.NotificationOsMemoryWarningNode.NotificationTranslationChangedNode.NotificationWMAboutNode.NotificationCrashNode.NotificationOsImeUpdateNode.NotificationApplicationResumedNode.NotificationApplicationPausedNode.NotificationApplicationFocusInNode.NotificationApplicationFocusOutNode.NotificationTextServerChangedNode.GetNode<T>(NodePath)Node.GetNodeOrNull<T>(NodePath)Node.GetOwner<T>()Node.GetOwnerOrNull<T>()Node.GetParent<T>()Node.GetParentOrNull<T>()Node._EnterTree()Node._ExitTree()Node._GetConfigurationWarnings()Node._Input(InputEvent)Node._ShortcutInput(InputEvent)Node._UnhandledInput(InputEvent)Node._UnhandledKeyInput(InputEvent)Node.PrintOrphanNodes()Node.RemoveChild(Node)Node.HasNode(NodePath)Node.GetNode(NodePath)Node.GetNodeOrNull(NodePath)Node.GetParent()Node.HasNodeAndResource(NodePath)Node.GetNodeAndResource(NodePath)Node.IsInsideTree()Node.IsAncestorOf(Node)Node.IsGreaterThan(Node)Node.GetPath()Node.RemoveFromGroup(StringName)Node.IsInGroup(StringName)Node.GetGroups()Node.PrintTree()Node.PrintTreePretty()Node.GetPhysicsProcessDeltaTime()Node.IsPhysicsProcessing()Node.GetProcessDeltaTime()Node.IsProcessing()Node.IsProcessingInput()Node.IsProcessingShortcutInput()Node.IsProcessingUnhandledInput()Node.IsProcessingUnhandledKeyInput()Node.CanProcess()Node.IsDisplayedFolded()Node.IsProcessingInternal()Node.IsPhysicsProcessingInternal()Node.GetWindow()Node.GetLastExclusiveWindow()Node.GetTree()Node.CreateTween()Node.GetSceneInstanceLoadPlaceholder()Node.IsEditableInstance(Node)Node.GetViewport()Node.QueueFree()Node.RequestReady()Node.IsNodeReady()Node.GetMultiplayerAuthority()Node.IsMultiplayerAuthority()Node.RpcConfig(StringName, Variant)Node.Rpc(StringName, params Variant[])Node.UpdateConfigurationWarnings()Node.CallDeferredThreadGroup(StringName, params Variant[])Node.SetDeferredThreadGroup(StringName, Variant)Node.CallThreadSafe(StringName, params Variant[])Node.SetThreadSafe(StringName, Variant)Node._ImportPathNode.NameNode.UniqueNameInOwnerNode.SceneFilePathNode.OwnerNode.MultiplayerNode.ProcessModeNode.ProcessPriorityNode.ProcessPhysicsPriorityNode.ProcessThreadGroupNode.ProcessThreadGroupOrderNode.ProcessThreadMessagesNode.EditorDescriptionNode.ReadyNode.RenamedNode.TreeEnteredNode.TreeExitingNode.TreeExitedNode.ChildEnteredTreeNode.ChildExitingTreeNode.ChildOrderChangedNode.ReplacingByGodotObject.NotificationPostinitializeGodotObject.NotificationPredeleteGodotObject.NativeInstanceGodotObject.ScriptChangedGodotObject.PropertyListChanged
- Extension Methods
Fields
_autoSelectObjects
Whether or not to select ISelectable objects automatically.
[Export(PropertyHint.None, "")]
private bool _autoSelectObjects
Field Value
_derivedPosition
A node that this should derive it's position from for distance based calculations
[Export(PropertyHint.None, "")]
private Node3D _derivedPosition
Field Value
- Node3D
_timer
private Timer _timer
Field Value
- Timer
backing_OnCurrentInteractionChange
private InteractionSensor.OnCurrentInteractionChangeEventHandler backing_OnCurrentInteractionChange
Field Value
Properties
CurrentInteraction
The currently available interaction object, or null if none are present.
public Node3D CurrentInteraction { get; private set; }
Property Value
- Node3D
Methods
GetGodotSignalList()
internal static List<MethodInfo> GetGodotSignalList()
Returns
- List<MethodInfo>
OnAreaEnter(Area3D)
private void OnAreaEnter(Area3D _)
Parameters
_
Area3D
OnAreaExit(Area3D)
private void OnAreaExit(Area3D _)
Parameters
_
Area3D
OnBodyEnter(Node3D)
private void OnBodyEnter(Node3D _)
Parameters
_
Node3D
OnBodyExit(Node3D)
private void OnBodyExit(Node3D _)
Parameters
_
Node3D
RefreshCurrent()
public void RefreshCurrent()
_Ready()
Called when the node is "ready", i.e. when both the node and its children have entered the scene tree. If the node has children, their Godot.Node._Ready() callbacks get triggered first, and the parent node will receive the ready notification afterwards.
Corresponds to the Godot.Node.NotificationReady notification in _Notification(int). See also the @onready
annotation for variables.
Usually used for initialization. For even earlier initialization, Godot.GodotObject.GodotObject() may be used. See also Godot.Node._EnterTree().
Note:
Godot.Node._Ready() may be called only once for each node. After removing a node from the scene tree and adding it again, _ready
will not be called a second time. This can be bypassed by requesting another call with Godot.Node.RequestReady(), which may be called anywhere before adding the node again.
public override void _Ready()
Events
OnCurrentInteractionChange
Signal that is emitted when the current interactable object changes
public event InteractionSensor.OnCurrentInteractionChangeEventHandler OnCurrentInteractionChange