Glides the node toward another node every frame, so it trails the target instead of snapping onto it. With Speed = 8 it keeps a health bar over an enemy head, a pet behind the player or a marker on a minimap, and Follow With Camera does the same for a camera.
Input
Type
Default
Description
Node
Node
-
The node that follows. Leave it empty to move this node.
Target
Node
-
The node to follow.
Offset
Vector2
(0.0, 0.0)
How far from the target to sit, such as above its head.
Speed
float
8.0
How fast the node catches up. A bigger value follows tighter.
PhasesEvery FramePhysicsWorks onNode2D
Get Angle To
Every Frame
Get Angle ToNode 2D
Nodenot set|Targetnot set
Measures the angle from the node to a target and stores it, in degrees.
Input
Type
Default
Description
Node
Node
-
The node the angle is measured from. Leave it empty to measure from this node.
Target
Node2D
-
The node to measure the angle to, such as another Node2D.
Output
Type
Description
Angle
float
Where to store the resulting angle, in degrees.
PhasesStartEvery FramePhysicsEndWorks onNode2D
Get Distance
Every Frame
Get DistanceNode 2D
Nodenot set|Targetnot set
Measures the distance from the node to a target and stores it, in pixels.
Input
Type
Default
Description
Node
Node
-
The node the distance is measured from. Leave it empty to measure from this node.
Target
Node2D
-
The node to measure the distance to, such as another Node2D.
Output
Type
Description
Distance
float
Where to store the resulting distance, in pixels.
PhasesStartEvery FramePhysicsEndWorks onNode2D
Get Facing Direction
Every Frame
Get Facing DirectionNode 2D
not set
Reads the direction the node is facing and stores it, as a unit vector in global space. Useful to move or shoot straight ahead.
Input
Type
Default
Description
Node
Node
-
The node to read the facing of. Leave it empty to read this node.
Output
Type
Description
Forward
Vector2
Where to store the facing direction, as a unit vector.
Checks whether the node is turned toward a point, inside a cone of the given width, and branches on the answer. It fits an enemy that only notices what is in front of it, or a turret that only shoots forward.
Input
Type
Default
Description
Node
Node
-
The node that does the facing. Leave it empty to check this node.
Target
Variant
-
The point to face. A node works too, its global position is read.
Angle
float
45.0
Half the width of the cone in degrees, so 45 accepts a target up to 45 degrees off to either side.
Branch
Goes to
Facing
Where to go while the target is inside the cone.
Away
Where to go while the target is outside it.
PhasesStartEvery FramePhysicsWorks onNode2D
Is On Screen
Every Frame
Is On ScreenNode 2D
not set|→ True|→ False
Answers whether the node is inside the visible screen, so a bullet or an enemy that left the view can be cleared. It can branch on the answer or hand it to a field that takes a yes or no.
Input
Type
Default
Description
Node
Node
-
The node to check. Leave it empty to check this node.
Output
Type
Description
Yes
bool
Where to store whether the node is inside the view.
Branch
Goes to
True
Where to go while the node is on screen.
False
Where to go once the node is off screen.
PhasesStartEvery FramePhysicsWorks onNode2D
Keep On Screen
Physics
Keep On ScreenNode 2D
Nodenot set|Margin0.0
Holds the node inside the screen, stopping it at the edge instead of letting it leave. Assumes a fixed screen with no scrolling camera.
Input
Type
Default
Description
Node
Node
-
The node to keep on screen. Leave it empty to keep this node.
Margin
float
0.0
How far inside each edge the node stops, in pixels.
PhasesEvery FramePhysicsWorks onNode2D
Look At
Every Frame
Look AtNode 2D
Nodenot set|Target(0.0, 0.0)
Rotates the node so its right side faces a point in global space.
Input
Type
Default
Description
Node
Node
-
The node to turn. Leave it empty to turn this node.
Target
Vector2
(0.0, 0.0)
The point in global space to face.
PhasesStartEvery FramePhysicsEndWorks onNode2D
Move
Every Frame
MoveNode 2D
Nodenot set|Velocity(120.0, 0.0)|Speed1.0
Moves the node by a velocity. During update it is applied per second; on enter or exit it is applied once.
Input
Type
Default
Description
Node
Node
-
The node to move. Leave it empty to move this node.
Places the node at a position, measured in its parent space.
Input
Type
Default
Description
Node
Node
-
The node to place. Leave it empty to place this node.
Position
Vector2
(0.0, 0.0)
The new position, in parent space.
PhasesStartEvery FramePhysicsEndWorks onNode2D
Set Rotation
Every Frame
Set RotationNode 2D
Nodenot set|Angle0.0
Points the node at an angle, in degrees, replacing whatever rotation it had. Zero puts it back upright. Rotate adds to the current angle instead.
Input
Type
Default
Description
Node
Node
-
The node to turn. Leave it empty to turn this node.
Angle
float
0.0
The angle to point at, in degrees. Zero is upright.
PhasesStartEvery FramePhysicsEndWorks onNode2D
Set Scale
Every Frame
Set ScaleNode 2D
Nodenot set|Scale(1.0, 1.0)
Sets the scale of the node.
Input
Type
Default
Description
Node
Node
-
The node to resize. Leave it empty to resize this node.
Scale
Vector2
(1.0, 1.0)
The new scale, where 1 by 1 is the normal size.
PhasesStartEvery FramePhysicsEndWorks onNode2D
Set World Position
Start
Set World PositionNode 2D
Nodenot set|Position(0.0, 0.0)
Places the node at a point in global space, ignoring the parent. Set Position uses the parent space instead.
Input
Type
Default
Description
Node
Node
-
The node to place. Leave it empty to place this node.
Position
Vector2
(0.0, 0.0)
The new position, in global space.
PhasesStartEvery FramePhysicsEndWorks onNode2D
Steer
Physics
SteerNode 2D
Nodenot set|Amount0.0|Degrees180.0
Turns the node left or right from a steering input, useful for car-like or top-down movement.
Input
Type
Default
Description
Node
Node
-
The node to steer. Leave it empty to steer this node.
Amount
float
0.0
Steering input from -1 to 1, where negative turns one way and positive the other.
Degrees
float
180.0
Maximum turn rate, in degrees per second.
PhasesEvery FramePhysicsWorks onNode2D
Translate
Every Frame
TranslateNode 2D
Nodenot set|Offset(100.0, 0.0)
Moves the node by an offset. During update it is applied per second; on enter or exit it is applied once.
Input
Type
Default
Description
Node
Node
-
The node to move. Leave it empty to move this node.
Offset
Vector2
(100.0, 0.0)
The amount to move, in pixels.
PhasesStartEvery FramePhysicsEndWorks onNode2D
Wrap Around Screen
Physics
Wrap Around ScreenNode 2D
not set
Sends the node to the opposite edge when it leaves the screen, the way an asteroid reappears on the far side. Assumes a fixed screen with no scrolling camera.
Input
Type
Default
Description
Node
Node
-
The node to wrap around the screen. Leave it empty to wrap this node.