Godot Namespace |
[Missing <summary> documentation for "N:Godot"]
Class | Description | |
---|---|---|
![]() | AcceptDialog | This dialog is useful for small notifications to the user about an event. It can only be accepted or closed, with the same result. |
![]() | AnimatedSprite | Animations are created using a SpriteFrames resource, which can be configured in the editor via the SpriteFrames panel. Note: You can associate a set of normal maps by creating additional SpriteFrames resources with a _normal suffix. For example, having 2 SpriteFrames resources run and run_normal will make it so the run animation uses the normal map. |
![]() | AnimatedSprite3D | Animations are created using a SpriteFrames resource, which can be configured in the editor via the SpriteFrames panel. |
![]() | AnimatedTexture | AnimatedTexture is a resource format for frame-based animations, where multiple textures can be chained automatically with a predefined delay for each frame. Unlike AnimationPlayer or AnimatedSprite, it isn't a Node, but has the advantage of being usable anywhere a Texture resource can be used, e.g. in a TileSet. The playback of the animation is controlled by the Fps property as well as each frame's optional delay (see SetFrameDelay(Int32, Single)). The animation loops, i.e. it will restart at frame 0 automatically after playing the last frame. AnimatedTexture currently requires all frame textures to have the same size, otherwise the bigger ones will be cropped to match the smallest one. Note: AnimatedTexture doesn't support using AtlasTextures. Each frame needs to be a separate Texture. |
![]() | Animation | An Animation resource contains data used to animate everything in the engine. Animations are divided into tracks, and each track must be linked to a node. The state of that node can be changed through time, by adding timed keys (events) to the track. # This creates an animation that makes the node "Enemy" move to the right by # 100 pixels in 0.5 seconds. var animation = Animation.new() var track_index = animation.add_track(Animation.TYPE_VALUE) animation.track_set_path(track_index, "Enemy:position:x") animation.track_insert_key(track_index, 0.0, 0) animation.track_insert_key(track_index, 0.5, 100) Animations are just data containers, and must be added to nodes such as an AnimationPlayer or AnimationTreePlayer to be played back. Animation tracks have different types, each with its own set of dedicated methods. Check AnimationTrackType to see available types. |
![]() | AnimationNode | Base resource for AnimationTree nodes. In general, it's not used directly, but you can create custom ones with custom blending formulas. Inherit this when creating nodes mainly for use in AnimationNodeBlendTree, otherwise AnimationRootNode should be used instead. |
![]() | AnimationNodeAdd2 | A resource to add to an AnimationNodeBlendTree. Blends two animations additively based on an amount value in the [0.0, 1.0] range. |
![]() | AnimationNodeAdd3 | A resource to add to an AnimationNodeBlendTree. Blends two animations together additively out of three based on a value in the [-1.0, 1.0] range. This node has three inputs: - The base animation to add to - A -add animation to blend with when the blend amount is in the [-1.0, 0.0] range. - A +add animation to blend with when the blend amount is in the [0.0, 1.0] range |
![]() | AnimationNodeAnimation | A resource to add to an AnimationNodeBlendTree. Only features one output set using the Animation property. Use it as an input for AnimationNode that blend animations together. |
![]() | AnimationNodeBlend2 | A resource to add to an AnimationNodeBlendTree. Blends two animations linearly based on an amount value in the [0.0, 1.0] range. |
![]() | AnimationNodeBlend3 | A resource to add to an AnimationNodeBlendTree. Blends two animations together linearly out of three based on a value in the [-1.0, 1.0] range. This node has three inputs: - The base animation - A -blend animation to blend with when the blend amount is in the [-1.0, 0.0] range. - A +blend animation to blend with when the blend amount is in the [0.0, 1.0] range |
![]() | AnimationNodeBlendSpace1D | A resource to add to an AnimationNodeBlendTree. This is a virtual axis on which you can add any type of AnimationNode using AddBlendPoint(AnimationRootNode, Single, Int32). Outputs the linear blend of the two AnimationNodes closest to the node's current value. You can set the extents of the axis using the MinSpace and MaxSpace. |
![]() | AnimationNodeBlendSpace2D | A resource to add to an AnimationNodeBlendTree. This node allows you to blend linearly between three animations using a Vector2 weight. You can add vertices to the blend space with AddBlendPoint(AnimationRootNode, Vector2, Int32) and automatically triangulate it by setting AutoTriangles to true. Otherwise, use AddTriangle(Int32, Int32, Int32, Int32) and RemoveTriangle(Int32) to create up the blend space by hand. |
![]() | AnimationNodeBlendTree | This node may contain a sub-tree of any other blend type nodes, such as mix, blend2, blend3, one shot, etc. This is one of the most commonly used roots. |
![]() | AnimationNodeOneShot | A resource to add to an AnimationNodeBlendTree. This node will execute a sub-animation and return once it finishes. Blend times for fading in and out can be customized, as well as filters. |
![]() | AnimationNodeOutput | |
![]() | AnimationNodeStateMachine | Contains multiple nodes representing animation states, connected in a graph. Node transitions can be configured to happen automatically or via code, using a shortest-path algorithm. Retrieve the AnimationNodeStateMachinePlayback object from the AnimationTree node to control it programmatically. Example: var state_machine = $AnimationTree.get("parameters/playback") state_machine.travel("some_state") |
![]() | AnimationNodeStateMachinePlayback | Allows control of AnimationTree state machines created with AnimationNodeStateMachine. Retrieve with $AnimationTree.get("parameters/playback"). Example: var state_machine = $AnimationTree.get("parameters/playback") state_machine.travel("some_state") |
![]() | AnimationNodeStateMachineTransition | |
![]() | AnimationNodeTimeScale | Allows scaling the speed of the animation (or reversing it) in any children nodes. Setting it to 0 will pause the animation. |
![]() | AnimationNodeTimeSeek | This node can be used to cause a seek command to happen to any sub-children of the animation graph. Use this node type to play an Animation from the start or a certain playback position inside the AnimationNodeBlendTree. After setting the time and changing the animation playback, the seek node automatically goes into sleep mode on the next process frame by setting its seek_position value to -1.0. # Play child animation from the start. animation_tree.set("parameters/Seek/seek_position", 0.0) # Alternative syntax (same result as above). animation_tree["parameters/Seek/seek_position"] = 0.0 # Play child animation from 12 second timestamp. animation_tree.set("parameters/Seek/seek_position", 12.0) # Alternative syntax (same result as above). animation_tree["parameters/Seek/seek_position"] = 12.0 |
![]() | AnimationNodeTransition | Simple state machine for cases which don't require a more advanced AnimationNodeStateMachine. Animations can be connected to the inputs and transition times can be specified. |
![]() | AnimationPlayer | An animation player is used for general-purpose playback of Animation resources. It contains a dictionary of animations (referenced by name) and custom blend times between their transitions. Additionally, animations can be played and blended in different channels. AnimationPlayer is more suited than Tween for animations where you know the final values in advance. For example, fading a screen in and out is more easily done with an AnimationPlayer node thanks to the animation tools provided by the editor. That particular example can also be implemented with a Tween node, but it requires doing everything by code. Updating the target properties of animations occurs at process time. |
![]() | AnimationRootNode | |
![]() | AnimationTrackEditPlugin | |
![]() | AnimationTree | Note: When linked with an AnimationPlayer, several properties and methods of the corresponding AnimationPlayer will not function as expected. Playback and transitions should be handled using only the AnimationTree and its constituent AnimationNode(s). The AnimationPlayer node should be used solely for adding, deleting, and editing animations. |
![]() | AnimationTreePlayer | Deprecated. A node graph tool for blending multiple animations bound to an AnimationPlayer. Especially useful for animating characters or other skeleton-based rigs. It can combine several animations to form a desired pose. It takes Animations from an AnimationPlayer node and mixes them depending on the graph. See AnimationTree for a more full-featured replacement of this node. |
![]() | Area | 3D area that detects CollisionObject nodes overlapping, entering, or exiting. Can also alter or override local physics parameters (gravity, damping). |
![]() | Area2D | 2D area that detects CollisionObject2D nodes overlapping, entering, or exiting. Can also alter or override local physics parameters (gravity, damping). |
![]() | ArrayMesh | The ArrayMesh is used to construct a Mesh by specifying the attributes as arrays. The most basic example is the creation of a single triangle: var vertices = PoolVector3Array() vertices.push_back(Vector3(0, 1, 0)) vertices.push_back(Vector3(1, 0, 0)) vertices.push_back(Vector3(0, 0, 1)) # Initialize the ArrayMesh. var arr_mesh = ArrayMesh.new() var arrays = [] arrays.resize(ArrayMesh.ARRAY_MAX) arrays[ArrayMesh.ARRAY_VERTEX] = vertices # Create the Mesh. arr_mesh.add_surface_from_arrays(Mesh.PRIMITIVE_TRIANGLES, arrays) var m = MeshInstance.new() m.mesh = arr_mesh The MeshInstance is ready to be added to the SceneTree to be shown. See also ImmediateGeometry, MeshDataTool and SurfaceTool for procedural geometry generation. Note: Godot uses clockwise winding order for front faces of triangle primitive modes. |
![]() | ARVRAnchor | The ARVRAnchor point is a spatial node that maps a real world location identified by the AR platform to a position within the game world. For example, as long as plane detection in ARKit is on, ARKit will identify and update the position of planes (tables, floors, etc) and create anchors for them. This node is mapped to one of the anchors through its unique ID. When you receive a signal that a new anchor is available, you should add this node to your scene for that anchor. You can predefine nodes and set the ID; the nodes will simply remain on 0,0,0 until a plane is recognized. Keep in mind that, as long as plane detection is enabled, the size, placing and orientation of an anchor will be updated as the detection logic learns more about the real world out there especially if only part of the surface is in view. |
![]() | ARVRCamera | This is a helper spatial node for our camera; note that, if stereoscopic rendering is applicable (VR-HMD), most of the camera properties are ignored, as the HMD information overrides them. The only properties that can be trusted are the near and far planes. The position and orientation of this node is automatically updated by the ARVR Server to represent the location of the HMD if such tracking is available and can thus be used by game logic. Note that, in contrast to the ARVR Controller, the render thread has access to the most up-to-date tracking data of the HMD and the location of the ARVRCamera can lag a few milliseconds behind what is used for rendering as a result. |
![]() | ARVRController | This is a helper spatial node that is linked to the tracking of controllers. It also offers several handy passthroughs to the state of buttons and such on the controllers. Controllers are linked by their ID. You can create controller nodes before the controllers are available. If your game always uses two controllers (one for each hand), you can predefine the controllers with ID 1 and 2; they will become active as soon as the controllers are identified. If you expect additional controllers to be used, you should react to the signals and add ARVRController nodes to your scene. The position of the controller node is automatically updated by the ARVRServer. This makes this node ideal to add child nodes to visualize the controller. |
![]() | ARVRInterface | This class needs to be implemented to make an AR or VR platform available to Godot and these should be implemented as C++ modules or GDNative modules (note that for GDNative the subclass ARVRScriptInterface should be used). Part of the interface is exposed to GDScript so you can detect, enable and configure an AR or VR platform. Interfaces should be written in such a way that simply enabling them will give us a working setup. You can query the available interfaces through ARVRServer. |
![]() | ARVRInterfaceGDNative | This is a wrapper class for GDNative implementations of the ARVR interface. To use a GDNative ARVR interface, simply instantiate this object and set your GDNative library containing the ARVR interface implementation. |
![]() | ARVROrigin | This is a special node within the AR/VR system that maps the physical location of the center of our tracking space to the virtual location within our game world. There should be only one of these nodes in your scene and you must have one. All the ARVRCamera, ARVRController and ARVRAnchor nodes should be direct children of this node for spatial tracking to work correctly. It is the position of this node that you update when your character needs to move through your game world while we're not moving in the real world. Movement in the real world is always in relation to this origin point. For example, if your character is driving a car, the ARVROrigin node should be a child node of this car. Or, if you're implementing a teleport system to move your character, you should change the position of this node. |
![]() | ARVRPositionalTracker | An instance of this object represents a device that is tracked, such as a controller or anchor point. HMDs aren't represented here as they are handled internally. As controllers are turned on and the AR/VR interface detects them, instances of this object are automatically added to this list of active tracking objects accessible through the ARVRServer. The ARVRController and ARVRAnchor both consume objects of this type and should be used in your project. The positional trackers are just under-the-hood objects that make this all work. These are mostly exposed so that GDNative-based interfaces can interact with them. |
![]() | ARVRServer | The AR/VR server is the heart of our Advanced and Virtual Reality solution and handles all the processing. |
![]() | AspectRatioContainer | Arranges child controls in a way to preserve their aspect ratio automatically whenever the container is resized. Solves the problem where the container size is dynamic and the contents' size needs to adjust accordingly without losing proportions. |
![]() | AStar | A* (A star) is a computer algorithm that is widely used in pathfinding and graph traversal, the process of plotting short paths among vertices (points), passing through a given set of edges (segments). It enjoys widespread use due to its performance and accuracy. Godot's A* implementation uses points in three-dimensional space and Euclidean distances by default. You must add points manually with AddPoint(Int32, Vector3, Single) and create segments manually with ConnectPoints(Int32, Int32, Boolean). Then you can test if there is a path between two points with the ArePointsConnected(Int32, Int32, Boolean) function, get a path containing indices by GetIdPath(Int32, Int32), or one containing actual coordinates with GetPointPath(Int32, Int32). It is also possible to use non-Euclidean distances. To do so, create a class that extends AStar and override methods _ComputeCost(Int32, Int32) and _EstimateCost(Int32, Int32). Both take two indices and return a length, as is shown in the following example. class MyAStar: extends AStar func _compute_cost(u, v): return abs(u - v) func _estimate_cost(u, v): return min(0, abs(u - v) - 1) _EstimateCost(Int32, Int32) should return a lower bound of the distance, i.e. _estimate_cost(u, v) <= _compute_cost(u, v). This serves as a hint to the algorithm because the custom _compute_cost might be computation-heavy. If this is not the case, make _EstimateCost(Int32, Int32) return the same value as _ComputeCost(Int32, Int32) to provide the algorithm with the most accurate information. If the default _EstimateCost(Int32, Int32) and _ComputeCost(Int32, Int32) methods are used, or if the supplied _EstimateCost(Int32, Int32) method returns a lower bound of the cost, then the paths returned by A* will be the lowest cost paths. Here, the cost of a path equals to the sum of the _ComputeCost(Int32, Int32) results of all segments in the path multiplied by the weight_scales of the end points of the respective segments. If the default methods are used and the weight_scales of all points are set to 1.0, then this equals to the sum of Euclidean distances of all segments in the path. |
![]() | AStar2D | This is a wrapper for the AStar class which uses 2D vectors instead of 3D vectors. |
![]() | AtlasTexture | Texture resource that crops out one part of the Atlas texture, defined by Region. The main use case is cropping out textures from a texture atlas, which is a big texture file that packs multiple smaller textures. Consists of a Texture for the Atlas, a Region that defines the area of Atlas to use, and a Margin that defines the border width. AtlasTexture cannot be used in an AnimatedTexture, cannot be tiled in nodes such as TextureRect, and does not work properly if used inside of other AtlasTexture resources. Multiple AtlasTexture resources can be used to crop multiple textures from the atlas. Using a texture atlas helps to optimize video memory costs and render calls compared to using multiple small files. Note: AtlasTextures don't support repetition. The and flags are ignored when using an AtlasTexture. |
![]() | AudioBusLayout | Stores position, muting, solo, bypass, effects, effect position, volume, and the connections between buses. See AudioServer for usage. |
![]() | AudioEffect | Base resource for audio bus. Applies an audio effect on the bus that the resource is applied on. |
![]() | AudioEffectAmplify | Increases or decreases the volume being routed through the audio bus. |
![]() | AudioEffectBandLimitFilter | Limits the frequencies in a range around the CutoffHz and allows frequencies outside of this range to pass. |
![]() | AudioEffectBandPassFilter | Attenuates the frequencies inside of a range around the CutoffHz and cuts frequencies outside of this band. |
![]() | AudioEffectCapture | AudioEffectCapture is an AudioEffect which copies all audio frames from the attached audio effect bus into its internal ring buffer. Application code should consume these audio frames from this ring buffer using GetBuffer(Int32) and process it as needed, for example to capture data from a microphone, implement application defined effects, or to transmit audio over the network. |
![]() | AudioEffectChorus | Adds a chorus audio effect. The effect applies a filter with voices to duplicate the audio source and manipulate it through the filter. |
![]() | AudioEffectCompressor | Dynamic range compressor reduces the level of the sound when the amplitude goes over a certain threshold in Decibels. One of the main uses of a compressor is to increase the dynamic range by clipping as little as possible (when sound goes over 0dB). Compressor has many uses in the mix: - In the Master bus to compress the whole output (although an AudioEffectLimiter is probably better). - In voice channels to ensure they sound as balanced as possible. - Sidechained. This can reduce the sound level sidechained with another audio bus for threshold detection. This technique is common in video game mixing to the level of music and SFX while voices are being heard. - Accentuates transients by using a wider attack, making effects sound more punchy. |
![]() | AudioEffectDelay | Plays input signal back after a period of time. The delayed signal may be played back multiple times to create the sound of a repeating, decaying echo. Delay effects range from a subtle echo effect to a pronounced blending of previous sounds with new sounds. |
![]() | AudioEffectDistortion | Different types are available: clip, tan, lo-fi (bit crushing), overdrive, or waveshape. By distorting the waveform the frequency content change, which will often make the sound "crunchy" or "abrasive". For games, it can simulate sound coming from some saturated device or speaker very efficiently. |
![]() | AudioEffectEQ | AudioEffectEQ gives you control over frequencies. Use it to compensate for existing deficiencies in audio. AudioEffectEQs are useful on the Master bus to completely master a mix and give it more character. They are also useful when a game is run on a mobile device, to adjust the mix to that kind of speakers (it can be added but disabled when headphones are plugged). |
![]() | AudioEffectEQ10 | Frequency bands: Band 1: 31 Hz Band 2: 62 Hz Band 3: 125 Hz Band 4: 250 Hz Band 5: 500 Hz Band 6: 1000 Hz Band 7: 2000 Hz Band 8: 4000 Hz Band 9: 8000 Hz Band 10: 16000 Hz See also AudioEffectEQ, AudioEffectEQ6, AudioEffectEQ21. |
![]() | AudioEffectEQ21 | Frequency bands: Band 1: 22 Hz Band 2: 32 Hz Band 3: 44 Hz Band 4: 63 Hz Band 5: 90 Hz Band 6: 125 Hz Band 7: 175 Hz Band 8: 250 Hz Band 9: 350 Hz Band 10: 500 Hz Band 11: 700 Hz Band 12: 1000 Hz Band 13: 1400 Hz Band 14: 2000 Hz Band 15: 2800 Hz Band 16: 4000 Hz Band 17: 5600 Hz Band 18: 8000 Hz Band 19: 11000 Hz Band 20: 16000 Hz Band 21: 22000 Hz See also AudioEffectEQ, AudioEffectEQ6, AudioEffectEQ10. |
![]() | AudioEffectEQ6 | Frequency bands: Band 1: 32 Hz Band 2: 100 Hz Band 3: 320 Hz Band 4: 1000 Hz Band 5: 3200 Hz Band 6: 10000 Hz See also AudioEffectEQ, AudioEffectEQ10, AudioEffectEQ21. |
![]() | AudioEffectFilter | Allows frequencies other than the CutoffHz to pass. |
![]() | AudioEffectHighPassFilter | Cuts frequencies lower than the CutoffHz and allows higher frequencies to pass. |
![]() | AudioEffectHighShelfFilter | |
![]() | AudioEffectInstance | |
![]() | AudioEffectLimiter | A limiter is similar to a compressor, but it's less flexible and designed to disallow sound going over a given dB threshold. Adding one in the Master bus is always recommended to reduce the effects of clipping. Soft clipping starts to reduce the peaks a little below the threshold level and progressively increases its effect as the input level increases such that the threshold is never exceeded. |
![]() | AudioEffectLowPassFilter | Cuts frequencies higher than the CutoffHz and allows lower frequencies to pass. |
![]() | AudioEffectLowShelfFilter | |
![]() | AudioEffectNotchFilter | Attenuates frequencies in a narrow band around the CutoffHz and cuts frequencies outside of this range. |
![]() | AudioEffectPanner | Determines how much of an audio signal is sent to the left and right buses. |
![]() | AudioEffectPhaser | Combines phase-shifted signals with the original signal. The movement of the phase-shifted signals is controlled using a low-frequency oscillator. |
![]() | AudioEffectPitchShift | Allows modulation of pitch independently of tempo. All frequencies can be increased/decreased with minimal effect on transients. |
![]() | AudioEffectRecord | Allows the user to record sound from a microphone. It sets and gets the format in which the audio file will be recorded (8-bit, 16-bit, or compressed). It checks whether or not the recording is active, and if it is, records the sound. It then returns the recorded sample. |
![]() | AudioEffectReverb | Simulates rooms of different sizes. Its parameters can be adjusted to simulate the sound of a specific room. |
![]() | AudioEffectSpectrumAnalyzer | |
![]() | AudioEffectSpectrumAnalyzerInstance | |
![]() | AudioEffectStereoEnhance | |
![]() | AudioServer | AudioServer is a low-level server interface for audio access. It is in charge of creating sample data (playable audio) as well as its playback via a voice interface. |
![]() | AudioStream | Base class for audio streams. Audio streams are used for sound effects and music playback, and support WAV (via AudioStreamSample) and OGG (via AudioStreamOGGVorbis) file formats. |
![]() | AudioStreamGenerator | |
![]() | AudioStreamGeneratorPlayback | |
![]() | AudioStreamMicrophone | |
![]() | AudioStreamMP3 | MP3 audio stream driver. |
![]() | AudioStreamOGGVorbis | OGG Vorbis audio stream driver. |
![]() | AudioStreamPlayback | Can play, loop, pause a scroll through audio. See AudioStream and AudioStreamOGGVorbis for usage. |
![]() | AudioStreamPlaybackResampled | |
![]() | AudioStreamPlayer | Plays an audio stream non-positionally. |
![]() | AudioStreamPlayer2D | Plays audio that dampens with distance from screen center. |
![]() | AudioStreamPlayer3D | Plays a sound effect with directed sound effects, dampens with distance if needed, generates effect of hearable position in space. For greater realism, a low-pass filter is automatically applied to distant sounds. This can be disabled by setting AttenuationFilterCutoffHz to 20500. By default, audio is heard from the camera position. This can be changed by adding a Listener node to the scene and enabling it by calling MakeCurrent on it. |
![]() | AudioStreamRandomPitch | Randomly varies pitch on each start. |
![]() | AudioStreamSample | AudioStreamSample stores sound samples loaded from WAV files. To play the stored sound, use an AudioStreamPlayer (for non-positional audio) or AudioStreamPlayer2D/AudioStreamPlayer3D (for positional audio). The sound can be looped. This class can also be used to store dynamically-generated PCM audio data. |
![]() | BackBufferCopy | Node for back-buffering the currently-displayed screen. The region defined in the BackBufferCopy node is buffered with the content of the screen it covers, or the entire screen according to the copy mode set. Use the texture(SCREEN_TEXTURE, ...) function in your shader scripts to access the buffer. Note: Since this node inherits from Node2D (and not Control), anchors and margins won't apply to child Control-derived nodes. This can be problematic when resizing the window. To avoid this, add Control-derived nodes as siblings to the BackBufferCopy node instead of adding them as children. |
![]() | BakedLightmap | Baked lightmaps are an alternative workflow for adding indirect (or baked) lighting to a scene. Unlike the GIProbe approach, baked lightmaps work fine on low-end PCs and mobile devices as they consume almost no resources in run-time. |
![]() | BakedLightmapData | |
![]() | BaseButton | BaseButton is the abstract base class for buttons, so it shouldn't be used directly (it doesn't display anything). Other types of buttons inherit from it. |
![]() | BitMap | A two-dimensional array of boolean values, can be used to efficiently store a binary matrix (every matrix element takes only one bit) and query the values using natural cartesian coordinates. |
![]() | BitmapFont | Renders text using *.fnt fonts containing texture atlases. Supports distance fields. For using vector font files like TTF directly, see DynamicFont. |
![]() | Bone2D | Use a hierarchy of Bone2D bound to a Skeleton2D to control, and animate other Node2D nodes. You can use Bone2D and Skeleton2D nodes to animate 2D meshes created with the Polygon 2D UV editor. Each bone has a Rest transform that you can reset to with ApplyRest. These rest poses are relative to the bone's parent. If in the editor, you can set the rest pose of an entire skeleton using a menu option, from the code, you need to iterate over the bones to set their individual rest poses. |
![]() | BoneAttachment | This node must be the child of a Skeleton node. You can then select a bone for this node to attach to. The BoneAttachment node will copy the transform of the selected bone. |
![]() | BoxContainer | Arranges child controls vertically or horizontally, and rearranges the controls automatically when their minimum size changes. |
![]() | BoxShape | 3D box shape that can be a child of a PhysicsBody or Area. |
![]() | Button | Button is the standard themed button. It can contain text and an icon, and will display them according to the current Theme. Example of creating a button and assigning an action when pressed by code: func _ready(): var button = Button.new() button.text = "Click me" button.connect("pressed", self, "_button_pressed") add_child(button) func _button_pressed(): print("Hello world!") Buttons (like all Control nodes) can also be created in the editor, but some situations may require creating them from code. See also BaseButton which contains common properties and methods associated with this node. Note: Buttons do not interpret touch input and therefore don't support multitouch, since mouse emulation can only press one button at a given time. Use TouchScreenButton for buttons that trigger gameplay movement or actions, as TouchScreenButton supports multitouch. |
![]() | ButtonGroup | Group of Button. All direct and indirect children buttons become radios. Only one allows being pressed. ToggleMode should be true. |
![]() | Camera | Camera is a special node that displays what is visible from its current location. Cameras register themselves in the nearest Viewport node (when ascending the tree). Only one camera can be active per viewport. If no viewport is available ascending the tree, the camera will register in the global viewport. In other words, a camera just provides 3D display capabilities to a Viewport, and, without one, a scene registered in that Viewport (or higher viewports) can't be displayed. |
![]() | Camera2D | Camera node for 2D scenes. It forces the screen (current layer) to scroll following this node. This makes it easier (and faster) to program scrollable scenes than manually changing the position of CanvasItem-based nodes. This node is intended to be a simple helper to get things going quickly and it may happen that more functionality is desired to change how the camera works. To make your own custom camera node, inherit from Node2D and change the transform of the canvas by setting CanvasTransform in Viewport (you can obtain the current Viewport by using GetViewport). Note that the Camera2D node's position doesn't represent the actual position of the screen, which may differ due to applied smoothing or limits. You can use GetCameraScreenCenter to get the real position. |
![]() | CameraFeed | A camera feed gives you access to a single physical camera attached to your device. When enabled, Godot will start capturing frames from the camera which can then be used. Note: Many cameras will return YCbCr images which are split into two textures and need to be combined in a shader. Godot does this automatically for you if you set the environment to show the camera image in the background. |
![]() | CameraServer | The CameraServer keeps track of different cameras accessible in Godot. These are external cameras such as webcams or the cameras on your phone. It is notably used to provide AR modules with a video feed from the camera. |
![]() | CameraTexture | This texture gives access to the camera texture provided by a CameraFeed. Note: Many cameras supply YCbCr images which need to be converted in a shader. |
![]() | CanvasItem | Base class of anything 2D. Canvas items are laid out in a tree; children inherit and extend their parent's transform. CanvasItem is extended by Control for anything GUI-related, and by Node2D for anything related to the 2D engine. Any CanvasItem can draw. For this, Update must be called, then will be received on idle time to request redraw. Because of this, canvas items don't need to be redrawn on every frame, improving the performance significantly. Several functions for drawing on the CanvasItem are provided (see draw_* functions). However, they can only be used inside the _Notification(Int32), signal or _Draw virtual functions. Canvas items are drawn in tree order. By default, children are on top of their parents so a root CanvasItem will be drawn behind everything. This behavior can be changed on a per-item basis. A CanvasItem can also be hidden, which will also hide its children. It provides many ways to change parameters such as modulation (for itself and its children) and self modulation (only for itself), as well as its blend mode. Ultimately, a transform notification can be requested, which will notify the node that its global position changed in case the parent tree changed. Note: Unless otherwise specified, all methods that have angle parameters must have angles specified as radians. To convert degrees to radians, use @GDScript.deg2rad. |
![]() | CanvasItemMaterial | CanvasItemMaterials provide a means of modifying the textures associated with a CanvasItem. They specialize in describing blend and lighting behaviors for textures. Use a ShaderMaterial to more fully customize a material's interactions with a CanvasItem. |
![]() | CanvasLayer | Canvas drawing layer. CanvasItem nodes that are direct or indirect children of a CanvasLayer will be drawn in that layer. The layer is a numeric index that defines the draw order. The default 2D scene renders with index 0, so a CanvasLayer with index -1 will be drawn below, and one with index 1 will be drawn above. This is very useful for HUDs (in layer 1+ or above), or backgrounds (in layer -1 or below). |
![]() | CanvasModulate | CanvasModulate tints the canvas elements using its assigned Color. |
![]() | CapsuleMesh | Class representing a capsule-shaped PrimitiveMesh. |
![]() | CapsuleShape | Capsule shape for collisions. |
![]() | CapsuleShape2D | Capsule shape for 2D collisions. |
![]() | CenterContainer | CenterContainer keeps children controls centered. This container keeps all children to their minimum size, in the center. |
![]() | CharFXTransform | By setting various properties on this object, you can control how individual characters will be displayed in a RichTextEffect. |
![]() | CheckBox | A checkbox allows the user to make a binary choice (choosing only one of two possible options). It's similar to CheckButton in functionality, but it has a different appearance. To follow established UX patterns, it's recommended to use CheckBox when toggling it has no immediate effect on something. For instance, it should be used when toggling it will only do something once a confirmation button is pressed. See also BaseButton which contains common properties and methods associated with this node. |
![]() | CheckButton | CheckButton is a toggle button displayed as a check field. It's similar to CheckBox in functionality, but it has a different appearance. To follow established UX patterns, it's recommended to use CheckButton when toggling it has an immediate effect on something. For instance, it should be used if toggling it enables/disables a setting without requiring the user to press a confirmation button. See also BaseButton which contains common properties and methods associated with this node. |
![]() | CircleShape2D | Circular shape for 2D collisions. This shape is useful for modeling balls or small characters and its collision detection with everything else is very fast. |
![]() | ClassDB | Provides access to metadata stored for every available class. |
![]() | ClippedCamera | This node extends Camera to add collisions with Area and/or PhysicsBody nodes. The camera cannot move through colliding objects. |
![]() | CollisionObject | CollisionObject is the base class for physics objects. It can hold any number of collision Shapes. Each shape must be assigned to a shape owner. The CollisionObject can have any number of shape owners. Shape owners are not nodes and do not appear in the editor, but are accessible through code using the shape_owner_* methods. |
![]() | CollisionObject2D | CollisionObject2D is the base class for 2D physics objects. It can hold any number of 2D collision Shape2Ds. Each shape must be assigned to a shape owner. The CollisionObject2D can have any number of shape owners. Shape owners are not nodes and do not appear in the editor, but are accessible through code using the shape_owner_* methods. |
![]() | CollisionPolygon | Allows editing a collision polygon's vertices on a selected plane. Can also set a depth perpendicular to that plane. This class is only available in the editor. It will not appear in the scene tree at run-time. Creates a Shape for gameplay. Properties modified during gameplay will have no effect. |
![]() | CollisionPolygon2D | Provides a 2D collision polygon to a CollisionObject2D parent. Polygons can be drawn in the editor or specified by a list of vertices. |
![]() | CollisionShape | Editor facility for creating and editing collision shapes in 3D space. You can use this node to represent all sorts of collision shapes, for example, add this to an Area to give it a detection shape, or add it to a PhysicsBody to create a solid object. IMPORTANT: this is an Editor-only helper to create shapes, use ShapeOwnerGetShape(UInt32, Int32) to get the actual shape. |
![]() | CollisionShape2D | Editor facility for creating and editing collision shapes in 2D space. You can use this node to represent all sorts of collision shapes, for example, add this to an Area2D to give it a detection shape, or add it to a PhysicsBody2D to create a solid object. IMPORTANT: this is an Editor-only helper to create shapes, use ShapeOwnerGetShape(UInt32, Int32) to get the actual shape. |
![]() | ColorPicker | Control node displaying a color picker widget. It's useful for selecting a color from an RGB/RGBA colorspace. |
![]() | ColorPickerButton | Encapsulates a ColorPicker making it accessible by pressing a button. Pressing the button will toggle the ColorPicker visibility. See also BaseButton which contains common properties and methods associated with this node. |
![]() | ColorRect | Displays a rectangle filled with a solid Color. If you need to display the border alone, consider using ReferenceRect instead. |
![]() | Colors |
This class contains color constants created from standardized color names.
The standardized color set is based on the X11 and .NET color names.
|
![]() | ConcavePolygonShape | Concave polygon shape resource, which can be set into a PhysicsBody or area. This shape is created by feeding a list of triangles. Note: when used for collision, ConcavePolygonShape is intended to work with static PhysicsBody nodes like StaticBody and will not work with KinematicBody or RigidBody with a mode other than Static. |
![]() | ConcavePolygonShape2D | Concave polygon 2D shape resource for physics. It is made out of segments and is optimal for complex polygonal concave collisions. However, it is not advised to use for RigidBody2D nodes. A CollisionPolygon2D in convex decomposition mode (solids) or several convex objects are advised for that instead. Otherwise, a concave polygon 2D shape is better for static collisions. The main difference between a ConvexPolygonShape2D and a ConcavePolygonShape2D is that a concave polygon assumes it is concave and uses a more complex method of collision detection, and a convex one forces itself to be convex in order to speed up collision detection. |
![]() | ConeTwistJoint | The joint can rotate the bodies across an axis defined by the local x-axes of the Joint. The twist axis is initiated as the X axis of the Joint. Once the Bodies swing, the twist axis is calculated as the middle of the x-axes of the Joint in the local space of the two Bodies. See also Generic6DOFJoint. |
![]() | ConfigFile | This helper class can be used to store Variant values on the filesystem using INI-style formatting. The stored values are identified by a section and a key: [section] some_key=42 string_example="Hello World!" a_vector=Vector3( 1, 0, 2 ) The stored data can be saved to or parsed from a file, though ConfigFile objects can also be used directly without accessing the filesystem. The following example shows how to parse an INI-style file from the system, read its contents and store new values in it: var config = ConfigFile.new() var err = config.load("user://settings.cfg") if err == OK: # If not, something went wrong with the file loading # Look for the display/width pair, and default to 1024 if missing var screen_width = config.get_value("display", "width", 1024) # Store a variable if and only if it hasn't been defined yet if not config.has_section_key("audio", "mute"): config.set_value("audio", "mute", false) # Save the changes by overwriting the previous file config.save("user://settings.cfg") Keep in mind that section and property names can't contain spaces. Anything after a space will be ignored on save and on load. ConfigFiles can also contain manually written comment lines starting with a semicolon (;). Those lines will be ignored when parsing the file. Note that comments will be lost when saving the ConfigFile. This can still be useful for dedicated server configuration files, which are typically never overwritten without explicit user action. |
![]() | ConfirmationDialog | Dialog for confirmation of actions. This dialog inherits from AcceptDialog, but has by default an OK and Cancel button (in host OS order). To get cancel action, you can use: get_cancel().connect("pressed", self, "cancelled") |
![]() | Container | Base node for containers. A Container contains other controls and automatically arranges them in a certain way. A Control can inherit this to create custom container classes. |
![]() | Control | Base class for all UI-related nodes. Control features a bounding rectangle that defines its extents, an anchor position relative to its parent control or the current viewport, and margins that represent an offset to the anchor. The margins update automatically when the node, any of its parents, or the screen size change. For more information on Godot's UI system, anchors, margins, and containers, see the related tutorials in the manual. To build flexible UIs, you'll need a mix of UI elements that inherit from Control and Container nodes. User Interface nodes and input Godot sends input events to the scene's root node first, by calling _Input(InputEvent). _Input(InputEvent) forwards the event down the node tree to the nodes under the mouse cursor, or on keyboard focus. To do so, it calls _InputEvent(InputEvent). Call AcceptEvent so no other node receives the event. Once you accepted an input, it becomes handled so _UnhandledInput(InputEvent) will not process it. Only one Control node can be in keyboard focus. Only the node in focus will receive keyboard events. To get the focus, call GrabFocus. Control nodes lose focus when another node grabs it, or if you hide the node in focus. Sets MouseFilter to to tell a Control node to ignore mouse or touch events. You'll need it if you place an icon on top of a button. Theme resources change the Control's appearance. If you change the Theme on a Control node, it affects all of its children. To override some of the theme's parameters, call one of the add_*_override methods, like AddFontOverride(String, Font). You can override the theme with the inspector. Note: Theme items are not Object properties. This means you can't access their values using Get(String) and Set(String, Object). Instead, use GetColor(String, String), GetConstant(String, String), GetFont(String, String), GetIcon(String, String), GetStylebox(String, String), and the add_*_override methods provided by this class. |
![]() | ConvexPolygonShape | Convex polygon shape resource, which can be added to a PhysicsBody or area. |
![]() | ConvexPolygonShape2D | Convex polygon shape for 2D physics. A convex polygon, whatever its shape, is internally decomposed into as many convex polygons as needed to ensure all collision checks against it are always done on convex polygons (which are faster to check). The main difference between a ConvexPolygonShape2D and a ConcavePolygonShape2D is that a concave polygon assumes it is concave and uses a more complex method of collision detection, and a convex one forces itself to be convex in order to speed up collision detection. |
![]() | CPUParticles | CPU-based 3D particle node used to create a variety of particle systems and effects. See also Particles, which provides the same functionality with hardware acceleration, but may not run on older devices. Note: Unlike Particles, the visibility rect is generated on-the-fly and doesn't need to be configured by the user. |
![]() | CPUParticles2D | CPU-based 2D particle node used to create a variety of particle systems and effects. See also Particles2D, which provides the same functionality with hardware acceleration, but may not run on older devices. Note: Unlike Particles2D, the visibility rect is generated on-the-fly and doesn't need to be configured by the user. |
![]() | Crypto | The Crypto class allows you to access some more advanced cryptographic functionalities in Godot. For now, this includes generating cryptographically secure random bytes, and RSA keys and self-signed X509 certificates generation. More functionalities are planned for future releases. extends Node var crypto = Crypto.new() var key = CryptoKey.new() var cert = X509Certificate.new() func _ready(): # Generate new RSA key. key = crypto.generate_rsa(4096) # Generate new self-signed certificate with the given key. cert = crypto.generate_self_signed_certificate(key, "CN=mydomain.com,O=My Game Company,C=IT") # Save key and certificate in the user folder. key.save("user://generated.key") cert.save("user://generated.crt") Note: Not available in HTML5 exports. |
![]() | CryptoKey | The CryptoKey class represents a cryptographic key. Keys can be loaded and saved like any other Resource. They can be used to generate a self-signed X509Certificate via GenerateSelfSignedCertificate(CryptoKey, String, String, String) and as private key in AcceptStream(StreamPeer, CryptoKey, X509Certificate, X509Certificate) along with the appropriate certificate. Note: Not available in HTML5 exports. |
![]() | CSGBox | This node allows you to create a box for use with the CSG system. |
![]() | CSGCombiner | For complex arrangements of shapes, it is sometimes needed to add structure to your CSG nodes. The CSGCombiner node allows you to create this structure. The node encapsulates the result of the CSG operations of its children. In this way, it is possible to do operations on one set of shapes that are children of one CSGCombiner node, and a set of separate operations on a second set of shapes that are children of a second CSGCombiner node, and then do an operation that takes the two end results as its input to create the final shape. |
![]() | CSGCylinder | This node allows you to create a cylinder (or cone) for use with the CSG system. |
![]() | CSGMesh | This CSG node allows you to use any mesh resource as a CSG shape, provided it is closed, does not self-intersect, does not contain internal faces and has no edges that connect to more then two faces. |
![]() | CSGPolygon | This node takes a 2D polygon shape and extrudes it to create a 3D mesh. |
![]() | CSGPrimitive | Parent class for various CSG primitives. It contains code and functionality that is common between them. It cannot be used directly. Instead use one of the various classes that inherit from it. |
![]() | CSGShape | This is the CSG base class that provides CSG operation support to the various CSG nodes in Godot. |
![]() | CSGSphere | This node allows you to create a sphere for use with the CSG system. |
![]() | CSGTorus | This node allows you to create a torus for use with the CSG system. |
![]() | CSharpScript | This class represents a C# script. It is the C# equivalent of the GDScript class and is only available in Mono-enabled Godot builds. See also GodotSharp. |
![]() | CubeMap | A 6-sided 3D texture typically used for faking reflections. It can be used to make an object look as if it's reflecting its surroundings. This usually delivers much better performance than other reflection methods. |
![]() | CubeMesh | Generate an axis-aligned cuboid PrimitiveMesh. The cube's UV layout is arranged in a 3×2 layout that allows texturing each face individually. To apply the same texture on all faces, change the material's UV property to Vector3(3, 2, 1). Note: When using a large textured CubeMesh (e.g. as a floor), you may stumble upon UV jittering issues depending on the camera angle. To solve this, increase SubdivideDepth, SubdivideHeight and SubdivideWidth until you no longer notice UV jittering. |
![]() | Curve | A curve that can be saved and re-used for other objects. By default, it ranges between 0 and 1 on the Y axis and positions points relative to the 0.5 Y position. |
![]() | Curve2D | This class describes a Bézier curve in 2D space. It is mainly used to give a shape to a Path2D, but can be manually sampled for other purposes. It keeps a cache of precalculated points along the curve, to speed up further calculations. |
![]() | Curve3D | This class describes a Bézier curve in 3D space. It is mainly used to give a shape to a Path, but can be manually sampled for other purposes. It keeps a cache of precalculated points along the curve, to speed up further calculations. |
![]() | CurveTexture | Renders a given Curve provided to it. Simplifies the task of drawing curves and/or saving them as image files. |
![]() | CylinderMesh | Class representing a cylindrical PrimitiveMesh. This class can be used to create cones by setting either the TopRadius or BottomRadius properties to 0.0. |
![]() | CylinderShape | Cylinder shape for collisions. |
![]() | DampedSpringJoint2D | Damped spring constraint for 2D physics. This resembles a spring joint that always wants to go back to a given length. |
![]() | DirectionalLight | A directional light is a type of Light node that models an infinite number of parallel rays covering the entire scene. It is used for lights with strong intensity that are located far away from the scene to model sunlight or moonlight. The worldspace location of the DirectionalLight transform (origin) is ignored. Only the basis is used to determine light direction. |
![]() | Directory | Directory type. It is used to manage directories and their content (not restricted to the project folder). When creating a new Directory, its default opened directory will be res://. This may change in the future, so it is advised to always use Open(String) to initialize your Directory where you want to operate, with explicit error checking. Note: Many resources types are imported (e.g. textures or sound files), and their source asset will not be included in the exported game, as only the imported version is used. Use ResourceLoader to access imported resources. Here is an example on how to iterate through the files of a directory: func dir_contents(path): var dir = Directory.new() if dir.open(path) == OK: dir.list_dir_begin() var file_name = dir.get_next() while file_name != "": if dir.current_is_dir(): print("Found directory: " + file_name) else: print("Found file: " + file_name) file_name = dir.get_next() else: print("An error occurred when trying to access the path.") |
![]() | Dispatcher | |
![]() | DTLSServer | This class is used to store the state of a DTLS server. Upon Setup(CryptoKey, X509Certificate, X509Certificate) it converts connected PacketPeerUDP to PacketPeerDTLS accepting them via TakeConnection(PacketPeerUDP) as DTLS clients. Under the hood, this class is used to store the DTLS state and cookies of the server. The reason of why the state and cookies are needed is outside of the scope of this documentation. Below a small example of how to use it: # server.gd extends Node var dtls := DTLSServer.new() var server := UDPServer.new() var peers = [] func _ready(): server.listen(4242) var key = load("key.key") # Your private key. var cert = load("cert.crt") # Your X509 certificate. dtls.setup(key, cert) func _process(delta): while server.is_connection_available(): var peer : PacketPeerUDP = server.take_connection() var dtls_peer : PacketPeerDTLS = dtls.take_connection(peer) if dtls_peer.get_status() != PacketPeerDTLS.STATUS_HANDSHAKING: continue # It is normal that 50% of the connections fails due to cookie exchange. print("Peer connected!") peers.append(dtls_peer) for p in peers: p.poll() # Must poll to update the state. if p.get_status() == PacketPeerDTLS.STATUS_CONNECTED: while p.get_available_packet_count() > 0: print("Received message from client: %s" % p.get_packet().get_string_from_utf8()) p.put_packet("Hello DTLS client".to_utf8()) # client.gd extends Node var dtls := PacketPeerDTLS.new() var udp := PacketPeerUDP.new() var connected = false func _ready(): udp.connect_to_host("127.0.0.1", 4242) dtls.connect_to_peer(udp, false) # Use true in production for certificate validation! func _process(delta): dtls.poll() if dtls.get_status() == PacketPeerDTLS.STATUS_CONNECTED: if !connected: # Try to contact server dtls.put_packet("The answer is... 42!".to_utf8()) while dtls.get_available_packet_count() > 0: print("Connected: %s" % dtls.get_packet().get_string_from_utf8()) connected = true |
![]() | DynamicFont | DynamicFont renders vector font files (such as TTF or OTF) dynamically at runtime instead of using a prerendered texture atlas like BitmapFont. This trades the faster loading time of BitmapFonts for the ability to change font parameters like size and spacing during runtime. DynamicFontData is used for referencing the font file paths. DynamicFont also supports defining one or more fallback fonts, which will be used when displaying a character not supported by the main font. DynamicFont uses the FreeType library for rasterization. var dynamic_font = DynamicFont.new() dynamic_font.font_data = load("res://BarlowCondensed-Bold.ttf") dynamic_font.size = 64 $"Label".set("custom_fonts/font", dynamic_font) Note: DynamicFont doesn't support features such as kerning, right-to-left typesetting, ligatures, text shaping, variable fonts and optional font features yet. If you wish to "bake" an optional font feature into a TTF font file, you can use FontForge to do so. In FontForge, use File > Generate Fonts, click Options, choose the desired features then generate the font. |
![]() | DynamicFontData | Used with DynamicFont to describe the location of a vector font file for dynamic rendering at runtime. |
![]() ![]() | DynamicGodotObject |
Represents an Object whose members can be dynamically accessed at runtime through the Variant API.
|
![]() | EditorExportPlugin | Editor export plugins are automatically activated whenever the user exports the project. Their most common use is to determine what files are being included in the exported project. For each plugin, _ExportBegin(String, Boolean, String, Int32) is called at the beginning of the export process and then _ExportFile(String, String, String) is called for each exported file. |
![]() | EditorFeatureProfile | An editor feature profile can be used to disable specific features of the Godot editor. When disabled, the features won't appear in the editor, which makes the editor less cluttered. This is useful in education settings to reduce confusion or when working in a team. For example, artists and level designers could use a feature profile that disables the script editor to avoid accidentally making changes to files they aren't supposed to edit. To manage editor feature profiles visually, use Editor > Manage Feature Profiles... at the top of the editor window. |
![]() | EditorFileDialog | |
![]() | EditorFileSystem | This object holds information of all resources in the filesystem, their types, etc. Note: This class shouldn't be instantiated directly. Instead, access the singleton using GetResourceFilesystem. |
![]() | EditorFileSystemDirectory | A more generalized, low-level variation of the directory concept. |
![]() | EditorImportPlugin | EditorImportPlugins provide a way to extend the editor's resource import functionality. Use them to import resources from custom files or to provide alternatives to the editor's existing importers. Register your EditorPlugin with AddImportPlugin(EditorImportPlugin). EditorImportPlugins work by associating with specific file extensions and a resource type. See GetRecognizedExtensions and GetResourceType. They may optionally specify some import presets that affect the import process. EditorImportPlugins are responsible for creating the resources and saving them in the .import directory. Below is an example EditorImportPlugin that imports a Mesh from a file with the extension ".special" or ".spec": tool extends EditorImportPlugin func get_importer_name(): return "my.special.plugin" func get_visible_name(): return "Special Mesh" func get_recognized_extensions(): return ["special", "spec"] func get_save_extension(): return "mesh" func get_resource_type(): return "Mesh" func get_preset_count(): return 1 func get_preset_name(i): return "Default" func get_import_options(i): return [{"name": "my_option", "default_value": false}] func import(source_file, save_path, options, platform_variants, gen_files): var file = File.new() if file.open(source_file, File.READ) != OK: return FAILED var mesh = Mesh.new() # Fill the Mesh with data read in "file", left as an exercise to the reader var filename = save_path + "." + get_save_extension() return ResourceSaver.save(filename, mesh) |
![]() | EditorInspector | The editor inspector is by default located on the right-hand side of the editor. It's used to edit the properties of the selected node. For example, you can select a node such as Sprite then edit its transform through the inspector tool. The editor inspector is an essential tool in the game development workflow. Note: This class shouldn't be instantiated directly. Instead, access the singleton using GetInspector. |
![]() | EditorInspectorPlugin | These plugins allow adding custom property editors to EditorInspector. Plugins are registered via AddInspectorPlugin(EditorInspectorPlugin). When an object is edited, the CanHandle(Object) function is called and must return true if the object type is supported. If supported, the function ParseBegin(Object) will be called, allowing to place custom controls at the beginning of the class. Subsequently, the ParseCategory(Object, String) and ParseProperty(Object, Int32, String, Int32, String, Int32) are called for every category and property. They offer the ability to add custom controls to the inspector too. Finally, ParseEnd will be called. On each of these calls, the "add" functions can be called. |
![]() | EditorInterface | EditorInterface gives you control over Godot editor's window. It allows customizing the window, saving and (re-)loading scenes, rendering mesh previews, inspecting and editing resources and objects, and provides access to EditorSettings, EditorFileSystem, EditorResourcePreview, ScriptEditor, the editor viewport, and information about scenes. Note: This class shouldn't be instantiated directly. Instead, access the singleton using GetEditorInterface. |
![]() | EditorNavigationMeshGenerator | |
![]() | EditorPlugin | Plugins are used by the editor to extend functionality. The most common types of plugins are those which edit a given node or resource type, import plugins and export plugins. See also EditorScript to add functions to the editor. |
![]() | EditorProperty | This control allows property editing for one or multiple properties into EditorInspector. It is added via EditorInspectorPlugin. |
![]() | EditorResourceConversionPlugin | |
![]() | EditorResourcePreview | This object is used to generate previews for resources of files. Note: This class shouldn't be instantiated directly. Instead, access the singleton using GetResourcePreviewer. |
![]() | EditorResourcePreviewGenerator | Custom code to generate previews. Please check file_dialog/thumbnail_size in EditorSettings to find out the right size to do previews at. |
![]() | EditorSceneImporter | |
![]() | EditorSceneImporterFBX | This is an FBX 3D asset importer with full support for most FBX features. If exporting a FBX scene from Autodesk Maya, use these FBX export settings: - Smoothing Groups - Smooth Mesh - Triangluate (for meshes with blend shapes) - Bake Animation - Resample All - Deformed Models - Skins - Blend Shapes - Curve Filters - Constant Key Reducer - Auto Tangents Only - *Do not check* Constraints (as it will break the file) - Can check Embed Media (embeds textures into the exported FBX file) - Note that when importing embedded media, the texture and mesh will be a single immutable file. - You will have to re-export then re-import the FBX if the texture has changed. - Units: Centimeters - Up Axis: Y - Binary format in FBX 2017 |
![]() | EditorScenePostImport | Imported scenes can be automatically modified right after import by setting their Custom Script Import property to a tool script that inherits from this class. The PostImport(Object) callback receives the imported scene's root node and returns the modified version of the scene. Usage example: tool # Needed so it runs in editor extends EditorScenePostImport # This sample changes all node names # Called right after the scene is imported and gets the root node func post_import(scene): # Change all node names to "modified_[oldnodename]" iterate(scene) return scene # Remember to return the imported scene func iterate(node): if node != null: node.name = "modified_" + node.name for child in node.get_children(): iterate(child) |
![]() | EditorScript | Scripts extending this class and implementing its _Run method can be executed from the Script Editor's File > Run menu option (or by pressing Ctrl+Shift+X) while the editor is running. This is useful for adding custom in-editor functionality to Godot. For more complex additions, consider using EditorPlugins instead. Note: Extending scripts need to have tool mode enabled. Example script: tool
extends EditorScript
func _run():
print("Hello from the Godot Editor!") Note: The script is run in the Editor context, which means the output is visible in the console window started with the Editor (stdout) instead of the usual Godot Output dock. |
![]() | EditorSelection | This object manages the SceneTree selection in the editor. Note: This class shouldn't be instantiated directly. Instead, access the singleton using GetSelection. |
![]() | EditorSettings | Object that holds the project-independent editor settings. These settings are generally visible in the Editor > Editor Settings menu. Property names use slash delimiters to distinguish sections. Setting values can be of any Variant type. It's recommended to use snake_case for editor settings to be consistent with the Godot editor itself. Accessing the settings can be done using the following methods, such as: # `settings.set("some/property", value)` also works as this class overrides `_set()` internally. settings.set_setting("some/property",value) # `settings.get("some/property", value)` also works as this class overrides `_get()` internally. settings.get_setting("some/property") var list_of_settings = settings.get_property_list() Note: This class shouldn't be instantiated directly. Instead, access the singleton using GetEditorSettings. |
![]() | EditorSpatialGizmo | Custom gizmo that is used for providing custom visualization and editing (handles) for 3D Spatial objects. See EditorSpatialGizmoPlugin for more information. |
![]() | EditorSpatialGizmoPlugin | EditorSpatialGizmoPlugin allows you to define a new type of Gizmo. There are two main ways to do so: extending EditorSpatialGizmoPlugin for the simpler gizmos, or creating a new EditorSpatialGizmo type. See the tutorial in the documentation for more info. |
![]() | EditorSpinSlider | |
![]() | EditorVCSInterface | Used by the editor to display VCS extracted information in the editor. The implementation of this API is included in VCS addons, which are essentially GDNative plugins that need to be put into the project folder. These VCS addons are scripts which are attached (on demand) to the object instance of EditorVCSInterface. All the functions listed below, instead of performing the task themselves, they call the internally defined functions in the VCS addons to provide a plug-n-play experience. |
![]() | EncodedObjectAsID | Utility class which holds a reference to the internal identifier of an Object instance, as given by GetInstanceId. This ID can then be used to retrieve the object instance with @GDScript.instance_from_id. This class is used internally by the editor inspector and script debugger, but can also be used in plugins to pass and display objects as their IDs. |
![]() | Engine | The Engine singleton allows you to query and modify the project's run-time parameters, such as frames per second, time scale, and others. |
![]() | Environment | Resource for environment nodes (like WorldEnvironment) that define multiple environment operations (such as background Sky or Color, ambient light, fog, depth-of-field...). These parameters affect the final render of the scene. The order of these operations is: - Depth of Field Blur - Glow - Tonemap (Auto Exposure) - Adjustments These effects will only apply when the Viewport's intended usage is "3D" or "3D Without Effects". This can be configured for the root Viewport with , or for specific Viewports via the Usage property. |
![]() | ExportAttribute | |
![]() | Expression | An expression can be made of any arithmetic operation, built-in math function call, method call of a passed instance, or built-in type construction call. An example expression text using the built-in math functions could be sqrt(pow(3,2) + pow(4,2)). In the following example we use a LineEdit node to write our expression and show the result. onready var expression = Expression.new() func _ready(): $LineEdit.connect("text_entered", self, "_on_text_entered") func _on_text_entered(command): var error = expression.parse(command, []) if error != OK: print(expression.get_error_text()) return var result = expression.execute([], null, true) if not expression.has_execute_failed(): $LineEdit.text = str(result) |
![]() | ExternalTexture | Enable support for the OpenGL ES external texture extension as defined by OES_EGL_image_external. Note: This is only supported for Android platforms. |
![]() | File | File type. This is used to permanently store data into the user device's file system and to read from it. This can be used to store game save data or player configuration files, for example. Here's a sample on how to write and read from a file: func save(content): var file = File.new() file.open("user://save_game.dat", File.WRITE) file.store_string(content) file.close() func load(): var file = File.new() file.open("user://save_game.dat", File.READ) var content = file.get_as_text() file.close() return content In the example above, the file will be saved in the user data folder as specified in the Data paths documentation. Note: To access project resources once exported, it is recommended to use ResourceLoader instead of the File API, as some files are converted to engine-specific formats and their original source files might not be present in the exported PCK package. Note: Files are automatically closed only if the process exits "normally" (such as by clicking the window manager's close button or pressing Alt + F4). If you stop the project execution by pressing F8 while the project is running, the file won't be closed as the game process will be killed. You can work around this by calling Flush at regular intervals. |
![]() | FileDialog | FileDialog is a preset dialog used to choose files and directories in the filesystem. It supports filter masks. The FileDialog automatically sets its window title according to the Mode. If you want to use a custom title, disable this by setting ModeOverridesTitle to false. |
![]() | FileSystemDock | |
![]() | Font | Font contains a Unicode-compatible character set, as well as the ability to draw it with variable width, ascent, descent and kerning. For creating fonts from TTF files (or other font formats), see the editor support for fonts. Note: If a DynamicFont doesn't contain a character used in a string, the character in question will be replaced with codepoint 0xfffd if it's available in the DynamicFont. If this replacement character isn't available in the DynamicFont, the character will be hidden without displaying any replacement character in the string. Note: If a BitmapFont doesn't contain a character used in a string, the character in question will be hidden without displaying any replacement character in the string. |
![]() | FuncRef | In GDScript, functions are not first-class objects. This means it is impossible to store them directly as variables, return them from another function, or pass them as arguments. However, by creating a FuncRef using the @GDScript.funcref function, a reference to a function in a given object can be created, passed around and called. |
![]() | GD | |
![]() | GDNative | |
![]() | GDNativeLibrary | A GDNative library can implement NativeScripts, global functions to call with the GDNative class, or low-level engine extensions through interfaces such as ARVRInterfaceGDNative. The library must be compiled for each platform and architecture that the project will run on. |
![]() | GDScript | A script implemented in the GDScript programming language. The script extends the functionality of all objects that instance it. New(Object) creates a new instance of the script. SetScript(Reference) extends an existing object, if that object's class matches one of the script's base classes. |
![]() | GDScriptFunctionState | Calling @GDScript.yield within a function will cause that function to yield and return its current state as an object of this type. The yielded function call can then be resumed later by calling Resume(Object) on this state object. |
![]() | Generic6DOFJoint | The first 3 DOF axes are linear axes, which represent translation of Bodies, and the latter 3 DOF axes represent the angular motion. Each axis can be either locked, or limited. |
![]() | Geometry | Geometry provides users with a set of helper functions to create geometric shapes, compute intersections between shapes, and process various other geometric operations. |
![]() | GeometryInstance | Base node for geometry-based visual instances. Shares some common functionality like visibility and custom materials. |
![]() | GIProbe | GIProbes are used to provide high-quality real-time indirect light to scenes. They precompute the effect of objects that emit light and the effect of static geometry to simulate the behavior of complex light in real-time. GIProbes need to be baked before using, however, once baked, dynamic objects will receive light from them. Further, lights can be fully dynamic or baked. Having GIProbes in a scene can be expensive, the quality of the probe can be turned down in exchange for better performance in the ProjectSettings using . Note: Meshes should have sufficiently thick walls to avoid light leaks (avoid one-sided walls). For interior levels, enclose your level geometry in a sufficiently large box and bridge the loops to close the mesh. Note: Due to a renderer limitation, emissive ShaderMaterials cannot emit light when used in a GIProbe. Only emissive SpatialMaterials can emit light in a GIProbe. |
![]() | GIProbeData | |
![]() | GodotSharp | This class is a bridge between Godot and the Mono runtime. It exposes several low-level operations and is only available in Mono-enabled Godot builds. See also CSharpScript. |
![]() | GodotSynchronizationContext | |
![]() | GodotTaskScheduler | |
![]() | Gradient | Given a set of colors, this resource will interpolate them in order. This means that if you have color 1, color 2 and color 3, the ramp will interpolate from color 1 to color 2 and from color 2 to color 3. The ramp will initially have 2 colors (black and white), one (black) at ramp lower offset 0 and the other (white) at the ramp higher offset 1. |
![]() | GradientTexture | GradientTexture uses a Gradient to fill the texture data. The gradient will be filled from left to right using colors obtained from the gradient. This means the texture does not necessarily represent an exact copy of the gradient, but instead an interpolation of samples obtained from the gradient at fixed steps (see Width). |
![]() | GraphEdit | GraphEdit manages the showing of GraphNodes it contains, as well as connections and disconnections between them. Signals are sent for each of these two events. Disconnection between GraphNode slots is disabled by default. It is greatly advised to enable low-processor usage mode (see LowProcessorUsageMode) when using GraphEdits. |
![]() | GraphNode | A GraphNode is a container. Each GraphNode can have several input and output slots, sometimes referred to as ports, allowing connections between GraphNodes. To add a slot to GraphNode, add any Control-derived child node to it. After adding at least one child to GraphNode new sections will be automatically created in the Inspector called 'Slot'. When 'Slot' is expanded you will see list with index number for each slot. You can click on each of them to expand further. In the Inspector you can enable (show) or disable (hide) slots. By default, all slots are disabled so you may not see any slots on your GraphNode initially. You can assign a type to each slot. Only slots of the same type will be able to connect to each other. You can also assign colors to slots. A tuple of input and output slots is defined for each GUI element included in the GraphNode. Input connections are on the left and output connections are on the right side of GraphNode. Only enabled slots are counted as connections. |
![]() | GridContainer | GridContainer will arrange its Control-derived children in a grid like structure, the grid columns are specified using the Columns property and the number of rows will be equal to the number of children in the container divided by the number of columns. For example, if the container has 5 children, and 2 columns, there will be 3 rows in the container. Notice that grid layout will preserve the columns and rows for every size of the container, and that empty columns will be expanded automatically. Note: GridContainer only works with child nodes inheriting from Control. It won't rearrange child nodes inheriting from Node2D. |
![]() | GridMap | GridMap lets you place meshes on a grid interactively. It works both from the editor and from scripts, which can help you create in-game level editors. GridMaps use a MeshLibrary which contains a list of tiles. Each tile is a mesh with materials plus optional collision and navigation shapes. A GridMap contains a collection of cells. Each grid cell refers to a tile in the MeshLibrary. All cells in the map have the same dimensions. Internally, a GridMap is split into a sparse collection of octants for efficient rendering and physics processing. Every octant has the same dimensions and can contain several cells. Note: GridMap doesn't extend VisualInstance and therefore can't be hidden or cull masked based on Layers. If you make a light not affect the first layer, the whole GridMap won't be lit by the light in question. |
![]() | GrooveJoint2D | Groove constraint for 2D physics. This is useful for making a body "slide" through a segment placed in another. |
![]() | HashingContext | The HashingContext class provides an interface for computing cryptographic hashes over multiple iterations. This is useful for example when computing hashes of big files (so you don't have to load them all in memory), network streams, and data streams in general (so you don't have to hold buffers). The HashingContextHashType enum shows the supported hashing algorithms. const CHUNK_SIZE = 1024 func hash_file(path): var ctx = HashingContext.new() var file = File.new() # Start a SHA-256 context. ctx.start(HashingContext.HASH_SHA256) # Check that file exists. if not file.file_exists(path): return # Open the file to hash. file.open(path, File.READ) # Update the context after reading each chunk. while not file.eof_reached(): ctx.update(file.get_buffer(CHUNK_SIZE)) # Get the computed hash. var res = ctx.finish() # Print the result as hex string and array. printt(res.hex_encode(), Array(res)) Note: Not available in HTML5 exports. |
![]() | HBoxContainer | Horizontal box container. See BoxContainer. |
![]() | HeightMapShape | Height map shape resource, which can be added to a PhysicsBody or Area. |
![]() | HingeJoint | A HingeJoint normally uses the Z axis of body A as the hinge axis, another axis can be specified when adding it manually though. See also Generic6DOFJoint. |
![]() | HScrollBar | Horizontal version of ScrollBar, which goes from left (min) to right (max). |
![]() | HSeparator | Horizontal separator. See Separator. Even though it looks horizontal, it is used to separate objects vertically. |
![]() | HSlider | |
![]() | HSplitContainer | Horizontal split container. See SplitContainer. This goes from left to right. |
![]() | HTTPClient | Hyper-text transfer protocol client (sometimes called "User Agent"). Used to make HTTP requests to download web content, upload files and other data or to communicate with various services, among other use cases. See the HTTPRequest node for a higher-level alternative. Note: This client only needs to connect to a host once (see ConnectToHost(String, Int32, Boolean, Boolean)) to send multiple requests. Because of this, methods that take URLs usually take just the part after the host instead of the full URL, as the client is already connected to a host. See Request(HTTPClientMethod, String, String, String) for a full example and to get started. A HTTPClient should be reused between multiple requests or to connect to different hosts instead of creating one client per request. Supports SSL and SSL server certificate verification. HTTP status codes in the 2xx range indicate success, 3xx redirection (i.e. "try again, but over here"), 4xx something was wrong with the request, and 5xx something went wrong on the server's side. For more information on HTTP, see https://developer.mozilla.org/en-US/docs/Web/HTTP (or read RFC 2616 to get it straight from the source: https://tools.ietf.org/html/rfc2616). Note: When performing HTTP requests from a project exported to HTML5, keep in mind the remote server may not allow requests from foreign origins due to CORS. If you host the server in question, you should modify its backend to allow requests from foreign origins by adding the Access-Control-Allow-Origin: * HTTP header. Note: SSL/TLS support is currently limited to TLS 1.0, TLS 1.1, and TLS 1.2. Attempting to connect to a TLS 1.3-only server will return an error. |
![]() | HTTPRequest | A node with the ability to send HTTP requests. Uses HTTPClient internally. Can be used to make HTTP requests, i.e. download or upload files or web content via HTTP. Example of contacting a REST API and printing one of its returned fields: func _ready(): # Create an HTTP request node and connect its completion signal. var http_request = HTTPRequest.new() add_child(http_request) http_request.connect("request_completed", self, "_http_request_completed") # Perform a GET request. The URL below returns JSON as of writing. var error = http_request.request("https://httpbin.org/get") if error != OK: push_error("An error occurred in the HTTP request.") # Perform a POST request. The URL below returns JSON as of writing. # Note: Don't make simultaneous requests using a single HTTPRequest node. # The snippet below is provided for reference only. var body = {"name": "Godette"} error = http_request.request("https://httpbin.org/post", [], true, HTTPClient.METHOD_POST, body) if error != OK: push_error("An error occurred in the HTTP request.") # Called when the HTTP request is completed. func _http_request_completed(result, response_code, headers, body): var response = parse_json(body.get_string_from_utf8()) # Will print the user agent string used by the HTTPRequest node (as recognized by httpbin.org). print(response.headers["User-Agent"]) Example of loading and displaying an image using HTTPRequest: func _ready(): # Create an HTTP request node and connect its completion signal. var http_request = HTTPRequest.new() add_child(http_request) http_request.connect("request_completed", self, "_http_request_completed") # Perform the HTTP request. The URL below returns a PNG image as of writing. var error = http_request.request("https://via.placeholder.com/512") if error != OK: push_error("An error occurred in the HTTP request.") # Called when the HTTP request is completed. func _http_request_completed(result, response_code, headers, body): var image = Image.new() var error = image.load_png_from_buffer(body) if error != OK: push_error("Couldn't load the image.") var texture = ImageTexture.new() texture.create_from_image(image) # Display the image in a TextureRect node. var texture_rect = TextureRect.new() add_child(texture_rect) texture_rect.texture = texture Note: When performing HTTP requests from a project exported to HTML5, keep in mind the remote server may not allow requests from foreign origins due to CORS. If you host the server in question, you should modify its backend to allow requests from foreign origins by adding the Access-Control-Allow-Origin: * HTTP header. Note: SSL/TLS support is currently limited to TLS 1.0, TLS 1.1, and TLS 1.2. Attempting to connect to a TLS 1.3-only server will return an error. |
![]() | Image | Native image datatype. Contains image data which can be converted to an ImageTexture and provides commonly used image processing methods. The maximum width and height for an Image are and . An Image cannot be assigned to a texture property of an object directly (such as Sprite), and has to be converted manually to an ImageTexture first. Note: The maximum image size is 16384×16384 pixels due to graphics hardware limitations. Larger images may fail to import. |
![]() | ImageTexture | A Texture based on an Image. For an image to be displayed, an ImageTexture has to be created from it using the CreateFromImage(Image, UInt32) method: var texture = ImageTexture.new() var image = Image.new() image.load("res://icon.png") texture.create_from_image(image) $Sprite.texture = texture This way, textures can be created at run-time by loading images both from within the editor and externally. Warning: Prefer to load imported textures with @GDScript.load over loading them from within the filesystem dynamically with Load(String), as it may not work in exported projects: var texture = load("res://icon.png") $Sprite.texture = texture This is because images have to be imported as StreamTexture first to be loaded with @GDScript.load. If you'd still like to load an image file just like any other Resource, import it as an Image resource instead, and then load it normally using the @GDScript.load method. But do note that the image data can still be retrieved from an imported texture as well using the GetData method, which returns a copy of the data: var texture = load("res://icon.png") var image : Image = texture.get_data() An ImageTexture is not meant to be operated from within the editor interface directly, and is mostly useful for rendering images on screen dynamically via code. If you need to generate images procedurally from within the editor, consider saving and importing images as custom texture resources implementing a new [!:Godot.EditorImportPlugin]. Note: The maximum texture size is 16384×16384 pixels due to graphics hardware limitations. |
![]() | ImmediateGeometry | Draws simple geometry from code. Uses a drawing mode similar to OpenGL 1.x. See also ArrayMesh, MeshDataTool and SurfaceTool for procedural geometry generation. Note: ImmediateGeometry3D is best suited to small amounts of mesh data that change every frame. It will be slow when handling large amounts of mesh data. If mesh data doesn't change often, use ArrayMesh, MeshDataTool or SurfaceTool instead. Note: Godot uses clockwise winding order for front faces of triangle primitive modes. Note: In case of missing points when handling large amounts of mesh data, try increasing its buffer size limit under . |
![]() | Input | A singleton that deals with inputs. This includes key presses, mouse buttons and movement, joypads, and input actions. Actions and their events can be set in the Input Map tab in the Project > Project Settings, or with the InputMap class. |
![]() | InputEvent | Base class of all sort of input event. See _Input(InputEvent). |
![]() | InputEventAction | Contains a generic action which can be targeted from several types of inputs. Actions can be created from the Input Map tab in the Project > Project Settings menu. See _Input(InputEvent). |
![]() | InputEventGesture | |
![]() | InputEventJoypadButton | Input event type for gamepad buttons. For gamepad analog sticks and joysticks, see InputEventJoypadMotion. |
![]() | InputEventJoypadMotion | Stores information about joystick motions. One InputEventJoypadMotion represents one axis at a time. |
![]() | InputEventKey | Stores key presses on the keyboard. Supports key presses, key releases and Echo events. |
![]() | InputEventMagnifyGesture | |
![]() | InputEventMIDI | |
![]() | InputEventMouse | Stores general mouse events information. |
![]() | InputEventMouseButton | Contains mouse click information. See _Input(InputEvent). |
![]() | InputEventMouseMotion | Contains mouse and pen motion information. Supports relative, absolute positions and speed. See _Input(InputEvent). Note: By default, this event is only emitted once per frame rendered at most. If you need more precise input reporting, call SetUseAccumulatedInput(Boolean) with false to make events emitted as often as possible. If you use InputEventMouseMotion to draw lines, consider implementing Bresenham's line algorithm as well to avoid visible gaps in lines if the user is moving the mouse quickly. |
![]() | InputEventPanGesture | |
![]() | InputEventScreenDrag | Contains screen drag information. See _Input(InputEvent). |
![]() | InputEventScreenTouch | Stores multi-touch press/release information. Supports touch press, touch release and Index for multi-touch count and order. |
![]() | InputEventWithModifiers | Contains keys events information with modifiers support like Shift or Alt. See _Input(InputEvent). |
![]() | InputMap | Manages all InputEventAction which can be created/modified from the project settings menu Project > Project Settings > Input Map or in code with AddAction(String, Single) and ActionAddEvent(String, InputEvent). See _Input(InputEvent). |
![]() | InstancePlaceholder | Turning on the option Load As Placeholder for an instanced scene in the editor causes it to be replaced by an InstancePlaceholder when running the game. This makes it possible to delay actually loading the scene until calling ReplaceByInstance(PackedScene). This is useful to avoid loading large scenes all at once by loading parts of it selectively. The InstancePlaceholder does not have a transform. This causes any child nodes to be positioned relatively to the Viewport from point (0,0), rather than their parent as displayed in the editor. Replacing the placeholder with a scene with a transform will transform children relatively to their parent again. |
![]() | InterpolatedCamera | |
![]() | IP | IP contains support functions for the Internet Protocol (IP). TCP/IP support is in different classes (see StreamPeerTCP and TCP_Server). IP provides DNS hostname resolution support, both blocking and threaded. |
![]() | ItemList | This control provides a selectable list of items that may be in a single (or multiple columns) with option of text, icons, or both text and icon. Tooltips are supported and may be different for every item in the list. Selectable items in the list may be selected or deselected and multiple selection may be enabled. Selection with right mouse button may also be enabled to allow use of popup context menus. Items may also be "activated" by double-clicking them or by pressing Enter. Item text only supports single-line strings, newline characters (e.g. \n) in the string won't produce a newline. Text wrapping is enabled in mode, but column's width is adjusted to fully fit its content by default. You need to set FixedColumnWidth greater than zero to wrap the text. |
![]() | JavaClass | |
![]() | JavaClassWrapper | |
![]() | JavaScript | The JavaScript singleton is implemented only in the HTML5 export. It's used to access the browser's JavaScript context. This allows interaction with embedding pages or calling third-party JavaScript APIs. Note: This singleton can be disabled at build-time to improve security. By default, the JavaScript singleton is enabled. Official export templates also have the JavaScript singleton enabled. See Compiling for the Web in the documentation for more information. |
![]() | JNISingleton | |
![]() | Joint | Joints are used to bind together two physics bodies. They have a solver priority and can define if the bodies of the two attached nodes should be able to collide with each other. |
![]() | Joint2D | Base node for all joint constraints in 2D physics. Joints take 2 bodies and apply a custom constraint. |
![]() | JSON | Helper class for parsing JSON data. For usage example and other important hints, see JSONParseResult. |
![]() | JSONParseResult | Returned by Parse(String), JSONParseResult contains the decoded JSON or error information if the JSON source wasn't successfully parsed. You can check if the JSON source was successfully parsed with if json_result.error == OK. |
![]() | JSONRPC | |
![]() | KinematicBody | Kinematic bodies are special types of bodies that are meant to be user-controlled. They are not affected by physics at all; to other types of bodies, such as a character or a rigid body, these are the same as a static body. However, they have two main uses: Simulated motion: When these bodies are moved manually, either from code or from an AnimationPlayer (with PlaybackProcessMode set to "physics"), the physics will automatically compute an estimate of their linear and angular velocity. This makes them very useful for moving platforms or other AnimationPlayer-controlled objects (like a door, a bridge that opens, etc). Kinematic characters: KinematicBody also has an API for moving objects (the MoveAndCollide(Vector3, Boolean, Boolean, Boolean) and MoveAndSlide(Vector3, NullableVector3, Boolean, Int32, Single, Boolean) methods) while performing collision tests. This makes them really useful to implement characters that collide against a world, but don't require advanced physics. |
![]() | KinematicBody2D | Kinematic bodies are special types of bodies that are meant to be user-controlled. They are not affected by physics at all; to other types of bodies, such as a character or a rigid body, these are the same as a static body. However, they have two main uses: Simulated motion: When these bodies are moved manually, either from code or from an AnimationPlayer (with PlaybackProcessMode set to "physics"), the physics will automatically compute an estimate of their linear and angular velocity. This makes them very useful for moving platforms or other AnimationPlayer-controlled objects (like a door, a bridge that opens, etc). Kinematic characters: KinematicBody2D also has an API for moving objects (the MoveAndCollide(Vector2, Boolean, Boolean, Boolean) and MoveAndSlide(Vector2, NullableVector2, Boolean, Int32, Single, Boolean) methods) while performing collision tests. This makes them really useful to implement characters that collide against a world, but don't require advanced physics. |
![]() | KinematicCollision | Contains collision data for KinematicBody collisions. When a KinematicBody is moved using MoveAndCollide(Vector3, Boolean, Boolean, Boolean), it stops if it detects a collision with another body. If a collision is detected, a KinematicCollision object is returned. This object contains information about the collision, including the colliding object, the remaining motion, and the collision position. This information can be used to calculate a collision response. |
![]() | KinematicCollision2D | Contains collision data for KinematicBody2D collisions. When a KinematicBody2D is moved using MoveAndCollide(Vector2, Boolean, Boolean, Boolean), it stops if it detects a collision with another body. If a collision is detected, a KinematicCollision2D object is returned. This object contains information about the collision, including the colliding object, the remaining motion, and the collision position. This information can be used to calculate a collision response. |
![]() | Label | Label displays plain text on the screen. It gives you control over the horizontal and vertical alignment, and can wrap the text inside the node's bounding rectangle. It doesn't support bold, italics or other formatting. For that, use RichTextLabel instead. Note: Contrarily to most other Controls, Label's MouseFilter defaults to (i.e. it doesn't react to mouse input events). This implies that a label won't display any configured HintTooltip, unless you change its mouse filter. |
![]() | LargeTexture | A Texture capable of storing many smaller textures with offsets. You can dynamically add pieces (Textures) to this LargeTexture using different offsets. |
![]() | Light | Light is the abstract base class for light nodes. As it can't be instanced, it shouldn't be used directly. Other types of light nodes inherit from it. Light contains the common variables and parameters used for lighting. |
![]() | Light2D | Casts light in a 2D environment. Light is defined by a (usually grayscale) texture, a color, an energy value, a mode (see constants), and various other parameters (range and shadows-related). Note: Light2D can also be used as a mask. |
![]() | LightOccluder2D | Occludes light cast by a Light2D, casting shadows. The LightOccluder2D must be provided with an OccluderPolygon2D in order for the shadow to be computed. |
![]() | Line2D | A line through several points in 2D space. Note: By default, Godot can only draw up to 4,096 polygon points at a time. To increase this limit, open the Project Settings and increase and . |
![]() | LineEdit | LineEdit provides a single-line string editor, used for text fields. It features many built-in shortcuts which will always be available (Ctrl here maps to Command on macOS): - Ctrl + C: Copy - Ctrl + X: Cut - Ctrl + V or Ctrl + Y: Paste/"yank" - Ctrl + Z: Undo - Ctrl + Shift + Z: Redo - Ctrl + U: Delete text from the cursor position to the beginning of the line - Ctrl + K: Delete text from the cursor position to the end of the line - Ctrl + A: Select all text - Up/Down arrow: Move the cursor to the beginning/end of the line On macOS, some extra keyboard shortcuts are available: - Ctrl + F: Like the right arrow key, move the cursor one character right - Ctrl + B: Like the left arrow key, move the cursor one character left - Ctrl + P: Like the up arrow key, move the cursor to the previous line - Ctrl + N: Like the down arrow key, move the cursor to the next line - Ctrl + D: Like the Delete key, delete the character on the right side of cursor - Ctrl + H: Like the Backspace key, delete the character on the left side of the cursor - Command + Left arrow: Like the Home key, move the cursor to the beginning of the line - Command + Right arrow: Like the End key, move the cursor to the end of the line |
![]() | LineShape2D | Line shape for 2D collisions. It works like a 2D plane and will not allow any physics body to go to the negative side. Not recommended for rigid bodies, and usually not recommended for static bodies either because it forces checks against it on every frame. |
![]() | LinkButton | This kind of button is primarily used when the interaction with the button causes a context change (like linking to a web page). See also BaseButton which contains common properties and methods associated with this node. |
![]() | Listener | Once added to the scene tree and enabled using MakeCurrent, this node will override the location sounds are heard from. This can be used to listen from a location different from the Camera. Note: There is no 2D equivalent for this node yet. |
![]() | MainLoop | MainLoop is the abstract base class for a Godot project's game loop. It is inherited by SceneTree, which is the default game loop implementation used in Godot projects, though it is also possible to write and use one's own MainLoop subclass instead of the scene tree. Upon the application start, a MainLoop implementation must be provided to the OS; otherwise, the application will exit. This happens automatically (and a SceneTree is created) unless a main Script is provided from the command line (with e.g. godot -s my_loop.gd, which should then be a MainLoop implementation. Here is an example script implementing a simple MainLoop: extends MainLoop var time_elapsed = 0 var keys_typed = [] var quit = false func _initialize(): print("Initialized:") print(" Starting time: %s" % str(time_elapsed)) func _idle(delta): time_elapsed += delta # Return true to end the main loop. return quit func _input_event(event): # Record keys. if event is InputEventKey and event.pressed and !event.echo: keys_typed.append(OS.get_scancode_string(event.scancode)) # Quit on Escape press. if event.scancode == KEY_ESCAPE: quit = true # Quit on any mouse click. if event is InputEventMouseButton: quit = true func _finalize(): print("Finalized:") print(" End time: %s" % str(time_elapsed)) print(" Keys typed: %s" % var2str(keys_typed)) |
![]() | MarginContainer | Adds a top, left, bottom, and right margin to all Control nodes that are direct children of the container. To control the MarginContainer's margin, use the margin_* theme properties listed below. Note: Be careful, Control margin values are different than the constant margin values. If you want to change the custom margin values of the MarginContainer by code, you should use the following examples: # This code sample assumes the current script is extending MarginContainer. var margin_value = 100 add_constant_override("margin_top", margin_value) add_constant_override("margin_left", margin_value) add_constant_override("margin_bottom", margin_value) add_constant_override("margin_right", margin_value) |
![]() | Marshalls | Provides data transformation and encoding utility functions. |
![]() | MasterAttribute | |
![]() | MasterSyncAttribute | |
![]() | Material | Material is a base Resource used for coloring and shading geometry. All materials inherit from it and almost all VisualInstance derived nodes carry a Material. A few flags and parameters are shared between all material types and are configured here. |
![]() | Mathf | |
![]() | MenuButton | Special button that brings up a PopupMenu when clicked. New items can be created inside this PopupMenu using get_popup().add_item("My Item Name"). You can also create them directly from the editor. To do so, select the MenuButton node, then in the toolbar at the top of the 2D editor, click Items then click Add in the popup. You will be able to give each item new properties. See also BaseButton which contains common properties and methods associated with this node. |
![]() | Mesh | Mesh is a type of Resource that contains vertex array-based geometry, divided in surfaces. Each surface contains a completely separate array and a material used to draw it. Design wise, a mesh with multiple surfaces is preferred to a single surface, because objects created in 3D editing software commonly contain multiple materials. |
![]() | MeshDataTool | MeshDataTool provides access to individual vertices in a Mesh. It allows users to read and edit vertex data of meshes. It also creates an array of faces and edges. To use MeshDataTool, load a mesh with CreateFromSurface(ArrayMesh, Int32). When you are finished editing the data commit the data to a mesh with CommitToSurface(ArrayMesh). Below is an example of how MeshDataTool may be used. var mesh = ArrayMesh.new() mesh.add_surface_from_arrays(Mesh.PRIMITIVE_TRIANGLES, CubeMesh.new().get_mesh_arrays()) var mdt = MeshDataTool.new() mdt.create_from_surface(mesh, 0) for i in range(mdt.get_vertex_count()): var vertex = mdt.get_vertex(i) # In this example we extend the mesh by one unit, which results in seperated faces as it is flat shaded. vertex += mdt.get_vertex_normal(i) # Save your change. mdt.set_vertex(i, vertex) mesh.surface_remove(0) mdt.commit_to_surface(mesh) var mi = MeshInstance.new() mi.mesh = mesh add_child(mi) See also ArrayMesh, ImmediateGeometry and SurfaceTool for procedural geometry generation. Note: Godot uses clockwise winding order for front faces of triangle primitive modes. |
![]() | MeshInstance | MeshInstance is a node that takes a Mesh resource and adds it to the current scenario by creating an instance of it. This is the class most often used to get 3D geometry rendered and can be used to instance a single Mesh in many places. This allows to reuse geometry and save on resources. When a Mesh has to be instanced more than thousands of times at close proximity, consider using a MultiMesh in a MultiMeshInstance instead. |
![]() | MeshInstance2D | |
![]() | MeshLibrary | |
![]() | MeshTexture | Simple texture that uses a mesh to draw itself. It's limited because flags can't be changed and region drawing is not supported. |
![]() | MobileVRInterface | This is a generic mobile VR implementation where you need to provide details about the phone and HMD used. It does not rely on any existing framework. This is the most basic interface we have. For the best effect, you need a mobile phone with a gyroscope and accelerometer. Note that even though there is no positional tracking, the camera will assume the headset is at a height of 1.85 meters. You can change this by setting EyeHeight. You can initialise this interface as follows: var interface = ARVRServer.find_interface("Native mobile") if interface and interface.initialize(): get_viewport().arvr = true |
![]() | MultiMesh | MultiMesh provides low-level mesh instancing. Drawing thousands of MeshInstance nodes can be slow, since each object is submitted to the GPU then drawn individually. MultiMesh is much faster as it can draw thousands of instances with a single draw call, resulting in less API overhead. As a drawback, if the instances are too far away of each other, performance may be reduced as every single instance will always render (they are spatially indexed as one, for the whole object). Since instances may have any behavior, the AABB used for visibility must be provided by the user. |
![]() | MultiMeshInstance | MultiMeshInstance is a specialized node to instance GeometryInstances based on a MultiMesh resource. This is useful to optimize the rendering of a high amount of instances of a given mesh (for example trees in a forest or grass strands). |
![]() | MultiMeshInstance2D | MultiMeshInstance2D is a specialized node to instance a MultiMesh resource in 2D. Usage is the same as MultiMeshInstance. |
![]() | MultiplayerAPI | This class implements most of the logic behind the high-level multiplayer API. See also NetworkedMultiplayerPeer. By default, SceneTree has a reference to this class that is used to provide multiplayer capabilities (i.e. RPC/RSET) across the whole scene. It is possible to override the MultiplayerAPI instance used by specific Nodes by setting the CustomMultiplayer property, effectively allowing to run both client and server in the same scene. Note: The high-level multiplayer API protocol is an implementation detail and isn't meant to be used by non-Godot servers. It may change without notice. |
![]() | MultiplayerPeerGDNative | |
![]() | Mutex | |
![]() | NativeScript | |
![]() | Navigation | Provides navigation and pathfinding within a collection of NavigationMeshes. By default, these will be automatically collected from child NavigationMeshInstance nodes, but they can also be added on the fly with NavmeshAdd(NavigationMesh, Transform, Object). In addition to basic pathfinding, this class also assists with aligning navigation agents with the meshes they are navigating on. |
![]() | Navigation2D | Navigation2D provides navigation and pathfinding within a 2D area, specified as a collection of NavigationPolygon resources. By default, these are automatically collected from child NavigationPolygonInstance nodes, but they can also be added on the fly with NavpolyAdd(NavigationPolygon, Transform2D, Object). |
![]() | NavigationMesh | |
![]() | NavigationMeshInstance | |
![]() | NavigationPolygon | There are two ways to create polygons. Either by using the AddOutline(Vector2) method, or using the AddPolygon(Int32) method. Using AddOutline(Vector2): var polygon = NavigationPolygon.new() var outline = PoolVector2Array([Vector2(0, 0), Vector2(0, 50), Vector2(50, 50), Vector2(50, 0)]) polygon.add_outline(outline) polygon.make_polygons_from_outlines() $NavigationPolygonInstance.navpoly = polygon Using AddPolygon(Int32) and indices of the vertices array. var polygon = NavigationPolygon.new() var vertices = PoolVector2Array([Vector2(0, 0), Vector2(0, 50), Vector2(50, 50), Vector2(50, 0)]) polygon.set_vertices(vertices) var indices = PoolIntArray(0, 3, 1) polygon.add_polygon(indices) $NavigationPolygonInstance.navpoly = polygon |
![]() | NavigationPolygonInstance | |
![]() | NetworkedMultiplayerENet | A PacketPeer implementation that should be passed to NetworkPeer after being initialized as either a client or server. Events can then be handled by connecting to SceneTree signals. ENet's purpose is to provide a relatively thin, simple and robust network communication layer on top of UDP (User Datagram Protocol). Note: ENet only uses UDP, not TCP. When forwarding the server port to make your server accessible on the public Internet, you only need to forward the server port in UDP. You can use the UPNP class to try to forward the server port automatically when starting the server. |
![]() | NetworkedMultiplayerPeer | Manages the connection to network peers. Assigns unique IDs to each client connected to the server. See also MultiplayerAPI. Note: The high-level multiplayer API protocol is an implementation detail and isn't meant to be used by non-Godot servers. It may change without notice. |
![]() | NinePatchRect | Also known as 9-slice panels, NinePatchRect produces clean panels of any size, based on a small texture. To do so, it splits the texture in a 3×3 grid. When you scale the node, it tiles the texture's sides horizontally or vertically, the center on both axes but it doesn't scale or tile the corners. |
![]() | Node | Nodes are Godot's building blocks. They can be assigned as the child of another node, resulting in a tree arrangement. A given node can contain any number of nodes as children with the requirement that all siblings (direct children of a node) should have unique names. A tree of nodes is called a scene. Scenes can be saved to the disk and then instanced into other scenes. This allows for very high flexibility in the architecture and data model of Godot projects. Scene tree: The SceneTree contains the active tree of nodes. When a node is added to the scene tree, it receives the notification and its _EnterTree callback is triggered. Child nodes are always added after their parent node, i.e. the _EnterTree callback of a parent node will be triggered before its child's. Once all nodes have been added in the scene tree, they receive the notification and their respective _Ready callbacks are triggered. For groups of nodes, the _Ready callback is called in reverse order, starting with the children and moving up to the parent nodes. This means that when adding a node to the scene tree, the following order will be used for the callbacks: _EnterTree of the parent, _EnterTree of the children, _Ready of the children and finally _Ready of the parent (recursively for the entire scene tree). Processing: Nodes can override the "process" state, so that they receive a callback on each frame requesting them to process (do something). Normal processing (callback _Process(Single), toggled with SetProcess(Boolean)) happens as fast as possible and is dependent on the frame rate, so the processing time delta (in seconds) is passed as an argument. Physics processing (callback _PhysicsProcess(Single), toggled with SetPhysicsProcess(Boolean)) happens a fixed number of times per second (60 by default) and is useful for code related to the physics engine. Nodes can also process input events. When present, the _Input(InputEvent) function will be called for each input that the program receives. In many cases, this can be overkill (unless used for simple projects), and the _UnhandledInput(InputEvent) function might be preferred; it is called when the input event was not handled by anyone else (typically, GUI Control nodes), ensuring that the node only receives the events that were meant for it. To keep track of the scene hierarchy (especially when instancing scenes into other scenes), an "owner" can be set for the node with the Owner property. This keeps track of who instanced what. This is mostly useful when writing editors and tools, though. Finally, when a node is freed with Free or QueueFree, it will also free all its children. Groups: Nodes can be added to as many groups as you want to be easy to manage, you could create groups like "enemies" or "collectables" for example, depending on your game. See AddToGroup(String, Boolean), IsInGroup(String) and RemoveFromGroup(String). You can then retrieve all nodes in these groups, iterate them and even call methods on groups via the methods on SceneTree. Networking with nodes: After connecting to a server (or making one, see NetworkedMultiplayerENet), it is possible to use the built-in RPC (remote procedure call) system to communicate over the network. By calling Rpc(String, Object) with a method name, it will be called locally and in all connected peers (peers = clients and the server that accepts connections). To identify which node receives the RPC call, Godot will use its NodePath (make sure node names are the same on all peers). Also, take a look at the high-level networking tutorial and corresponding demos. |
![]() | Node2D | A 2D game object, with a transform (position, rotation, and scale). All 2D nodes, including physics objects and sprites, inherit from Node2D. Use Node2D as a parent node to move, scale and rotate children in a 2D project. Also gives control of the node's render order. |
![]() | NodePath | |
![]() | NoiseTexture | Uses an OpenSimplexNoise to fill the texture data. You can specify the texture size but keep in mind that larger textures will take longer to generate and seamless noise only works with square sized textures. NoiseTexture can also generate normalmap textures. The class uses Threads to generate the texture data internally, so GetData may return null if the generation process has not completed yet. In that case, you need to wait for the texture to be generated before accessing the data: var texture = preload("res://noise.tres") yield(texture, "changed") var image = texture.get_data() |
![]() | Object | Every class which is not a built-in type inherits from this class. You can construct Objects from scripting languages, using Object.new() in GDScript, new Object in C#, or the "Construct Object" node in VisualScript. Objects do not manage memory. If a class inherits from Object, you will have to delete instances of it manually. To do so, call the Free method from your script or delete the instance from C++. Some classes that extend Object add memory management. This is the case of Reference, which counts references and deletes itself automatically when no longer referenced. Node, another fundamental type, deletes all its children when freed from memory. Objects export properties, which are mainly useful for storage and editing, but not really so much in programming. Properties are exported in _GetPropertyList and handled in _Get(String) and _Set(String, Object). However, scripting languages and C++ have simpler means to export them. Property membership can be tested directly in GDScript using in: var n = Node2D.new() print("position" in n) # Prints "True". print("other_property" in n) # Prints "False". The in operator will evaluate to true as long as the key exists, even if the value is null. Objects also receive notifications. Notifications are a simple way to notify the object about different events, so they can all be handled together. See _Notification(Int32). Note: Unlike references to a Reference, references to an Object stored in a variable can become invalid without warning. Therefore, it's recommended to use Reference for data classes instead of Object. Note: Due to a bug, you can't create a "plain" Object using Object.new(). Instead, use ClassDB.instance("Object"). This bug only applies to Object itself, not any of its descendents like Reference. |
![]() | OccluderPolygon2D | Editor facility that helps you draw a 2D polygon used as resource for LightOccluder2D. |
![]() | OmniLight | An Omnidirectional light is a type of Light that emits light in all directions. The light is attenuated by distance and this attenuation can be configured by changing its energy, radius, and attenuation parameters. Note: By default, only 32 OmniLights may affect a single mesh resource at once. Consider splitting your level into several meshes to decrease the likelihood that more than 32 lights will affect the same mesh resource. Splitting the level mesh will also improve frustum culling effectiveness, leading to greater performance. If you need to use more lights per mesh, you can increase at the cost of shader compilation times. |
![]() | OpenSimplexNoise | This resource allows you to configure and sample a fractal noise space. Here is a brief usage example that configures an OpenSimplexNoise and gets samples at various positions and dimensions: var noise = OpenSimplexNoise.new() # Configure noise.seed = randi() noise.octaves = 4 noise.period = 20.0 noise.persistence = 0.8 # Sample print("Values:") print(noise.get_noise_2d(1.0, 1.0)) print(noise.get_noise_3d(0.5, 3.0, 15.0)) print(noise.get_noise_4d(0.5, 1.9, 4.7, 0.0)) |
![]() | OptionButton | OptionButton is a type button that provides a selectable list of items when pressed. The item selected becomes the "current" item and is displayed as the button text. See also BaseButton which contains common properties and methods associated with this node. |
![]() | OS | Operating System functions. OS wraps the most common functionality to communicate with the host operating system, such as the clipboard, video driver, date and time, timers, environment variables, execution of binaries, command line, etc. |
![]() | PackedDataContainer | |
![]() | PackedDataContainerRef | |
![]() | PackedScene | A simplified interface to a scene file. Provides access to operations and checks that can be performed on the scene resource itself. Can be used to save a node to a file. When saving, the node as well as all the nodes it owns get saved (see owner property on Node). Note: The node doesn't need to own itself. Example of loading a saved scene: # Use `load()` instead of `preload()` if the path isn't known at compile-time. var scene = preload("res://scene.tscn").instance() # Add the node as a child of the node the script is attached to. add_child(scene) Example of saving a node with different owners: The following example creates 3 objects: Node2D (node), RigidBody2D (rigid) and CollisionObject2D (collision). collision is a child of rigid which is a child of node. Only rigid is owned by node and pack will therefore only save those two nodes, but not collision. # Create the objects. var node = Node2D.new() var rigid = RigidBody2D.new() var collision = CollisionShape2D.new() # Create the object hierarchy. rigid.add_child(collision) node.add_child(rigid) # Change owner of `rigid`, but not of `collision`. rigid.owner = node var scene = PackedScene.new() # Only `node` and `rigid` are now packed. var result = scene.pack(node) if result == OK: var error = ResourceSaver.save("res://path/name.scn", scene) # Or "user://..." if error != OK: push_error("An error occurred while saving the scene to disk.") |
![]() | PacketPeer | PacketPeer is an abstraction and base class for packet-based protocols (such as UDP). It provides an API for sending and receiving packets both as raw data or variables. This makes it easy to transfer data over a protocol, without having to encode data as low-level bytes or having to worry about network ordering. |
![]() | PacketPeerDTLS | This class represents a DTLS peer connection. It can be used to connect to a DTLS server, and is returned by TakeConnection(PacketPeerUDP). |
![]() | PacketPeerGDNative | |
![]() | PacketPeerStream | PacketStreamPeer provides a wrapper for working using packets over a stream. This allows for using packet based code with StreamPeers. PacketPeerStream implements a custom protocol over the StreamPeer, so the user should not read or write to the wrapped StreamPeer directly. |
![]() | PacketPeerUDP | UDP packet peer. Can be used to send raw UDP packets as well as Variants. |
![]() | Panel | |
![]() | PanelContainer | Panel container type. This container fits controls inside of the delimited area of a stylebox. It's useful for giving controls an outline. |
![]() | PanoramaSky | A resource referenced in an Environment that is used to draw a background. The Panorama sky functions similar to skyboxes in other engines, except it uses an equirectangular sky map instead of a cube map. Using an HDR panorama is strongly recommended for accurate, high-quality reflections. Godot supports the Radiance HDR (.hdr) and OpenEXR (.exr) image formats for this purpose. You can use this tool to convert a cube map to an equirectangular sky map. |
![]() | ParallaxBackground | A ParallaxBackground uses one or more ParallaxLayer child nodes to create a parallax effect. Each ParallaxLayer can move at a different speed using MotionOffset. This creates an illusion of depth in a 2D game. If not used with a Camera2D, you must manually calculate the ScrollOffset. |
![]() | ParallaxLayer | A ParallaxLayer must be the child of a ParallaxBackground node. Each ParallaxLayer can be set to move at different speeds relative to the camera movement or the ScrollOffset value. This node's children will be affected by its scroll offset. Note: Any changes to this node's position and scale made after it enters the scene will be ignored. |
![]() | Particles | 3D particle node used to create a variety of particle systems and effects. Particles features an emitter that generates some number of particles at a given rate. Use the process_material property to add a ParticlesMaterial to configure particle appearance and behavior. Alternatively, you can add a ShaderMaterial which will be applied to all particles. Note: Particles only work when using the GLES3 renderer. If using the GLES2 renderer, use CPUParticles instead. You can convert Particles to CPUParticles by selecting the node, clicking the Particles menu at the top of the 3D editor viewport then choosing Convert to CPUParticles. Note: After working on a Particles node, remember to update its VisibilityAabb by selecting it, clicking the Particles menu at the top of the 3D editor viewport then choose Generate Visibility AABB. Otherwise, particles may suddenly disappear depending on the camera position and angle. |
![]() | Particles2D | 2D particle node used to create a variety of particle systems and effects. Particles2D features an emitter that generates some number of particles at a given rate. Use the process_material property to add a ParticlesMaterial to configure particle appearance and behavior. Alternatively, you can add a ShaderMaterial which will be applied to all particles. Note: Particles2D only work when using the GLES3 renderer. If using the GLES2 renderer, use CPUParticles2D instead. You can convert Particles2D to CPUParticles2D by selecting the node, clicking the Particles menu at the top of the 2D editor viewport then choosing Convert to CPUParticles2D. Note: After working on a Particles node, remember to update its VisibilityRect by selecting it, clicking the Particles menu at the top of the 2D editor viewport then choose Generate Visibility Rect. Otherwise, particles may suddenly disappear depending on the camera position and angle. Note: Unlike CPUParticles2D, Particles2D currently ignore the texture region defined in AtlasTextures. |
![]() | ParticlesMaterial | ParticlesMaterial defines particle properties and behavior. It is used in the process_material of Particles and Particles2D emitter nodes. Some of this material's properties are applied to each particle when emitted, while others can have a CurveTexture applied to vary values over the lifetime of the particle. When a randomness ratio is applied to a property it is used to scale that property by a random amount. The random ratio is used to interpolate between 1.0 and a random number less than one, the result is multiplied by the property to obtain the randomized property. For example a random ratio of 0.4 would scale the original property between 0.4-1.0 of its original value. |
![]() | Path | Can have PathFollow child nodes moving along the Curve3D. See PathFollow for more information on the usage. Note that the path is considered as relative to the moved nodes (children of PathFollow). As such, the curve should usually start with a zero vector (0, 0, 0). |
![]() | Path2D | Can have PathFollow2D child nodes moving along the Curve2D. See PathFollow2D for more information on usage. Note: The path is considered as relative to the moved nodes (children of PathFollow2D). As such, the curve should usually start with a zero vector ((0, 0)). |
![]() | PathFollow | This node takes its parent Path, and returns the coordinates of a point within it, given a distance from the first vertex. It is useful for making other nodes follow a path, without coding the movement pattern. For that, the nodes must be children of this node. The descendant nodes will then move accordingly when setting an offset in this node. |
![]() | PathFollow2D | This node takes its parent Path2D, and returns the coordinates of a point within it, given a distance from the first vertex. It is useful for making other nodes follow a path, without coding the movement pattern. For that, the nodes must be children of this node. The descendant nodes will then move accordingly when setting an offset in this node. |
![]() | PCKPacker | The PCKPacker is used to create packages that can be loaded into a running project using LoadResourcePack(String, Boolean, Int32). var packer = PCKPacker.new() packer.pck_start("test.pck") packer.add_file("res://text.txt", "text.txt") packer.flush() The above PCKPacker creates package test.pck, then adds a file named text.txt at the root of the package. |
![]() | Performance | This class provides access to a number of different monitors related to performance, such as memory usage, draw calls, and FPS. These are the same as the values displayed in the Monitor tab in the editor's Debugger panel. By using the GetMonitor(PerformanceMonitor) method of this class, you can access this data from your code. Note: A few of these monitors are only available in debug mode and will always return 0 when used in a release build. Note: Many of these monitors are not updated in real-time, so there may be a short delay between changes. |
![]() | PHashTranslation | Optimized translation. Uses real-time compressed translations, which results in very small dictionaries. |
![]() | PhysicalBone | |
![]() | Physics2DDirectBodyState | Provides direct access to a physics body in the Physics2DServer, allowing safe changes to physics properties. This object is passed via the direct state callback of rigid/character bodies, and is intended for changing the direct state of that body. See _IntegrateForces(Physics2DDirectBodyState). |
![]() | Physics2DDirectSpaceState | Direct access object to a space in the Physics2DServer. It's used mainly to do queries against objects and areas residing in a given space. |
![]() | Physics2DServer | Physics2DServer is the server responsible for all 2D physics. It can create many kinds of physics objects, but does not insert them on the node tree. |
![]() | Physics2DShapeQueryParameters | This class contains the shape and other parameters for 2D intersection/collision queries. See also Physics2DShapeQueryResult. |
![]() | Physics2DShapeQueryResult | The result of a 2D shape query in Physics2DServer. See also Physics2DShapeQueryParameters. |
![]() | Physics2DTestMotionResult | |
![]() | PhysicsBody | PhysicsBody is an abstract base class for implementing a physics body. All *Body types inherit from it. |
![]() | PhysicsBody2D | PhysicsBody2D is an abstract base class for implementing a physics body. All *Body2D types inherit from it. |
![]() | PhysicsDirectBodyState | Provides direct access to a physics body in the PhysicsServer, allowing safe changes to physics properties. This object is passed via the direct state callback of rigid/character bodies, and is intended for changing the direct state of that body. See _IntegrateForces(PhysicsDirectBodyState). |
![]() | PhysicsDirectSpaceState | Direct access object to a space in the PhysicsServer. It's used mainly to do queries against objects and areas residing in a given space. |
![]() | PhysicsMaterial | Provides a means of modifying the collision properties of a PhysicsBody. |
![]() | PhysicsServer | PhysicsServer is the server responsible for all 3D physics. It can create many kinds of physics objects, but does not insert them on the node tree. |
![]() | PhysicsShapeQueryParameters | This class contains the shape and other parameters for 3D intersection/collision queries. See also PhysicsShapeQueryResult. |
![]() | PhysicsShapeQueryResult | The result of a 3D shape query in PhysicsServer. See also PhysicsShapeQueryParameters. |
![]() | PinJoint | Pin joint for 3D rigid bodies. It pins 2 bodies (rigid or static) together. See also Generic6DOFJoint. |
![]() | PinJoint2D | Pin Joint for 2D rigid bodies. It pins two bodies (rigid or static) together. |
![]() | PlaneMesh | Class representing a planar PrimitiveMesh. This flat mesh does not have a thickness. By default, this mesh is aligned on the X and Z axes; this default rotation isn't suited for use with billboarded materials. For billboarded materials, use QuadMesh instead. Note: When using a large textured PlaneMesh (e.g. as a floor), you may stumble upon UV jittering issues depending on the camera angle. To solve this, increase SubdivideDepth and SubdivideWidth until you no longer notice UV jittering. |
![]() | PlaneShape | An infinite plane shape for 3D collisions. Note that the Plane's normal matters; anything "below" the plane will collide with it. If the PlaneShape is used in a PhysicsBody, it will cause colliding objects placed "below" it to teleport "above" the plane. |
![]() | PluginScript | |
![]() | PointMesh | The PointMesh is made from a single point. Instead of relying on triangles, points are rendered as a single rectangle on the screen with a constant size. They are intended to be used with Particle systems, but can be used as a cheap way to render constant size billboarded sprites (for example in a point cloud). PointMeshes, must be used with a material that has a point size. Point size can be accessed in a shader with POINT_SIZE, or in a SpatialMaterial by setting FlagsUsePointSize and the variable ParamsPointSize. When using PointMeshes, properties that normally alter vertices will be ignored, including billboard mode, grow, and cull face. |
![]() | Polygon2D | A Polygon2D is defined by a set of points. Each point is connected to the next, with the final point being connected to the first, resulting in a closed polygon. Polygon2Ds can be filled with color (solid or gradient) or filled with a given texture. Note: By default, Godot can only draw up to 4,096 polygon points at a time. To increase this limit, open the Project Settings and increase and . |
![]() | PolygonPathFinder | |
![]() | Popup | |
![]() | PopupDialog | PopupDialog is a base class for popup dialogs, along with WindowDialog. |
![]() | PopupMenu | |
![]() | PopupPanel | Class for displaying popups with a panel background. In some cases it might be simpler to use than Popup, since it provides a configurable background. If you are making windows, better check WindowDialog. |
![]() | Position2D | Generic 2D position hint for editing. It's just like a plain Node2D, but it displays as a cross in the 2D editor at all times. You can set cross' visual size by using the gizmo in the 2D editor while the node is selected. |
![]() | Position3D | Generic 3D position hint for editing. It's just like a plain Spatial, but it displays as a cross in the 3D editor at all times. |
![]() | PrimitiveMesh | Base class for all primitive meshes. Handles applying a Material to a primitive mesh. Examples include CapsuleMesh, CubeMesh, CylinderMesh, PlaneMesh, PrismMesh, QuadMesh, and SphereMesh. |
![]() | PrismMesh | Class representing a prism-shaped PrimitiveMesh. |
![]() | ProceduralSky | ProceduralSky provides a way to create an effective background quickly by defining procedural parameters for the sun, the sky and the ground. The sky and ground are very similar, they are defined by a color at the horizon, another color, and finally an easing curve to interpolate between these two colors. Similarly, the sun is described by a position in the sky, a color, and an easing curve. However, the sun also defines a minimum and maximum angle, these two values define at what distance the easing curve begins and ends from the sun, and thus end up defining the size of the sun in the sky. The ProceduralSky is updated on the CPU after the parameters change. It is stored in a texture and then displayed as a background in the scene. This makes it relatively unsuitable for real-time updates during gameplay. However, with a small enough texture size, it can still be updated relatively frequently, as it is updated on a background thread when multi-threading is available. |
![]() | ProgressBar | General-purpose progress bar. Shows fill percentage from right to left. |
![]() | ProjectSettings | Contains global variables accessible from everywhere. Use GetSetting(String), SetSetting(String, Object) or HasSetting(String) to access them. Variables stored in project.godot are also loaded into ProjectSettings, making this object very useful for reading custom game configuration options. When naming a Project Settings property, use the full path to the setting including the category. For example, "application/config/name" for the project name. Category and property names can be viewed in the Project Settings dialog. Overriding: Any project setting can be overridden by creating a file named override.cfg in the project's root directory. This can also be used in exported projects by placing this file in the same directory as the project binary. Overriding will still take the base project settings' feature tags in account. Therefore, make sure to also override the setting with the desired feature tags if you want them to override base project settings on all platforms and configurations. |
![]() | ProximityGroup | General-purpose proximity detection node. |
![]() | ProxyTexture | |
![]() | PuppetAttribute | |
![]() | PuppetSyncAttribute | |
![]() | QuadMesh | Class representing a square PrimitiveMesh. This flat mesh does not have a thickness. By default, this mesh is aligned on the X and Y axes; this default rotation is more suited for use with billboarded materials. Unlike PlaneMesh, this mesh doesn't provide subdivision options. |
![]() | RandomNumberGenerator | RandomNumberGenerator is a class for generating pseudo-random numbers. It currently uses PCG32. Note: The underlying algorithm is an implementation detail. As a result, it should not be depended upon for reproducible random streams across Godot versions. To generate a random float number (within a given range) based on a time-dependant seed: var rng = RandomNumberGenerator.new() func _ready(): rng.randomize() var my_random_number = rng.randf_range(-10.0, 10.0) Note: The default values of Seed and State properties are pseudo-random, and changes when calling Randomize. The 0 value documented here is a placeholder, and not the actual default seed. |
![]() | Range | |
![]() | RayCast | A RayCast represents a line from its origin to its destination position, cast_to. It is used to query the 3D space in order to find the closest object along the path of the ray. RayCast can ignore some objects by adding them to the exception list via add_exception or by setting proper filtering with collision layers and masks. RayCast can be configured to report collisions with Areas (CollideWithAreas) and/or PhysicsBodys (CollideWithBodies). Only enabled raycasts will be able to query the space and report collisions. RayCast calculates intersection every physics frame (see Node), and the result is cached so it can be used later until the next frame. If multiple queries are required between physics frames (or during the same frame), use ForceRaycastUpdate after adjusting the raycast. |
![]() | RayCast2D | A RayCast represents a line from its origin to its destination position, cast_to. It is used to query the 2D space in order to find the closest object along the path of the ray. RayCast2D can ignore some objects by adding them to the exception list via add_exception, by setting proper filtering with collision layers, or by filtering object types with type masks. RayCast2D can be configured to report collisions with Area2Ds (CollideWithAreas) and/or PhysicsBody2Ds (CollideWithBodies). Only enabled raycasts will be able to query the space and report collisions. RayCast2D calculates intersection every physics frame (see Node), and the result is cached so it can be used later until the next frame. If multiple queries are required between physics frames (or during the same frame) use ForceRaycastUpdate after adjusting the raycast. |
![]() | RayShape | Ray shape for 3D collisions, which can be set into a PhysicsBody or Area. A ray is not really a collision body; instead, it tries to separate itself from whatever is touching its far endpoint. It's often useful for characters. |
![]() | RayShape2D | Ray shape for 2D collisions. A ray is not really a collision body; instead, it tries to separate itself from whatever is touching its far endpoint. It's often useful for characters. |
![]() | RectangleShape2D | Rectangle shape for 2D collisions. This shape is useful for modeling box-like 2D objects. |
![]() | Reference | Base class for any object that keeps a reference count. Resource and many other helper objects inherit this class. Unlike other Object types, References keep an internal reference counter so that they are automatically released when no longer in use, and only then. References therefore do not need to be freed manually with Free. In the vast majority of use cases, instantiating and using Reference-derived types is all you need to do. The methods provided in this class are only for advanced users, and can cause issues if misused. Note: In C#, references will not be freed instantly after they are no longer in use. Instead, garbage collection will run periodically and will free references that are no longer in use. This means that unused references will linger on for a while before being removed. |
![]() | ReferenceRect | A rectangle box that displays only a BorderColor border color around its rectangle. ReferenceRect has no fill Color. If you need to display a rectangle filled with a solid color, consider using ColorRect instead. |
![]() | ReflectionProbe | Capture its surroundings as a dual paraboloid image, and stores versions of it with increasing levels of blur to simulate different material roughnesses. The ReflectionProbe is used to create high-quality reflections at the cost of performance. It can be combined with GIProbes and Screen Space Reflections to achieve high quality reflections. ReflectionProbes render all objects within their CullMask, so updating them can be quite expensive. It is best to update them once with the important static objects and then leave them. Note: By default Godot will only render 16 reflection probes. If you need more, increase the number of atlas subdivisions. This setting can be found in . |
![]() | RegEx | A regular expression (or regex) is a compact language that can be used to recognise strings that follow a specific pattern, such as URLs, email addresses, complete sentences, etc. For instance, a regex of ab[0-9] would find any string that is ab followed by any number from 0 to 9. For a more in-depth look, you can easily find various tutorials and detailed explanations on the Internet. To begin, the RegEx object needs to be compiled with the search pattern using Compile(String) before it can be used. var regex = RegEx.new() regex.compile("\\w-(\\d+)") The search pattern must be escaped first for GDScript before it is escaped for the expression. For example, compile("\\d+") would be read by RegEx as \d+. Similarly, compile("\"(?:\\\\.|[^\"])*\"") would be read as "(?:\\.|[^"])*". Using Search(String, Int32, Int32), you can find the pattern within the given text. If a pattern is found, RegExMatch is returned and you can retrieve details of the results using methods such as GetString(Object) and GetStart(Object). var regex = RegEx.new() regex.compile("\\w-(\\d+)") var result = regex.search("abc n-0123") if result: print(result.get_string()) # Would print n-0123 The results of capturing groups () can be retrieved by passing the group number to the various methods in RegExMatch. Group 0 is the default and will always refer to the entire pattern. In the above example, calling result.get_string(1) would give you 0123. This version of RegEx also supports named capturing groups, and the names can be used to retrieve the results. If two or more groups have the same name, the name would only refer to the first one with a match. var regex = RegEx.new() regex.compile("d(?<digit>[0-9]+)|x(?<digit>[0-9a-f]+)") var result = regex.search("the number is x2f") if result: print(result.get_string("digit")) # Would print 2f If you need to process multiple results, SearchAll(String, Int32, Int32) generates a list of all non-overlapping results. This can be combined with a for loop for convenience. for result in regex.search_all("d01, d03, d0c, x3f and x42"): print(result.get_string("digit")) # Would print 01 03 0 3f 42 Example of splitting a string using a RegEx: var regex = RegEx.new() regex.compile("\\S+") # Negated whitespace character class. var results = [] for result in regex.search_all("One Two \n\tThree"): results.push_back(result.get_string()) # The `results` array now contains "One", "Two", "Three". Note: Godot's regex implementation is based on the PCRE2 library. You can view the full pattern reference here. Tip: You can use Regexr to test regular expressions online. |
![]() | RegExMatch | Contains the results of a single RegEx match returned by Search(String, Int32, Int32) and SearchAll(String, Int32, Int32). It can be used to find the position and range of the match and its capturing groups, and it can extract its substring for you. |
![]() | RemoteAttribute | |
![]() | RemoteSyncAttribute | |
![]() | RemoteTransform | |
![]() | RemoteTransform2D | RemoteTransform2D pushes its own Transform2D to another CanvasItem derived Node (called the remote node) in the scene. It can be set to update another Node's position, rotation and/or scale. It can use either global or local coordinates. |
![]() | Resource | Resource is the base class for all Godot-specific resource types, serving primarily as data containers. Since they inherit from Reference, resources are reference-counted and freed when no longer in use. They are also cached once loaded from disk, so that any further attempts to load a resource from a given path will return the same reference (all this in contrast to a Node, which is not reference-counted and can be instanced from disk as many times as desired). Resources can be saved externally on disk or bundled into another object, such as a Node or another resource. Note: In C#, resources will not be freed instantly after they are no longer in use. Instead, garbage collection will run periodically and will free resources that are no longer in use. This means that unused resources will linger on for a while before being removed. |
![]() | ResourceFormatLoader | Godot loads resources in the editor or in exported games using ResourceFormatLoaders. They are queried automatically via the ResourceLoader singleton, or when a resource with internal dependencies is loaded. Each file type may load as a different resource type, so multiple ResourceFormatLoaders are registered in the engine. Extending this class allows you to define your own loader. Be sure to respect the documented return types and values. You should give it a global class name with class_name for it to be registered. Like built-in ResourceFormatLoaders, it will be called automatically when loading resources of its handled type(s). You may also implement a ResourceFormatSaver. Note: You can also extend [!:Godot.EditorImportPlugin] if the resource type you need exists but Godot is unable to load its format. Choosing one way over another depends on if the format is suitable or not for the final exported game. For example, it's better to import .png textures as .stex (StreamTexture) first, so they can be loaded with better efficiency on the graphics card. |
![]() | ResourceFormatSaver | The engine can save resources when you do it from the editor, or when you use the ResourceSaver singleton. This is accomplished thanks to multiple ResourceFormatSavers, each handling its own format and called automatically by the engine. By default, Godot saves resources as .tres (text-based), .res (binary) or another built-in format, but you can choose to create your own format by extending this class. Be sure to respect the documented return types and values. You should give it a global class name with class_name for it to be registered. Like built-in ResourceFormatSavers, it will be called automatically when saving resources of its recognized type(s). You may also implement a ResourceFormatLoader. |
![]() | ResourceImporter | |
![]() | ResourceInteractiveLoader | Interactive Resource loader. This object is returned by ResourceLoader when performing an interactive load. It allows loading resources with high granularity, which makes it mainly useful for displaying loading bars or percentages. |
![]() | ResourceLoader | Singleton used to load resource files from the filesystem. It uses the many ResourceFormatLoader classes registered in the engine (either built-in or from a plugin) to load files into memory and convert them to a format that can be used by the engine. |
![]() | ResourcePreloader | This node is used to preload sub-resources inside a scene, so when the scene is loaded, all the resources are ready to use and can be retrieved from the preloader. GDScript has a simplified @GDScript.preload built-in method which can be used in most situations, leaving the use of ResourcePreloader for more advanced scenarios. |
![]() | ResourceSaver | Singleton for saving Godot-specific resource types to the filesystem. It uses the many ResourceFormatSaver classes registered in the engine (either built-in or from a plugin) to save engine-specific resource data to text-based (e.g. .tres or .tscn) or binary files (e.g. .res or .scn). |
![]() | RichTextEffect | A custom effect for use with RichTextLabel. Note: For a RichTextEffect to be usable, a BBCode tag must be defined as a member variable called bbcode in the script. # The RichTextEffect will be usable like this: `[example]Some text[/example]` var bbcode = "example" Note: As soon as a RichTextLabel contains at least one RichTextEffect, it will continuously process the effect unless the project is paused. This may impact battery life negatively. |
![]() | RichTextLabel | Rich text can contain custom text, fonts, images and some basic formatting. The label manages these as an internal tag stack. It also adapts itself to given width/heights. Note: Assignments to BbcodeText clear the tag stack and reconstruct it from the property's contents. Any edits made to BbcodeText will erase previous edits made from other manual sources such as AppendBbcode(String) and the push_* / Pop methods. Note: RichTextLabel doesn't support entangled BBCode tags. For example, instead of using [b]bold[i]bold italic[/b]italic[/i], use [b]bold[i]bold italic[/i][/b][i]italic[/i]. Note: Unlike Label, RichTextLabel doesn't have a property to horizontally align text to the center. Instead, enable BbcodeEnabled and surround the text in a [center] tag as follows: [center]Example[/center]. There is currently no built-in way to vertically align text either, but this can be emulated by relying on anchors/containers and the FitContentHeight property. |
![]() | RID | |
![]() | RigidBody | This is the node that implements full 3D physics. This means that you do not control a RigidBody directly. Instead, you can apply forces to it (gravity, impulses, etc.), and the physics simulation will calculate the resulting movement, collision, bouncing, rotating, etc. A RigidBody has 4 behavior Modes: Rigid, Static, Character, and Kinematic. Note: Don't change a RigidBody's position every frame or very often. Sporadic changes work fine, but physics runs at a different granularity (fixed Hz) than usual rendering (process callback) and maybe even in a separate thread, so changing this from a process loop may result in strange behavior. If you need to directly affect the body's state, use _IntegrateForces(PhysicsDirectBodyState), which allows you to directly access the physics state. If you need to override the default physics behavior, you can write a custom force integration function. See CustomIntegrator. With Bullet physics (the default), the center of mass is the RigidBody3D center. With GodotPhysics, the center of mass is the average of the CollisionShape centers. |
![]() | RigidBody2D | This node implements simulated 2D physics. You do not control a RigidBody2D directly. Instead, you apply forces to it (gravity, impulses, etc.) and the physics simulation calculates the resulting movement based on its mass, friction, and other physical properties. A RigidBody2D has 4 behavior Modes: Rigid, Static, Character, and Kinematic. Note: You should not change a RigidBody2D's position or linear_velocity every frame or even very often. If you need to directly affect the body's state, use _IntegrateForces(Physics2DDirectBodyState), which allows you to directly access the physics state. Please also keep in mind that physics bodies manage their own transform which overwrites the ones you set. So any direct or indirect transformation (including scaling of the node or its parent) will be visible in the editor only, and immediately reset at runtime. If you need to override the default physics behavior or add a transformation at runtime, you can write a custom force integration. See CustomIntegrator. The center of mass is always located at the node's origin without taking into account the CollisionShape2D centroid offsets. |
![]() | SceneState | Maintains a list of resources, nodes, exported, and overridden properties, and built-in scripts associated with a scene. This class cannot be instantiated directly, it is retrieved for a given scene as the result of GetState. |
![]() | SceneTree | As one of the most important classes, the SceneTree manages the hierarchy of nodes in a scene as well as scenes themselves. Nodes can be added, retrieved and removed. The whole scene tree (and thus the current scene) can be paused. Scenes can be loaded, switched and reloaded. You can also use the SceneTree to organize your nodes into groups: every node can be assigned as many groups as you want to create, e.g. an "enemy" group. You can then iterate these groups or even call methods and set properties on all the group's members at once. SceneTree is the default MainLoop implementation used by scenes, and is thus in charge of the game loop. |
![]() | SceneTreeTimer | A one-shot timer managed by the scene tree, which emits timeout on completion. See also CreateTimer(Single, Boolean). As opposed to Timer, it does not require the instantiation of a node. Commonly used to create a one-shot delay timer as in the following example: func some_function(): print("Timer started.") yield(get_tree().create_timer(1.0), "timeout") print("Timer ended.") |
![]() | Script | A class stored as a resource. A script extends the functionality of all objects that instance it. The new method of a script subclass creates a new instance. SetScript(Reference) extends an existing object, if that object's class matches one of the script's base classes. |
![]() | ScriptCreateDialog | The ScriptCreateDialog creates script files according to a given template for a given scripting language. The standard use is to configure its fields prior to calling one of the Popup_(NullableRect2) methods. func _ready(): dialog.config("Node", "res://new_node.gd") # For in-engine types dialog.config("\"res://base_node.gd\"", "res://derived_node.gd") # For script types dialog.popup_centered() |
![]() | ScriptEditor | Note: This class shouldn't be instantiated directly. Instead, access the singleton using GetScriptEditor. |
![]() | ScrollBar | Scrollbars are a Range-based Control, that display a draggable area (the size of the page). Horizontal (HScrollBar) and Vertical (VScrollBar) versions are available. |
![]() | ScrollContainer | A ScrollContainer node meant to contain a Control child. ScrollContainers will automatically create a scrollbar child (HScrollBar, VScrollBar, or both) when needed and will only draw the Control within the ScrollContainer area. Scrollbars will automatically be drawn at the right (for vertical) or bottom (for horizontal) and will enable dragging to move the viewable Control (and its children) within the ScrollContainer. Scrollbars will also automatically resize the grabber based on the RectMinSize of the Control relative to the ScrollContainer. Works great with a Panel control. You can set EXPAND on the children's size flags, so they will upscale to the ScrollContainer's size if it's larger (scroll is invisible for the chosen dimension). |
![]() | SegmentShape2D | Segment shape for 2D collisions. Consists of two points, a and b. |
![]() | Semaphore | |
![]() | Separator | Separator is a Control used for separating other controls. It's purely a visual decoration. Horizontal (HSeparator) and Vertical (VSeparator) versions are available. |
![]() | Shader | This class allows you to define a custom shader program that can be used by a ShaderMaterial. Shaders allow you to write your own custom behavior for rendering objects or updating particle information. For a detailed explanation and usage, please see the tutorials linked below. |
![]() | ShaderMaterial | A material that uses a custom Shader program to render either items to screen or process particles. You can create multiple materials for the same shader but configure different values for the uniforms defined in the shader. Note: Due to a renderer limitation, emissive ShaderMaterials cannot emit light when used in a GIProbe. Only emissive SpatialMaterials can emit light in a GIProbe. |
![]() | Shape | Base class for all 3D shape resources. Nodes that inherit from this can be used as shapes for a PhysicsBody or Area objects. |
![]() | Shape2D | Base class for all 2D shapes. All 2D shape types inherit from this. |
![]() | ShortCut | A shortcut for binding input. Shortcuts are commonly used for interacting with a Control element from a InputEvent. |
![]() | SignalAttribute | |
![]() | SignalAwaiter | |
![]() | Skeleton | Skeleton provides a hierarchical interface for managing bones, including pose, rest and animation (see Animation). It can also use ragdoll physics. The overall transform of a bone with respect to the skeleton is determined by the following hierarchical order: rest pose, custom pose and pose. Note that "global pose" below refers to the overall transform of the bone with respect to skeleton, so it not the actual global/world transform of the bone. |
![]() | Skeleton2D | |
![]() | SkeletonIK | |
![]() | Skin | |
![]() | SkinReference | |
![]() | Sky | The base class for PanoramaSky and ProceduralSky. |
![]() | SlaveAttribute | |
![]() | Slider | Base class for GUI sliders. Note: The Range.changed and Range.value_changed signals are part of the Range class which this class inherits from. |
![]() | SliderJoint | Slides across the X axis of the pivot object. See also Generic6DOFJoint. |
![]() | SoftBody | A deformable physics body. Used to create elastic or deformable objects such as cloth, rubber, or other flexible materials. |
![]() | Spatial | Most basic 3D game object, with a 3D Transform and visibility settings. All other 3D game objects inherit from Spatial. Use Spatial as a parent node to move, scale, rotate and show/hide children in a 3D project. Affine operations (rotate, scale, translate) happen in parent's local coordinate system, unless the Spatial object is set as top-level. Affine operations in this coordinate system correspond to direct affine operations on the Spatial's transform. The word local below refers to this coordinate system. The coordinate system that is attached to the Spatial object itself is referred to as object-local coordinate system. Note: Unless otherwise specified, all methods that have angle parameters must have angles specified as radians. To convert degrees to radians, use @GDScript.deg2rad. |
![]() | SpatialGizmo | |
![]() | SpatialMaterial | This provides a default material with a wide variety of rendering features and properties without the need to write shader code. See the tutorial below for details. |
![]() | SpatialVelocityTracker | |
![]() | SphereMesh | Class representing a spherical PrimitiveMesh. |
![]() | SphereShape | Sphere shape for 3D collisions, which can be set into a PhysicsBody or Area. This shape is useful for modeling sphere-like 3D objects. |
![]() | SpinBox | SpinBox is a numerical input text field. It allows entering integers and floats. Example: var spin_box = SpinBox.new() add_child(spin_box) var line_edit = spin_box.get_line_edit() line_edit.context_menu_enabled = false spin_box.align = LineEdit.ALIGN_RIGHT The above code will create a SpinBox, disable context menu on it and set the text alignment to right. See Range class for more options over the SpinBox. Note: SpinBox relies on an underlying LineEdit node. To theme a SpinBox's background, add theme items for LineEdit and customize them. |
![]() | SplitContainer | Container for splitting two Controls vertically or horizontally, with a grabber that allows adjusting the split offset or ratio. |
![]() | SpotLight | A Spotlight is a type of Light node that emits lights in a specific direction, in the shape of a cone. The light is attenuated through the distance. This attenuation can be configured by changing the energy, radius and attenuation parameters of Light. Note: By default, only 32 SpotLights may affect a single mesh resource at once. Consider splitting your level into several meshes to decrease the likelihood that more than 32 lights will affect the same mesh resource. Splitting the level mesh will also improve frustum culling effectiveness, leading to greater performance. If you need to use more lights per mesh, you can increase at the cost of shader compilation times. |
![]() | SpringArm | The SpringArm node is a node that casts a ray (or collision shape) along its z axis and moves all its direct children to the collision point, minus a margin. The most common use case for this is to make a 3rd person camera that reacts to collisions in the environment. The SpringArm will either cast a ray, or if a shape is given, it will cast the shape in the direction of its z axis. If you use the SpringArm as a camera controller for your player, you might need to exclude the player's collider from the SpringArm's collision check. |
![]() | Sprite | A node that displays a 2D texture. The texture displayed can be a region from a larger atlas texture, or a frame from a sprite sheet animation. |
![]() | Sprite3D | A node that displays a 2D texture in a 3D environment. The texture displayed can be a region from a larger atlas texture, or a frame from a sprite sheet animation. |
![]() | SpriteBase3D | A node that displays 2D texture information in a 3D environment. |
![]() | SpriteFrames | Sprite frame library for AnimatedSprite. Contains frames and animation data for playback. Note: You can associate a set of normal maps by creating additional SpriteFrames resources with a _normal suffix. For example, having 2 SpriteFrames resources run and run_normal will make it so the run animation uses the normal map. |
![]() | StaticBody | Static body for 3D physics. A static body is a simple body that is not intended to move. In contrast to RigidBody, they don't consume any CPU resources as long as they don't move. Additionally, a constant linear or angular velocity can be set for the static body, so even if it doesn't move, it affects other bodies as if it was moving (this is useful for simulating conveyor belts or conveyor wheels). |
![]() | StaticBody2D | Static body for 2D physics. A StaticBody2D is a body that is not intended to move. It is ideal for implementing objects in the environment, such as walls or platforms. Additionally, a constant linear or angular velocity can be set for the static body, which will affect colliding bodies as if it were moving (for example, a conveyor belt). |
![]() | StreamPeer | StreamPeer is an abstraction and base class for stream-based protocols (such as TCP or UNIX sockets). It provides an API for sending and receiving data through streams as raw data or strings. |
![]() | StreamPeerBuffer | |
![]() | StreamPeerGDNative | |
![]() | StreamPeerSSL | SSL stream peer. This object can be used to connect to an SSL server or accept a single SSL client connection. |
![]() | StreamPeerTCP | TCP stream peer. This object can be used to connect to TCP servers, or also is returned by a TCP server. |
![]() | StreamTexture | A texture that is loaded from a .stex file. |
![]() | StringExtensions | |
![]() | StyleBox | StyleBox is Resource that provides an abstract base class for drawing stylized boxes for the UI. StyleBoxes are used for drawing the styles of buttons, line edit backgrounds, tree backgrounds, etc. and also for testing a transparency mask for pointer signals. If mask test fails on a StyleBox assigned as mask to a control, clicks and motion signals will go through it to the one below. Note: For children of Control that have Theme Properties, the focusStyleBox is displayed over the normal, hover or pressedStyleBox. This makes the focusStyleBox more reusable across different nodes. |
![]() | StyleBoxEmpty | Empty stylebox (really does not display anything). |
![]() | StyleBoxFlat | This StyleBox can be used to achieve all kinds of looks without the need of a texture. The following properties are customizable: - Color - Border width (individual width for each border) - Rounded corners (individual radius for each corner) - Shadow (with blur and offset) Setting corner radius to high values is allowed. As soon as corners overlap, the stylebox will switch to a relative system. Example: height = 30 corner_radius_top_left = 50 corner_radius_bottom_left = 100 The relative system now would take the 1:2 ratio of the two left corners to calculate the actual corner width. Both corners added will never be more than the height. Result: corner_radius_top_left: 10 corner_radius_bottom_left: 20 |
![]() | StyleBoxLine | StyleBox that displays a single line of a given color and thickness. It can be used to draw things like separators. |
![]() | StyleBoxTexture | Texture-based nine-patch StyleBox, in a way similar to NinePatchRect. This stylebox performs a 3×3 scaling of a texture, where only the center cell is fully stretched. This makes it possible to design bordered styles regardless of the stylebox's size. |
![]() | SurfaceTool | The SurfaceTool is used to construct a Mesh by specifying vertex attributes individually. It can be used to construct a Mesh from a script. All properties except indices need to be added before calling AddVertex(Vector3). For example, to add vertex colors and UVs: var st = SurfaceTool.new() st.begin(Mesh.PRIMITIVE_TRIANGLES) st.add_color(Color(1, 0, 0)) st.add_uv(Vector2(0, 0)) st.add_vertex(Vector3(0, 0, 0)) The above SurfaceTool now contains one vertex of a triangle which has a UV coordinate and a specified Color. If another vertex were added without calling AddUv(Vector2) or AddColor(Color), then the last values would be used. Vertex attributes must be passed before calling AddVertex(Vector3). Failure to do so will result in an error when committing the vertex information to a mesh. Additionally, the attributes used before the first vertex is added determine the format of the mesh. For example, if you only add UVs to the first vertex, you cannot add color to any of the subsequent vertices. See also ArrayMesh, ImmediateGeometry and MeshDataTool for procedural geometry generation. Note: Godot uses clockwise winding order for front faces of triangle primitive modes. |
![]() | SyncAttribute | |
![]() | TabContainer | Sets the active tab's visible property to the value true. Sets all other children's to false. Ignores non-Control children. Individual tabs are always visible unless you use SetTabDisabled(Int32, Boolean) and SetTabTitle(Int32, String) to hide it. To hide only a tab's content, nest the content inside a child Control, so it receives the TabContainer's visibility setting instead. |
![]() | Tabs | Simple tabs control, similar to TabContainer but is only in charge of drawing tabs, not interacting with children. |
![]() | TCP_Server | A TCP server. Listens to connections on a port and returns a StreamPeerTCP when it gets an incoming connection. |
![]() | TextEdit | TextEdit is meant for editing large, multiline text. It also has facilities for editing code, such as syntax highlighting support and multiple levels of undo/redo. |
![]() | TextFile | |
![]() | Texture | A texture works by registering an image in the video hardware, which then can be used in 3D models or 2D Sprite or GUI Control. Textures are often created by loading them from a file. See @GDScript.load. Texture is a base for other resources. It cannot be used directly. Note: The maximum texture size is 16384×16384 pixels due to graphics hardware limitations. Larger textures may fail to import. |
![]() | Texture3D | Texture3D is a 3-dimensional texture that has a width, height, and depth. |
![]() | TextureArray | TextureArrays store an array of Images in a single Texture primitive. Each layer of the texture array has its own mipmap chain. This makes it is a good alternative to texture atlases. TextureArrays must be displayed using shaders. After importing your file as a TextureArray and setting the appropriate Horizontal and Vertical Slices, display it by setting it as a uniform to a shader, for example: shader_type canvas_item; uniform sampler2DArray tex; uniform int index; void fragment() { COLOR = texture(tex, vec3(UV.x, UV.y, float(index))); } Set the integer uniform "index" to show a particular part of the texture as defined by the Horizontal and Vertical Slices in the importer. |
![]() | TextureButton | TextureButton has the same functionality as Button, except it uses sprites instead of Godot's Theme resource. It is faster to create, but it doesn't support localization like more complex Controls. The "normal" state must contain a texture (TextureNormal); other textures are optional. See also BaseButton which contains common properties and methods associated with this node. |
![]() | TextureLayered | Base class for Texture3D and TextureArray. Cannot be used directly, but contains all the functions necessary for accessing and using Texture3D and TextureArray. Data is set on a per-layer basis. For Texture3Ds, the layer specifies the depth or Z-index, they can be treated as a bunch of 2D slices. Similarly, for TextureArrays, the layer specifies the array layer. |
![]() | TextureProgress | TextureProgress works like ProgressBar, but uses up to 3 textures instead of Godot's Theme resource. It can be used to create horizontal, vertical and radial progress bars. |
![]() | TextureRect | Used to draw icons and sprites in a user interface. The texture's placement can be controlled with the StretchMode property. It can scale, tile, or stay centered inside its bounding rectangle. Note: You should enable FlipV when using a TextureRect to display a ViewportTexture. Alternatively, you can enable RenderTargetVFlip on the Viewport. Otherwise, the image will appear upside down. |
![]() | Theme | A theme for skinning controls. Controls can be skinned individually, but for complex applications, it's more practical to just create a global theme that defines everything. This theme can be applied to any Control; the Control and its children will automatically use it. Theme resources can alternatively be loaded by writing them in a .theme file, see the documentation for more information. |
![]() | Thread | |
![]() | TileMap | Node for 2D tile-based maps. Tilemaps use a TileSet which contain a list of tiles (textures plus optional collision, navigation, and/or occluder shapes) which are used to create grid-based maps. When doing physics queries against the tilemap, the cell coordinates are encoded as metadata for each detected collision shape returned by methods such as IntersectShape(Physics2DShapeQueryParameters, Int32), GetContactColliderShapeMetadata(Int32), etc. |
![]() | TileSet | A TileSet is a library of tiles for a TileMap. It contains a list of tiles, each consisting of a sprite and optional collision shapes. Tiles are referenced by a unique integer ID. |
![]() | Timer | Counts down a specified interval and emits a signal on reaching 0. Can be set to repeat or "one-shot" mode. Note: To create a one-shot timer without instantiating a node, use CreateTimer(Single, Boolean). |
![]() | ToolAttribute | |
![]() | ToolButton | This is a helper class to generate a flat Button (see Flat), creating a ToolButton is equivalent to: var btn = Button.new() btn.flat = true |
![]() | TouchScreenButton | TouchScreenButton allows you to create on-screen buttons for touch devices. It's intended for gameplay use, such as a unit you have to touch to move. Unlike Button, TouchScreenButton supports multitouch out of the box. Several TouchScreenButtons can be pressed at the same time with touch input. This node inherits from Node2D. Unlike with Control nodes, you cannot set anchors on it. If you want to create menus or user interfaces, you may want to use Button nodes instead. To make button nodes react to touch events, you can enable the Emulate Mouse option in the Project Settings. You can configure TouchScreenButton to be visible only on touch devices, helping you develop your game both for desktop and mobile devices. |
![]() | Translation | Translations are resources that can be loaded and unloaded on demand. They map a string to another string. |
![]() | TranslationServer | Server that manages all translations. Translations can be set to it and removed from it. |
![]() | Tree | This shows a tree of items that can be selected, expanded and collapsed. The tree can have multiple columns with custom controls like text editing, buttons and popups. It can be useful for structured displays and interactions. Trees are built via code, using TreeItem objects to create the structure. They have a single root but multiple roots can be simulated if a dummy hidden root is added. func _ready(): var tree = Tree.new() var root = tree.create_item() tree.set_hide_root(true) var child1 = tree.create_item(root) var child2 = tree.create_item(root) var subchild1 = tree.create_item(child1) subchild1.set_text(0, "Subchild1") To iterate over all the TreeItem objects in a Tree object, use GetNext and GetChildren after getting the root through GetRoot. You can use Free on a TreeItem to remove it from the Tree. |
![]() | TreeItem | |
![]() | TriangleMesh | Mesh type used internally for collision calculations. |
![]() | Tween | Tweens are useful for animations requiring a numerical property to be interpolated over a range of values. The name tween comes from in-betweening, an animation technique where you specify keyframes and the computer interpolates the frames that appear between them. Tween is more suited than AnimationPlayer for animations where you don't know the final values in advance. For example, interpolating a dynamically-chosen camera zoom value is best done with a Tween node; it would be difficult to do the same thing with an AnimationPlayer node. Here is a brief usage example that makes a 2D node move smoothly between two positions: var tween = get_node("Tween") tween.interpolate_property($Node2D, "position", Vector2(0, 0), Vector2(100, 100), 1, Tween.TRANS_LINEAR, Tween.EASE_IN_OUT) tween.start() Many methods require a property name, such as "position" above. You can find the correct property name by hovering over the property in the Inspector. You can also provide the components of a property directly by using "property:component" (e.g. position:x), where it would only apply to that particular component. Many of the methods accept trans_type and ease_type. The first accepts an TweenTransitionType constant, and refers to the way the timing of the animation is handled (see easings.net for some examples). The second accepts an TweenEaseType constant, and controls where the trans_type is applied to the interpolation (in the beginning, the end, or both). If you don't know which transition and easing to pick, you can try different TweenTransitionType constants with , and use the one that looks best. |
![]() | UDPServer | A simple server that opens a UDP socket and returns connected PacketPeerUDP upon receiving new packets. See also ConnectToHost(String, Int32). After starting the server (Listen(UInt16, String)), you will need to Poll it at regular intervals (e.g. inside _Process(Single)) for it to process new packets, delivering them to the appropriate PacketPeerUDP, and taking new connections. Below a small example of how it can be used: # server.gd extends Node var server := UDPServer.new() var peers = [] func _ready(): server.listen(4242) func _process(delta): server.poll() # Important! if server.is_connection_available(): var peer : PacketPeerUDP = server.take_connection() var pkt = peer.get_packet() print("Accepted peer: %s:%s" % [peer.get_packet_ip(), peer.get_packet_port()]) print("Received data: %s" % [pkt.get_string_from_utf8()]) # Reply so it knows we received the message. peer.put_packet(pkt) # Keep a reference so we can keep contacting the remote peer. peers.append(peer) for i in range(0, peers.size()): pass # Do something with the connected peers. # client.gd extends Node var udp := PacketPeerUDP.new() var connected = false func _ready(): udp.connect_to_host("127.0.0.1", 4242) func _process(delta): if !connected: # Try to contact server udp.put_packet("The answer is... 42!".to_utf8()) if udp.get_available_packet_count() > 0: print("Connected: %s" % udp.get_packet().get_string_from_utf8()) connected = true |
![]() | UndoRedo | Helper to manage undo/redo operations in the editor or custom tools. It works by registering methods and property changes inside "actions". Common behavior is to create an action, then add do/undo calls to functions or property changes, then committing the action. Here's an example on how to add an action to the Godot editor's own UndoRedo, from a plugin: var undo_redo = get_undo_redo() # Method of EditorPlugin. func do_something(): pass # Put your code here. func undo_something(): pass # Put here the code that reverts what's done by "do_something()". func _on_MyButton_pressed(): var node = get_node("MyNode2D") undo_redo.create_action("Move the node") undo_redo.add_do_method(self, "do_something") undo_redo.add_undo_method(self, "undo_something") undo_redo.add_do_property(node, "position", Vector2(100,100)) undo_redo.add_undo_property(node, "position", node.position) undo_redo.commit_action() CreateAction(String, UndoRedoMergeMode), AddDoMethod(Object, String, Object), AddUndoMethod(Object, String, Object), AddDoProperty(Object, String, Object), AddUndoProperty(Object, String, Object), and CommitAction should be called one after the other, like in the example. Not doing so could lead to crashes. If you don't need to register a method, you can leave AddDoMethod(Object, String, Object) and AddUndoMethod(Object, String, Object) out; the same goes for properties. You can also register more than one method/property. |
![]() | UnhandledExceptionArgs |
Event arguments for when unhandled exceptions occur.
|
![]() | UPNP | Provides UPNP functionality to discover UPNPDevices on the local network and execute commands on them, like managing port mappings (port forwarding) and querying the local and remote network IP address. Note that methods on this class are synchronous and block the calling thread. To forward a specific port: const PORT = 7777 var upnp = UPNP.new() upnp.discover(2000, 2, "InternetGatewayDevice") upnp.add_port_mapping(port) To close a specific port (e.g. after you have finished using it): upnp.delete_port_mapping(port) |
![]() | UPNPDevice | UPNP device. See UPNP for UPNP discovery and utility functions. Provides low-level access to UPNP control commands. Allows to manage port mappings (port forwarding) and to query network information of the device (like local and external IP address and status). Note that methods on this class are synchronous and block the calling thread. |
![]() | Variant | |
![]() | VBoxContainer | Vertical box container. See BoxContainer. |
![]() | VehicleBody | This node implements all the physics logic needed to simulate a car. It is based on the raycast vehicle system commonly found in physics engines. You will need to add a CollisionShape for the main body of your vehicle and add VehicleWheel nodes for the wheels. You should also add a MeshInstance to this node for the 3D model of your car but this model should not include meshes for the wheels. You should control the vehicle by using the Brake, EngineForce, and Steering properties and not change the position or orientation of this node directly. Note: The origin point of your VehicleBody will determine the center of gravity of your vehicle so it is better to keep this low and move the CollisionShape and MeshInstance upwards. Note: This class has known issues and isn't designed to provide realistic 3D vehicle physics. If you want advanced vehicle physics, you will probably have to write your own physics integration using another PhysicsBody class. |
![]() | VehicleWheel | This node needs to be used as a child node of VehicleBody and simulates the behavior of one of its wheels. This node also acts as a collider to detect if the wheel is touching a surface. Note: This class has known issues and isn't designed to provide realistic 3D vehicle physics. If you want advanced vehicle physics, you will probably have to write your own physics integration using another PhysicsBody class. |
![]() | VideoPlayer | Control node for playing video streams using VideoStream resources. Supported video formats are WebM (.webm, VideoStreamWebm), Ogg Theora (.ogv, VideoStreamTheora), and any format exposed via a GDNative plugin using VideoStreamGDNative. Note: Due to a bug, VideoPlayer does not support localization remapping yet. Warning: On HTML5, video playback will perform poorly due to missing architecture-specific assembly optimizations, especially for VP8/VP9. |
![]() | VideoStream | Base resource type for all video streams. Classes that derive from VideoStream can all be used as resource types to play back videos in VideoPlayer. |
![]() | VideoStreamGDNative | VideoStream resource for for video formats implemented via GDNative. It can be used via godot-videodecoder which uses the FFmpeg library. |
![]() | VideoStreamTheora | VideoStream resource handling the Ogg Theora video format with .ogv extension. The Theora codec is less efficient than VideoStreamWebm's VP8 and VP9, but it requires less CPU resources to decode. The Theora codec is decoded on the CPU. Note: While Ogg Theora videos can also have an .ogg extension, you will have to rename the extension to .ogv to use those videos within Godot. |
![]() | VideoStreamWebm | VideoStream resource handling the WebM video format with .webm extension. Both the VP8 and VP9 codecs are supported. The VP8 and VP9 codecs are more efficient than VideoStreamTheora, but they require more CPU resources to decode (especially VP9). Both the VP8 and VP9 codecs are decoded on the CPU. Note: Alpha channel (also known as transparency) is not supported. The video will always appear to have a black background, even if it originally contains an alpha channel. Note: There are known bugs and performance issues with WebM video playback in Godot. If you run into problems, try using the Ogg Theora format instead: VideoStreamTheora |
![]() | Viewport | A Viewport creates a different view into the screen, or a sub-view inside another viewport. Children 2D Nodes will display on it, and children Camera 3D nodes will render on it too. Optionally, a viewport can have its own 2D or 3D world, so they don't share what they draw with other viewports. If a viewport is a child of a ViewportContainer, it will automatically take up its size, otherwise it must be set manually. Viewports can also choose to be audio listeners, so they generate positional audio depending on a 2D or 3D camera child of it. Also, viewports can be assigned to different screens in case the devices have multiple screens. Finally, viewports can also behave as render targets, in which case they will not be visible unless the associated texture is used to draw. |
![]() | ViewportContainer | |
![]() | ViewportTexture | Displays the content of a Viewport node as a dynamic Texture. This can be used to mix controls, 2D, and 3D elements in the same scene. To create a ViewportTexture in code, use the GetTexture method on the target viewport. |
![]() | VisibilityEnabler | The VisibilityEnabler will disable RigidBody and AnimationPlayer nodes when they are not visible. It will only affect other nodes within the same scene as the VisibilityEnabler itself. If you just want to receive notifications, use VisibilityNotifier instead. Note: VisibilityEnabler uses an approximate heuristic for performance reasons. It doesn't take walls and other occlusion into account. The heuristic is an implementation detail and may change in future versions. If you need precise visibility checking, use another method such as adding an Area node as a child of a Camera node and/or Vector3.dot. Note: VisibilityEnabler will not affect nodes added after scene initialization. |
![]() | VisibilityEnabler2D | The VisibilityEnabler2D will disable RigidBody2D, AnimationPlayer, and other nodes when they are not visible. It will only affect nodes with the same root node as the VisibilityEnabler2D, and the root node itself. If you just want to receive notifications, use VisibilityNotifier2D instead. Note: For performance reasons, VisibilityEnabler2D uses an approximate heuristic with precision determined by . If you need precise visibility checking, use another method such as adding an Area2D node as a child of a Camera2D node. Note: VisibilityEnabler2D will not affect nodes added after scene initialization. |
![]() | VisibilityNotifier | The VisibilityNotifier detects when it is visible on the screen. It also notifies when its bounding rectangle enters or exits the screen or a Camera's view. If you want nodes to be disabled automatically when they exit the screen, use VisibilityEnabler instead. Note: VisibilityNotifier uses an approximate heuristic for performance reasons. It doesn't take walls and other occlusion into account. The heuristic is an implementation detail and may change in future versions. If you need precise visibility checking, use another method such as adding an Area node as a child of a Camera node and/or Vector3.dot. |
![]() | VisibilityNotifier2D | The VisibilityNotifier2D detects when it is visible on the screen. It also notifies when its bounding rectangle enters or exits the screen or a viewport. If you want nodes to be disabled automatically when they exit the screen, use VisibilityEnabler2D instead. Note: For performance reasons, VisibilityNotifier2D uses an approximate heuristic with precision determined by . If you need precise visibility checking, use another method such as adding an Area2D node as a child of a Camera2D node. |
![]() | VisualInstance | The VisualInstance is used to connect a resource to a visual representation. All visual 3D nodes inherit from the VisualInstance. In general, you should not access the VisualInstance properties directly as they are accessed and managed by the nodes that inherit from VisualInstance. VisualInstance is the node representation of the VisualServer instance. |
![]() | VisualScript | A script implemented in the Visual Script programming environment. The script extends the functionality of all objects that instance it. SetScript(Reference) extends an existing object, if that object's class matches one of the script's base classes. You are most likely to use this class via the Visual Script editor or when writing plugins for it. |
![]() | VisualScriptBasicTypeConstant | A Visual Script node representing a constant from base types, such as . |
![]() | VisualScriptBuiltinFunc | A built-in function used inside a VisualScript. It is usually a math function or an utility function. See also @GDScript, for the same functions in the GDScript language. |
![]() | VisualScriptClassConstant | This node returns a constant from a given class, such as . See the given class' documentation for available constants. Input Ports: none Output Ports: - Data (variant): value |
![]() | VisualScriptComment | A Visual Script node used to display annotations in the script, so that code may be documented. Comment nodes can be resized so they encompass a group of nodes. |
![]() | VisualScriptComposeArray | A Visual Script Node used to compose array from the list of elements provided with custom in-graph UI hard coded in the VisualScript Editor. |
![]() | VisualScriptCondition | A Visual Script node that checks a Boolean input port. If true, it will exit via the "true" sequence port. If false, it will exit via the "false" sequence port. After exiting either, it exits via the "done" port. Sequence ports may be left disconnected. Input Ports: - Sequence: if (cond) is - Data (boolean): cond Output Ports: - Sequence: true - Sequence: false - Sequence: done |
![]() | VisualScriptConstant | This node returns a constant's value. Input Ports: none Output Ports: - Data (variant): get |
![]() | VisualScriptConstructor | A Visual Script node which calls a base type constructor. It can be used for type conversion as well. |
![]() | VisualScriptCustomNode | A custom Visual Script node which can be scripted in powerful ways. |
![]() | VisualScriptDeconstruct | A Visual Script node which deconstructs a base type instance into its parts. |
![]() | VisualScriptEditor | |
![]() | VisualScriptEmitSignal | Emits a specified signal when it is executed. Input Ports: - Sequence: emit Output Ports: - Sequence |
![]() | VisualScriptEngineSingleton | A Visual Script node returning a singleton from @GlobalScope. |
![]() | VisualScriptExpression | |
![]() | VisualScriptFunction | |
![]() | VisualScriptFunctionCall | |
![]() | VisualScriptFunctionState | |
![]() | VisualScriptGlobalConstant | |
![]() | VisualScriptIndexGet | |
![]() | VisualScriptIndexSet | |
![]() | VisualScriptInputAction | |
![]() | VisualScriptIterator | This node steps through each item in a given input. Input can be any sequence data type, such as an Array or String. When each item has been processed, execution passed out the exit Sequence port. Input Ports: - Sequence: for (elem) in (input) - Data (variant): input Output Ports: - Sequence: each - Sequence: exit - Data (variant): elem |
![]() | VisualScriptLists | A Visual Script virtual class that defines the shape and the default behavior of the nodes that have to be in-graph editable nodes. |
![]() | VisualScriptLocalVar | Returns a local variable's value. "Var Name" must be supplied, with an optional type. Input Ports: none Output Ports: - Data (variant): get |
![]() | VisualScriptLocalVarSet | Changes a local variable's value to the given input. The new value is also provided on an output Data port. Input Ports: - Sequence - Data (variant): set Output Ports: - Sequence - Data (variant): get |
![]() | VisualScriptMathConstant | Provides common math constants, such as Pi, on an output Data port. Input Ports: none Output Ports: - Data (variant): get |
![]() | VisualScriptNode | A node which is part of a VisualScript. Not to be confused with Node, which is a part of a SceneTree. |
![]() | VisualScriptOperator | Input Ports: - Data (variant): A - Data (variant): B Output Ports: - Data (variant): result |
![]() | VisualScriptPreload | Creates a new Resource or loads one from the filesystem. Input Ports: none Output Ports: - Data (object): res |
![]() | VisualScriptPropertyGet | |
![]() | VisualScriptPropertySet | |
![]() | VisualScriptResourcePath | |
![]() | VisualScriptReturn | Ends the execution of a function and returns control to the calling function. Optionally, it can return a Variant value. Input Ports: - Sequence - Data (variant): result (optional) Output Ports: none |
![]() | VisualScriptSceneNode | A direct reference to a node. Input Ports: none Output Ports: - Data: node (obj) |
![]() | VisualScriptSceneTree | |
![]() | VisualScriptSelect | Chooses between two input values based on a Boolean condition. Input Ports: - Data (boolean): cond - Data (variant): a - Data (variant): b Output Ports: - Data (variant): out |
![]() | VisualScriptSelf | Provides a reference to the node running the visual script. Input Ports: none Output Ports: - Data (object): instance |
![]() | VisualScriptSequence | Steps through a series of one or more output Sequence ports. The current data port outputs the currently executing item. Input Ports: - Sequence: in order Output Ports: - Sequence: 1 - Sequence: 2 - n (optional) - Data (int): current |
![]() | VisualScriptSubCall | |
![]() | VisualScriptSwitch | Branches the flow based on an input's value. Use Case Count in the Inspector to set the number of branches and each comparison's optional type. Input Ports: - Sequence: 'input' is - Data (variant): = - Data (variant): = (optional) - Data (variant): input Output Ports: - Sequence - Sequence (optional) - Sequence: done |
![]() | VisualScriptTypeCast | |
![]() | VisualScriptVariableGet | Returns a variable's value. "Var Name" must be supplied, with an optional type. Input Ports: none Output Ports: - Data (variant): value |
![]() | VisualScriptVariableSet | Changes a variable's value to the given input. Input Ports: - Sequence - Data (variant): set Output Ports: - Sequence |
![]() | VisualScriptWhile | Loops while a condition is true. Execution continues out the exit Sequence port when the loop terminates. Input Ports: - Sequence: while(cond) - Data (bool): cond Output Ports: - Sequence: repeat - Sequence: exit |
![]() | VisualScriptYield | |
![]() | VisualScriptYieldSignal | |
![]() | VisualServer | Server for anything visible. The visual server is the API backend for everything visible. The whole scene system mounts on it to display. The visual server is completely opaque, the internals are entirely implementation specific and cannot be accessed. The visual server can be used to bypass the scene system entirely. Resources are created using the *_create functions. All objects are drawn to a viewport. You can use the Viewport attached to the SceneTree or you can create one yourself with ViewportCreate. When using a custom scenario or canvas, the scenario or canvas needs to be attached to the viewport using ViewportSetScenario(RID, RID) or ViewportAttachCanvas(RID, RID). In 3D, all visual objects must be associated with a scenario. The scenario is a visual representation of the world. If accessing the visual server from a running game, the scenario can be accessed from the scene tree from any Spatial node with GetWorld. Otherwise, a scenario can be created with ScenarioCreate. Similarly, in 2D, a canvas is needed to draw all canvas items. In 3D, all visible objects are comprised of a resource and an instance. A resource can be a mesh, a particle system, a light, or any other 3D object. In order to be visible resources must be attached to an instance using InstanceSetBase(RID, RID). The instance must also be attached to the scenario using InstanceSetScenario(RID, RID) in order to be visible. In 2D, all visible objects are some form of canvas item. In order to be visible, a canvas item needs to be the child of a canvas attached to a viewport, or it needs to be the child of another canvas item that is eventually attached to the canvas. |
![]() | VisualShader | This class allows you to define a custom shader program that can be used for various materials to render objects. The visual shader editor creates the shader. |
![]() | VisualShaderNode | |
![]() | VisualShaderNodeBooleanConstant | Has only one output port and no inputs. Translated to bool in the shader language. |
![]() | VisualShaderNodeBooleanUniform | Translated to uniform bool in the shader language. |
![]() | VisualShaderNodeColorConstant | Has two output ports representing RGB and alpha channels of Color. Translated to vec3 rgb and float alpha in the shader language. |
![]() | VisualShaderNodeColorFunc | |
![]() | VisualShaderNodeColorOp | Applies Operator to two color inputs. |
![]() | VisualShaderNodeColorUniform | Translated to uniform vec4 in the shader language. |
![]() | VisualShaderNodeCompare | |
![]() | VisualShaderNodeCubeMap | Translated to texture(cubemap, vec3) in the shader language. Returns a color vector and alpha channel as scalar. |
![]() | VisualShaderNodeCubeMapUniform | Translated to uniform samplerCube in the shader language. The output value can be used as port for VisualShaderNodeCubeMap. |
![]() | VisualShaderNodeCustom | By inheriting this class you can create a custom VisualShader script addon which will be automatically added to the Visual Shader Editor. The VisualShaderNode's behavior is defined by overriding the provided virtual methods. In order for the node to be registered as an editor addon, you must use the tool keyword and provide a class_name for your custom script. For example: tool extends VisualShaderNodeCustom class_name VisualShaderNodeNoise |
![]() | VisualShaderNodeDeterminant | Translates to determinant(x) in the shader language. |
![]() | VisualShaderNodeDotProduct | Translates to dot(a, b) in the shader language. |
![]() | VisualShaderNodeExpression | Custom Godot Shading Language expression, with a custom amount of input and output ports. The provided code is directly injected into the graph's matching shader function (vertex, fragment, or light), so it cannot be used to declare functions, varyings, uniforms, or global constants. See VisualShaderNodeGlobalExpression for such global definitions. |
![]() | VisualShaderNodeFaceForward | Translates to faceforward(N, I, Nref) in the shader language. The function has three vector parameters: N, the vector to orient, I, the incident vector, and Nref, the reference vector. If the dot product of I and Nref is smaller than zero the return value is N. Otherwise, -N is returned. |
![]() | VisualShaderNodeFresnel | Returns falloff based on the dot product of surface normal and view direction of camera (pass associated inputs to it). |
![]() | VisualShaderNodeGlobalExpression | Custom Godot Shader Language expression, which is placed on top of the generated shader. You can place various function definitions inside to call later in VisualShaderNodeExpressions (which are injected in the main shader functions). You can also declare varyings, uniforms and global constants. |
![]() | VisualShaderNodeGroupBase | Currently, has no direct usage, use the derived classes instead. |
![]() | VisualShaderNodeIf | |
![]() | VisualShaderNodeInput | Gives access to input variables (built-ins) available for the shader. See the shading reference for the list of available built-ins for each shader type (check Tutorials section for link). |
![]() | VisualShaderNodeIs | Returns the boolean result of the comparison between INF or NaN and a scalar parameter. |
![]() | VisualShaderNodeOuterProduct | OuterProduct treats the first parameter c as a column vector (matrix with one column) and the second parameter r as a row vector (matrix with one row) and does a linear algebraic matrix multiply c * r, yielding a matrix whose number of rows is the number of components in c and whose number of columns is the number of components in r. |
![]() | VisualShaderNodeOutput | This visual shader node is present in all shader graphs in form of "Output" block with multiple output value ports. |
![]() | VisualShaderNodeScalarClamp | Constrains a value to lie between min and max values. |
![]() | VisualShaderNodeScalarConstant | |
![]() | VisualShaderNodeScalarDerivativeFunc | This node is only available in Fragment and Light visual shaders. |
![]() | VisualShaderNodeScalarFunc | |
![]() | VisualShaderNodeScalarInterp | Translates to mix(a, b, weight) in the shader language. |
![]() | VisualShaderNodeScalarOp | |
![]() | VisualShaderNodeScalarSmoothStep | Translates to smoothstep(edge0, edge1, x) in the shader language. Returns 0.0 if x is smaller than edge0 and 1.0 if x is larger than edge1. Otherwise the return value is interpolated between 0.0 and 1.0 using Hermite polynomials. |
![]() | VisualShaderNodeScalarSwitch | Returns an associated scalar if the provided boolean value is true or false. |
![]() | VisualShaderNodeScalarUniform | |
![]() | VisualShaderNodeSwitch | Returns an associated vector if the provided boolean value is true or false. |
![]() | VisualShaderNodeTexture | Performs a lookup operation on the provided texture, with support for multiple texture sources to choose from. |
![]() | VisualShaderNodeTextureUniform | Performs a lookup operation on the texture provided as a uniform for the shader. |
![]() | VisualShaderNodeTextureUniformTriplanar | Performs a lookup operation on the texture provided as a uniform for the shader, with support for triplanar mapping. |
![]() | VisualShaderNodeTransformCompose | Creates a 4x4 transform matrix using four vectors of type vec3. Each vector is one row in the matrix and the last column is a vec4(0, 0, 0, 1). |
![]() | VisualShaderNodeTransformConstant | A constant Transform, which can be used as an input node. |
![]() | VisualShaderNodeTransformDecompose | Takes a 4x4 transform matrix and decomposes it into four vec3 values, one from each row of the matrix. |
![]() | VisualShaderNodeTransformFunc | Computes an inverse or transpose function on the provided Transform. |
![]() | VisualShaderNodeTransformMult | A multiplication operation on two transforms (4x4 matrices), with support for different multiplication operators. |
![]() | VisualShaderNodeTransformUniform | Translated to uniform mat4 in the shader language. |
![]() | VisualShaderNodeTransformVecMult | A multiplication operation on a transform (4x4 matrix) and a vector, with support for different multiplication operators. |
![]() | VisualShaderNodeUniform | A uniform represents a variable in the shader which is set externally, i.e. from the ShaderMaterial. Uniforms are exposed as properties in the ShaderMaterial and can be assigned from the inspector or from a script. |
![]() | VisualShaderNodeUniformRef | Creating a reference to a VisualShaderNodeUniform allows you to reuse this uniform in different shaders or shader stages easily. |
![]() | VisualShaderNodeVec3Constant | A constant Vector3, which can be used as an input node. |
![]() | VisualShaderNodeVec3Uniform | Translated to uniform vec3 in the shader language. |
![]() | VisualShaderNodeVectorClamp | Constrains a value to lie between min and max values. The operation is performed on each component of the vector individually. |
![]() | VisualShaderNodeVectorCompose | Creates a vec3 using three scalar values that can be provided from separate inputs. |
![]() | VisualShaderNodeVectorDecompose | Takes a vec3 and decomposes it into three scalar values that can be used as separate inputs. |
![]() | VisualShaderNodeVectorDerivativeFunc | This node is only available in Fragment and Light visual shaders. |
![]() | VisualShaderNodeVectorDistance | Calculates distance from point represented by vector p0 to vector p1. Translated to distance(p0, p1) in the shader language. |
![]() | VisualShaderNodeVectorFunc | A visual shader node able to perform different functions using vectors. |
![]() | VisualShaderNodeVectorInterp | Translates to mix(a, b, weight) in the shader language, where weight is a Vector3 with weights for each component. |
![]() | VisualShaderNodeVectorLen | Translated to length(p0) in the shader language. |
![]() | VisualShaderNodeVectorOp | A visual shader node for use of vector operators. Operates on vector a and vector b. |
![]() | VisualShaderNodeVectorRefract | Translated to refract(I, N, eta) in the shader language, where I is the incident vector, N is the normal vector and eta is the ratio of the indices of the refraction. |
![]() | VisualShaderNodeVectorScalarMix | Translates to mix(a, b, weight) in the shader language, where a and b are vectors and weight is a scalar. |
![]() | VisualShaderNodeVectorScalarSmoothStep | Translates to smoothstep(edge0, edge1, x) in the shader language, where x is a scalar. Returns 0.0 if x is smaller than edge0 and 1.0 if x is larger than edge1. Otherwise the return value is interpolated between 0.0 and 1.0 using Hermite polynomials. |
![]() | VisualShaderNodeVectorScalarStep | Translates to step(edge, x) in the shader language. Returns 0.0 if x is smaller than edge and 1.0 otherwise. |
![]() | VisualShaderNodeVectorSmoothStep | Translates to smoothstep(edge0, edge1, x) in the shader language, where x is a vector. Returns 0.0 if x is smaller than edge0 and 1.0 if x is larger than edge1. Otherwise the return value is interpolated between 0.0 and 1.0 using Hermite polynomials. |
![]() | VScrollBar | Vertical version of ScrollBar, which goes from top (min) to bottom (max). |
![]() | VSeparator | Vertical version of Separator. Even though it looks vertical, it is used to separate objects horizontally. |
![]() | VSlider | |
![]() | VSplitContainer | Vertical split container. See SplitContainer. This goes from top to bottom. |
![]() | WeakRef | A weakref can hold a Reference, without contributing to the reference counter. A weakref can be created from an Object using @GDScript.weakref. If this object is not a reference, weakref still works, however, it does not have any effect on the object. Weakrefs are useful in cases where multiple classes have variables that refer to each other. Without weakrefs, using these classes could lead to memory leaks, since both references keep each other from being released. Making part of the variables a weakref can prevent this cyclic dependency, and allows the references to be released. |
![]() | WebRTCDataChannel | |
![]() | WebRTCDataChannelGDNative | |
![]() | WebRTCMultiplayer | This class constructs a full mesh of WebRTCPeerConnection (one connection for each peer) that can be used as a NetworkPeer. You can add each WebRTCPeerConnection via AddPeer(WebRTCPeerConnection, Int32, Int32) or remove them via RemovePeer(Int32). Peers must be added in state to allow it to create the appropriate channels. This class will not create offers nor set descriptions, it will only poll them, and notify connections and disconnections. NetworkedMultiplayerPeer.connection_succeeded and NetworkedMultiplayerPeer.server_disconnected will not be emitted unless server_compatibility is true in Initialize(Int32, Boolean). Beside that data transfer works like in a NetworkedMultiplayerPeer. |
![]() | WebRTCPeerConnection | A WebRTC connection between the local computer and a remote peer. Provides an interface to connect, maintain and monitor the connection. Setting up a WebRTC connection between two peers from now on) may not seem a trivial task, but it can be broken down into 3 main steps: - The peer that wants to initiate the connection (A from now on) creates an offer and send it to the other peer (B from now on). - B receives the offer, generate and answer, and sends it to A). - A and B then generates and exchange ICE candidates with each other. After these steps, the connection should become connected. Keep on reading or look into the tutorial for more information. |
![]() | WebRTCPeerConnectionGDNative | |
![]() | WebSocketClient | This class implements a WebSocket client compatible with any RFC 6455-compliant WebSocket server. This client can be optionally used as a network peer for the MultiplayerAPI. After starting the client (ConnectToUrl(String, String, Boolean, String)), you will need to Poll it at regular intervals (e.g. inside _Process(Single)). You will receive appropriate signals when connecting, disconnecting, or when new data is available. |
![]() | WebSocketMultiplayerPeer | Base class for WebSocket server and client, allowing them to be used as network peer for the MultiplayerAPI. |
![]() | WebSocketPeer | This class represent a specific WebSocket connection, you can do lower level operations with it. You can choose to write to the socket in binary or text mode, and you can recognize the mode used for writing by the other peer. |
![]() | WebSocketServer | This class implements a WebSocket server that can also support the high-level multiplayer API. After starting the server (Listen(Int32, String, Boolean)), you will need to Poll it at regular intervals (e.g. inside _Process(Single)). When clients connect, disconnect, or send data, you will receive the appropriate signal. Note: Not available in HTML5 exports. |
![]() | WebXRInterface | WebXR is an open standard that allows creating VR and AR applications that run in the web browser. As such, this interface is only available when running in an HTML5 export. WebXR supports a wide range of devices, from the very capable (like Valve Index, HTC Vive, Oculus Rift and Quest) down to the much less capable (like Google Cardboard, Oculus Go, GearVR, or plain smartphones). Since WebXR is based on Javascript, it makes extensive use of callbacks, which means that WebXRInterface is forced to use signals, where other AR/VR interfaces would instead use functions that return a result immediately. This makes WebXRInterface quite a bit more complicated to intialize than other AR/VR interfaces. Here's the minimum code required to start an immersive VR session: extends Spatial var webxr_interface var vr_supported = false func _ready(): # We assume this node has a button as a child. # This button is for the user to consent to entering immersive VR mode. $Button.connect("pressed", self, "_on_Button_pressed") webxr_interface = ARVRServer.find_interface("WebXR") if webxr_interface: # WebXR uses a lot of asynchronous callbacks, so we connect to various # signals in order to receive them. webxr_interface.connect("session_supported", self, "_webxr_session_supported") webxr_interface.connect("session_started", self, "_webxr_session_started") webxr_interface.connect("session_ended", self, "_webxr_session_ended") webxr_interface.connect("session_failed", self, "_webxr_session_failed") # This returns immediately - our _webxr_session_supported() method # (which we connected to the "session_supported" signal above) will # be called sometime later to let us know if it's supported or not. webxr_interface.is_session_supported("immersive-vr") func _webxr_session_supported(session_mode, supported): if session_mode == 'immersive-vr': vr_supported = supported func _on_Button_pressed(): if not vr_supported: OS.alert("Your browser doesn't support VR") return # We want an immersive VR session, as opposed to AR ('immersive-ar') or a # simple 3DoF viewer ('viewer'). webxr_interface.session_mode = 'immersive-vr' # 'bounded-floor' is room scale, 'local-floor' is a standing or sitting # experience (it puts you 1.6m above the ground if you have 3DoF headset), # whereas as 'local' puts you down at the ARVROrigin. # This list means it'll first try to request 'bounded-floor', then # fallback on 'local-floor' and ultimately 'local', if nothing else is # supported. webxr_interface.requested_reference_space_types = 'bounded-floor, local-floor, local' # In order to use 'local-floor' or 'bounded-floor' we must also # mark the features as required or optional. webxr_interface.required_features = 'local-floor' webxr_interface.optional_features = 'bounded-floor' # This will return false if we're unable to even request the session, # however, it can still fail asynchronously later in the process, so we # only know if it's really succeeded or failed when our # _webxr_session_started() or _webxr_session_failed() methods are called. if not webxr_interface.initialize(): OS.alert("Failed to initialize") return func _webxr_session_started(): $Button.visible = false # This tells Godot to start rendering to the headset. get_viewport().arvr = true # This will be the reference space type you ultimately got, out of the # types that you requested above. This is useful if you want the game to # work a little differently in 'bounded-floor' versus 'local-floor'. print ("Reference space type: " + webxr_interface.reference_space_type) func _webxr_session_ended(): $Button.visible = true # If the user exits immersive mode, then we tell Godot to render to the web # page again. get_viewport().arvr = false func _webxr_session_failed(message): OS.alert("Failed to initialize: " + message) There are several ways to handle "controller" input: - Using ARVRController nodes and their ARVRController.button_pressed and ARVRController.button_release signals. This is how controllers are typically handled in AR/VR apps in Godot, however, this will only work with advanced VR controllers like the Oculus Touch or Index controllers, for example. The buttons codes are defined by Section 3.3 of the WebXR Gamepads Module. - Using _UnhandledInput(InputEvent) and InputEventJoypadButton or InputEventJoypadMotion. This works the same as normal joypads, except the Device starts at 100, so the left controller is 100 and the right controller is 101, and the button codes are also defined by Section 3.3 of the WebXR Gamepads Module. - Using the select, squeeze and related signals. This method will work for both advanced VR controllers, and non-traditional "controllers" like a tap on the screen, a spoken voice command or a button press on the device itself. The controller_id passed to these signals is the same id as used in ControllerId. You can use one or all of these methods to allow your game or app to support a wider or narrower set of devices and input methods, or to allow more advanced interations with more advanced devices. |
![]() | WindowDialog | Windowdialog is the base class for all window-based dialogs. It's a by-default toplevel Control that draws a window decoration and allows motion and resizing. |
![]() | World | Class that has everything pertaining to a world. A physics space, a visual scenario and a sound space. Spatial nodes register their resources into the current world. |
![]() | World2D | Class that has everything pertaining to a 2D world. A physics space, a visual scenario and a sound space. 2D nodes register their resources into the current 2D world. |
![]() | WorldEnvironment | The WorldEnvironment node is used to configure the default Environment for the scene. The parameters defined in the WorldEnvironment can be overridden by an Environment node set on the current Camera. Additionally, only one WorldEnvironment may be instanced in a given scene at a time. The WorldEnvironment allows the user to specify default lighting parameters (e.g. ambient lighting), various post-processing effects (e.g. SSAO, DOF, Tonemapping), and how to draw the background (e.g. solid color, skybox). Usually, these are added in order to improve the realism/color balance of the scene. |
![]() | X509Certificate | The X509Certificate class represents an X509 certificate. Certificates can be loaded and saved like any other Resource. They can be used as the server certificate in AcceptStream(StreamPeer, CryptoKey, X509Certificate, X509Certificate) (along with the proper CryptoKey), and to specify the only certificate that should be accepted when connecting to an SSL server via ConnectToStream(StreamPeer, Boolean, String, X509Certificate). Note: Not available in HTML5 exports. |
![]() | XMLParser | This class can serve as base to make custom XML parsers. Since XML is a very flexible standard, this interface is low-level so it can be applied to any possible schema. |
![]() | YSort | Sort all child nodes based on their Y positions. The child node must inherit from CanvasItem for it to be sorted. Nodes that have a higher Y position will be drawn later, so they will appear on top of nodes that have a lower Y position. Nesting of YSort nodes is possible. Children YSort nodes will be sorted in the same space as the parent YSort, allowing to better organize a scene or divide it in multiple ones, yet keep the unique sorting. |
Structure | Description | |
---|---|---|
![]() | AABB |
Axis-Aligned Bounding Box. AABB consists of a position, a size, and
several utility functions. It is typically used for fast overlap tests.
|
![]() | Basis |
3×3 matrix used for 3D rotation and scale.
Almost always used as an orthogonal basis for a Transform.
Contains 3 vector fields X, Y and Z as its columns, which are typically
interpreted as the local basis vectors of a 3D transformation. For such use,
it is composed of a scaling and a rotation matrix, in that order (M = R.S).
Can also be accessed as array of 3D vectors. These vectors are normally
orthogonal to each other, but are not necessarily normalized (due to scaling).
For more information, read this documentation article:
https://docs.godotengine.org/en/3.3/tutorials/math/matrices_and_transforms.html
|
![]() | Color |
A color represented by red, green, blue, and alpha (RGBA) components.
The alpha component is often used for transparency.
Values are in floating-point and usually range from 0 to 1.
Some properties (such as CanvasItem.modulate) may accept values
greater than 1 (overbright or HDR colors).
If you want to supply values in a range of 0 to 255, you should use
Color8(Byte, Byte, Byte, Byte) and the `r8`/`g8`/`b8`/`a8` properties.
|
![]() | Plane |
Plane represents a normalized plane equation.
"Over" or "Above" the plane is considered the side of
the plane towards where the normal is pointing.
|
![]() | Quat |
A unit quaternion used for representing 3D rotations.
Quaternions need to be normalized to be used for rotation.
It is similar to Basis, which implements matrix representation of
rotations, and can be parametrized using both an axis-angle pair
or Euler angles. Basis stores rotation, scale, and shearing,
while Quat only stores rotation.
Due to its compactness and the way it is stored in memory, certain
operations (obtaining axis-angle and performing SLERP, in particular)
are more efficient and robust against floating-point errors.
|
![]() | Rect2 |
2D axis-aligned bounding box. Rect2 consists of a position, a size, and
several utility functions. It is typically used for fast overlap tests.
|
![]() | Transform |
3×4 matrix (3 rows, 4 columns) used for 3D linear transformations.
It can represent transformations such as translation, rotation, or scaling.
It consists of a Basis (first 3 columns) and a
Vector3 for the origin (last column).
For more information, read this documentation article:
https://docs.godotengine.org/en/3.3/tutorials/math/matrices_and_transforms.html
|
![]() | Transform2D |
2×3 matrix (2 rows, 3 columns) used for 2D linear transformations.
It can represent transformations such as translation, rotation, or scaling.
It consists of a three Vector2 values: x, y, and the origin.
For more information, read this documentation article:
https://docs.godotengine.org/en/3.3/tutorials/math/matrices_and_transforms.html
|
![]() | Vector2 |
2-element structure that can be used to represent positions in 2D space or any other pair of numeric values.
|
![]() | Vector3 |
3-element structure that can be used to represent positions in 3D space or any other pair of numeric values.
|
Interface | Description | |
---|---|---|
![]() | IAwaitable | |
![]() | IAwaitableTResult | |
![]() | IAwaiter | |
![]() | IAwaiterTResult | |
![]() | ISerializationListener |