mirror of
https://github.com/Relintai/pandemonium_engine_minimal.git
synced 2025-03-30 23:05:29 +02:00
Re-extracted class docs.
This commit is contained in:
parent
3e4e95f2e6
commit
16d56d4c83
@ -18,15 +18,9 @@
|
||||
<member name="ClassDB" type="ClassDB" setter="" getter="">
|
||||
The [ClassDB] singleton.
|
||||
</member>
|
||||
<member name="DatabaseManager" type="DatabaseManager" setter="" getter="">
|
||||
</member>
|
||||
<member name="ESS" type="ESS" setter="" getter="">
|
||||
</member>
|
||||
<member name="Engine" type="Engine" setter="" getter="">
|
||||
The [Engine] singleton.
|
||||
</member>
|
||||
<member name="GSAIUtils" type="GSAIUtils" setter="" getter="">
|
||||
</member>
|
||||
<member name="Geometry" type="Geometry" setter="" getter="">
|
||||
The [Geometry] singleton.
|
||||
</member>
|
||||
@ -42,30 +36,9 @@
|
||||
<member name="JSON" type="JSON" setter="" getter="">
|
||||
The [JSON] singleton.
|
||||
</member>
|
||||
<member name="JavaClassWrapper" type="JavaClassWrapper" setter="" getter="">
|
||||
The [JavaClassWrapper] singleton.
|
||||
[b]Note:[/b] Only implemented on Android.
|
||||
</member>
|
||||
<member name="JavaScript" type="JavaScript" setter="" getter="">
|
||||
The [JavaScript] singleton.
|
||||
[b]Note:[/b] Only implemented on HTML5.
|
||||
</member>
|
||||
<member name="MMAlgos" type="MMAlgos" setter="" getter="">
|
||||
</member>
|
||||
<member name="Marshalls" type="Marshalls" setter="" getter="">
|
||||
The [Marshalls] singleton.
|
||||
</member>
|
||||
<member name="MeshUtils" type="MeshUtils" setter="" getter="">
|
||||
</member>
|
||||
<member name="Navigation2DServer" type="Navigation2DServer" setter="" getter="">
|
||||
The [Navigation2DServer] singleton.
|
||||
</member>
|
||||
<member name="NavigationMeshGenerator" type="NavigationMeshGenerator" setter="" getter="">
|
||||
The [NavigationMeshGenerator] singleton.
|
||||
</member>
|
||||
<member name="NavigationServer" type="NavigationServer" setter="" getter="">
|
||||
The [NavigationServer] singleton.
|
||||
</member>
|
||||
<member name="OS" type="OS" setter="" getter="">
|
||||
The [OS] singleton.
|
||||
</member>
|
||||
@ -77,22 +50,9 @@
|
||||
<member name="Physics2DServer" type="Physics2DServer" setter="" getter="">
|
||||
The [Physics2DServer] singleton.
|
||||
</member>
|
||||
<member name="PhysicsServer" type="PhysicsServer" setter="" getter="">
|
||||
The [PhysicsServer] singleton.
|
||||
</member>
|
||||
<member name="ProfileManager" type="ProfileManager" setter="" getter="">
|
||||
</member>
|
||||
<member name="ProjectSettings" type="ProjectSettings" setter="" getter="">
|
||||
The [ProjectSettings] singleton.
|
||||
</member>
|
||||
<member name="Prop2DCache" type="Prop2DCache" setter="" getter="">
|
||||
</member>
|
||||
<member name="Prop2DUtils" type="Prop2DUtils" setter="" getter="">
|
||||
</member>
|
||||
<member name="PropCache" type="PropCache" setter="" getter="">
|
||||
</member>
|
||||
<member name="PropUtils" type="PropUtils" setter="" getter="">
|
||||
</member>
|
||||
<member name="RenderingServer" type="RenderingServer" setter="" getter="">
|
||||
The [RenderingServer] singleton.
|
||||
</member>
|
||||
@ -113,10 +73,6 @@
|
||||
<member name="TranslationServer" type="TranslationServer" setter="" getter="">
|
||||
The [TranslationServer] singleton.
|
||||
</member>
|
||||
<member name="UnitTestDB" type="UnitTestDB" setter="" getter="">
|
||||
</member>
|
||||
<member name="UserDB" type="UserDB" setter="" getter="">
|
||||
</member>
|
||||
</members>
|
||||
<constants>
|
||||
<constant name="MARGIN_LEFT" value="0" enum="Margin">
|
||||
|
@ -1,60 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<class name="AnimatedSprite3D" inherits="SpriteBase3D" version="4.2">
|
||||
<brief_description>
|
||||
2D sprite node in 3D world, that can use multiple 2D textures for animation.
|
||||
</brief_description>
|
||||
<description>
|
||||
Animations are created using a [SpriteFrames] resource, which can be configured in the editor via the SpriteFrames panel.
|
||||
</description>
|
||||
<tutorials>
|
||||
<link title="2D Sprite animation (also applies to 3D)">$DOCS_URL/tutorials/2d/2d_sprite_animation.md</link>
|
||||
</tutorials>
|
||||
<methods>
|
||||
<method name="is_playing" qualifiers="const">
|
||||
<return type="bool" />
|
||||
<description>
|
||||
Returns [code]true[/code] if an animation is currently being played.
|
||||
</description>
|
||||
</method>
|
||||
<method name="play">
|
||||
<return type="void" />
|
||||
<argument index="0" name="anim" type="StringName" default="@""" />
|
||||
<description>
|
||||
</description>
|
||||
</method>
|
||||
<method name="stop">
|
||||
<return type="void" />
|
||||
<description>
|
||||
Stops the current animation (does not reset the frame counter).
|
||||
</description>
|
||||
</method>
|
||||
</methods>
|
||||
<members>
|
||||
<member name="animation" type="StringName" setter="set_animation" getter="get_animation" default="@"default"">
|
||||
The current animation from the [code]frames[/code] resource. If this value changes, the [code]frame[/code] counter is reset.
|
||||
</member>
|
||||
<member name="frame" type="int" setter="set_frame" getter="get_frame" default="0">
|
||||
The displayed animation frame's index.
|
||||
</member>
|
||||
<member name="frames" type="SpriteFrames" setter="set_sprite_frames" getter="get_sprite_frames">
|
||||
The [SpriteFrames] resource containing the animation(s).
|
||||
</member>
|
||||
<member name="playing" type="bool" setter="_set_playing" getter="_is_playing" default="false">
|
||||
If [code]true[/code], the [member animation] is currently playing.
|
||||
</member>
|
||||
</members>
|
||||
<signals>
|
||||
<signal name="animation_finished">
|
||||
<description>
|
||||
Emitted when the animation is finished (when it plays the last frame). If the animation is looping, this signal is emitted every time the last frame is drawn.
|
||||
</description>
|
||||
</signal>
|
||||
<signal name="frame_changed">
|
||||
<description>
|
||||
Emitted when [member frame] changed.
|
||||
</description>
|
||||
</signal>
|
||||
</signals>
|
||||
<constants>
|
||||
</constants>
|
||||
</class>
|
@ -241,14 +241,6 @@
|
||||
Returns the arguments values to be called on a method track for a given key in a given track.
|
||||
</description>
|
||||
</method>
|
||||
<method name="position_track_insert_key">
|
||||
<return type="int" />
|
||||
<argument index="0" name="track_idx" type="int" />
|
||||
<argument index="1" name="time" type="float" />
|
||||
<argument index="2" name="position" type="Vector3" />
|
||||
<description>
|
||||
</description>
|
||||
</method>
|
||||
<method name="remove_track">
|
||||
<return type="void" />
|
||||
<argument index="0" name="track_idx" type="int" />
|
||||
@ -256,22 +248,6 @@
|
||||
Removes a track by specifying the track index.
|
||||
</description>
|
||||
</method>
|
||||
<method name="rotation_track_insert_key">
|
||||
<return type="int" />
|
||||
<argument index="0" name="track_idx" type="int" />
|
||||
<argument index="1" name="time" type="float" />
|
||||
<argument index="2" name="rotation" type="Quaternion" />
|
||||
<description>
|
||||
</description>
|
||||
</method>
|
||||
<method name="scale_track_insert_key">
|
||||
<return type="int" />
|
||||
<argument index="0" name="track_idx" type="int" />
|
||||
<argument index="1" name="time" type="float" />
|
||||
<argument index="2" name="scale" type="Vector3" />
|
||||
<description>
|
||||
</description>
|
||||
</method>
|
||||
<method name="track_find_key" qualifiers="const">
|
||||
<return type="int" />
|
||||
<argument index="0" name="track_idx" type="int" />
|
||||
@ -534,22 +510,16 @@
|
||||
<constant name="TYPE_VALUE" value="0" enum="TrackType">
|
||||
Value tracks set values in node properties, but only those which can be Interpolated.
|
||||
</constant>
|
||||
<constant name="TYPE_POSITION_3D" value="1" enum="TrackType">
|
||||
</constant>
|
||||
<constant name="TYPE_ROTATION_3D" value="2" enum="TrackType">
|
||||
</constant>
|
||||
<constant name="TYPE_SCALE_3D" value="3" enum="TrackType">
|
||||
</constant>
|
||||
<constant name="TYPE_METHOD" value="4" enum="TrackType">
|
||||
<constant name="TYPE_METHOD" value="1" enum="TrackType">
|
||||
Method tracks call functions with given arguments per key.
|
||||
</constant>
|
||||
<constant name="TYPE_BEZIER" value="5" enum="TrackType">
|
||||
<constant name="TYPE_BEZIER" value="2" enum="TrackType">
|
||||
Bezier tracks are used to interpolate a value using custom curves. They can also be used to animate sub-properties of vectors and colors (e.g. alpha value of a [Color]).
|
||||
</constant>
|
||||
<constant name="TYPE_AUDIO" value="6" enum="TrackType">
|
||||
<constant name="TYPE_AUDIO" value="3" enum="TrackType">
|
||||
Audio tracks are used to play an audio stream with either type of [AudioStreamPlayer]. The stream can be trimmed and previewed in the animation.
|
||||
</constant>
|
||||
<constant name="TYPE_ANIMATION" value="7" enum="TrackType">
|
||||
<constant name="TYPE_ANIMATION" value="4" enum="TrackType">
|
||||
Animation tracks play animations in other [AnimationPlayer] nodes.
|
||||
</constant>
|
||||
<constant name="INTERPOLATION_NEAREST" value="0" enum="InterpolationType">
|
||||
|
@ -1,183 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<class name="AnimationNode" inherits="Resource" version="4.2">
|
||||
<brief_description>
|
||||
Base resource for [AnimationTree] nodes.
|
||||
</brief_description>
|
||||
<description>
|
||||
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.
|
||||
</description>
|
||||
<tutorials>
|
||||
<link>$DOCS_URL/tutorials/animation/animation_tree.md</link>
|
||||
</tutorials>
|
||||
<methods>
|
||||
<method name="add_input">
|
||||
<return type="void" />
|
||||
<argument index="0" name="name" type="String" />
|
||||
<description>
|
||||
Adds an input to the node. This is only useful for nodes created for use in an [AnimationNodeBlendTree].
|
||||
</description>
|
||||
</method>
|
||||
<method name="blend_animation">
|
||||
<return type="void" />
|
||||
<argument index="0" name="animation" type="StringName" />
|
||||
<argument index="1" name="time" type="float" />
|
||||
<argument index="2" name="delta" type="float" />
|
||||
<argument index="3" name="seeked" type="bool" />
|
||||
<argument index="4" name="blend" type="float" />
|
||||
<description>
|
||||
</description>
|
||||
</method>
|
||||
<method name="blend_input">
|
||||
<return type="float" />
|
||||
<argument index="0" name="input_index" type="int" />
|
||||
<argument index="1" name="time" type="float" />
|
||||
<argument index="2" name="seek" type="bool" />
|
||||
<argument index="3" name="blend" type="float" />
|
||||
<argument index="4" name="filter" type="int" enum="AnimationNode.FilterAction" default="0" />
|
||||
<argument index="5" name="optimize" type="bool" default="true" />
|
||||
<description>
|
||||
Blend an input. This is only useful for nodes created for an [AnimationNodeBlendTree]. The [code]time[/code] parameter is a relative delta, unless [code]seek[/code] is [code]true[/code], in which case it is absolute. A filter mode may be optionally passed (see [enum FilterAction] for options).
|
||||
</description>
|
||||
</method>
|
||||
<method name="blend_node">
|
||||
<return type="float" />
|
||||
<argument index="0" name="name" type="StringName" />
|
||||
<argument index="1" name="node" type="AnimationNode" />
|
||||
<argument index="2" name="time" type="float" />
|
||||
<argument index="3" name="seek" type="bool" />
|
||||
<argument index="4" name="blend" type="float" />
|
||||
<argument index="5" name="filter" type="int" enum="AnimationNode.FilterAction" default="0" />
|
||||
<argument index="6" name="optimize" type="bool" default="true" />
|
||||
<description>
|
||||
</description>
|
||||
</method>
|
||||
<method name="get_caption" qualifiers="virtual">
|
||||
<return type="String" />
|
||||
<description>
|
||||
When inheriting from [AnimationRootNode], implement this virtual method to override the text caption for this node.
|
||||
</description>
|
||||
</method>
|
||||
<method name="get_child_by_name" qualifiers="virtual">
|
||||
<return type="Object" />
|
||||
<argument index="0" name="name" type="String" />
|
||||
<description>
|
||||
When inheriting from [AnimationRootNode], implement this virtual method to return a child node by its [code]name[/code].
|
||||
</description>
|
||||
</method>
|
||||
<method name="get_child_nodes" qualifiers="virtual">
|
||||
<return type="Dictionary" />
|
||||
<description>
|
||||
When inheriting from [AnimationRootNode], implement this virtual method to return all children nodes in order as a [code]name: node[/code] dictionary.
|
||||
</description>
|
||||
</method>
|
||||
<method name="get_input_count" qualifiers="const">
|
||||
<return type="int" />
|
||||
<description>
|
||||
Amount of inputs in this node, only useful for nodes that go into [AnimationNodeBlendTree].
|
||||
</description>
|
||||
</method>
|
||||
<method name="get_input_name">
|
||||
<return type="String" />
|
||||
<argument index="0" name="input" type="int" />
|
||||
<description>
|
||||
Gets the name of an input by index.
|
||||
</description>
|
||||
</method>
|
||||
<method name="get_parameter" qualifiers="const">
|
||||
<return type="Variant" />
|
||||
<argument index="0" name="name" type="StringName" />
|
||||
<description>
|
||||
</description>
|
||||
</method>
|
||||
<method name="get_parameter_default_value" qualifiers="virtual">
|
||||
<return type="Variant" />
|
||||
<argument index="0" name="name" type="String" />
|
||||
<description>
|
||||
When inheriting from [AnimationRootNode], implement this virtual method to return the default value of parameter "[code]name[/code]". Parameters are custom local memory used for your nodes, given a resource can be reused in multiple trees.
|
||||
</description>
|
||||
</method>
|
||||
<method name="get_parameter_list" qualifiers="virtual">
|
||||
<return type="Array" />
|
||||
<description>
|
||||
When inheriting from [AnimationRootNode], implement this virtual method to return a list of the properties on this node. Parameters are custom local memory used for your nodes, given a resource can be reused in multiple trees. Format is similar to [method Object.get_property_list].
|
||||
</description>
|
||||
</method>
|
||||
<method name="has_filter" qualifiers="virtual">
|
||||
<return type="bool" />
|
||||
<description>
|
||||
When inheriting from [AnimationRootNode], implement this virtual method to return whether the blend tree editor should display filter editing on this node.
|
||||
</description>
|
||||
</method>
|
||||
<method name="is_path_filtered" qualifiers="const">
|
||||
<return type="bool" />
|
||||
<argument index="0" name="path" type="NodePath" />
|
||||
<description>
|
||||
Returns whether the given path is filtered.
|
||||
</description>
|
||||
</method>
|
||||
<method name="process" qualifiers="virtual">
|
||||
<return type="void" />
|
||||
<argument index="0" name="time" type="float" />
|
||||
<argument index="1" name="seek" type="bool" />
|
||||
<description>
|
||||
When inheriting from [AnimationRootNode], implement this virtual method to run some code when this node is processed. The [code]time[/code] parameter is a relative delta, unless [code]seek[/code] is [code]true[/code], in which case it is absolute.
|
||||
Here, call the [method blend_input], [method blend_node] or [method blend_animation] functions. You can also use [method get_parameter] and [method set_parameter] to modify local memory.
|
||||
This function should return the time left for the current animation to finish (if unsure, pass the value from the main blend being called).
|
||||
</description>
|
||||
</method>
|
||||
<method name="remove_input">
|
||||
<return type="void" />
|
||||
<argument index="0" name="index" type="int" />
|
||||
<description>
|
||||
Removes an input, call this only when inactive.
|
||||
</description>
|
||||
</method>
|
||||
<method name="set_filter_path">
|
||||
<return type="void" />
|
||||
<argument index="0" name="path" type="NodePath" />
|
||||
<argument index="1" name="enable" type="bool" />
|
||||
<description>
|
||||
Adds or removes a path for the filter.
|
||||
</description>
|
||||
</method>
|
||||
<method name="set_parameter">
|
||||
<return type="void" />
|
||||
<argument index="0" name="name" type="StringName" />
|
||||
<argument index="1" name="value" type="Variant" />
|
||||
<description>
|
||||
</description>
|
||||
</method>
|
||||
</methods>
|
||||
<members>
|
||||
<member name="filter_enabled" type="bool" setter="set_filter_enabled" getter="is_filter_enabled">
|
||||
If [code]true[/code], filtering is enabled.
|
||||
</member>
|
||||
</members>
|
||||
<signals>
|
||||
<signal name="removed_from_graph">
|
||||
<description>
|
||||
Emitted when the node was removed from the graph.
|
||||
</description>
|
||||
</signal>
|
||||
<signal name="tree_changed">
|
||||
<description>
|
||||
Emitted by nodes that inherit from this class and that have an internal tree when one of their nodes changes. The nodes that emit this signal are [AnimationNodeBlendSpace1D], [AnimationNodeBlendSpace2D], [AnimationNodeStateMachine], and [AnimationNodeBlendTree].
|
||||
</description>
|
||||
</signal>
|
||||
</signals>
|
||||
<constants>
|
||||
<constant name="FILTER_IGNORE" value="0" enum="FilterAction">
|
||||
Do not use filtering.
|
||||
</constant>
|
||||
<constant name="FILTER_PASS" value="1" enum="FilterAction">
|
||||
Paths matching the filter will be allowed to pass.
|
||||
</constant>
|
||||
<constant name="FILTER_STOP" value="2" enum="FilterAction">
|
||||
Paths matching the filter will be discarded.
|
||||
</constant>
|
||||
<constant name="FILTER_BLEND" value="3" enum="FilterAction">
|
||||
Paths matching the filter will be blended (by the blend value).
|
||||
</constant>
|
||||
</constants>
|
||||
</class>
|
@ -1,21 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<class name="AnimationNodeAdd2" inherits="AnimationNode" version="4.2">
|
||||
<brief_description>
|
||||
Blends two animations additively inside of an [AnimationNodeBlendTree].
|
||||
</brief_description>
|
||||
<description>
|
||||
A resource to add to an [AnimationNodeBlendTree]. Blends two animations additively based on an amount value in the [code][0.0, 1.0][/code] range.
|
||||
</description>
|
||||
<tutorials>
|
||||
<link>$DOCS_URL/tutorials/animation/animation_tree.md</link>
|
||||
</tutorials>
|
||||
<methods>
|
||||
</methods>
|
||||
<members>
|
||||
<member name="sync" type="bool" setter="set_use_sync" getter="is_using_sync" default="false">
|
||||
If [code]true[/code], sets the [code]optimization[/code] to [code]false[/code] when calling [method AnimationNode.blend_input], forcing the blended animations to update every frame.
|
||||
</member>
|
||||
</members>
|
||||
<constants>
|
||||
</constants>
|
||||
</class>
|
@ -1,26 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<class name="AnimationNodeAdd3" inherits="AnimationNode" version="4.2">
|
||||
<brief_description>
|
||||
Blends two of three animations additively inside of an [AnimationNodeBlendTree].
|
||||
</brief_description>
|
||||
<description>
|
||||
A resource to add to an [AnimationNodeBlendTree]. Blends two animations together additively out of three based on a value in the [code][-1.0, 1.0][/code] 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 [code][-1.0, 0.0][/code] range.
|
||||
- A +add animation to blend with when the blend amount is in the [code][0.0, 1.0][/code] range
|
||||
</description>
|
||||
<tutorials>
|
||||
<link title="AnimationTree">$DOCS_URL/tutorials/animation/animation_tree.md</link>
|
||||
<link title="Third Person Shooter Demo">https://godotengine.org/asset-library/asset/678</link>
|
||||
</tutorials>
|
||||
<methods>
|
||||
</methods>
|
||||
<members>
|
||||
<member name="sync" type="bool" setter="set_use_sync" getter="is_using_sync" default="false">
|
||||
If [code]true[/code], sets the [code]optimization[/code] to [code]false[/code] when calling [method AnimationNode.blend_input], forcing the blended animations to update every frame.
|
||||
</member>
|
||||
</members>
|
||||
<constants>
|
||||
</constants>
|
||||
</class>
|
@ -1,23 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<class name="AnimationNodeAnimation" inherits="AnimationRootNode" version="4.2">
|
||||
<brief_description>
|
||||
Input animation to use in an [AnimationNodeBlendTree].
|
||||
</brief_description>
|
||||
<description>
|
||||
A resource to add to an [AnimationNodeBlendTree]. Only features one output set using the [member animation] property. Use it as an input for [AnimationNode] that blend animations together.
|
||||
</description>
|
||||
<tutorials>
|
||||
<link title="AnimationTree">$DOCS_URL/tutorials/animation/animation_tree.md</link>
|
||||
<link title="3D Platformer Demo">https://godotengine.org/asset-library/asset/125</link>
|
||||
<link title="Third Person Shooter Demo">https://godotengine.org/asset-library/asset/678</link>
|
||||
</tutorials>
|
||||
<methods>
|
||||
</methods>
|
||||
<members>
|
||||
<member name="animation" type="StringName" setter="set_animation" getter="get_animation" default="@""">
|
||||
Animation to use as an output. It is one of the animations provided by [member AnimationTree.anim_player].
|
||||
</member>
|
||||
</members>
|
||||
<constants>
|
||||
</constants>
|
||||
</class>
|
@ -1,23 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<class name="AnimationNodeBlend2" inherits="AnimationNode" version="4.2">
|
||||
<brief_description>
|
||||
Blends two animations linearly inside of an [AnimationNodeBlendTree].
|
||||
</brief_description>
|
||||
<description>
|
||||
A resource to add to an [AnimationNodeBlendTree]. Blends two animations linearly based on an amount value in the [code][0.0, 1.0][/code] range.
|
||||
</description>
|
||||
<tutorials>
|
||||
<link title="AnimationTree">$DOCS_URL/tutorials/animation/animation_tree.md</link>
|
||||
<link title="3D Platformer Demo">https://godotengine.org/asset-library/asset/125</link>
|
||||
<link title="Third Person Shooter Demo">https://godotengine.org/asset-library/asset/678</link>
|
||||
</tutorials>
|
||||
<methods>
|
||||
</methods>
|
||||
<members>
|
||||
<member name="sync" type="bool" setter="set_use_sync" getter="is_using_sync" default="false">
|
||||
If [code]true[/code], sets the [code]optimization[/code] to [code]false[/code] when calling [method AnimationNode.blend_input], forcing the blended animations to update every frame.
|
||||
</member>
|
||||
</members>
|
||||
<constants>
|
||||
</constants>
|
||||
</class>
|
@ -1,25 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<class name="AnimationNodeBlend3" inherits="AnimationNode" version="4.2">
|
||||
<brief_description>
|
||||
Blends two of three animations linearly inside of an [AnimationNodeBlendTree].
|
||||
</brief_description>
|
||||
<description>
|
||||
A resource to add to an [AnimationNodeBlendTree]. Blends two animations together linearly out of three based on a value in the [code][-1.0, 1.0][/code] range.
|
||||
This node has three inputs:
|
||||
- The base animation
|
||||
- A -blend animation to blend with when the blend amount is in the [code][-1.0, 0.0][/code] range.
|
||||
- A +blend animation to blend with when the blend amount is in the [code][0.0, 1.0][/code] range
|
||||
</description>
|
||||
<tutorials>
|
||||
<link>$DOCS_URL/tutorials/animation/animation_tree.md</link>
|
||||
</tutorials>
|
||||
<methods>
|
||||
</methods>
|
||||
<members>
|
||||
<member name="sync" type="bool" setter="set_use_sync" getter="is_using_sync" default="false">
|
||||
If [code]true[/code], sets the [code]optimization[/code] to [code]false[/code] when calling [method AnimationNode.blend_input], forcing the blended animations to update every frame.
|
||||
</member>
|
||||
</members>
|
||||
<constants>
|
||||
</constants>
|
||||
</class>
|
@ -1,85 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<class name="AnimationNodeBlendSpace1D" inherits="AnimationRootNode" version="4.2">
|
||||
<brief_description>
|
||||
Blends linearly between two of any number of [AnimationNode] of any type placed on a virtual axis.
|
||||
</brief_description>
|
||||
<description>
|
||||
A resource to add to an [AnimationNodeBlendTree].
|
||||
This is a virtual axis on which you can add any type of [AnimationNode] using [method add_blend_point].
|
||||
Outputs the linear blend of the two [AnimationNode]s closest to the node's current value.
|
||||
You can set the extents of the axis using the [member min_space] and [member max_space].
|
||||
</description>
|
||||
<tutorials>
|
||||
<link>$DOCS_URL/tutorials/animation/animation_tree.md</link>
|
||||
</tutorials>
|
||||
<methods>
|
||||
<method name="add_blend_point">
|
||||
<return type="void" />
|
||||
<argument index="0" name="node" type="AnimationRootNode" />
|
||||
<argument index="1" name="pos" type="float" />
|
||||
<argument index="2" name="at_index" type="int" default="-1" />
|
||||
<description>
|
||||
Adds a new point that represents a [code]node[/code] on the virtual axis at a given position set by [code]pos[/code]. You can insert it at a specific index using the [code]at_index[/code] argument. If you use the default value for [code]at_index[/code], the point is inserted at the end of the blend points array.
|
||||
</description>
|
||||
</method>
|
||||
<method name="get_blend_point_count" qualifiers="const">
|
||||
<return type="int" />
|
||||
<description>
|
||||
Returns the number of points on the blend axis.
|
||||
</description>
|
||||
</method>
|
||||
<method name="get_blend_point_node" qualifiers="const">
|
||||
<return type="AnimationRootNode" />
|
||||
<argument index="0" name="point" type="int" />
|
||||
<description>
|
||||
Returns the [AnimationNode] referenced by the point at index [code]point[/code].
|
||||
</description>
|
||||
</method>
|
||||
<method name="get_blend_point_position" qualifiers="const">
|
||||
<return type="float" />
|
||||
<argument index="0" name="point" type="int" />
|
||||
<description>
|
||||
Returns the position of the point at index [code]point[/code].
|
||||
</description>
|
||||
</method>
|
||||
<method name="remove_blend_point">
|
||||
<return type="void" />
|
||||
<argument index="0" name="point" type="int" />
|
||||
<description>
|
||||
Removes the point at index [code]point[/code] from the blend axis.
|
||||
</description>
|
||||
</method>
|
||||
<method name="set_blend_point_node">
|
||||
<return type="void" />
|
||||
<argument index="0" name="point" type="int" />
|
||||
<argument index="1" name="node" type="AnimationRootNode" />
|
||||
<description>
|
||||
Changes the [AnimationNode] referenced by the point at index [code]point[/code].
|
||||
</description>
|
||||
</method>
|
||||
<method name="set_blend_point_position">
|
||||
<return type="void" />
|
||||
<argument index="0" name="point" type="int" />
|
||||
<argument index="1" name="pos" type="float" />
|
||||
<description>
|
||||
Updates the position of the point at index [code]point[/code] on the blend axis.
|
||||
</description>
|
||||
</method>
|
||||
</methods>
|
||||
<members>
|
||||
<member name="max_space" type="float" setter="set_max_space" getter="get_max_space" default="1.0">
|
||||
The blend space's axis's upper limit for the points' position. See [method add_blend_point].
|
||||
</member>
|
||||
<member name="min_space" type="float" setter="set_min_space" getter="get_min_space" default="-1.0">
|
||||
The blend space's axis's lower limit for the points' position. See [method add_blend_point].
|
||||
</member>
|
||||
<member name="snap" type="float" setter="set_snap" getter="get_snap" default="0.1">
|
||||
Position increment to snap to when moving a point on the axis.
|
||||
</member>
|
||||
<member name="value_label" type="String" setter="set_value_label" getter="get_value_label" default=""value"">
|
||||
Label of the virtual axis of the blend space.
|
||||
</member>
|
||||
</members>
|
||||
<constants>
|
||||
</constants>
|
||||
</class>
|
@ -1,141 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<class name="AnimationNodeBlendSpace2D" inherits="AnimationRootNode" version="4.2">
|
||||
<brief_description>
|
||||
Blends linearly between three [AnimationNode] of any type placed in a 2D space.
|
||||
</brief_description>
|
||||
<description>
|
||||
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 [method add_blend_point] and automatically triangulate it by setting [member auto_triangles] to [code]true[/code]. Otherwise, use [method add_triangle] and [method remove_triangle] to create up the blend space by hand.
|
||||
</description>
|
||||
<tutorials>
|
||||
<link title="AnimationTree">$DOCS_URL/tutorials/animation/animation_tree.md</link>
|
||||
<link title="Third Person Shooter Demo">https://godotengine.org/asset-library/asset/678</link>
|
||||
</tutorials>
|
||||
<methods>
|
||||
<method name="add_blend_point">
|
||||
<return type="void" />
|
||||
<argument index="0" name="node" type="AnimationRootNode" />
|
||||
<argument index="1" name="pos" type="Vector2" />
|
||||
<argument index="2" name="at_index" type="int" default="-1" />
|
||||
<description>
|
||||
Adds a new point that represents a [code]node[/code] at the position set by [code]pos[/code]. You can insert it at a specific index using the [code]at_index[/code] argument. If you use the default value for [code]at_index[/code], the point is inserted at the end of the blend points array.
|
||||
</description>
|
||||
</method>
|
||||
<method name="add_triangle">
|
||||
<return type="void" />
|
||||
<argument index="0" name="x" type="int" />
|
||||
<argument index="1" name="y" type="int" />
|
||||
<argument index="2" name="z" type="int" />
|
||||
<argument index="3" name="at_index" type="int" default="-1" />
|
||||
<description>
|
||||
Creates a new triangle using three points [code]x[/code], [code]y[/code], and [code]z[/code]. Triangles can overlap. You can insert the triangle at a specific index using the [code]at_index[/code] argument. If you use the default value for [code]at_index[/code], the point is inserted at the end of the blend points array.
|
||||
</description>
|
||||
</method>
|
||||
<method name="get_blend_point_count" qualifiers="const">
|
||||
<return type="int" />
|
||||
<description>
|
||||
Returns the number of points in the blend space.
|
||||
</description>
|
||||
</method>
|
||||
<method name="get_blend_point_node" qualifiers="const">
|
||||
<return type="AnimationRootNode" />
|
||||
<argument index="0" name="point" type="int" />
|
||||
<description>
|
||||
Returns the [AnimationRootNode] referenced by the point at index [code]point[/code].
|
||||
</description>
|
||||
</method>
|
||||
<method name="get_blend_point_position" qualifiers="const">
|
||||
<return type="Vector2" />
|
||||
<argument index="0" name="point" type="int" />
|
||||
<description>
|
||||
Returns the position of the point at index [code]point[/code].
|
||||
</description>
|
||||
</method>
|
||||
<method name="get_triangle_count" qualifiers="const">
|
||||
<return type="int" />
|
||||
<description>
|
||||
Returns the number of triangles in the blend space.
|
||||
</description>
|
||||
</method>
|
||||
<method name="get_triangle_point">
|
||||
<return type="int" />
|
||||
<argument index="0" name="triangle" type="int" />
|
||||
<argument index="1" name="point" type="int" />
|
||||
<description>
|
||||
Returns the position of the point at index [code]point[/code] in the triangle of index [code]triangle[/code].
|
||||
</description>
|
||||
</method>
|
||||
<method name="remove_blend_point">
|
||||
<return type="void" />
|
||||
<argument index="0" name="point" type="int" />
|
||||
<description>
|
||||
Removes the point at index [code]point[/code] from the blend space.
|
||||
</description>
|
||||
</method>
|
||||
<method name="remove_triangle">
|
||||
<return type="void" />
|
||||
<argument index="0" name="triangle" type="int" />
|
||||
<description>
|
||||
Removes the triangle at index [code]triangle[/code] from the blend space.
|
||||
</description>
|
||||
</method>
|
||||
<method name="set_blend_point_node">
|
||||
<return type="void" />
|
||||
<argument index="0" name="point" type="int" />
|
||||
<argument index="1" name="node" type="AnimationRootNode" />
|
||||
<description>
|
||||
Changes the [AnimationNode] referenced by the point at index [code]point[/code].
|
||||
</description>
|
||||
</method>
|
||||
<method name="set_blend_point_position">
|
||||
<return type="void" />
|
||||
<argument index="0" name="point" type="int" />
|
||||
<argument index="1" name="pos" type="Vector2" />
|
||||
<description>
|
||||
Updates the position of the point at index [code]point[/code] on the blend axis.
|
||||
</description>
|
||||
</method>
|
||||
</methods>
|
||||
<members>
|
||||
<member name="auto_triangles" type="bool" setter="set_auto_triangles" getter="get_auto_triangles" default="true">
|
||||
If [code]true[/code], the blend space is triangulated automatically. The mesh updates every time you add or remove points with [method add_blend_point] and [method remove_blend_point].
|
||||
</member>
|
||||
<member name="blend_mode" type="int" setter="set_blend_mode" getter="get_blend_mode" enum="AnimationNodeBlendSpace2D.BlendMode" default="0">
|
||||
Controls the interpolation between animations. See [enum BlendMode] constants.
|
||||
</member>
|
||||
<member name="max_space" type="Vector2" setter="set_max_space" getter="get_max_space" default="Vector2( 1, 1 )">
|
||||
The blend space's X and Y axes' upper limit for the points' position. See [method add_blend_point].
|
||||
</member>
|
||||
<member name="min_space" type="Vector2" setter="set_min_space" getter="get_min_space" default="Vector2( -1, -1 )">
|
||||
The blend space's X and Y axes' lower limit for the points' position. See [method add_blend_point].
|
||||
</member>
|
||||
<member name="snap" type="Vector2" setter="set_snap" getter="get_snap" default="Vector2( 0.1, 0.1 )">
|
||||
Position increment to snap to when moving a point.
|
||||
</member>
|
||||
<member name="x_label" type="String" setter="set_x_label" getter="get_x_label" default=""x"">
|
||||
Name of the blend space's X axis.
|
||||
</member>
|
||||
<member name="y_label" type="String" setter="set_y_label" getter="get_y_label" default=""y"">
|
||||
Name of the blend space's Y axis.
|
||||
</member>
|
||||
</members>
|
||||
<signals>
|
||||
<signal name="triangles_updated">
|
||||
<description>
|
||||
Emitted every time the blend space's triangles are created, removed, or when one of their vertices changes position.
|
||||
</description>
|
||||
</signal>
|
||||
</signals>
|
||||
<constants>
|
||||
<constant name="BLEND_MODE_INTERPOLATED" value="0" enum="BlendMode">
|
||||
The interpolation between animations is linear.
|
||||
</constant>
|
||||
<constant name="BLEND_MODE_DISCRETE" value="1" enum="BlendMode">
|
||||
The blend space plays the animation of the node the blending position is closest to. Useful for frame-by-frame 2D animations.
|
||||
</constant>
|
||||
<constant name="BLEND_MODE_DISCRETE_CARRY" value="2" enum="BlendMode">
|
||||
Similar to [constant BLEND_MODE_DISCRETE], but starts the new animation at the last animation's playback position.
|
||||
</constant>
|
||||
</constants>
|
||||
</class>
|
@ -1,101 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<class name="AnimationNodeBlendTree" inherits="AnimationRootNode" version="4.2">
|
||||
<brief_description>
|
||||
[AnimationTree] node resource that contains many blend type nodes.
|
||||
</brief_description>
|
||||
<description>
|
||||
This node may contain a sub-tree of any other blend type nodes, such as [AnimationNodeTransition], [AnimationNodeBlend2], [AnimationNodeBlend3], [AnimationNodeOneShot], etc. This is one of the most commonly used roots.
|
||||
An [AnimationNodeOutput] node named [code]output[/code] is created by default.
|
||||
</description>
|
||||
<tutorials>
|
||||
<link>$DOCS_URL/tutorials/animation/animation_tree.md</link>
|
||||
</tutorials>
|
||||
<methods>
|
||||
<method name="add_node">
|
||||
<return type="void" />
|
||||
<argument index="0" name="name" type="StringName" />
|
||||
<argument index="1" name="node" type="AnimationNode" />
|
||||
<argument index="2" name="position" type="Vector2" default="Vector2( 0, 0 )" />
|
||||
<description>
|
||||
</description>
|
||||
</method>
|
||||
<method name="connect_node">
|
||||
<return type="void" />
|
||||
<argument index="0" name="input_node" type="StringName" />
|
||||
<argument index="1" name="input_index" type="int" />
|
||||
<argument index="2" name="output_node" type="StringName" />
|
||||
<description>
|
||||
</description>
|
||||
</method>
|
||||
<method name="disconnect_node">
|
||||
<return type="void" />
|
||||
<argument index="0" name="input_node" type="StringName" />
|
||||
<argument index="1" name="input_index" type="int" />
|
||||
<description>
|
||||
</description>
|
||||
</method>
|
||||
<method name="get_node" qualifiers="const">
|
||||
<return type="AnimationNode" />
|
||||
<argument index="0" name="name" type="StringName" />
|
||||
<description>
|
||||
</description>
|
||||
</method>
|
||||
<method name="get_node_position" qualifiers="const">
|
||||
<return type="Vector2" />
|
||||
<argument index="0" name="name" type="StringName" />
|
||||
<description>
|
||||
</description>
|
||||
</method>
|
||||
<method name="has_node" qualifiers="const">
|
||||
<return type="bool" />
|
||||
<argument index="0" name="name" type="StringName" />
|
||||
<description>
|
||||
</description>
|
||||
</method>
|
||||
<method name="remove_node">
|
||||
<return type="void" />
|
||||
<argument index="0" name="name" type="StringName" />
|
||||
<description>
|
||||
</description>
|
||||
</method>
|
||||
<method name="rename_node">
|
||||
<return type="void" />
|
||||
<argument index="0" name="name" type="StringName" />
|
||||
<argument index="1" name="new_name" type="StringName" />
|
||||
<description>
|
||||
</description>
|
||||
</method>
|
||||
<method name="set_node_position">
|
||||
<return type="void" />
|
||||
<argument index="0" name="name" type="StringName" />
|
||||
<argument index="1" name="position" type="Vector2" />
|
||||
<description>
|
||||
</description>
|
||||
</method>
|
||||
</methods>
|
||||
<members>
|
||||
<member name="graph_offset" type="Vector2" setter="set_graph_offset" getter="get_graph_offset" default="Vector2( 0, 0 )">
|
||||
The global offset of all sub-nodes.
|
||||
</member>
|
||||
</members>
|
||||
<constants>
|
||||
<constant name="CONNECTION_OK" value="0">
|
||||
The connection was successful.
|
||||
</constant>
|
||||
<constant name="CONNECTION_ERROR_NO_INPUT" value="1">
|
||||
The input node is [code]null[/code].
|
||||
</constant>
|
||||
<constant name="CONNECTION_ERROR_NO_INPUT_INDEX" value="2">
|
||||
The specified input port is out of range.
|
||||
</constant>
|
||||
<constant name="CONNECTION_ERROR_NO_OUTPUT" value="3">
|
||||
The output node is [code]null[/code].
|
||||
</constant>
|
||||
<constant name="CONNECTION_ERROR_SAME_NODE" value="4">
|
||||
Input and output nodes are the same.
|
||||
</constant>
|
||||
<constant name="CONNECTION_ERROR_CONNECTION_EXISTS" value="5">
|
||||
The specified connection already exists.
|
||||
</constant>
|
||||
</constants>
|
||||
</class>
|
@ -1,40 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<class name="AnimationNodeOneShot" inherits="AnimationNode" version="4.2">
|
||||
<brief_description>
|
||||
Plays an animation once in [AnimationNodeBlendTree].
|
||||
</brief_description>
|
||||
<description>
|
||||
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.
|
||||
</description>
|
||||
<tutorials>
|
||||
<link title="AnimationTree">$DOCS_URL/tutorials/animation/animation_tree.md</link>
|
||||
<link title="Third Person Shooter Demo">https://godotengine.org/asset-library/asset/678</link>
|
||||
</tutorials>
|
||||
<methods>
|
||||
</methods>
|
||||
<members>
|
||||
<member name="autorestart" type="bool" setter="set_autorestart" getter="has_autorestart" default="false">
|
||||
If [code]true[/code], the sub-animation will restart automatically after finishing.
|
||||
</member>
|
||||
<member name="autorestart_delay" type="float" setter="set_autorestart_delay" getter="get_autorestart_delay" default="1.0">
|
||||
The delay after which the automatic restart is triggered, in seconds.
|
||||
</member>
|
||||
<member name="autorestart_random_delay" type="float" setter="set_autorestart_random_delay" getter="get_autorestart_random_delay" default="0.0">
|
||||
If [member autorestart] is [code]true[/code], a random additional delay (in seconds) between 0 and this value will be added to [member autorestart_delay].
|
||||
</member>
|
||||
<member name="fadein_time" type="float" setter="set_fadein_time" getter="get_fadein_time" default="0.1">
|
||||
</member>
|
||||
<member name="fadeout_time" type="float" setter="set_fadeout_time" getter="get_fadeout_time" default="0.1">
|
||||
</member>
|
||||
<member name="mix_mode" type="int" setter="set_mix_mode" getter="get_mix_mode" enum="AnimationNodeOneShot.MixMode" default="0">
|
||||
</member>
|
||||
<member name="sync" type="bool" setter="set_use_sync" getter="is_using_sync" default="false">
|
||||
</member>
|
||||
</members>
|
||||
<constants>
|
||||
<constant name="MIX_MODE_BLEND" value="0" enum="MixMode">
|
||||
</constant>
|
||||
<constant name="MIX_MODE_ADD" value="1" enum="MixMode">
|
||||
</constant>
|
||||
</constants>
|
||||
</class>
|
@ -1,17 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<class name="AnimationNodeOutput" inherits="AnimationNode" version="4.2">
|
||||
<brief_description>
|
||||
Generic output node to be added to [AnimationNodeBlendTree].
|
||||
</brief_description>
|
||||
<description>
|
||||
</description>
|
||||
<tutorials>
|
||||
<link title="AnimationTree">$DOCS_URL/tutorials/animation/animation_tree.md</link>
|
||||
<link title="3D Platformer Demo">https://godotengine.org/asset-library/asset/125</link>
|
||||
<link title="Third Person Shooter Demo">https://godotengine.org/asset-library/asset/678</link>
|
||||
</tutorials>
|
||||
<methods>
|
||||
</methods>
|
||||
<constants>
|
||||
</constants>
|
||||
</class>
|
@ -1,174 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<class name="AnimationNodeStateMachine" inherits="AnimationRootNode" version="4.2">
|
||||
<brief_description>
|
||||
State machine for control of animations.
|
||||
</brief_description>
|
||||
<description>
|
||||
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.
|
||||
[b]Example:[/b]
|
||||
[codeblock]
|
||||
var state_machine = $AnimationTree.get("parameters/playback")
|
||||
state_machine.travel("some_state")
|
||||
[/codeblock]
|
||||
</description>
|
||||
<tutorials>
|
||||
<link>$DOCS_URL/tutorials/animation/animation_tree.md</link>
|
||||
</tutorials>
|
||||
<methods>
|
||||
<method name="add_node">
|
||||
<return type="void" />
|
||||
<argument index="0" name="name" type="StringName" />
|
||||
<argument index="1" name="node" type="AnimationNode" />
|
||||
<argument index="2" name="position" type="Vector2" default="Vector2( 0, 0 )" />
|
||||
<description>
|
||||
</description>
|
||||
</method>
|
||||
<method name="add_transition">
|
||||
<return type="void" />
|
||||
<argument index="0" name="from" type="StringName" />
|
||||
<argument index="1" name="to" type="StringName" />
|
||||
<argument index="2" name="transition" type="AnimationNodeStateMachineTransition" />
|
||||
<description>
|
||||
</description>
|
||||
</method>
|
||||
<method name="get_end_node" qualifiers="const">
|
||||
<return type="String" />
|
||||
<description>
|
||||
Returns the graph's end node.
|
||||
</description>
|
||||
</method>
|
||||
<method name="get_graph_offset" qualifiers="const">
|
||||
<return type="Vector2" />
|
||||
<description>
|
||||
Returns the draw offset of the graph. Used for display in the editor.
|
||||
</description>
|
||||
</method>
|
||||
<method name="get_node" qualifiers="const">
|
||||
<return type="AnimationNode" />
|
||||
<argument index="0" name="name" type="StringName" />
|
||||
<description>
|
||||
</description>
|
||||
</method>
|
||||
<method name="get_node_name" qualifiers="const">
|
||||
<return type="StringName" />
|
||||
<argument index="0" name="node" type="AnimationNode" />
|
||||
<description>
|
||||
Returns the given animation node's name.
|
||||
</description>
|
||||
</method>
|
||||
<method name="get_node_position" qualifiers="const">
|
||||
<return type="Vector2" />
|
||||
<argument index="0" name="name" type="StringName" />
|
||||
<description>
|
||||
</description>
|
||||
</method>
|
||||
<method name="get_start_node" qualifiers="const">
|
||||
<return type="String" />
|
||||
<description>
|
||||
Returns the graph's end node.
|
||||
</description>
|
||||
</method>
|
||||
<method name="get_transition" qualifiers="const">
|
||||
<return type="AnimationNodeStateMachineTransition" />
|
||||
<argument index="0" name="idx" type="int" />
|
||||
<description>
|
||||
Returns the given transition.
|
||||
</description>
|
||||
</method>
|
||||
<method name="get_transition_count" qualifiers="const">
|
||||
<return type="int" />
|
||||
<description>
|
||||
Returns the number of connections in the graph.
|
||||
</description>
|
||||
</method>
|
||||
<method name="get_transition_from" qualifiers="const">
|
||||
<return type="StringName" />
|
||||
<argument index="0" name="idx" type="int" />
|
||||
<description>
|
||||
Returns the given transition's start node.
|
||||
</description>
|
||||
</method>
|
||||
<method name="get_transition_to" qualifiers="const">
|
||||
<return type="StringName" />
|
||||
<argument index="0" name="idx" type="int" />
|
||||
<description>
|
||||
Returns the given transition's end node.
|
||||
</description>
|
||||
</method>
|
||||
<method name="has_node" qualifiers="const">
|
||||
<return type="bool" />
|
||||
<argument index="0" name="name" type="StringName" />
|
||||
<description>
|
||||
</description>
|
||||
</method>
|
||||
<method name="has_transition" qualifiers="const">
|
||||
<return type="bool" />
|
||||
<argument index="0" name="from" type="StringName" />
|
||||
<argument index="1" name="to" type="StringName" />
|
||||
<description>
|
||||
</description>
|
||||
</method>
|
||||
<method name="remove_node">
|
||||
<return type="void" />
|
||||
<argument index="0" name="name" type="StringName" />
|
||||
<description>
|
||||
</description>
|
||||
</method>
|
||||
<method name="remove_transition">
|
||||
<return type="void" />
|
||||
<argument index="0" name="from" type="StringName" />
|
||||
<argument index="1" name="to" type="StringName" />
|
||||
<description>
|
||||
</description>
|
||||
</method>
|
||||
<method name="remove_transition_by_index">
|
||||
<return type="void" />
|
||||
<argument index="0" name="idx" type="int" />
|
||||
<description>
|
||||
Deletes the given transition by index.
|
||||
</description>
|
||||
</method>
|
||||
<method name="rename_node">
|
||||
<return type="void" />
|
||||
<argument index="0" name="name" type="StringName" />
|
||||
<argument index="1" name="new_name" type="StringName" />
|
||||
<description>
|
||||
</description>
|
||||
</method>
|
||||
<method name="replace_node">
|
||||
<return type="void" />
|
||||
<argument index="0" name="name" type="StringName" />
|
||||
<argument index="1" name="node" type="AnimationNode" />
|
||||
<description>
|
||||
</description>
|
||||
</method>
|
||||
<method name="set_end_node">
|
||||
<return type="void" />
|
||||
<argument index="0" name="name" type="StringName" />
|
||||
<description>
|
||||
</description>
|
||||
</method>
|
||||
<method name="set_graph_offset">
|
||||
<return type="void" />
|
||||
<argument index="0" name="offset" type="Vector2" />
|
||||
<description>
|
||||
Sets the draw offset of the graph. Used for display in the editor.
|
||||
</description>
|
||||
</method>
|
||||
<method name="set_node_position">
|
||||
<return type="void" />
|
||||
<argument index="0" name="name" type="StringName" />
|
||||
<argument index="1" name="position" type="Vector2" />
|
||||
<description>
|
||||
</description>
|
||||
</method>
|
||||
<method name="set_start_node">
|
||||
<return type="void" />
|
||||
<argument index="0" name="name" type="StringName" />
|
||||
<description>
|
||||
</description>
|
||||
</method>
|
||||
</methods>
|
||||
<constants>
|
||||
</constants>
|
||||
</class>
|
@ -1,71 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<class name="AnimationNodeStateMachinePlayback" inherits="Resource" version="4.2">
|
||||
<brief_description>
|
||||
Playback control for [AnimationNodeStateMachine].
|
||||
</brief_description>
|
||||
<description>
|
||||
Allows control of [AnimationTree] state machines created with [AnimationNodeStateMachine]. Retrieve with [code]$AnimationTree.get("parameters/playback")[/code].
|
||||
[b]Example:[/b]
|
||||
[codeblock]
|
||||
var state_machine = $AnimationTree.get("parameters/playback")
|
||||
state_machine.travel("some_state")
|
||||
[/codeblock]
|
||||
</description>
|
||||
<tutorials>
|
||||
<link>$DOCS_URL/tutorials/animation/animation_tree.md</link>
|
||||
</tutorials>
|
||||
<methods>
|
||||
<method name="get_current_length" qualifiers="const">
|
||||
<return type="float" />
|
||||
<description>
|
||||
</description>
|
||||
</method>
|
||||
<method name="get_current_node" qualifiers="const">
|
||||
<return type="StringName" />
|
||||
<description>
|
||||
Returns the currently playing animation state.
|
||||
</description>
|
||||
</method>
|
||||
<method name="get_current_play_position" qualifiers="const">
|
||||
<return type="float" />
|
||||
<description>
|
||||
Returns the playback position within the current animation state.
|
||||
</description>
|
||||
</method>
|
||||
<method name="get_travel_path" qualifiers="const">
|
||||
<return type="PoolStringArray" />
|
||||
<description>
|
||||
Returns the current travel path as computed internally by the A* algorithm.
|
||||
</description>
|
||||
</method>
|
||||
<method name="is_playing" qualifiers="const">
|
||||
<return type="bool" />
|
||||
<description>
|
||||
Returns [code]true[/code] if an animation is playing.
|
||||
</description>
|
||||
</method>
|
||||
<method name="start">
|
||||
<return type="void" />
|
||||
<argument index="0" name="node" type="StringName" />
|
||||
<description>
|
||||
</description>
|
||||
</method>
|
||||
<method name="stop">
|
||||
<return type="void" />
|
||||
<description>
|
||||
Stops the currently playing animation.
|
||||
</description>
|
||||
</method>
|
||||
<method name="travel">
|
||||
<return type="void" />
|
||||
<argument index="0" name="to_node" type="StringName" />
|
||||
<description>
|
||||
</description>
|
||||
</method>
|
||||
</methods>
|
||||
<members>
|
||||
<member name="resource_local_to_scene" type="bool" setter="set_local_to_scene" getter="is_local_to_scene" overrides="Resource" default="true" />
|
||||
</members>
|
||||
<constants>
|
||||
</constants>
|
||||
</class>
|
@ -1,53 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<class name="AnimationNodeStateMachineTransition" inherits="Resource" version="4.2">
|
||||
<brief_description>
|
||||
</brief_description>
|
||||
<description>
|
||||
</description>
|
||||
<tutorials>
|
||||
<link>$DOCS_URL/tutorials/animation/animation_tree.md</link>
|
||||
</tutorials>
|
||||
<methods>
|
||||
</methods>
|
||||
<members>
|
||||
<member name="advance_condition" type="StringName" setter="set_advance_condition" getter="get_advance_condition" default="@""">
|
||||
Turn on auto advance when this condition is set. The provided name will become a boolean parameter on the [AnimationTree] that can be controlled from code (see [url=$DOCS_URL/tutorials/animation/animation_tree.html#controlling-from-code][/url]). For example, if [member AnimationTree.tree_root] is an [AnimationNodeStateMachine] and [member advance_condition] is set to [code]"idle"[/code]:
|
||||
[codeblock]
|
||||
$animation_tree["parameters/conditions/idle"] = is_on_floor and (linear_velocity.x == 0)
|
||||
[/codeblock]
|
||||
</member>
|
||||
<member name="auto_advance" type="bool" setter="set_auto_advance" getter="has_auto_advance" default="false">
|
||||
Turn on the transition automatically when this state is reached. This works best with [constant SWITCH_MODE_AT_END].
|
||||
</member>
|
||||
<member name="disabled" type="bool" setter="set_disabled" getter="is_disabled" default="false">
|
||||
Don't use this transition during [method AnimationNodeStateMachinePlayback.travel] or [member auto_advance].
|
||||
</member>
|
||||
<member name="priority" type="int" setter="set_priority" getter="get_priority" default="1">
|
||||
Lower priority transitions are preferred when travelling through the tree via [method AnimationNodeStateMachinePlayback.travel] or [member auto_advance].
|
||||
</member>
|
||||
<member name="switch_mode" type="int" setter="set_switch_mode" getter="get_switch_mode" enum="AnimationNodeStateMachineTransition.SwitchMode" default="0">
|
||||
The transition type.
|
||||
</member>
|
||||
<member name="xfade_time" type="float" setter="set_xfade_time" getter="get_xfade_time" default="0.0">
|
||||
The time to cross-fade between this state and the next.
|
||||
</member>
|
||||
</members>
|
||||
<signals>
|
||||
<signal name="advance_condition_changed">
|
||||
<description>
|
||||
Emitted when [member advance_condition] is changed.
|
||||
</description>
|
||||
</signal>
|
||||
</signals>
|
||||
<constants>
|
||||
<constant name="SWITCH_MODE_IMMEDIATE" value="0" enum="SwitchMode">
|
||||
Switch to the next state immediately. The current state will end and blend into the beginning of the new one.
|
||||
</constant>
|
||||
<constant name="SWITCH_MODE_SYNC" value="1" enum="SwitchMode">
|
||||
Switch to the next state immediately, but will seek the new state to the playback position of the old state.
|
||||
</constant>
|
||||
<constant name="SWITCH_MODE_AT_END" value="2" enum="SwitchMode">
|
||||
Wait for the current state playback to end, then switch to the beginning of the next state animation.
|
||||
</constant>
|
||||
</constants>
|
||||
</class>
|
@ -1,17 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<class name="AnimationNodeTimeScale" inherits="AnimationNode" version="4.2">
|
||||
<brief_description>
|
||||
A time-scaling animation node to be used with [AnimationTree].
|
||||
</brief_description>
|
||||
<description>
|
||||
Allows scaling the speed of the animation (or reversing it) in any children nodes. Setting it to 0 will pause the animation.
|
||||
</description>
|
||||
<tutorials>
|
||||
<link title="AnimationTree">$DOCS_URL/tutorials/animation/animation_tree.md</link>
|
||||
<link title="3D Platformer Demo">https://godotengine.org/asset-library/asset/125</link>
|
||||
</tutorials>
|
||||
<methods>
|
||||
</methods>
|
||||
<constants>
|
||||
</constants>
|
||||
</class>
|
@ -1,27 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<class name="AnimationNodeTimeSeek" inherits="AnimationNode" version="4.2">
|
||||
<brief_description>
|
||||
A time-seeking animation node to be used with [AnimationTree].
|
||||
</brief_description>
|
||||
<description>
|
||||
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 [code]seek_position[/code] value to [code]-1.0[/code].
|
||||
[codeblock]
|
||||
# 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
|
||||
[/codeblock]
|
||||
</description>
|
||||
<tutorials>
|
||||
<link>$DOCS_URL/tutorials/animation/animation_tree.md</link>
|
||||
</tutorials>
|
||||
<methods>
|
||||
</methods>
|
||||
<constants>
|
||||
</constants>
|
||||
</class>
|
@ -1,52 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<class name="AnimationNodeTransition" inherits="AnimationNode" version="4.2">
|
||||
<brief_description>
|
||||
A generic animation transition node for [AnimationTree].
|
||||
</brief_description>
|
||||
<description>
|
||||
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.
|
||||
</description>
|
||||
<tutorials>
|
||||
<link title="AnimationTree">$DOCS_URL/tutorials/animation/animation_tree.md</link>
|
||||
<link title="3D Platformer Demo">https://godotengine.org/asset-library/asset/125</link>
|
||||
<link title="Third Person Shooter Demo">https://godotengine.org/asset-library/asset/678</link>
|
||||
</tutorials>
|
||||
<methods>
|
||||
<method name="get_input_caption" qualifiers="const">
|
||||
<return type="String" />
|
||||
<argument index="0" name="input" type="int" />
|
||||
<description>
|
||||
</description>
|
||||
</method>
|
||||
<method name="is_input_set_as_auto_advance" qualifiers="const">
|
||||
<return type="bool" />
|
||||
<argument index="0" name="input" type="int" />
|
||||
<description>
|
||||
</description>
|
||||
</method>
|
||||
<method name="set_input_as_auto_advance">
|
||||
<return type="void" />
|
||||
<argument index="0" name="input" type="int" />
|
||||
<argument index="1" name="enable" type="bool" />
|
||||
<description>
|
||||
</description>
|
||||
</method>
|
||||
<method name="set_input_caption">
|
||||
<return type="void" />
|
||||
<argument index="0" name="input" type="int" />
|
||||
<argument index="1" name="caption" type="String" />
|
||||
<description>
|
||||
</description>
|
||||
</method>
|
||||
</methods>
|
||||
<members>
|
||||
<member name="input_count" type="int" setter="set_enabled_inputs" getter="get_enabled_inputs" default="0">
|
||||
The number of available input ports for this node.
|
||||
</member>
|
||||
<member name="xfade_time" type="float" setter="set_cross_fade_time" getter="get_cross_fade_time" default="0.0">
|
||||
Cross-fading time (in seconds) between each animation connected to the inputs.
|
||||
</member>
|
||||
</members>
|
||||
<constants>
|
||||
</constants>
|
||||
</class>
|
@ -1,13 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<class name="AnimationRootNode" inherits="AnimationNode" version="4.2">
|
||||
<brief_description>
|
||||
</brief_description>
|
||||
<description>
|
||||
</description>
|
||||
<tutorials>
|
||||
</tutorials>
|
||||
<methods>
|
||||
</methods>
|
||||
<constants>
|
||||
</constants>
|
||||
</class>
|
@ -1,13 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<class name="AnimationTrackEditPlugin" inherits="Reference" version="4.2">
|
||||
<brief_description>
|
||||
</brief_description>
|
||||
<description>
|
||||
</description>
|
||||
<tutorials>
|
||||
</tutorials>
|
||||
<methods>
|
||||
</methods>
|
||||
<constants>
|
||||
</constants>
|
||||
</class>
|
@ -1,65 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<class name="AnimationTree" inherits="Node" version="4.2">
|
||||
<brief_description>
|
||||
A node to be used for advanced animation transitions in an [AnimationPlayer].
|
||||
</brief_description>
|
||||
<description>
|
||||
A node to be used for advanced animation transitions in an [AnimationPlayer].
|
||||
[b]Note:[/b] 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.
|
||||
</description>
|
||||
<tutorials>
|
||||
<link title="Using AnimationTree">$DOCS_URL/tutorials/animation/animation_tree.md</link>
|
||||
<link title="Third Person Shooter Demo">https://godotengine.org/asset-library/asset/678</link>
|
||||
</tutorials>
|
||||
<methods>
|
||||
<method name="advance">
|
||||
<return type="void" />
|
||||
<argument index="0" name="delta" type="float" />
|
||||
<description>
|
||||
Manually advance the animations by the specified time (in seconds).
|
||||
</description>
|
||||
</method>
|
||||
<method name="get_root_motion_transform" qualifiers="const">
|
||||
<return type="Transform" />
|
||||
<description>
|
||||
Retrieve the motion of the [member root_motion_track] as a [Transform] that can be used elsewhere. If [member root_motion_track] is not a path to a track of type [constant Animation.TYPE_POSITION_3D], [constant Animation.TYPE_SCALE_3D] or [constant Animation.TYPE_ROTATION_3D], returns an identity transformation. See also [member root_motion_track] and [RootMotionView].
|
||||
</description>
|
||||
</method>
|
||||
<method name="rename_parameter">
|
||||
<return type="void" />
|
||||
<argument index="0" name="old_name" type="String" />
|
||||
<argument index="1" name="new_name" type="String" />
|
||||
<description>
|
||||
</description>
|
||||
</method>
|
||||
</methods>
|
||||
<members>
|
||||
<member name="active" type="bool" setter="set_active" getter="is_active" default="false">
|
||||
If [code]true[/code], the [AnimationTree] will be processing.
|
||||
</member>
|
||||
<member name="anim_player" type="NodePath" setter="set_animation_player" getter="get_animation_player" default="NodePath("")">
|
||||
The path to the [AnimationPlayer] used for animating.
|
||||
</member>
|
||||
<member name="process_mode" type="int" setter="set_process_mode" getter="get_process_mode" enum="AnimationTree.AnimationProcessMode" default="1">
|
||||
The process mode of this [AnimationTree]. See [enum AnimationProcessMode] for available modes.
|
||||
</member>
|
||||
<member name="root_motion_track" type="NodePath" setter="set_root_motion_track" getter="get_root_motion_track" default="NodePath("")">
|
||||
The path to the Animation track used for root motion. Paths must be valid scene-tree paths to a node, and must be specified starting from the parent node of the node that will reproduce the animation. To specify a track that controls properties or bones, append its name after the path, separated by [code]":"[/code]. For example, [code]"character/skeleton:ankle"[/code] or [code]"character/mesh:transform/local"[/code].
|
||||
If the track has type [constant Animation.TYPE_POSITION_3D], [constant Animation.TYPE_ROTATION_3D] or [constant Animation.TYPE_SCALE_3D], the transformation will be cancelled visually, and the animation will appear to stay in place. See also [method get_root_motion_transform] and [RootMotionView].
|
||||
</member>
|
||||
<member name="tree_root" type="AnimationNode" setter="set_tree_root" getter="get_tree_root">
|
||||
The root animation node of this [AnimationTree]. See [AnimationNode].
|
||||
</member>
|
||||
</members>
|
||||
<constants>
|
||||
<constant name="ANIMATION_PROCESS_PHYSICS" value="0" enum="AnimationProcessMode">
|
||||
The animations will progress during the physics frame (i.e. [method Node._physics_process]).
|
||||
</constant>
|
||||
<constant name="ANIMATION_PROCESS_IDLE" value="1" enum="AnimationProcessMode">
|
||||
The animations will progress during the idle frame (i.e. [method Node._process]).
|
||||
</constant>
|
||||
<constant name="ANIMATION_PROCESS_MANUAL" value="2" enum="AnimationProcessMode">
|
||||
The animations will only progress manually (see [method advance]).
|
||||
</constant>
|
||||
</constants>
|
||||
</class>
|
@ -1,200 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<class name="Area" inherits="CollisionObject" version="4.2">
|
||||
<brief_description>
|
||||
3D area for detection and physics and audio influence.
|
||||
</brief_description>
|
||||
<description>
|
||||
3D area that detects [CollisionObject] nodes overlapping, entering, or exiting. Can also alter or override local physics parameters (gravity, damping) and route audio to a custom audio bus.
|
||||
To give the area its shape, add a [CollisionShape] or a [CollisionPolygon] node as a [i]direct[/i] child (or add multiple such nodes as direct children) of the area.
|
||||
[b]Warning:[/b] See [ConcavePolygonShape] (also called "trimesh") for a warning about possibly unexpected behavior when using that shape for an area.
|
||||
[b]Warning:[/b] With a non-uniform scale this node will probably not function as expected. Please make sure to keep its scale uniform (i.e. the same on all axes), and change the size(s) of its collision shape(s) instead.
|
||||
</description>
|
||||
<tutorials>
|
||||
<link title="3D Platformer Demo">https://godotengine.org/asset-library/asset/125</link>
|
||||
<link title="GUI in 3D Demo">https://godotengine.org/asset-library/asset/127</link>
|
||||
</tutorials>
|
||||
<methods>
|
||||
<method name="get_overlapping_areas" qualifiers="const">
|
||||
<return type="Array" />
|
||||
<description>
|
||||
Returns a list of intersecting [Area]s. The overlapping area's [member CollisionObject.collision_layer] must be part of this area's [member CollisionObject.collision_mask] in order to be detected.
|
||||
For performance reasons (collisions are all processed at the same time) this list is modified once during the physics step, not immediately after objects are moved. Consider using signals instead.
|
||||
</description>
|
||||
</method>
|
||||
<method name="get_overlapping_bodies" qualifiers="const">
|
||||
<return type="Array" />
|
||||
<description>
|
||||
Returns a list of intersecting [PhysicsBody]s. The overlapping body's [member CollisionObject.collision_layer] must be part of this area's [member CollisionObject.collision_mask] in order to be detected.
|
||||
For performance reasons (collisions are all processed at the same time) this list is modified once during the physics step, not immediately after objects are moved. Consider using signals instead.
|
||||
</description>
|
||||
</method>
|
||||
<method name="overlaps_area" qualifiers="const">
|
||||
<return type="bool" />
|
||||
<argument index="0" name="area" type="Node" />
|
||||
<description>
|
||||
If [code]true[/code], the given area overlaps the Area.
|
||||
[b]Note:[/b] The result of this test is not immediate after moving objects. For performance, list of overlaps is updated once per frame and before the physics step. Consider using signals instead.
|
||||
</description>
|
||||
</method>
|
||||
<method name="overlaps_body" qualifiers="const">
|
||||
<return type="bool" />
|
||||
<argument index="0" name="body" type="Node" />
|
||||
<description>
|
||||
If [code]true[/code], the given physics body overlaps the Area.
|
||||
[b]Note:[/b] The result of this test is not immediate after moving objects. For performance, list of overlaps is updated once per frame and before the physics step. Consider using signals instead.
|
||||
The [code]body[/code] argument can either be a [PhysicsBody] or a [GridMap] instance (while GridMaps are not physics body themselves, they register their tiles with collision shapes as a virtual physics body).
|
||||
</description>
|
||||
</method>
|
||||
</methods>
|
||||
<members>
|
||||
<member name="angular_damp" type="float" setter="set_angular_damp" getter="get_angular_damp" default="0.1">
|
||||
The rate at which objects stop spinning in this area. Represents the angular velocity lost per second.
|
||||
See [member ProjectSettings.physics/3d/default_angular_damp] for more details about damping.
|
||||
</member>
|
||||
<member name="audio_bus_name" type="StringName" setter="set_audio_bus" getter="get_audio_bus" default="@"Master"">
|
||||
The name of the area's audio bus.
|
||||
</member>
|
||||
<member name="audio_bus_override" type="bool" setter="set_audio_bus_override" getter="is_overriding_audio_bus" default="false">
|
||||
If [code]true[/code], the area's audio bus overrides the default audio bus.
|
||||
</member>
|
||||
<member name="gravity" type="float" setter="set_gravity" getter="get_gravity" default="9.8">
|
||||
The area's gravity intensity (in meters per second squared). This value multiplies the gravity vector. This is useful to alter the force of gravity without altering its direction.
|
||||
</member>
|
||||
<member name="gravity_distance_scale" type="float" setter="set_gravity_distance_scale" getter="get_gravity_distance_scale" default="0.0">
|
||||
The falloff factor for point gravity. The greater the value, the faster gravity decreases with distance.
|
||||
</member>
|
||||
<member name="gravity_point" type="bool" setter="set_gravity_is_point" getter="is_gravity_a_point" default="false">
|
||||
If [code]true[/code], gravity is calculated from a point (set via [member gravity_vec]). See also [member space_override].
|
||||
</member>
|
||||
<member name="gravity_vec" type="Vector3" setter="set_gravity_vector" getter="get_gravity_vector" default="Vector3( 0, -1, 0 )">
|
||||
The area's gravity vector (not normalized). If gravity is a point (see [member gravity_point]), this will be the point of attraction.
|
||||
</member>
|
||||
<member name="linear_damp" type="float" setter="set_linear_damp" getter="get_linear_damp" default="0.1">
|
||||
The rate at which objects stop moving in this area. Represents the linear velocity lost per second.
|
||||
See [member ProjectSettings.physics/3d/default_linear_damp] for more details about damping.
|
||||
</member>
|
||||
<member name="monitorable" type="bool" setter="set_monitorable" getter="is_monitorable" default="true">
|
||||
If [code]true[/code], other monitoring areas can detect this area.
|
||||
</member>
|
||||
<member name="monitoring" type="bool" setter="set_monitoring" getter="is_monitoring" default="true">
|
||||
If [code]true[/code], the area detects bodies or areas entering and exiting it.
|
||||
</member>
|
||||
<member name="priority" type="float" setter="set_priority" getter="get_priority" default="0.0">
|
||||
The area's priority. Higher priority areas are processed first.
|
||||
</member>
|
||||
<member name="reverb_bus_amount" type="float" setter="set_reverb_amount" getter="get_reverb_amount" default="0.0">
|
||||
The degree to which this area applies reverb to its associated audio. Ranges from [code]0[/code] to [code]1[/code] with [code]0.1[/code] precision.
|
||||
</member>
|
||||
<member name="reverb_bus_enable" type="bool" setter="set_use_reverb_bus" getter="is_using_reverb_bus" default="false">
|
||||
If [code]true[/code], the area applies reverb to its associated audio.
|
||||
</member>
|
||||
<member name="reverb_bus_name" type="StringName" setter="set_reverb_bus" getter="get_reverb_bus" default="@"Master"">
|
||||
The reverb bus name to use for this area's associated audio.
|
||||
</member>
|
||||
<member name="reverb_bus_uniformity" type="float" setter="set_reverb_uniformity" getter="get_reverb_uniformity" default="0.0">
|
||||
The degree to which this area's reverb is a uniform effect. Ranges from [code]0[/code] to [code]1[/code] with [code]0.1[/code] precision.
|
||||
</member>
|
||||
<member name="space_override" type="int" setter="set_space_override_mode" getter="get_space_override_mode" enum="Area.SpaceOverride" default="0">
|
||||
Override mode for gravity and damping calculations within this area. See [enum SpaceOverride] for possible values.
|
||||
</member>
|
||||
</members>
|
||||
<signals>
|
||||
<signal name="area_entered">
|
||||
<argument index="0" name="area" type="Area" />
|
||||
<description>
|
||||
Emitted when another Area enters this Area. Requires [member monitoring] to be set to [code]true[/code].
|
||||
[code]area[/code] the other Area.
|
||||
</description>
|
||||
</signal>
|
||||
<signal name="area_exited">
|
||||
<argument index="0" name="area" type="Area" />
|
||||
<description>
|
||||
Emitted when another Area exits this Area. Requires [member monitoring] to be set to [code]true[/code].
|
||||
[code]area[/code] the other Area.
|
||||
</description>
|
||||
</signal>
|
||||
<signal name="area_shape_entered">
|
||||
<argument index="0" name="area_rid" type="RID" />
|
||||
<argument index="1" name="area" type="Area" />
|
||||
<argument index="2" name="area_shape_index" type="int" />
|
||||
<argument index="3" name="local_shape_index" type="int" />
|
||||
<description>
|
||||
Emitted when one of another Area's [Shape]s enters one of this Area's [Shape]s. Requires [member monitoring] to be set to [code]true[/code].
|
||||
[code]area_rid[/code] the [RID] of the other Area's [CollisionObject] used by the [PhysicsServer].
|
||||
[code]area[/code] the other Area.
|
||||
[code]area_shape_index[/code] the index of the [Shape] of the other Area used by the [PhysicsServer]. Get the [CollisionShape] node with [code]area.shape_owner_get_owner(area_shape_index)[/code].
|
||||
[code]local_shape_index[/code] the index of the [Shape] of this Area used by the [PhysicsServer]. Get the [CollisionShape] node with [code]self.shape_owner_get_owner(local_shape_index)[/code].
|
||||
</description>
|
||||
</signal>
|
||||
<signal name="area_shape_exited">
|
||||
<argument index="0" name="area_rid" type="RID" />
|
||||
<argument index="1" name="area" type="Area" />
|
||||
<argument index="2" name="area_shape_index" type="int" />
|
||||
<argument index="3" name="local_shape_index" type="int" />
|
||||
<description>
|
||||
Emitted when one of another Area's [Shape]s enters one of this Area's [Shape]s. Requires [member monitoring] to be set to [code]true[/code].
|
||||
[code]area_rid[/code] the [RID] of the other Area's [CollisionObject] used by the [PhysicsServer].
|
||||
[code]area[/code] the other Area.
|
||||
[code]area_shape_index[/code] the index of the [Shape] of the other Area used by the [PhysicsServer]. Get the [CollisionShape] node with [code]area.shape_owner_get_owner(area_shape_index)[/code].
|
||||
[code]local_shape_index[/code] the index of the [Shape] of this Area used by the [PhysicsServer]. Get the [CollisionShape] node with [code]self.shape_owner_get_owner(local_shape_index)[/code].
|
||||
</description>
|
||||
</signal>
|
||||
<signal name="body_entered">
|
||||
<argument index="0" name="body" type="Node" />
|
||||
<description>
|
||||
Emitted when a [PhysicsBody] or [GridMap] enters this Area. Requires [member monitoring] to be set to [code]true[/code]. [GridMap]s are detected if the [MeshLibrary] has Collision [Shape]s.
|
||||
[code]body[/code] the [Node], if it exists in the tree, of the other [PhysicsBody] or [GridMap].
|
||||
</description>
|
||||
</signal>
|
||||
<signal name="body_exited">
|
||||
<argument index="0" name="body" type="Node" />
|
||||
<description>
|
||||
Emitted when a [PhysicsBody] or [GridMap] exits this Area. Requires [member monitoring] to be set to [code]true[/code]. [GridMap]s are detected if the [MeshLibrary] has Collision [Shape]s.
|
||||
[code]body[/code] the [Node], if it exists in the tree, of the other [PhysicsBody] or [GridMap].
|
||||
</description>
|
||||
</signal>
|
||||
<signal name="body_shape_entered">
|
||||
<argument index="0" name="body_rid" type="RID" />
|
||||
<argument index="1" name="body" type="Node" />
|
||||
<argument index="2" name="body_shape_index" type="int" />
|
||||
<argument index="3" name="local_shape_index" type="int" />
|
||||
<description>
|
||||
Emitted when one of a [PhysicsBody] or [GridMap]'s [Shape]s enters one of this Area's [Shape]s. Requires [member monitoring] to be set to [code]true[/code]. [GridMap]s are detected if the [MeshLibrary] has Collision [Shape]s.
|
||||
[code]body_rid[/code] the [RID] of the [PhysicsBody] or [MeshLibrary]'s [CollisionObject] used by the [PhysicsServer].
|
||||
[code]body[/code] the [Node], if it exists in the tree, of the [PhysicsBody] or [GridMap].
|
||||
[code]body_shape_index[/code] the index of the [Shape] of the [PhysicsBody] or [GridMap] used by the [PhysicsServer]. Get the [CollisionShape] node with [code]body.shape_owner_get_owner(body_shape_index)[/code].
|
||||
[code]local_shape_index[/code] the index of the [Shape] of this Area used by the [PhysicsServer]. Get the [CollisionShape] node with [code]self.shape_owner_get_owner(local_shape_index)[/code].
|
||||
</description>
|
||||
</signal>
|
||||
<signal name="body_shape_exited">
|
||||
<argument index="0" name="body_rid" type="RID" />
|
||||
<argument index="1" name="body" type="Node" />
|
||||
<argument index="2" name="body_shape_index" type="int" />
|
||||
<argument index="3" name="local_shape_index" type="int" />
|
||||
<description>
|
||||
Emitted when one of a [PhysicsBody] or [GridMap]'s [Shape]s enters one of this Area's [Shape]s. Requires [member monitoring] to be set to [code]true[/code]. [GridMap]s are detected if the [MeshLibrary] has Collision [Shape]s.
|
||||
[code]body_rid[/code] the [RID] of the [PhysicsBody] or [MeshLibrary]'s [CollisionObject] used by the [PhysicsServer].
|
||||
[code]body[/code] the [Node], if it exists in the tree, of the [PhysicsBody] or [GridMap].
|
||||
[code]body_shape_index[/code] the index of the [Shape] of the [PhysicsBody] or [GridMap] used by the [PhysicsServer]. Get the [CollisionShape] node with [code]body.shape_owner_get_owner(body_shape_index)[/code].
|
||||
[code]local_shape_index[/code] the index of the [Shape] of this Area used by the [PhysicsServer]. Get the [CollisionShape] node with [code]self.shape_owner_get_owner(local_shape_index)[/code].
|
||||
</description>
|
||||
</signal>
|
||||
</signals>
|
||||
<constants>
|
||||
<constant name="SPACE_OVERRIDE_DISABLED" value="0" enum="SpaceOverride">
|
||||
This area does not affect gravity/damping.
|
||||
</constant>
|
||||
<constant name="SPACE_OVERRIDE_COMBINE" value="1" enum="SpaceOverride">
|
||||
This area adds its gravity/damping values to whatever has been calculated so far (in [member priority] order).
|
||||
</constant>
|
||||
<constant name="SPACE_OVERRIDE_COMBINE_REPLACE" value="2" enum="SpaceOverride">
|
||||
This area adds its gravity/damping values to whatever has been calculated so far (in [member priority] order), ignoring any lower priority areas.
|
||||
</constant>
|
||||
<constant name="SPACE_OVERRIDE_REPLACE" value="3" enum="SpaceOverride">
|
||||
This area replaces any gravity/damping, even the defaults, ignoring any lower priority areas.
|
||||
</constant>
|
||||
<constant name="SPACE_OVERRIDE_REPLACE_COMBINE" value="4" enum="SpaceOverride">
|
||||
This area replaces any gravity/damping calculated so far (in [member priority] order), but keeps calculating the rest of the areas.
|
||||
</constant>
|
||||
</constants>
|
||||
</class>
|
@ -40,7 +40,7 @@
|
||||
<argument index="0" name="primitive" type="int" enum="Mesh.PrimitiveType" />
|
||||
<argument index="1" name="arrays" type="Array" />
|
||||
<argument index="2" name="blend_shapes" type="Array" default="[ ]" />
|
||||
<argument index="3" name="compress_flags" type="int" default="2194432" />
|
||||
<argument index="3" name="compress_flags" type="int" default="7936" />
|
||||
<description>
|
||||
Creates a new surface.
|
||||
Surfaces are created to be rendered using a [code]primitive[/code], which may be any of the types defined in [enum Mesh.PrimitiveType]. (As a note, when using indices, it is recommended to only use points, lines, or triangles.) [method Mesh.get_surface_count] will become the [code]surf_idx[/code] for this new surface.
|
||||
@ -188,17 +188,11 @@
|
||||
<constant name="ARRAY_TEX_UV2" value="5" enum="ArrayType">
|
||||
[PoolVector2Array] for second UV coordinates.
|
||||
</constant>
|
||||
<constant name="ARRAY_BONES" value="6" enum="ArrayType">
|
||||
[PoolRealArray] or [PoolIntArray] of bone indices. Each element in groups of 4 floats.
|
||||
</constant>
|
||||
<constant name="ARRAY_WEIGHTS" value="7" enum="ArrayType">
|
||||
[PoolRealArray] of bone weights. Each element in groups of 4 floats.
|
||||
</constant>
|
||||
<constant name="ARRAY_INDEX" value="8" enum="ArrayType">
|
||||
<constant name="ARRAY_INDEX" value="6" enum="ArrayType">
|
||||
[PoolIntArray] of integers used as indices referencing vertices, colors, normals, tangents, and textures. All of those arrays must have the same number of elements as the vertex array. No index can be beyond the vertex array size. When this index array is present, it puts the function into "index mode," where the index selects the *i*'th vertex, normal, tangent, color, UV, etc. This means if you want to have different normals or colors along an edge, you have to duplicate the vertices.
|
||||
For triangles, the index array is interpreted as triples, referring to the vertices of each triangle. For lines, the index array is in pairs indicating the start and end of each line.
|
||||
</constant>
|
||||
<constant name="ARRAY_MAX" value="9" enum="ArrayType">
|
||||
<constant name="ARRAY_MAX" value="7" enum="ArrayType">
|
||||
Represents the size of the [enum ArrayType] enum.
|
||||
</constant>
|
||||
<constant name="ARRAY_FORMAT_VERTEX" value="1" enum="ArrayFormat">
|
||||
@ -219,13 +213,7 @@
|
||||
<constant name="ARRAY_FORMAT_TEX_UV2" value="32" enum="ArrayFormat">
|
||||
Array format will include another set of UVs.
|
||||
</constant>
|
||||
<constant name="ARRAY_FORMAT_BONES" value="64" enum="ArrayFormat">
|
||||
Array format will include bone indices.
|
||||
</constant>
|
||||
<constant name="ARRAY_FORMAT_WEIGHTS" value="128" enum="ArrayFormat">
|
||||
Array format will include bone weights.
|
||||
</constant>
|
||||
<constant name="ARRAY_FORMAT_INDEX" value="256" enum="ArrayFormat">
|
||||
<constant name="ARRAY_FORMAT_INDEX" value="64" enum="ArrayFormat">
|
||||
Index array will be used.
|
||||
</constant>
|
||||
</constants>
|
||||
|
@ -229,7 +229,6 @@
|
||||
<member name="orbit_velocity_random" type="float" setter="set_param_randomness" getter="get_param_randomness" default="0.0">
|
||||
Orbital velocity randomness ratio.
|
||||
</member>
|
||||
<member name="physics_interpolation_mode" type="int" setter="set_physics_interpolation_mode" getter="get_physics_interpolation_mode" overrides="Node" enum="Node.PhysicsInterpolationMode" default="1" />
|
||||
<member name="preprocess" type="float" setter="set_pre_process_time" getter="get_pre_process_time" default="0.0">
|
||||
Particle system starts as if it had already run for this many seconds.
|
||||
</member>
|
||||
|
@ -1,24 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<class name="CapsuleShape" inherits="Shape" version="4.2">
|
||||
<brief_description>
|
||||
Capsule shape for collisions.
|
||||
</brief_description>
|
||||
<description>
|
||||
Capsule shape for collisions.
|
||||
</description>
|
||||
<tutorials>
|
||||
<link title="3D Physics Tests Demo">https://godotengine.org/asset-library/asset/675</link>
|
||||
</tutorials>
|
||||
<methods>
|
||||
</methods>
|
||||
<members>
|
||||
<member name="height" type="float" setter="set_height" getter="get_height" default="1.0">
|
||||
The capsule's height.
|
||||
</member>
|
||||
<member name="radius" type="float" setter="set_radius" getter="get_radius" default="1.0">
|
||||
The capsule's radius.
|
||||
</member>
|
||||
</members>
|
||||
<constants>
|
||||
</constants>
|
||||
</class>
|
@ -1,95 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<class name="ClippedCamera" inherits="Camera" version="4.2">
|
||||
<brief_description>
|
||||
A [Camera] that includes collision.
|
||||
</brief_description>
|
||||
<description>
|
||||
This node extends [Camera] to add collisions with [Area] and/or [PhysicsBody] nodes. The camera cannot move through colliding objects.
|
||||
</description>
|
||||
<tutorials>
|
||||
</tutorials>
|
||||
<methods>
|
||||
<method name="add_exception">
|
||||
<return type="void" />
|
||||
<argument index="0" name="node" type="Object" />
|
||||
<description>
|
||||
Adds a collision exception so the camera does not collide with the specified node.
|
||||
</description>
|
||||
</method>
|
||||
<method name="add_exception_rid">
|
||||
<return type="void" />
|
||||
<argument index="0" name="rid" type="RID" />
|
||||
<description>
|
||||
Adds a collision exception so the camera does not collide with the specified [RID].
|
||||
</description>
|
||||
</method>
|
||||
<method name="clear_exceptions">
|
||||
<return type="void" />
|
||||
<description>
|
||||
Removes all collision exceptions.
|
||||
</description>
|
||||
</method>
|
||||
<method name="get_clip_offset" qualifiers="const">
|
||||
<return type="float" />
|
||||
<description>
|
||||
Returns the distance the camera has been offset due to a collision.
|
||||
</description>
|
||||
</method>
|
||||
<method name="get_collision_mask_bit" qualifiers="const">
|
||||
<return type="bool" />
|
||||
<argument index="0" name="bit" type="int" />
|
||||
<description>
|
||||
Returns [code]true[/code] if the specified bit index is on.
|
||||
[b]Note:[/b] Bit indices range from 0-19.
|
||||
</description>
|
||||
</method>
|
||||
<method name="remove_exception">
|
||||
<return type="void" />
|
||||
<argument index="0" name="node" type="Object" />
|
||||
<description>
|
||||
Removes a collision exception with the specified node.
|
||||
</description>
|
||||
</method>
|
||||
<method name="remove_exception_rid">
|
||||
<return type="void" />
|
||||
<argument index="0" name="rid" type="RID" />
|
||||
<description>
|
||||
Removes a collision exception with the specified [RID].
|
||||
</description>
|
||||
</method>
|
||||
<method name="set_collision_mask_bit">
|
||||
<return type="void" />
|
||||
<argument index="0" name="bit" type="int" />
|
||||
<argument index="1" name="value" type="bool" />
|
||||
<description>
|
||||
Sets the specified bit index to the [code]value[/code].
|
||||
[b]Note:[/b] Bit indices range from 0-19.
|
||||
</description>
|
||||
</method>
|
||||
</methods>
|
||||
<members>
|
||||
<member name="clip_to_areas" type="bool" setter="set_clip_to_areas" getter="is_clip_to_areas_enabled" default="false">
|
||||
If [code]true[/code], the camera stops on contact with [Area]s.
|
||||
</member>
|
||||
<member name="clip_to_bodies" type="bool" setter="set_clip_to_bodies" getter="is_clip_to_bodies_enabled" default="true">
|
||||
If [code]true[/code], the camera stops on contact with [PhysicsBody]s.
|
||||
</member>
|
||||
<member name="collision_mask" type="int" setter="set_collision_mask" getter="get_collision_mask" default="1">
|
||||
The camera's collision mask. Only objects in at least one collision layer matching the mask will be detected. See [url=$DOCS_URL/tutorials/physics/physics_introduction.html#collision-layers-and-masks]Collision layers and masks[/url] in the documentation for more information.
|
||||
</member>
|
||||
<member name="margin" type="float" setter="set_margin" getter="get_margin" default="0.0">
|
||||
The camera's collision margin. The camera can't get closer than this distance to a colliding object.
|
||||
</member>
|
||||
<member name="process_mode" type="int" setter="set_process_mode" getter="get_process_mode" enum="ClippedCamera.ProcessMode" default="0">
|
||||
The camera's process callback. See [enum ProcessMode].
|
||||
</member>
|
||||
</members>
|
||||
<constants>
|
||||
<constant name="CLIP_PROCESS_PHYSICS" value="0" enum="ProcessMode">
|
||||
The camera updates with the [code]_physics_process[/code] callback.
|
||||
</constant>
|
||||
<constant name="CLIP_PROCESS_IDLE" value="1" enum="ProcessMode">
|
||||
The camera updates with the [code]_process[/code] callback.
|
||||
</constant>
|
||||
</constants>
|
||||
</class>
|
@ -1,213 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<class name="CollisionObject" inherits="Spatial" version="4.2">
|
||||
<brief_description>
|
||||
Base node for collision objects.
|
||||
</brief_description>
|
||||
<description>
|
||||
CollisionObject is the base class for physics objects. It can hold any number of collision [Shape]s. Each shape must be assigned to a [i]shape owner[/i]. 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 [code]shape_owner_*[/code] methods.
|
||||
[b]Warning:[/b] With a non-uniform scale this node will probably not function as expected. Please make sure to keep its scale uniform (i.e. the same on all axes), and change the size(s) of its collision shape(s) instead.
|
||||
</description>
|
||||
<tutorials>
|
||||
</tutorials>
|
||||
<methods>
|
||||
<method name="_input_event" qualifiers="virtual">
|
||||
<return type="void" />
|
||||
<argument index="0" name="camera" type="Object" />
|
||||
<argument index="1" name="event" type="InputEvent" />
|
||||
<argument index="2" name="position" type="Vector3" />
|
||||
<argument index="3" name="normal" type="Vector3" />
|
||||
<argument index="4" name="shape_idx" type="int" />
|
||||
<description>
|
||||
Receives unhandled [InputEvent]s. [code]position[/code] is the location in world space of the mouse pointer on the surface of the shape with index [code]shape_idx[/code] and [code]normal[/code] is the normal vector of the surface at that point. Connect to the [signal input_event] signal to easily pick up these events.
|
||||
</description>
|
||||
</method>
|
||||
<method name="create_shape_owner">
|
||||
<return type="int" />
|
||||
<argument index="0" name="owner" type="Object" />
|
||||
<description>
|
||||
Creates a new shape owner for the given object. Returns [code]owner_id[/code] of the new owner for future reference.
|
||||
</description>
|
||||
</method>
|
||||
<method name="get_collision_layer_bit" qualifiers="const">
|
||||
<return type="bool" />
|
||||
<argument index="0" name="bit" type="int" />
|
||||
<description>
|
||||
Returns whether or not the specified [code]bit[/code] of the [member collision_layer] is set.
|
||||
</description>
|
||||
</method>
|
||||
<method name="get_collision_mask_bit" qualifiers="const">
|
||||
<return type="bool" />
|
||||
<argument index="0" name="bit" type="int" />
|
||||
<description>
|
||||
Returns whether or not the specified [code]bit[/code] of the [member collision_mask] is set.
|
||||
</description>
|
||||
</method>
|
||||
<method name="get_rid" qualifiers="const">
|
||||
<return type="RID" />
|
||||
<description>
|
||||
Returns the object's [RID].
|
||||
</description>
|
||||
</method>
|
||||
<method name="get_shape_owners">
|
||||
<return type="Array" />
|
||||
<description>
|
||||
Returns an [Array] of [code]owner_id[/code] identifiers. You can use these ids in other methods that take [code]owner_id[/code] as an argument.
|
||||
</description>
|
||||
</method>
|
||||
<method name="is_shape_owner_disabled" qualifiers="const">
|
||||
<return type="bool" />
|
||||
<argument index="0" name="owner_id" type="int" />
|
||||
<description>
|
||||
If [code]true[/code], the shape owner and its shapes are disabled.
|
||||
</description>
|
||||
</method>
|
||||
<method name="remove_shape_owner">
|
||||
<return type="void" />
|
||||
<argument index="0" name="owner_id" type="int" />
|
||||
<description>
|
||||
Removes the given shape owner.
|
||||
</description>
|
||||
</method>
|
||||
<method name="set_collision_layer_bit">
|
||||
<return type="void" />
|
||||
<argument index="0" name="bit" type="int" />
|
||||
<argument index="1" name="value" type="bool" />
|
||||
<description>
|
||||
If [code]value[/code] is [code]true[/code], sets the specified [code]bit[/code] in the [member collision_layer].
|
||||
If [code]value[/code] is [code]false[/code], clears the specified [code]bit[/code] in the [member collision_layer].
|
||||
</description>
|
||||
</method>
|
||||
<method name="set_collision_mask_bit">
|
||||
<return type="void" />
|
||||
<argument index="0" name="bit" type="int" />
|
||||
<argument index="1" name="value" type="bool" />
|
||||
<description>
|
||||
If [code]value[/code] is [code]true[/code], sets the specified [code]bit[/code] in the [member collision_mask].
|
||||
If [code]value[/code] is [code]false[/code], clears the specified [code]bit[/code] in the [member collision_mask].
|
||||
</description>
|
||||
</method>
|
||||
<method name="shape_find_owner" qualifiers="const">
|
||||
<return type="int" />
|
||||
<argument index="0" name="shape_index" type="int" />
|
||||
<description>
|
||||
Returns the [code]owner_id[/code] of the given shape.
|
||||
</description>
|
||||
</method>
|
||||
<method name="shape_owner_add_shape">
|
||||
<return type="void" />
|
||||
<argument index="0" name="owner_id" type="int" />
|
||||
<argument index="1" name="shape" type="Shape" />
|
||||
<description>
|
||||
Adds a [Shape] to the shape owner.
|
||||
</description>
|
||||
</method>
|
||||
<method name="shape_owner_clear_shapes">
|
||||
<return type="void" />
|
||||
<argument index="0" name="owner_id" type="int" />
|
||||
<description>
|
||||
Removes all shapes from the shape owner.
|
||||
</description>
|
||||
</method>
|
||||
<method name="shape_owner_get_owner" qualifiers="const">
|
||||
<return type="Object" />
|
||||
<argument index="0" name="owner_id" type="int" />
|
||||
<description>
|
||||
Returns the parent object of the given shape owner.
|
||||
</description>
|
||||
</method>
|
||||
<method name="shape_owner_get_shape" qualifiers="const">
|
||||
<return type="Shape" />
|
||||
<argument index="0" name="owner_id" type="int" />
|
||||
<argument index="1" name="shape_id" type="int" />
|
||||
<description>
|
||||
Returns the [Shape] with the given id from the given shape owner.
|
||||
</description>
|
||||
</method>
|
||||
<method name="shape_owner_get_shape_count" qualifiers="const">
|
||||
<return type="int" />
|
||||
<argument index="0" name="owner_id" type="int" />
|
||||
<description>
|
||||
Returns the number of shapes the given shape owner contains.
|
||||
</description>
|
||||
</method>
|
||||
<method name="shape_owner_get_shape_index" qualifiers="const">
|
||||
<return type="int" />
|
||||
<argument index="0" name="owner_id" type="int" />
|
||||
<argument index="1" name="shape_id" type="int" />
|
||||
<description>
|
||||
Returns the child index of the [Shape] with the given id from the given shape owner.
|
||||
</description>
|
||||
</method>
|
||||
<method name="shape_owner_get_transform" qualifiers="const">
|
||||
<return type="Transform" />
|
||||
<argument index="0" name="owner_id" type="int" />
|
||||
<description>
|
||||
Returns the shape owner's [Transform].
|
||||
</description>
|
||||
</method>
|
||||
<method name="shape_owner_remove_shape">
|
||||
<return type="void" />
|
||||
<argument index="0" name="owner_id" type="int" />
|
||||
<argument index="1" name="shape_id" type="int" />
|
||||
<description>
|
||||
Removes a shape from the given shape owner.
|
||||
</description>
|
||||
</method>
|
||||
<method name="shape_owner_set_disabled">
|
||||
<return type="void" />
|
||||
<argument index="0" name="owner_id" type="int" />
|
||||
<argument index="1" name="disabled" type="bool" />
|
||||
<description>
|
||||
If [code]true[/code], disables the given shape owner.
|
||||
</description>
|
||||
</method>
|
||||
<method name="shape_owner_set_transform">
|
||||
<return type="void" />
|
||||
<argument index="0" name="owner_id" type="int" />
|
||||
<argument index="1" name="transform" type="Transform" />
|
||||
<description>
|
||||
Sets the [Transform] of the given shape owner.
|
||||
</description>
|
||||
</method>
|
||||
</methods>
|
||||
<members>
|
||||
<member name="collision_layer" type="int" setter="set_collision_layer" getter="get_collision_layer" default="1">
|
||||
The physics layers this CollisionObject3D is in. Collision objects can exist in one or more of 32 different layers. See also [member collision_mask].
|
||||
[b]Note:[/b] A contact is detected if object A is in any of the layers that object B scans, or object B is in any layers that object A scans. See [url=$DOCS_URL/tutorials/physics/physics_introduction.html#collision-layers-and-masks]Collision layers and masks[/url] in the documentation for more information.
|
||||
</member>
|
||||
<member name="collision_mask" type="int" setter="set_collision_mask" getter="get_collision_mask" default="1">
|
||||
The physics layers this CollisionObject3D scans. Collision objects can scan one or more of 32 different layers. See also [member collision_layer].
|
||||
[b]Note:[/b] A contact is detected if object A is in any of the layers that object B scans, or object B is in any layers that object A scans. See [url=$DOCS_URL/tutorials/physics/physics_introduction.html#collision-layers-and-masks]Collision layers and masks[/url] in the documentation for more information.
|
||||
</member>
|
||||
<member name="input_capture_on_drag" type="bool" setter="set_capture_input_on_drag" getter="get_capture_input_on_drag" default="false">
|
||||
If [code]true[/code], the [CollisionObject] will continue to receive input events as the mouse is dragged across its shapes.
|
||||
</member>
|
||||
<member name="input_ray_pickable" type="bool" setter="set_ray_pickable" getter="is_ray_pickable" default="true">
|
||||
If [code]true[/code], this object is pickable. A pickable object can detect the mouse pointer entering/leaving, and if the mouse is inside it, report input events. Requires at least one [member collision_layer] bit to be set.
|
||||
</member>
|
||||
</members>
|
||||
<signals>
|
||||
<signal name="input_event">
|
||||
<argument index="0" name="camera" type="Node" />
|
||||
<argument index="1" name="event" type="InputEvent" />
|
||||
<argument index="2" name="position" type="Vector3" />
|
||||
<argument index="3" name="normal" type="Vector3" />
|
||||
<argument index="4" name="shape_idx" type="int" />
|
||||
<description>
|
||||
Emitted when the object receives an unhandled [InputEvent]. [code]position[/code] is the location in world space of the mouse pointer on the surface of the shape with index [code]shape_idx[/code] and [code]normal[/code] is the normal vector of the surface at that point.
|
||||
</description>
|
||||
</signal>
|
||||
<signal name="mouse_entered">
|
||||
<description>
|
||||
Emitted when the mouse pointer enters any of this object's shapes.
|
||||
</description>
|
||||
</signal>
|
||||
<signal name="mouse_exited">
|
||||
<description>
|
||||
Emitted when the mouse pointer exits all this object's shapes.
|
||||
</description>
|
||||
</signal>
|
||||
</signals>
|
||||
<constants>
|
||||
</constants>
|
||||
</class>
|
@ -1,31 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<class name="CollisionPolygon" inherits="Spatial" version="4.2">
|
||||
<brief_description>
|
||||
Editor-only class for defining a collision polygon in 3D space.
|
||||
</brief_description>
|
||||
<description>
|
||||
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.
|
||||
[b]Warning:[/b] A non-uniformly scaled CollisionPolygon3D node will probably not function as expected. Please make sure to keep its scale uniform (i.e. the same on all axes), and change its [member polygon]'s vertices instead.
|
||||
</description>
|
||||
<tutorials>
|
||||
</tutorials>
|
||||
<methods>
|
||||
</methods>
|
||||
<members>
|
||||
<member name="depth" type="float" setter="set_depth" getter="get_depth" default="1.0">
|
||||
Length that the resulting collision extends in either direction perpendicular to its polygon.
|
||||
</member>
|
||||
<member name="disabled" type="bool" setter="set_disabled" getter="is_disabled" default="false">
|
||||
If [code]true[/code], no collision will be produced.
|
||||
</member>
|
||||
<member name="margin" type="float" setter="set_margin" getter="get_margin" default="0.04">
|
||||
The collision margin for the generated [Shape]. See [member Shape.margin] for more details.
|
||||
</member>
|
||||
<member name="polygon" type="PoolVector2Array" setter="set_polygon" getter="get_polygon" default="PoolVector2Array( )">
|
||||
Array of vertices which define the polygon.
|
||||
[b]Note:[/b] The returned value is a copy of the original. Methods which mutate the size or properties of the return value will not impact the original polygon. To change properties of the polygon, assign it to a temporary variable and make changes before reassigning the [code]polygon[/code] member.
|
||||
</member>
|
||||
</members>
|
||||
<constants>
|
||||
</constants>
|
||||
</class>
|
@ -1,42 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<class name="CollisionShape" inherits="Spatial" version="4.2">
|
||||
<brief_description>
|
||||
Node that represents collision shape data in 3D space.
|
||||
</brief_description>
|
||||
<description>
|
||||
Editor facility for creating and editing collision shapes in 3D space. Set the [member shape] property to configure the shape. [b]IMPORTANT[/b]: this is an Editor-only helper to create shapes, use [method CollisionObject.shape_owner_get_shape] to get the actual shape.
|
||||
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.
|
||||
[b]Warning:[/b] A non-uniformly scaled CollisionShape3D node will probably not function as expected. Please make sure to keep its scale uniform (i.e. the same on all axes), and change the size of its [member shape] resource instead.
|
||||
</description>
|
||||
<tutorials>
|
||||
<link title="Physics introduction">$DOCS_URL/tutorials/physics/physics_introduction.md</link>
|
||||
<link title="3D Kinematic Character Demo">https://godotengine.org/asset-library/asset/126</link>
|
||||
<link title="3D Platformer Demo">https://godotengine.org/asset-library/asset/125</link>
|
||||
<link title="Third Person Shooter Demo">https://godotengine.org/asset-library/asset/678</link>
|
||||
</tutorials>
|
||||
<methods>
|
||||
<method name="make_convex_from_brothers">
|
||||
<return type="void" />
|
||||
<description>
|
||||
Sets the collision shape's shape to the addition of all its convexed [MeshInstance] siblings geometry.
|
||||
</description>
|
||||
</method>
|
||||
<method name="resource_changed">
|
||||
<return type="void" />
|
||||
<argument index="0" name="resource" type="Resource" />
|
||||
<description>
|
||||
If this method exists within a script it will be called whenever the shape resource has been modified.
|
||||
</description>
|
||||
</method>
|
||||
</methods>
|
||||
<members>
|
||||
<member name="disabled" type="bool" setter="set_disabled" getter="is_disabled" default="false">
|
||||
A disabled collision shape has no effect in the world.
|
||||
</member>
|
||||
<member name="shape" type="Shape" setter="set_shape" getter="get_shape">
|
||||
The actual shape owned by this collision shape.
|
||||
</member>
|
||||
</members>
|
||||
<constants>
|
||||
</constants>
|
||||
</class>
|
@ -1,31 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<class name="ConcavePolygonShape" inherits="Shape" version="4.2">
|
||||
<brief_description>
|
||||
Concave polygon shape.
|
||||
</brief_description>
|
||||
<description>
|
||||
Concave polygon shape resource, which can be set into a [PhysicsBody] or area. This shape is created by feeding a list of triangles.
|
||||
[b]Note:[/b] 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.
|
||||
[b]Warning:[/b] Using this shape for an [Area] (via a [CollisionShape] node, created e.g. by using the [i]Create Trimesh Collision Sibling[/i] option in the [i]Mesh[/i] menu that appears when selecting a [MeshInstance] node) may give unexpected results: when using Godot Physics, the area will only detect collisions with the triangle faces in the [ConcavePolygonShape] (and not with any "inside" of the shape, for example), and when using Bullet Physics the area will not detect any collisions with the concave shape at all (this is a known bug).
|
||||
</description>
|
||||
<tutorials>
|
||||
<link title="3D Physics Tests Demo">https://godotengine.org/asset-library/asset/675</link>
|
||||
</tutorials>
|
||||
<methods>
|
||||
<method name="get_faces" qualifiers="const">
|
||||
<return type="PoolVector3Array" />
|
||||
<description>
|
||||
Returns the faces (an array of triangles).
|
||||
</description>
|
||||
</method>
|
||||
<method name="set_faces">
|
||||
<return type="void" />
|
||||
<argument index="0" name="faces" type="PoolVector3Array" />
|
||||
<description>
|
||||
Sets the faces (an array of triangles).
|
||||
</description>
|
||||
</method>
|
||||
</methods>
|
||||
<constants>
|
||||
</constants>
|
||||
</class>
|
@ -1,75 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<class name="ConeTwistJoint" inherits="Joint" version="4.2">
|
||||
<brief_description>
|
||||
A twist joint between two 3D PhysicsBodies.
|
||||
</brief_description>
|
||||
<description>
|
||||
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].
|
||||
</description>
|
||||
<tutorials>
|
||||
</tutorials>
|
||||
<methods>
|
||||
<method name="get_param" qualifiers="const">
|
||||
<return type="float" />
|
||||
<argument index="0" name="param" type="int" enum="ConeTwistJoint.Param" />
|
||||
<description>
|
||||
</description>
|
||||
</method>
|
||||
<method name="set_param">
|
||||
<return type="void" />
|
||||
<argument index="0" name="param" type="int" enum="ConeTwistJoint.Param" />
|
||||
<argument index="1" name="value" type="float" />
|
||||
<description>
|
||||
</description>
|
||||
</method>
|
||||
</methods>
|
||||
<members>
|
||||
<member name="bias" type="float" setter="set_param" getter="get_param" default="0.3">
|
||||
The speed with which the swing or twist will take place.
|
||||
The higher, the faster.
|
||||
</member>
|
||||
<member name="relaxation" type="float" setter="set_param" getter="get_param" default="1.0">
|
||||
Defines, how fast the swing- and twist-speed-difference on both sides gets synced.
|
||||
</member>
|
||||
<member name="softness" type="float" setter="set_param" getter="get_param" default="0.8">
|
||||
The ease with which the joint starts to twist. If it's too low, it takes more force to start twisting the joint.
|
||||
</member>
|
||||
<member name="swing_span" type="float" setter="_set_swing_span" getter="_get_swing_span" default="45.0">
|
||||
Swing is rotation from side to side, around the axis perpendicular to the twist axis.
|
||||
The swing span defines, how much rotation will not get corrected along the swing axis.
|
||||
Could be defined as looseness in the [ConeTwistJoint].
|
||||
If below 0.05, this behavior is locked.
|
||||
</member>
|
||||
<member name="twist_span" type="float" setter="_set_twist_span" getter="_get_twist_span" default="180.0">
|
||||
Twist is the rotation around the twist axis, this value defined how far the joint can twist.
|
||||
Twist is locked if below 0.05.
|
||||
</member>
|
||||
</members>
|
||||
<constants>
|
||||
<constant name="PARAM_SWING_SPAN" value="0" enum="Param">
|
||||
Swing is rotation from side to side, around the axis perpendicular to the twist axis.
|
||||
The swing span defines, how much rotation will not get corrected along the swing axis.
|
||||
Could be defined as looseness in the [ConeTwistJoint].
|
||||
If below 0.05, this behavior is locked.
|
||||
</constant>
|
||||
<constant name="PARAM_TWIST_SPAN" value="1" enum="Param">
|
||||
Twist is the rotation around the twist axis, this value defined how far the joint can twist.
|
||||
Twist is locked if below 0.05.
|
||||
</constant>
|
||||
<constant name="PARAM_BIAS" value="2" enum="Param">
|
||||
The speed with which the swing or twist will take place.
|
||||
The higher, the faster.
|
||||
</constant>
|
||||
<constant name="PARAM_SOFTNESS" value="3" enum="Param">
|
||||
The ease with which the joint starts to twist. If it's too low, it takes more force to start twisting the joint.
|
||||
</constant>
|
||||
<constant name="PARAM_RELAXATION" value="4" enum="Param">
|
||||
Defines, how fast the swing- and twist-speed-difference on both sides gets synced.
|
||||
</constant>
|
||||
<constant name="PARAM_MAX" value="5" enum="Param">
|
||||
Represents the size of the [enum Param] enum.
|
||||
</constant>
|
||||
</constants>
|
||||
</class>
|
@ -22,7 +22,6 @@
|
||||
</method>
|
||||
</methods>
|
||||
<members>
|
||||
<member name="rect_min_size" type="Vector2" setter="set_custom_minimum_size" getter="get_custom_minimum_size" overrides="Control" default="Vector2( 200, 70 )" />
|
||||
<member name="window_title" type="String" setter="set_title" getter="get_title" overrides="WindowDialog" default=""Please Confirm..."" />
|
||||
</members>
|
||||
<constants>
|
||||
|
@ -751,7 +751,6 @@
|
||||
<member name="mouse_filter" type="int" setter="set_mouse_filter" getter="get_mouse_filter" enum="Control.MouseFilter" default="0">
|
||||
Controls whether the control will be able to receive mouse button input events through [method _gui_input] and how these events should be handled. Also controls whether the control can receive the [signal mouse_entered], and [signal mouse_exited] signals. See the constants to learn what each does.
|
||||
</member>
|
||||
<member name="physics_interpolation_mode" type="int" setter="set_physics_interpolation_mode" getter="get_physics_interpolation_mode" overrides="Node" enum="Node.PhysicsInterpolationMode" default="1" />
|
||||
<member name="rect_clip_content" type="bool" setter="set_clip_contents" getter="is_clipping_contents" default="false">
|
||||
Enables whether rendering of [CanvasItem] based children should be clipped to this control's rectangle. If [code]true[/code], parts of a child which would be visibly outside of this control's rectangle will not be rendered.
|
||||
</member>
|
||||
|
@ -1,21 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<class name="ConvexPolygonShape" inherits="Shape" version="4.2">
|
||||
<brief_description>
|
||||
Convex polygon shape for 3D physics.
|
||||
</brief_description>
|
||||
<description>
|
||||
Convex polygon shape resource, which can be added to a [PhysicsBody] or area.
|
||||
</description>
|
||||
<tutorials>
|
||||
<link title="3D Physics Tests Demo">https://godotengine.org/asset-library/asset/675</link>
|
||||
</tutorials>
|
||||
<methods>
|
||||
</methods>
|
||||
<members>
|
||||
<member name="points" type="PoolVector3Array" setter="set_points" getter="get_points" default="PoolVector3Array( )">
|
||||
The list of 3D points forming the convex polygon shape.
|
||||
</member>
|
||||
</members>
|
||||
<constants>
|
||||
</constants>
|
||||
</class>
|
@ -1,54 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<class name="CullInstance" inherits="Spatial" version="4.2">
|
||||
<brief_description>
|
||||
Parent of all nodes that can be culled by the Portal system.
|
||||
</brief_description>
|
||||
<description>
|
||||
Provides common functionality to nodes that can be culled by the [Portal] system.
|
||||
[code]Static[/code] and [code]Dynamic[/code] objects are the most efficiently managed objects in the system, but there are some caveats. They are expected to be present initially when [Room]s are converted using the [RoomManager] [code]rooms_convert[/code] function, and their lifetime should be the same as the game level (i.e. present until you call [code]rooms_clear[/code] on the [RoomManager]. Although you shouldn't create / delete these objects during gameplay, you can manage their visibility with the standard [code]hide[/code] and [code]show[/code] commands.
|
||||
[code]Roaming[/code] objects on the other hand, require extra processing to keep track of which [Room] they are within. This enables them to be culled effectively, wherever they are.
|
||||
[code]Global[/code] objects are not culled by the portal system, and use view frustum culling only.
|
||||
Objects that are not [code]Static[/code] or [code]Dynamic[/code] can be freely created and deleted during the lifetime of the game level.
|
||||
</description>
|
||||
<tutorials>
|
||||
</tutorials>
|
||||
<methods>
|
||||
</methods>
|
||||
<members>
|
||||
<member name="allow_merging" type="bool" setter="set_allow_merging" getter="get_allow_merging" default="true">
|
||||
This allows fine control over the mesh merging feature in the [RoomManager].
|
||||
Setting this option to [code]false[/code] can be used to prevent an instance being merged.
|
||||
</member>
|
||||
<member name="autoplace_priority" type="int" setter="set_portal_autoplace_priority" getter="get_portal_autoplace_priority" default="0">
|
||||
When set to [code]0[/code], [CullInstance]s will be autoplaced in the [Room] with the highest priority.
|
||||
When set to a value other than [code]0[/code], the system will attempt to autoplace in a [Room] with the [code]autoplace_priority[/code], if it is present.
|
||||
This can be used to control autoplacement of building exteriors in an outer [RoomGroup].
|
||||
</member>
|
||||
<member name="include_in_bound" type="bool" setter="set_include_in_bound" getter="get_include_in_bound" default="true">
|
||||
When a manual bound has not been explicitly specified for a [Room], the convex hull bound will be estimated from the geometry of the objects within the room. This setting determines whether the geometry of an object is included in this estimate of the room bound.
|
||||
[b]Note:[/b] This setting is only relevant when the object is set to [code]PORTAL_MODE_STATIC[/code] or [code]PORTAL_MODE_DYNAMIC[/code], and for [Portal]s.
|
||||
</member>
|
||||
<member name="portal_mode" type="int" setter="set_portal_mode" getter="get_portal_mode" enum="CullInstance.PortalMode" default="0">
|
||||
When using [Room]s and [Portal]s, this specifies how the [CullInstance] is processed in the system.
|
||||
</member>
|
||||
</members>
|
||||
<constants>
|
||||
<constant name="PORTAL_MODE_STATIC" value="0" enum="PortalMode">
|
||||
Use for instances within [Room]s that will [b]not move[/b] - e.g. walls, floors.
|
||||
[b]Note:[/b] If you attempt to delete a [code]PORTAL_MODE_STATIC[/code] instance while the room graph is loaded (converted), it will unload the room graph and deactivate portal culling. This is because the [b]room graph[/b] data has been invalidated. You will need to reconvert the rooms using the [RoomManager] to activate the system again.
|
||||
</constant>
|
||||
<constant name="PORTAL_MODE_DYNAMIC" value="1" enum="PortalMode">
|
||||
Use for instances within rooms that will move but [b]not change room[/b] - e.g. moving platforms.
|
||||
[b]Note:[/b] If you attempt to delete a [code]PORTAL_MODE_DYNAMIC[/code] instance while the room graph is loaded (converted), it will unload the room graph and deactivate portal culling. This is because the [b]room graph[/b] data has been invalidated. You will need to reconvert the rooms using the [RoomManager] to activate the system again.
|
||||
</constant>
|
||||
<constant name="PORTAL_MODE_ROAMING" value="2" enum="PortalMode">
|
||||
Use for instances that will move [b]between[/b] [Room]s - e.g. players.
|
||||
</constant>
|
||||
<constant name="PORTAL_MODE_GLOBAL" value="3" enum="PortalMode">
|
||||
Use for instances that will be frustum culled only - e.g. first person weapon, debug.
|
||||
</constant>
|
||||
<constant name="PORTAL_MODE_IGNORE" value="4" enum="PortalMode">
|
||||
Use for instances that will not be shown at all - e.g. [b]manual room bounds[/b] (specified by prefix [i]'Bound_'[/i]).
|
||||
</constant>
|
||||
</constants>
|
||||
</class>
|
@ -1,26 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<class name="CylinderShape" inherits="Shape" version="4.2">
|
||||
<brief_description>
|
||||
Cylinder shape for collisions.
|
||||
</brief_description>
|
||||
<description>
|
||||
Cylinder shape for collisions.
|
||||
</description>
|
||||
<tutorials>
|
||||
<link title="Third Person Shooter Demo">https://godotengine.org/asset-library/asset/678</link>
|
||||
<link title="3D Physics Tests Demo">https://godotengine.org/asset-library/asset/675</link>
|
||||
<link title="3D Voxel Demo">https://godotengine.org/asset-library/asset/676</link>
|
||||
</tutorials>
|
||||
<methods>
|
||||
</methods>
|
||||
<members>
|
||||
<member name="height" type="float" setter="set_height" getter="get_height" default="2.0">
|
||||
The cylinder's height.
|
||||
</member>
|
||||
<member name="radius" type="float" setter="set_radius" getter="get_radius" default="1.0">
|
||||
The cylinder's radius.
|
||||
</member>
|
||||
</members>
|
||||
<constants>
|
||||
</constants>
|
||||
</class>
|
@ -1,63 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<class name="DirectionalLight" inherits="Light" version="4.2">
|
||||
<brief_description>
|
||||
Directional light from a distance, as from the Sun.
|
||||
</brief_description>
|
||||
<description>
|
||||
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.
|
||||
</description>
|
||||
<tutorials>
|
||||
<link>$DOCS_URL/tutorials/3d/lights_and_shadows.md</link>
|
||||
</tutorials>
|
||||
<methods>
|
||||
</methods>
|
||||
<members>
|
||||
<member name="directional_shadow_bias_split_scale" type="float" setter="set_param" getter="get_param" default="0.25">
|
||||
Amount of extra bias for shadow splits that are far away. If self-shadowing occurs only on the splits far away, increasing this value can fix them. This is ignored when [member directional_shadow_mode] is [constant SHADOW_ORTHOGONAL].
|
||||
</member>
|
||||
<member name="directional_shadow_blend_splits" type="bool" setter="set_blend_splits" getter="is_blend_splits_enabled" default="false">
|
||||
If [code]true[/code], shadow detail is sacrificed in exchange for smoother transitions between splits. Enabling shadow blend splitting also has a moderate performance cost. This is ignored when [member directional_shadow_mode] is [constant SHADOW_ORTHOGONAL].
|
||||
</member>
|
||||
<member name="directional_shadow_depth_range" type="int" setter="set_shadow_depth_range" getter="get_shadow_depth_range" enum="DirectionalLight.ShadowDepthRange" default="0">
|
||||
Optimizes shadow rendering for detail versus movement. See [enum ShadowDepthRange].
|
||||
</member>
|
||||
<member name="directional_shadow_max_distance" type="float" setter="set_param" getter="get_param" default="100.0">
|
||||
The maximum distance for shadow splits. Increasing this value will make directional shadows visible from further away, at the cost of lower overall shadow detail and performance (since more objects need to be included in the directional shadow rendering).
|
||||
</member>
|
||||
<member name="directional_shadow_mode" type="int" setter="set_shadow_mode" getter="get_shadow_mode" enum="DirectionalLight.ShadowMode" default="3">
|
||||
The light's shadow rendering algorithm. See [enum ShadowMode].
|
||||
</member>
|
||||
<member name="directional_shadow_normal_bias" type="float" setter="set_param" getter="get_param" default="0.8">
|
||||
Can be used to fix special cases of self shadowing when objects are perpendicular to the light.
|
||||
</member>
|
||||
<member name="directional_shadow_split_1" type="float" setter="set_param" getter="get_param" default="0.1">
|
||||
The distance from camera to shadow split 1. Relative to [member directional_shadow_max_distance]. Only used when [member directional_shadow_mode] is [constant SHADOW_PARALLEL_2_SPLITS] or [constant SHADOW_PARALLEL_4_SPLITS].
|
||||
</member>
|
||||
<member name="directional_shadow_split_2" type="float" setter="set_param" getter="get_param" default="0.2">
|
||||
The distance from shadow split 1 to split 2. Relative to [member directional_shadow_max_distance]. Only used when [member directional_shadow_mode] is [constant SHADOW_PARALLEL_2_SPLITS] or [constant SHADOW_PARALLEL_4_SPLITS].
|
||||
</member>
|
||||
<member name="directional_shadow_split_3" type="float" setter="set_param" getter="get_param" default="0.5">
|
||||
The distance from shadow split 2 to split 3. Relative to [member directional_shadow_max_distance]. Only used when [member directional_shadow_mode] is [constant SHADOW_PARALLEL_4_SPLITS].
|
||||
</member>
|
||||
</members>
|
||||
<constants>
|
||||
<constant name="SHADOW_ORTHOGONAL" value="0" enum="ShadowMode">
|
||||
Renders the entire scene's shadow map from an orthogonal point of view. This is the fastest directional shadow mode. May result in blurrier shadows on close objects.
|
||||
</constant>
|
||||
<constant name="SHADOW_PARALLEL_2_SPLITS" value="1" enum="ShadowMode">
|
||||
Splits the view frustum in 2 areas, each with its own shadow map. This shadow mode is a compromise between [constant SHADOW_ORTHOGONAL] and [constant SHADOW_PARALLEL_4_SPLITS] in terms of performance.
|
||||
</constant>
|
||||
<constant name="SHADOW_PARALLEL_3_SPLITS" value="2" enum="ShadowMode">
|
||||
Splits the view frustum in 3 areas, each with its own shadow map. This shadow mode is a compromise between [constant SHADOW_ORTHOGONAL] and [constant SHADOW_PARALLEL_4_SPLITS] in terms of performance.
|
||||
</constant>
|
||||
<constant name="SHADOW_PARALLEL_4_SPLITS" value="3" enum="ShadowMode">
|
||||
Splits the view frustum in 4 areas, each with its own shadow map. This is the slowest directional shadow mode.
|
||||
</constant>
|
||||
<constant name="SHADOW_DEPTH_RANGE_STABLE" value="0" enum="ShadowDepthRange">
|
||||
Keeps the shadow stable when the camera moves, at the cost of lower effective shadow resolution.
|
||||
</constant>
|
||||
<constant name="SHADOW_DEPTH_RANGE_OPTIMIZED" value="1" enum="ShadowDepthRange">
|
||||
Tries to achieve maximum shadow resolution. May result in saw effect on shadow edges. This mode typically works best in games where the camera will often move at high speeds, such as most racing games.
|
||||
</constant>
|
||||
</constants>
|
||||
</class>
|
@ -220,35 +220,6 @@
|
||||
Opens the file for writing or reading, depending on the flags.
|
||||
</description>
|
||||
</method>
|
||||
<method name="open_compressed">
|
||||
<return type="int" enum="Error" />
|
||||
<argument index="0" name="path" type="String" />
|
||||
<argument index="1" name="mode_flags" type="int" enum="File.ModeFlags" />
|
||||
<argument index="2" name="compression_mode" type="int" enum="File.CompressionMode" default="0" />
|
||||
<description>
|
||||
Opens a compressed file for reading or writing.
|
||||
[b]Note:[/b] [method open_compressed] can only read files that were saved by Godot, not third-party compression formats. See [url=https://github.com/godotengine/godot/issues/28999]GitHub issue #28999[/url] for a workaround.
|
||||
</description>
|
||||
</method>
|
||||
<method name="open_encrypted">
|
||||
<return type="int" enum="Error" />
|
||||
<argument index="0" name="path" type="String" />
|
||||
<argument index="1" name="mode_flags" type="int" enum="File.ModeFlags" />
|
||||
<argument index="2" name="key" type="PoolByteArray" />
|
||||
<description>
|
||||
Opens an encrypted file in write or read mode. You need to pass a binary key to encrypt/decrypt it.
|
||||
[b]Note:[/b] The provided key must be 32 bytes long.
|
||||
</description>
|
||||
</method>
|
||||
<method name="open_encrypted_with_pass">
|
||||
<return type="int" enum="Error" />
|
||||
<argument index="0" name="path" type="String" />
|
||||
<argument index="1" name="mode_flags" type="int" enum="File.ModeFlags" />
|
||||
<argument index="2" name="pass" type="String" />
|
||||
<description>
|
||||
Opens an encrypted file in write or read mode. You need to pass a password to encrypt/decrypt it.
|
||||
</description>
|
||||
</method>
|
||||
<method name="seek">
|
||||
<return type="void" />
|
||||
<argument index="0" name="position" type="int" />
|
||||
@ -407,17 +378,5 @@
|
||||
<constant name="WRITE_READ" value="7" enum="ModeFlags">
|
||||
Opens the file for read and write operations. The file is created if it does not exist, and truncated if it does. The cursor is positioned at the beginning of the file.
|
||||
</constant>
|
||||
<constant name="COMPRESSION_FASTLZ" value="0" enum="CompressionMode">
|
||||
Uses the [url=http://fastlz.org/]FastLZ[/url] compression method.
|
||||
</constant>
|
||||
<constant name="COMPRESSION_DEFLATE" value="1" enum="CompressionMode">
|
||||
Uses the [url=https://en.wikipedia.org/wiki/DEFLATE]DEFLATE[/url] compression method.
|
||||
</constant>
|
||||
<constant name="COMPRESSION_ZSTD" value="2" enum="CompressionMode">
|
||||
Uses the [url=https://facebook.github.io/zstd/]Zstandard[/url] compression method.
|
||||
</constant>
|
||||
<constant name="COMPRESSION_GZIP" value="3" enum="CompressionMode">
|
||||
Uses the [url=https://www.gzip.org/]gzip[/url] compression method.
|
||||
</constant>
|
||||
</constants>
|
||||
</class>
|
||||
|
@ -1,90 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<class name="FileSystemDock" inherits="VBoxContainer" version="4.2">
|
||||
<brief_description>
|
||||
</brief_description>
|
||||
<description>
|
||||
</description>
|
||||
<tutorials>
|
||||
</tutorials>
|
||||
<methods>
|
||||
<method name="can_drop_data_fw" qualifiers="const">
|
||||
<return type="bool" />
|
||||
<argument index="0" name="point" type="Vector2" />
|
||||
<argument index="1" name="data" type="Variant" />
|
||||
<argument index="2" name="from" type="Control" />
|
||||
<description>
|
||||
</description>
|
||||
</method>
|
||||
<method name="drop_data_fw">
|
||||
<return type="void" />
|
||||
<argument index="0" name="point" type="Vector2" />
|
||||
<argument index="1" name="data" type="Variant" />
|
||||
<argument index="2" name="from" type="Control" />
|
||||
<description>
|
||||
</description>
|
||||
</method>
|
||||
<method name="ensure_visible">
|
||||
<return type="void" />
|
||||
<description>
|
||||
</description>
|
||||
</method>
|
||||
<method name="get_drag_data_fw">
|
||||
<return type="Variant" />
|
||||
<argument index="0" name="point" type="Vector2" />
|
||||
<argument index="1" name="from" type="Control" />
|
||||
<description>
|
||||
</description>
|
||||
</method>
|
||||
<method name="navigate_to_path">
|
||||
<return type="void" />
|
||||
<argument index="0" name="path" type="String" />
|
||||
<description>
|
||||
</description>
|
||||
</method>
|
||||
</methods>
|
||||
<signals>
|
||||
<signal name="custom_popup_creation_entry_pressed">
|
||||
<argument index="0" name="id" type="int" />
|
||||
<description>
|
||||
</description>
|
||||
</signal>
|
||||
<signal name="display_mode_changed">
|
||||
<description>
|
||||
</description>
|
||||
</signal>
|
||||
<signal name="file_removed">
|
||||
<argument index="0" name="file" type="String" />
|
||||
<description>
|
||||
</description>
|
||||
</signal>
|
||||
<signal name="files_moved">
|
||||
<argument index="0" name="old_file" type="String" />
|
||||
<argument index="1" name="new_file" type="String" />
|
||||
<description>
|
||||
</description>
|
||||
</signal>
|
||||
<signal name="folder_moved">
|
||||
<argument index="0" name="old_folder" type="String" />
|
||||
<argument index="1" name="new_file" type="String" />
|
||||
<description>
|
||||
</description>
|
||||
</signal>
|
||||
<signal name="folder_removed">
|
||||
<argument index="0" name="folder" type="String" />
|
||||
<description>
|
||||
</description>
|
||||
</signal>
|
||||
<signal name="inherit">
|
||||
<argument index="0" name="file" type="String" />
|
||||
<description>
|
||||
</description>
|
||||
</signal>
|
||||
<signal name="instance">
|
||||
<argument index="0" name="files" type="PoolStringArray" />
|
||||
<description>
|
||||
</description>
|
||||
</signal>
|
||||
</signals>
|
||||
<constants>
|
||||
</constants>
|
||||
</class>
|
@ -1,406 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<class name="Generic6DOFJoint" inherits="Joint" version="4.2">
|
||||
<brief_description>
|
||||
The generic 6-degrees-of-freedom joint can implement a variety of joint types by locking certain axes' rotation or translation.
|
||||
</brief_description>
|
||||
<description>
|
||||
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.
|
||||
</description>
|
||||
<tutorials>
|
||||
</tutorials>
|
||||
<methods>
|
||||
<method name="get_flag_x" qualifiers="const">
|
||||
<return type="bool" />
|
||||
<argument index="0" name="flag" type="int" enum="Generic6DOFJoint.Flag" />
|
||||
<description>
|
||||
</description>
|
||||
</method>
|
||||
<method name="get_flag_y" qualifiers="const">
|
||||
<return type="bool" />
|
||||
<argument index="0" name="flag" type="int" enum="Generic6DOFJoint.Flag" />
|
||||
<description>
|
||||
</description>
|
||||
</method>
|
||||
<method name="get_flag_z" qualifiers="const">
|
||||
<return type="bool" />
|
||||
<argument index="0" name="flag" type="int" enum="Generic6DOFJoint.Flag" />
|
||||
<description>
|
||||
</description>
|
||||
</method>
|
||||
<method name="get_param_x" qualifiers="const">
|
||||
<return type="float" />
|
||||
<argument index="0" name="param" type="int" enum="Generic6DOFJoint.Param" />
|
||||
<description>
|
||||
</description>
|
||||
</method>
|
||||
<method name="get_param_y" qualifiers="const">
|
||||
<return type="float" />
|
||||
<argument index="0" name="param" type="int" enum="Generic6DOFJoint.Param" />
|
||||
<description>
|
||||
</description>
|
||||
</method>
|
||||
<method name="get_param_z" qualifiers="const">
|
||||
<return type="float" />
|
||||
<argument index="0" name="param" type="int" enum="Generic6DOFJoint.Param" />
|
||||
<description>
|
||||
</description>
|
||||
</method>
|
||||
<method name="set_flag_x">
|
||||
<return type="void" />
|
||||
<argument index="0" name="flag" type="int" enum="Generic6DOFJoint.Flag" />
|
||||
<argument index="1" name="value" type="bool" />
|
||||
<description>
|
||||
</description>
|
||||
</method>
|
||||
<method name="set_flag_y">
|
||||
<return type="void" />
|
||||
<argument index="0" name="flag" type="int" enum="Generic6DOFJoint.Flag" />
|
||||
<argument index="1" name="value" type="bool" />
|
||||
<description>
|
||||
</description>
|
||||
</method>
|
||||
<method name="set_flag_z">
|
||||
<return type="void" />
|
||||
<argument index="0" name="flag" type="int" enum="Generic6DOFJoint.Flag" />
|
||||
<argument index="1" name="value" type="bool" />
|
||||
<description>
|
||||
</description>
|
||||
</method>
|
||||
<method name="set_param_x">
|
||||
<return type="void" />
|
||||
<argument index="0" name="param" type="int" enum="Generic6DOFJoint.Param" />
|
||||
<argument index="1" name="value" type="float" />
|
||||
<description>
|
||||
</description>
|
||||
</method>
|
||||
<method name="set_param_y">
|
||||
<return type="void" />
|
||||
<argument index="0" name="param" type="int" enum="Generic6DOFJoint.Param" />
|
||||
<argument index="1" name="value" type="float" />
|
||||
<description>
|
||||
</description>
|
||||
</method>
|
||||
<method name="set_param_z">
|
||||
<return type="void" />
|
||||
<argument index="0" name="param" type="int" enum="Generic6DOFJoint.Param" />
|
||||
<argument index="1" name="value" type="float" />
|
||||
<description>
|
||||
</description>
|
||||
</method>
|
||||
</methods>
|
||||
<members>
|
||||
<member name="angular_limit_x/damping" type="float" setter="set_param_x" getter="get_param_x" default="1.0">
|
||||
The amount of rotational damping across the X axis.
|
||||
The lower, the longer an impulse from one side takes to travel to the other side.
|
||||
</member>
|
||||
<member name="angular_limit_x/enabled" type="bool" setter="set_flag_x" getter="get_flag_x" default="true">
|
||||
If [code]true[/code], rotation across the X axis is limited.
|
||||
</member>
|
||||
<member name="angular_limit_x/erp" type="float" setter="set_param_x" getter="get_param_x" default="0.5">
|
||||
When rotating across the X axis, this error tolerance factor defines how much the correction gets slowed down. The lower, the slower.
|
||||
</member>
|
||||
<member name="angular_limit_x/force_limit" type="float" setter="set_param_x" getter="get_param_x" default="0.0">
|
||||
The maximum amount of force that can occur, when rotating around the X axis.
|
||||
</member>
|
||||
<member name="angular_limit_x/lower_angle" type="float" setter="_set_angular_lo_limit_x" getter="_get_angular_lo_limit_x" default="0.0">
|
||||
The minimum rotation in negative direction to break loose and rotate around the X axis.
|
||||
</member>
|
||||
<member name="angular_limit_x/restitution" type="float" setter="set_param_x" getter="get_param_x" default="0.0">
|
||||
The amount of rotational restitution across the X axis. The lower, the more restitution occurs.
|
||||
</member>
|
||||
<member name="angular_limit_x/softness" type="float" setter="set_param_x" getter="get_param_x" default="0.5">
|
||||
The speed of all rotations across the X axis.
|
||||
</member>
|
||||
<member name="angular_limit_x/upper_angle" type="float" setter="_set_angular_hi_limit_x" getter="_get_angular_hi_limit_x" default="0.0">
|
||||
The minimum rotation in positive direction to break loose and rotate around the X axis.
|
||||
</member>
|
||||
<member name="angular_limit_y/damping" type="float" setter="set_param_y" getter="get_param_y" default="1.0">
|
||||
The amount of rotational damping across the Y axis. The lower, the more dampening occurs.
|
||||
</member>
|
||||
<member name="angular_limit_y/enabled" type="bool" setter="set_flag_y" getter="get_flag_y" default="true">
|
||||
If [code]true[/code], rotation across the Y axis is limited.
|
||||
</member>
|
||||
<member name="angular_limit_y/erp" type="float" setter="set_param_y" getter="get_param_y" default="0.5">
|
||||
When rotating across the Y axis, this error tolerance factor defines how much the correction gets slowed down. The lower, the slower.
|
||||
</member>
|
||||
<member name="angular_limit_y/force_limit" type="float" setter="set_param_y" getter="get_param_y" default="0.0">
|
||||
The maximum amount of force that can occur, when rotating around the Y axis.
|
||||
</member>
|
||||
<member name="angular_limit_y/lower_angle" type="float" setter="_set_angular_lo_limit_y" getter="_get_angular_lo_limit_y" default="0.0">
|
||||
The minimum rotation in negative direction to break loose and rotate around the Y axis.
|
||||
</member>
|
||||
<member name="angular_limit_y/restitution" type="float" setter="set_param_y" getter="get_param_y" default="0.0">
|
||||
The amount of rotational restitution across the Y axis. The lower, the more restitution occurs.
|
||||
</member>
|
||||
<member name="angular_limit_y/softness" type="float" setter="set_param_y" getter="get_param_y" default="0.5">
|
||||
The speed of all rotations across the Y axis.
|
||||
</member>
|
||||
<member name="angular_limit_y/upper_angle" type="float" setter="_set_angular_hi_limit_y" getter="_get_angular_hi_limit_y" default="0.0">
|
||||
The minimum rotation in positive direction to break loose and rotate around the Y axis.
|
||||
</member>
|
||||
<member name="angular_limit_z/damping" type="float" setter="set_param_z" getter="get_param_z" default="1.0">
|
||||
The amount of rotational damping across the Z axis. The lower, the more dampening occurs.
|
||||
</member>
|
||||
<member name="angular_limit_z/enabled" type="bool" setter="set_flag_z" getter="get_flag_z" default="true">
|
||||
If [code]true[/code], rotation across the Z axis is limited.
|
||||
</member>
|
||||
<member name="angular_limit_z/erp" type="float" setter="set_param_z" getter="get_param_z" default="0.5">
|
||||
When rotating across the Z axis, this error tolerance factor defines how much the correction gets slowed down. The lower, the slower.
|
||||
</member>
|
||||
<member name="angular_limit_z/force_limit" type="float" setter="set_param_z" getter="get_param_z" default="0.0">
|
||||
The maximum amount of force that can occur, when rotating around the Z axis.
|
||||
</member>
|
||||
<member name="angular_limit_z/lower_angle" type="float" setter="_set_angular_lo_limit_z" getter="_get_angular_lo_limit_z" default="0.0">
|
||||
The minimum rotation in negative direction to break loose and rotate around the Z axis.
|
||||
</member>
|
||||
<member name="angular_limit_z/restitution" type="float" setter="set_param_z" getter="get_param_z" default="0.0">
|
||||
The amount of rotational restitution across the Z axis. The lower, the more restitution occurs.
|
||||
</member>
|
||||
<member name="angular_limit_z/softness" type="float" setter="set_param_z" getter="get_param_z" default="0.5">
|
||||
The speed of all rotations across the Z axis.
|
||||
</member>
|
||||
<member name="angular_limit_z/upper_angle" type="float" setter="_set_angular_hi_limit_z" getter="_get_angular_hi_limit_z" default="0.0">
|
||||
The minimum rotation in positive direction to break loose and rotate around the Z axis.
|
||||
</member>
|
||||
<member name="angular_motor_x/enabled" type="bool" setter="set_flag_x" getter="get_flag_x" default="false">
|
||||
If [code]true[/code], a rotating motor at the X axis is enabled.
|
||||
</member>
|
||||
<member name="angular_motor_x/force_limit" type="float" setter="set_param_x" getter="get_param_x" default="300.0">
|
||||
Maximum acceleration for the motor at the X axis.
|
||||
</member>
|
||||
<member name="angular_motor_x/target_velocity" type="float" setter="set_param_x" getter="get_param_x" default="0.0">
|
||||
Target speed for the motor at the X axis.
|
||||
</member>
|
||||
<member name="angular_motor_y/enabled" type="bool" setter="set_flag_y" getter="get_flag_y" default="false">
|
||||
If [code]true[/code], a rotating motor at the Y axis is enabled.
|
||||
</member>
|
||||
<member name="angular_motor_y/force_limit" type="float" setter="set_param_y" getter="get_param_y" default="300.0">
|
||||
Maximum acceleration for the motor at the Y axis.
|
||||
</member>
|
||||
<member name="angular_motor_y/target_velocity" type="float" setter="set_param_y" getter="get_param_y" default="0.0">
|
||||
Target speed for the motor at the Y axis.
|
||||
</member>
|
||||
<member name="angular_motor_z/enabled" type="bool" setter="set_flag_z" getter="get_flag_z" default="false">
|
||||
If [code]true[/code], a rotating motor at the Z axis is enabled.
|
||||
</member>
|
||||
<member name="angular_motor_z/force_limit" type="float" setter="set_param_z" getter="get_param_z" default="300.0">
|
||||
Maximum acceleration for the motor at the Z axis.
|
||||
</member>
|
||||
<member name="angular_motor_z/target_velocity" type="float" setter="set_param_z" getter="get_param_z" default="0.0">
|
||||
Target speed for the motor at the Z axis.
|
||||
</member>
|
||||
<member name="angular_spring_x/damping" type="float" setter="set_param_x" getter="get_param_x" default="0.0">
|
||||
</member>
|
||||
<member name="angular_spring_x/enabled" type="bool" setter="set_flag_x" getter="get_flag_x" default="false">
|
||||
</member>
|
||||
<member name="angular_spring_x/equilibrium_point" type="float" setter="set_param_x" getter="get_param_x" default="0.0">
|
||||
</member>
|
||||
<member name="angular_spring_x/stiffness" type="float" setter="set_param_x" getter="get_param_x" default="0.0">
|
||||
</member>
|
||||
<member name="angular_spring_y/damping" type="float" setter="set_param_y" getter="get_param_y" default="0.0">
|
||||
</member>
|
||||
<member name="angular_spring_y/enabled" type="bool" setter="set_flag_y" getter="get_flag_y" default="false">
|
||||
</member>
|
||||
<member name="angular_spring_y/equilibrium_point" type="float" setter="set_param_y" getter="get_param_y" default="0.0">
|
||||
</member>
|
||||
<member name="angular_spring_y/stiffness" type="float" setter="set_param_y" getter="get_param_y" default="0.0">
|
||||
</member>
|
||||
<member name="angular_spring_z/damping" type="float" setter="set_param_z" getter="get_param_z" default="0.0">
|
||||
</member>
|
||||
<member name="angular_spring_z/enabled" type="bool" setter="set_flag_z" getter="get_flag_z" default="false">
|
||||
</member>
|
||||
<member name="angular_spring_z/equilibrium_point" type="float" setter="set_param_z" getter="get_param_z" default="0.0">
|
||||
</member>
|
||||
<member name="angular_spring_z/stiffness" type="float" setter="set_param_z" getter="get_param_z" default="0.0">
|
||||
</member>
|
||||
<member name="linear_limit_x/damping" type="float" setter="set_param_x" getter="get_param_x" default="1.0">
|
||||
The amount of damping that happens at the X motion.
|
||||
</member>
|
||||
<member name="linear_limit_x/enabled" type="bool" setter="set_flag_x" getter="get_flag_x" default="true">
|
||||
If [code]true[/code], the linear motion across the X axis is limited.
|
||||
</member>
|
||||
<member name="linear_limit_x/lower_distance" type="float" setter="set_param_x" getter="get_param_x" default="0.0">
|
||||
The minimum difference between the pivot points' X axis.
|
||||
</member>
|
||||
<member name="linear_limit_x/restitution" type="float" setter="set_param_x" getter="get_param_x" default="0.5">
|
||||
The amount of restitution on the X axis movement. The lower, the more momentum gets lost.
|
||||
</member>
|
||||
<member name="linear_limit_x/softness" type="float" setter="set_param_x" getter="get_param_x" default="0.7">
|
||||
A factor applied to the movement across the X axis. The lower, the slower the movement.
|
||||
</member>
|
||||
<member name="linear_limit_x/upper_distance" type="float" setter="set_param_x" getter="get_param_x" default="0.0">
|
||||
The maximum difference between the pivot points' X axis.
|
||||
</member>
|
||||
<member name="linear_limit_y/damping" type="float" setter="set_param_y" getter="get_param_y" default="1.0">
|
||||
The amount of damping that happens at the Y motion.
|
||||
</member>
|
||||
<member name="linear_limit_y/enabled" type="bool" setter="set_flag_y" getter="get_flag_y" default="true">
|
||||
If [code]true[/code], the linear motion across the Y axis is limited.
|
||||
</member>
|
||||
<member name="linear_limit_y/lower_distance" type="float" setter="set_param_y" getter="get_param_y" default="0.0">
|
||||
The minimum difference between the pivot points' Y axis.
|
||||
</member>
|
||||
<member name="linear_limit_y/restitution" type="float" setter="set_param_y" getter="get_param_y" default="0.5">
|
||||
The amount of restitution on the Y axis movement. The lower, the more momentum gets lost.
|
||||
</member>
|
||||
<member name="linear_limit_y/softness" type="float" setter="set_param_y" getter="get_param_y" default="0.7">
|
||||
A factor applied to the movement across the Y axis. The lower, the slower the movement.
|
||||
</member>
|
||||
<member name="linear_limit_y/upper_distance" type="float" setter="set_param_y" getter="get_param_y" default="0.0">
|
||||
The maximum difference between the pivot points' Y axis.
|
||||
</member>
|
||||
<member name="linear_limit_z/damping" type="float" setter="set_param_z" getter="get_param_z" default="1.0">
|
||||
The amount of damping that happens at the Z motion.
|
||||
</member>
|
||||
<member name="linear_limit_z/enabled" type="bool" setter="set_flag_z" getter="get_flag_z" default="true">
|
||||
If [code]true[/code], the linear motion across the Z axis is limited.
|
||||
</member>
|
||||
<member name="linear_limit_z/lower_distance" type="float" setter="set_param_z" getter="get_param_z" default="0.0">
|
||||
The minimum difference between the pivot points' Z axis.
|
||||
</member>
|
||||
<member name="linear_limit_z/restitution" type="float" setter="set_param_z" getter="get_param_z" default="0.5">
|
||||
The amount of restitution on the Z axis movement. The lower, the more momentum gets lost.
|
||||
</member>
|
||||
<member name="linear_limit_z/softness" type="float" setter="set_param_z" getter="get_param_z" default="0.7">
|
||||
A factor applied to the movement across the Z axis. The lower, the slower the movement.
|
||||
</member>
|
||||
<member name="linear_limit_z/upper_distance" type="float" setter="set_param_z" getter="get_param_z" default="0.0">
|
||||
The maximum difference between the pivot points' Z axis.
|
||||
</member>
|
||||
<member name="linear_motor_x/enabled" type="bool" setter="set_flag_x" getter="get_flag_x" default="false">
|
||||
If [code]true[/code], then there is a linear motor on the X axis. It will attempt to reach the target velocity while staying within the force limits.
|
||||
</member>
|
||||
<member name="linear_motor_x/force_limit" type="float" setter="set_param_x" getter="get_param_x" default="0.0">
|
||||
The maximum force the linear motor can apply on the X axis while trying to reach the target velocity.
|
||||
</member>
|
||||
<member name="linear_motor_x/target_velocity" type="float" setter="set_param_x" getter="get_param_x" default="0.0">
|
||||
The speed that the linear motor will attempt to reach on the X axis.
|
||||
</member>
|
||||
<member name="linear_motor_y/enabled" type="bool" setter="set_flag_y" getter="get_flag_y" default="false">
|
||||
If [code]true[/code], then there is a linear motor on the Y axis. It will attempt to reach the target velocity while staying within the force limits.
|
||||
</member>
|
||||
<member name="linear_motor_y/force_limit" type="float" setter="set_param_y" getter="get_param_y" default="0.0">
|
||||
The maximum force the linear motor can apply on the Y axis while trying to reach the target velocity.
|
||||
</member>
|
||||
<member name="linear_motor_y/target_velocity" type="float" setter="set_param_y" getter="get_param_y" default="0.0">
|
||||
The speed that the linear motor will attempt to reach on the Y axis.
|
||||
</member>
|
||||
<member name="linear_motor_z/enabled" type="bool" setter="set_flag_z" getter="get_flag_z" default="false">
|
||||
If [code]true[/code], then there is a linear motor on the Z axis. It will attempt to reach the target velocity while staying within the force limits.
|
||||
</member>
|
||||
<member name="linear_motor_z/force_limit" type="float" setter="set_param_z" getter="get_param_z" default="0.0">
|
||||
The maximum force the linear motor can apply on the Z axis while trying to reach the target velocity.
|
||||
</member>
|
||||
<member name="linear_motor_z/target_velocity" type="float" setter="set_param_z" getter="get_param_z" default="0.0">
|
||||
The speed that the linear motor will attempt to reach on the Z axis.
|
||||
</member>
|
||||
<member name="linear_spring_x/damping" type="float" setter="set_param_x" getter="get_param_x" default="0.01">
|
||||
</member>
|
||||
<member name="linear_spring_x/enabled" type="bool" setter="set_flag_x" getter="get_flag_x" default="false">
|
||||
</member>
|
||||
<member name="linear_spring_x/equilibrium_point" type="float" setter="set_param_x" getter="get_param_x" default="0.0">
|
||||
</member>
|
||||
<member name="linear_spring_x/stiffness" type="float" setter="set_param_x" getter="get_param_x" default="0.01">
|
||||
</member>
|
||||
<member name="linear_spring_y/damping" type="float" setter="set_param_y" getter="get_param_y" default="0.01">
|
||||
</member>
|
||||
<member name="linear_spring_y/enabled" type="bool" setter="set_flag_y" getter="get_flag_y" default="false">
|
||||
</member>
|
||||
<member name="linear_spring_y/equilibrium_point" type="float" setter="set_param_y" getter="get_param_y" default="0.0">
|
||||
</member>
|
||||
<member name="linear_spring_y/stiffness" type="float" setter="set_param_y" getter="get_param_y" default="0.01">
|
||||
</member>
|
||||
<member name="linear_spring_z/damping" type="float" setter="set_param_z" getter="get_param_z" default="0.01">
|
||||
</member>
|
||||
<member name="linear_spring_z/enabled" type="bool" setter="set_flag_z" getter="get_flag_z" default="false">
|
||||
</member>
|
||||
<member name="linear_spring_z/equilibrium_point" type="float" setter="set_param_z" getter="get_param_z" default="0.0">
|
||||
</member>
|
||||
<member name="linear_spring_z/stiffness" type="float" setter="set_param_z" getter="get_param_z" default="0.01">
|
||||
</member>
|
||||
</members>
|
||||
<constants>
|
||||
<constant name="PARAM_LINEAR_LOWER_LIMIT" value="0" enum="Param">
|
||||
The minimum difference between the pivot points' axes.
|
||||
</constant>
|
||||
<constant name="PARAM_LINEAR_UPPER_LIMIT" value="1" enum="Param">
|
||||
The maximum difference between the pivot points' axes.
|
||||
</constant>
|
||||
<constant name="PARAM_LINEAR_LIMIT_SOFTNESS" value="2" enum="Param">
|
||||
A factor applied to the movement across the axes. The lower, the slower the movement.
|
||||
</constant>
|
||||
<constant name="PARAM_LINEAR_RESTITUTION" value="3" enum="Param">
|
||||
The amount of restitution on the axes' movement. The lower, the more momentum gets lost.
|
||||
</constant>
|
||||
<constant name="PARAM_LINEAR_DAMPING" value="4" enum="Param">
|
||||
The amount of damping that happens at the linear motion across the axes.
|
||||
</constant>
|
||||
<constant name="PARAM_LINEAR_MOTOR_TARGET_VELOCITY" value="5" enum="Param">
|
||||
The velocity the linear motor will try to reach.
|
||||
</constant>
|
||||
<constant name="PARAM_LINEAR_MOTOR_FORCE_LIMIT" value="6" enum="Param">
|
||||
The maximum force the linear motor will apply while trying to reach the velocity target.
|
||||
</constant>
|
||||
<constant name="PARAM_LINEAR_SPRING_STIFFNESS" value="7" enum="Param">
|
||||
</constant>
|
||||
<constant name="PARAM_LINEAR_SPRING_DAMPING" value="8" enum="Param">
|
||||
</constant>
|
||||
<constant name="PARAM_LINEAR_SPRING_EQUILIBRIUM_POINT" value="9" enum="Param">
|
||||
</constant>
|
||||
<constant name="PARAM_ANGULAR_LOWER_LIMIT" value="10" enum="Param">
|
||||
The minimum rotation in negative direction to break loose and rotate around the axes.
|
||||
</constant>
|
||||
<constant name="PARAM_ANGULAR_UPPER_LIMIT" value="11" enum="Param">
|
||||
The minimum rotation in positive direction to break loose and rotate around the axes.
|
||||
</constant>
|
||||
<constant name="PARAM_ANGULAR_LIMIT_SOFTNESS" value="12" enum="Param">
|
||||
The speed of all rotations across the axes.
|
||||
</constant>
|
||||
<constant name="PARAM_ANGULAR_DAMPING" value="13" enum="Param">
|
||||
The amount of rotational damping across the axes. The lower, the more dampening occurs.
|
||||
</constant>
|
||||
<constant name="PARAM_ANGULAR_RESTITUTION" value="14" enum="Param">
|
||||
The amount of rotational restitution across the axes. The lower, the more restitution occurs.
|
||||
</constant>
|
||||
<constant name="PARAM_ANGULAR_FORCE_LIMIT" value="15" enum="Param">
|
||||
The maximum amount of force that can occur, when rotating around the axes.
|
||||
</constant>
|
||||
<constant name="PARAM_ANGULAR_ERP" value="16" enum="Param">
|
||||
When rotating across the axes, this error tolerance factor defines how much the correction gets slowed down. The lower, the slower.
|
||||
</constant>
|
||||
<constant name="PARAM_ANGULAR_MOTOR_TARGET_VELOCITY" value="17" enum="Param">
|
||||
Target speed for the motor at the axes.
|
||||
</constant>
|
||||
<constant name="PARAM_ANGULAR_MOTOR_FORCE_LIMIT" value="18" enum="Param">
|
||||
Maximum acceleration for the motor at the axes.
|
||||
</constant>
|
||||
<constant name="PARAM_ANGULAR_SPRING_STIFFNESS" value="19" enum="Param">
|
||||
</constant>
|
||||
<constant name="PARAM_ANGULAR_SPRING_DAMPING" value="20" enum="Param">
|
||||
</constant>
|
||||
<constant name="PARAM_ANGULAR_SPRING_EQUILIBRIUM_POINT" value="21" enum="Param">
|
||||
</constant>
|
||||
<constant name="PARAM_MAX" value="22" enum="Param">
|
||||
Represents the size of the [enum Param] enum.
|
||||
</constant>
|
||||
<constant name="FLAG_ENABLE_LINEAR_LIMIT" value="0" enum="Flag">
|
||||
If enabled, linear motion is possible within the given limits.
|
||||
</constant>
|
||||
<constant name="FLAG_ENABLE_ANGULAR_LIMIT" value="1" enum="Flag">
|
||||
If enabled, rotational motion is possible within the given limits.
|
||||
</constant>
|
||||
<constant name="FLAG_ENABLE_LINEAR_SPRING" value="3" enum="Flag">
|
||||
</constant>
|
||||
<constant name="FLAG_ENABLE_ANGULAR_SPRING" value="2" enum="Flag">
|
||||
</constant>
|
||||
<constant name="FLAG_ENABLE_MOTOR" value="4" enum="Flag">
|
||||
If enabled, there is a rotational motor across these axes.
|
||||
</constant>
|
||||
<constant name="FLAG_ENABLE_LINEAR_MOTOR" value="5" enum="Flag">
|
||||
If enabled, there is a linear motor across these axes.
|
||||
</constant>
|
||||
<constant name="FLAG_MAX" value="6" enum="Flag">
|
||||
Represents the size of the [enum Flag] enum.
|
||||
</constant>
|
||||
</constants>
|
||||
</class>
|
@ -1,90 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<class name="GeometryInstance" inherits="VisualInstance" version="4.2">
|
||||
<brief_description>
|
||||
Base node for geometry-based visual instances.
|
||||
</brief_description>
|
||||
<description>
|
||||
Base node for geometry-based visual instances. Shares some common functionality like visibility and custom materials.
|
||||
</description>
|
||||
<tutorials>
|
||||
</tutorials>
|
||||
<methods>
|
||||
<method name="get_flag" qualifiers="const">
|
||||
<return type="bool" />
|
||||
<argument index="0" name="flag" type="int" enum="GeometryInstance.Flags" />
|
||||
<description>
|
||||
Returns the [enum GeometryInstance.Flags] that have been set for this object.
|
||||
</description>
|
||||
</method>
|
||||
<method name="set_custom_aabb">
|
||||
<return type="void" />
|
||||
<argument index="0" name="aabb" type="AABB" />
|
||||
<description>
|
||||
Overrides the bounding box of this node with a custom one. To remove it, set an [AABB] with all fields set to zero.
|
||||
</description>
|
||||
</method>
|
||||
<method name="set_flag">
|
||||
<return type="void" />
|
||||
<argument index="0" name="flag" type="int" enum="GeometryInstance.Flags" />
|
||||
<argument index="1" name="value" type="bool" />
|
||||
<description>
|
||||
Sets the [enum GeometryInstance.Flags] specified. See [enum GeometryInstance.Flags] for options.
|
||||
</description>
|
||||
</method>
|
||||
</methods>
|
||||
<members>
|
||||
<member name="cast_shadow" type="int" setter="set_cast_shadows_setting" getter="get_cast_shadows_setting" enum="GeometryInstance.ShadowCastingSetting" default="1">
|
||||
The selected shadow casting flag. See [enum ShadowCastingSetting] for possible values.
|
||||
</member>
|
||||
<member name="extra_cull_margin" type="float" setter="set_extra_cull_margin" getter="get_extra_cull_margin" default="0.0">
|
||||
The extra distance added to the GeometryInstance's bounding box ([AABB]) to increase its cull box.
|
||||
</member>
|
||||
<member name="lod_max_distance" type="float" setter="set_lod_max_distance" getter="get_lod_max_distance" default="0.0">
|
||||
The GeometryInstance's max LOD distance.
|
||||
[b]Note:[/b] This property currently has no effect.
|
||||
</member>
|
||||
<member name="lod_max_hysteresis" type="float" setter="set_lod_max_hysteresis" getter="get_lod_max_hysteresis" default="0.0">
|
||||
The GeometryInstance's max LOD margin.
|
||||
[b]Note:[/b] This property currently has no effect.
|
||||
</member>
|
||||
<member name="lod_min_distance" type="float" setter="set_lod_min_distance" getter="get_lod_min_distance" default="0.0">
|
||||
The GeometryInstance's min LOD distance.
|
||||
[b]Note:[/b] This property currently has no effect.
|
||||
</member>
|
||||
<member name="lod_min_hysteresis" type="float" setter="set_lod_min_hysteresis" getter="get_lod_min_hysteresis" default="0.0">
|
||||
The GeometryInstance's min LOD margin.
|
||||
[b]Note:[/b] This property currently has no effect.
|
||||
</member>
|
||||
<member name="material_overlay" type="Material" setter="set_material_overlay" getter="get_material_overlay">
|
||||
The material overlay for the whole geometry.
|
||||
If a material is assigned to this property, it will be rendered on top of any other active material for all the surfaces.
|
||||
</member>
|
||||
<member name="material_override" type="Material" setter="set_material_override" getter="get_material_override">
|
||||
The material override for the whole geometry.
|
||||
If a material is assigned to this property, it will be used instead of any material set in any material slot of the mesh.
|
||||
</member>
|
||||
</members>
|
||||
<constants>
|
||||
<constant name="SHADOW_CASTING_SETTING_OFF" value="0" enum="ShadowCastingSetting">
|
||||
Will not cast any shadows.
|
||||
</constant>
|
||||
<constant name="SHADOW_CASTING_SETTING_ON" value="1" enum="ShadowCastingSetting">
|
||||
Will cast shadows from all visible faces in the GeometryInstance.
|
||||
Will take culling into account, so faces not being rendered will not be taken into account when shadow casting.
|
||||
</constant>
|
||||
<constant name="SHADOW_CASTING_SETTING_DOUBLE_SIDED" value="2" enum="ShadowCastingSetting">
|
||||
Will cast shadows from all visible faces in the GeometryInstance.
|
||||
Will not take culling into account, so all faces will be taken into account when shadow casting.
|
||||
</constant>
|
||||
<constant name="SHADOW_CASTING_SETTING_SHADOWS_ONLY" value="3" enum="ShadowCastingSetting">
|
||||
Will only show the shadows casted from this object.
|
||||
In other words, the actual mesh will not be visible, only the shadows casted from the mesh will be.
|
||||
</constant>
|
||||
<constant name="FLAG_DRAW_NEXT_FRAME_IF_VISIBLE" value="0" enum="Flags">
|
||||
Unused in this class, exposed for consistency with [enum RenderingServer.InstanceFlags].
|
||||
</constant>
|
||||
<constant name="FLAG_MAX" value="1" enum="Flags">
|
||||
Represents the size of the [enum Flags] enum.
|
||||
</constant>
|
||||
</constants>
|
||||
</class>
|
@ -1,26 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<class name="HeightMapShape" inherits="Shape" version="4.2">
|
||||
<brief_description>
|
||||
Height map shape for 3D physics.
|
||||
</brief_description>
|
||||
<description>
|
||||
Height map shape resource, which can be added to a [PhysicsBody] or [Area].
|
||||
</description>
|
||||
<tutorials>
|
||||
</tutorials>
|
||||
<methods>
|
||||
</methods>
|
||||
<members>
|
||||
<member name="map_data" type="PoolRealArray" setter="set_map_data" getter="get_map_data" default="PoolRealArray( 0, 0, 0, 0 )">
|
||||
Height map data, pool array must be of [member map_width] * [member map_depth] size.
|
||||
</member>
|
||||
<member name="map_depth" type="int" setter="set_map_depth" getter="get_map_depth" default="2">
|
||||
Number of vertices in the depth of the height map. Changing this will resize the [member map_data].
|
||||
</member>
|
||||
<member name="map_width" type="int" setter="set_map_width" getter="get_map_width" default="2">
|
||||
Number of vertices in the width of the height map. Changing this will resize the [member map_data].
|
||||
</member>
|
||||
</members>
|
||||
<constants>
|
||||
</constants>
|
||||
</class>
|
@ -1,111 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<class name="HingeJoint" inherits="Joint" version="4.2">
|
||||
<brief_description>
|
||||
A hinge between two 3D PhysicsBodies.
|
||||
</brief_description>
|
||||
<description>
|
||||
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].
|
||||
</description>
|
||||
<tutorials>
|
||||
</tutorials>
|
||||
<methods>
|
||||
<method name="get_flag" qualifiers="const">
|
||||
<return type="bool" />
|
||||
<argument index="0" name="flag" type="int" enum="HingeJoint.Flag" />
|
||||
<description>
|
||||
Returns the value of the specified flag.
|
||||
</description>
|
||||
</method>
|
||||
<method name="get_param" qualifiers="const">
|
||||
<return type="float" />
|
||||
<argument index="0" name="param" type="int" enum="HingeJoint.Param" />
|
||||
<description>
|
||||
Returns the value of the specified parameter.
|
||||
</description>
|
||||
</method>
|
||||
<method name="set_flag">
|
||||
<return type="void" />
|
||||
<argument index="0" name="flag" type="int" enum="HingeJoint.Flag" />
|
||||
<argument index="1" name="enabled" type="bool" />
|
||||
<description>
|
||||
If [code]true[/code], enables the specified flag.
|
||||
</description>
|
||||
</method>
|
||||
<method name="set_param">
|
||||
<return type="void" />
|
||||
<argument index="0" name="param" type="int" enum="HingeJoint.Param" />
|
||||
<argument index="1" name="value" type="float" />
|
||||
<description>
|
||||
Sets the value of the specified parameter.
|
||||
</description>
|
||||
</method>
|
||||
</methods>
|
||||
<members>
|
||||
<member name="angular_limit/bias" type="float" setter="set_param" getter="get_param" default="0.3">
|
||||
The speed with which the rotation across the axis perpendicular to the hinge gets corrected.
|
||||
</member>
|
||||
<member name="angular_limit/enable" type="bool" setter="set_flag" getter="get_flag" default="false">
|
||||
If [code]true[/code], the hinges maximum and minimum rotation, defined by [member angular_limit/lower] and [member angular_limit/upper] has effects.
|
||||
</member>
|
||||
<member name="angular_limit/lower" type="float" setter="_set_lower_limit" getter="_get_lower_limit" default="-90.0">
|
||||
The minimum rotation. Only active if [member angular_limit/enable] is [code]true[/code].
|
||||
</member>
|
||||
<member name="angular_limit/relaxation" type="float" setter="set_param" getter="get_param" default="1.0">
|
||||
The lower this value, the more the rotation gets slowed down.
|
||||
</member>
|
||||
<member name="angular_limit/softness" type="float" setter="set_param" getter="get_param" default="0.9">
|
||||
</member>
|
||||
<member name="angular_limit/upper" type="float" setter="_set_upper_limit" getter="_get_upper_limit" default="90.0">
|
||||
The maximum rotation. Only active if [member angular_limit/enable] is [code]true[/code].
|
||||
</member>
|
||||
<member name="motor/enable" type="bool" setter="set_flag" getter="get_flag" default="false">
|
||||
When activated, a motor turns the hinge.
|
||||
</member>
|
||||
<member name="motor/max_impulse" type="float" setter="set_param" getter="get_param" default="1.0">
|
||||
Maximum acceleration for the motor.
|
||||
</member>
|
||||
<member name="motor/target_velocity" type="float" setter="set_param" getter="get_param" default="1.0">
|
||||
Target speed for the motor.
|
||||
</member>
|
||||
<member name="params/bias" type="float" setter="set_param" getter="get_param" default="0.3">
|
||||
The speed with which the two bodies get pulled together when they move in different directions.
|
||||
</member>
|
||||
</members>
|
||||
<constants>
|
||||
<constant name="PARAM_BIAS" value="0" enum="Param">
|
||||
The speed with which the two bodies get pulled together when they move in different directions.
|
||||
</constant>
|
||||
<constant name="PARAM_LIMIT_UPPER" value="1" enum="Param">
|
||||
The maximum rotation. Only active if [member angular_limit/enable] is [code]true[/code].
|
||||
</constant>
|
||||
<constant name="PARAM_LIMIT_LOWER" value="2" enum="Param">
|
||||
The minimum rotation. Only active if [member angular_limit/enable] is [code]true[/code].
|
||||
</constant>
|
||||
<constant name="PARAM_LIMIT_BIAS" value="3" enum="Param">
|
||||
The speed with which the rotation across the axis perpendicular to the hinge gets corrected.
|
||||
</constant>
|
||||
<constant name="PARAM_LIMIT_SOFTNESS" value="4" enum="Param">
|
||||
</constant>
|
||||
<constant name="PARAM_LIMIT_RELAXATION" value="5" enum="Param">
|
||||
The lower this value, the more the rotation gets slowed down.
|
||||
</constant>
|
||||
<constant name="PARAM_MOTOR_TARGET_VELOCITY" value="6" enum="Param">
|
||||
Target speed for the motor.
|
||||
</constant>
|
||||
<constant name="PARAM_MOTOR_MAX_IMPULSE" value="7" enum="Param">
|
||||
Maximum acceleration for the motor.
|
||||
</constant>
|
||||
<constant name="PARAM_MAX" value="8" enum="Param">
|
||||
Represents the size of the [enum Param] enum.
|
||||
</constant>
|
||||
<constant name="FLAG_USE_LIMIT" value="0" enum="Flag">
|
||||
If [code]true[/code], the hinges maximum and minimum rotation, defined by [member angular_limit/lower] and [member angular_limit/upper] has effects.
|
||||
</constant>
|
||||
<constant name="FLAG_ENABLE_MOTOR" value="1" enum="Flag">
|
||||
When activated, a motor turns the hinge.
|
||||
</constant>
|
||||
<constant name="FLAG_MAX" value="2" enum="Flag">
|
||||
Represents the size of the [enum Flag] enum.
|
||||
</constant>
|
||||
</constants>
|
||||
</class>
|
@ -1,92 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<class name="ImmediateGeometry" inherits="GeometryInstance" version="4.2">
|
||||
<brief_description>
|
||||
Draws simple geometry from code.
|
||||
</brief_description>
|
||||
<description>
|
||||
Draws simple geometry from code. Uses a drawing mode similar to OpenGL 1.x.
|
||||
See also [ArrayMesh], [MeshDataTool] and [SurfaceTool] for procedural geometry generation.
|
||||
[b]Note:[/b] 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.
|
||||
[b]Note:[/b] Godot uses clockwise [url=https://learnopengl.com/Advanced-OpenGL/Face-culling]winding order[/url] for front faces of triangle primitive modes.
|
||||
[b]Note:[/b] In case of missing points when handling large amounts of mesh data, try increasing its buffer size limit under [member ProjectSettings.rendering/limits/buffers/immediate_buffer_size_kb].
|
||||
</description>
|
||||
<tutorials>
|
||||
</tutorials>
|
||||
<methods>
|
||||
<method name="add_sphere">
|
||||
<return type="void" />
|
||||
<argument index="0" name="lats" type="int" />
|
||||
<argument index="1" name="lons" type="int" />
|
||||
<argument index="2" name="radius" type="float" />
|
||||
<argument index="3" name="add_uv" type="bool" default="true" />
|
||||
<description>
|
||||
Simple helper to draw an UV sphere with given latitude, longitude and radius.
|
||||
</description>
|
||||
</method>
|
||||
<method name="add_vertex">
|
||||
<return type="void" />
|
||||
<argument index="0" name="position" type="Vector3" />
|
||||
<description>
|
||||
Adds a vertex in local coordinate space with the currently set color/uv/etc.
|
||||
</description>
|
||||
</method>
|
||||
<method name="begin">
|
||||
<return type="void" />
|
||||
<argument index="0" name="primitive" type="int" enum="Mesh.PrimitiveType" />
|
||||
<argument index="1" name="texture" type="Texture" default="null" />
|
||||
<description>
|
||||
Begin drawing (and optionally pass a texture override). When done call [method end]. For more information on how this works, search for [code]glBegin()[/code] and [code]glEnd()[/code] references.
|
||||
For the type of primitive, see the [enum Mesh.PrimitiveType] enum.
|
||||
</description>
|
||||
</method>
|
||||
<method name="clear">
|
||||
<return type="void" />
|
||||
<description>
|
||||
Clears everything that was drawn using begin/end.
|
||||
</description>
|
||||
</method>
|
||||
<method name="end">
|
||||
<return type="void" />
|
||||
<description>
|
||||
Ends a drawing context and displays the results.
|
||||
</description>
|
||||
</method>
|
||||
<method name="set_color">
|
||||
<return type="void" />
|
||||
<argument index="0" name="color" type="Color" />
|
||||
<description>
|
||||
The current drawing color.
|
||||
</description>
|
||||
</method>
|
||||
<method name="set_normal">
|
||||
<return type="void" />
|
||||
<argument index="0" name="normal" type="Vector3" />
|
||||
<description>
|
||||
The next vertex's normal.
|
||||
</description>
|
||||
</method>
|
||||
<method name="set_tangent">
|
||||
<return type="void" />
|
||||
<argument index="0" name="tangent" type="Plane" />
|
||||
<description>
|
||||
The next vertex's tangent (and binormal facing).
|
||||
</description>
|
||||
</method>
|
||||
<method name="set_uv">
|
||||
<return type="void" />
|
||||
<argument index="0" name="uv" type="Vector2" />
|
||||
<description>
|
||||
The next vertex's UV.
|
||||
</description>
|
||||
</method>
|
||||
<method name="set_uv2">
|
||||
<return type="void" />
|
||||
<argument index="0" name="uv" type="Vector2" />
|
||||
<description>
|
||||
The next vertex's second layer UV.
|
||||
</description>
|
||||
</method>
|
||||
</methods>
|
||||
<constants>
|
||||
</constants>
|
||||
</class>
|
@ -1,43 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<class name="InterpolatedCamera" inherits="Camera" version="4.2">
|
||||
<brief_description>
|
||||
[i]Deprecated.[/i] Camera which moves toward another node.
|
||||
</brief_description>
|
||||
<description>
|
||||
[i]Deprecated (will be removed in Godot 4.0).[/i] InterpolatedCamera is a [Camera] which smoothly moves to match a target node's position and rotation.
|
||||
If it is not [member enabled] or does not have a valid target set, InterpolatedCamera acts like a normal Camera.
|
||||
</description>
|
||||
<tutorials>
|
||||
</tutorials>
|
||||
<methods>
|
||||
<method name="set_target">
|
||||
<return type="void" />
|
||||
<argument index="0" name="target" type="Object" />
|
||||
<description>
|
||||
Sets the node to move toward and orient with.
|
||||
</description>
|
||||
</method>
|
||||
</methods>
|
||||
<members>
|
||||
<member name="enabled" type="bool" setter="set_interpolation_enabled" getter="is_interpolation_enabled" default="false">
|
||||
If [code]true[/code], and a target is set, the camera will move automatically.
|
||||
</member>
|
||||
<member name="process_mode" type="int" setter="set_process_mode" getter="get_process_mode" enum="InterpolatedCamera.InterpolatedCameraProcessMode" default="1">
|
||||
The camera's process callback. See [enum InterpolatedCameraProcessMode].
|
||||
</member>
|
||||
<member name="speed" type="float" setter="set_speed" getter="get_speed" default="1.0">
|
||||
How quickly the camera moves toward its target. Higher values will result in tighter camera motion.
|
||||
</member>
|
||||
<member name="target" type="NodePath" setter="set_target_path" getter="get_target_path" default="NodePath("")">
|
||||
The target's [NodePath].
|
||||
</member>
|
||||
</members>
|
||||
<constants>
|
||||
<constant name="INTERPOLATED_CAMERA_PROCESS_PHYSICS" value="0" enum="InterpolatedCameraProcessMode">
|
||||
The camera updates with the [code]_physics_process[/code] callback.
|
||||
</constant>
|
||||
<constant name="INTERPOLATED_CAMERA_PROCESS_IDLE" value="1" enum="InterpolatedCameraProcessMode">
|
||||
The camera updates with the [code]_process[/code] callback.
|
||||
</constant>
|
||||
</constants>
|
||||
</class>
|
@ -1,16 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<class name="JNISingleton" inherits="Object" version="4.2">
|
||||
<brief_description>
|
||||
Singleton that connects the engine with Android plugins to interface with native Android code.
|
||||
</brief_description>
|
||||
<description>
|
||||
The JNISingleton is implemented only in the Android export. It's used to call methods and connect signals from an Android plugin written in Java or Kotlin. Methods and signals can be called and connected to the JNISingleton as if it is a Node. See [url=https://en.wikipedia.org/wiki/Java_Native_Interface]Java Native Interface - Wikipedia[/url] for more information.
|
||||
</description>
|
||||
<tutorials>
|
||||
<link title="Creating Android plugins">$DOCS_URL/tutorials/platform/android/android_plugin.md</link>
|
||||
</tutorials>
|
||||
<methods>
|
||||
</methods>
|
||||
<constants>
|
||||
</constants>
|
||||
</class>
|
@ -1,13 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<class name="JavaClass" inherits="Reference" version="4.2">
|
||||
<brief_description>
|
||||
</brief_description>
|
||||
<description>
|
||||
</description>
|
||||
<tutorials>
|
||||
</tutorials>
|
||||
<methods>
|
||||
</methods>
|
||||
<constants>
|
||||
</constants>
|
||||
</class>
|
@ -1,19 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<class name="JavaClassWrapper" inherits="Object" version="4.2">
|
||||
<brief_description>
|
||||
</brief_description>
|
||||
<description>
|
||||
</description>
|
||||
<tutorials>
|
||||
</tutorials>
|
||||
<methods>
|
||||
<method name="wrap">
|
||||
<return type="JavaClass" />
|
||||
<argument index="0" name="name" type="String" />
|
||||
<description>
|
||||
</description>
|
||||
</method>
|
||||
</methods>
|
||||
<constants>
|
||||
</constants>
|
||||
</class>
|
@ -1,88 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<class name="JavaScript" inherits="Object" version="4.2">
|
||||
<brief_description>
|
||||
Singleton that connects the engine with the browser's JavaScript context in HTML5 export.
|
||||
</brief_description>
|
||||
<description>
|
||||
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.
|
||||
[b]Note:[/b] 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 [url=$DOCS_URL/development/compiling/compiling_for_web.html]Compiling for the Web[/url] in the documentation for more information.
|
||||
</description>
|
||||
<tutorials>
|
||||
<link>$DOCS_URL/tutorials/export/exporting_for_web.html#calling-javascript-from-script</link>
|
||||
</tutorials>
|
||||
<methods>
|
||||
<method name="create_callback">
|
||||
<return type="JavaScriptObject" />
|
||||
<argument index="0" name="object" type="Object" />
|
||||
<argument index="1" name="method" type="StringName" />
|
||||
<description>
|
||||
</description>
|
||||
</method>
|
||||
<method name="create_object" qualifiers="vararg">
|
||||
<return type="Variant" />
|
||||
<argument index="0" name="object" type="String" />
|
||||
<description>
|
||||
Creates a new JavaScript object using the [code]new[/code] constructor. The [code]object[/code] must a valid property of the JavaScript [code]window[/code]. See [JavaScriptObject] for usage.
|
||||
</description>
|
||||
</method>
|
||||
<method name="download_buffer">
|
||||
<return type="void" />
|
||||
<argument index="0" name="buffer" type="PoolByteArray" />
|
||||
<argument index="1" name="name" type="String" />
|
||||
<argument index="2" name="mime" type="String" default=""application/octet-stream"" />
|
||||
<description>
|
||||
Prompts the user to download a file containing the specified [code]buffer[/code]. The file will have the given [code]name[/code] and [code]mime[/code] type.
|
||||
[b]Note:[/b] The browser may override the [url=https://en.wikipedia.org/wiki/Media_type]MIME type[/url] provided based on the file [code]name[/code]'s extension.
|
||||
[b]Note:[/b] Browsers might block the download if [method download_buffer] is not being called from a user interaction (e.g. button click).
|
||||
[b]Note:[/b] Browsers might ask the user for permission or block the download if multiple download requests are made in a quick succession.
|
||||
</description>
|
||||
</method>
|
||||
<method name="eval">
|
||||
<return type="Variant" />
|
||||
<argument index="0" name="code" type="String" />
|
||||
<argument index="1" name="use_global_execution_context" type="bool" default="false" />
|
||||
<description>
|
||||
Execute the string [code]code[/code] as JavaScript code within the browser window. This is a call to the actual global JavaScript function [code]eval()[/code].
|
||||
If [code]use_global_execution_context[/code] is [code]true[/code], the code will be evaluated in the global execution context. Otherwise, it is evaluated in the execution context of a function within the engine's runtime environment.
|
||||
</description>
|
||||
</method>
|
||||
<method name="force_fs_sync">
|
||||
<return type="void" />
|
||||
<description>
|
||||
Force synchronization of the persistent file system (when enabled).
|
||||
[b]Note:[/b] This is only useful for modules or extensions that can't use [File] to write files.
|
||||
</description>
|
||||
</method>
|
||||
<method name="get_interface">
|
||||
<return type="JavaScriptObject" />
|
||||
<argument index="0" name="interface" type="String" />
|
||||
<description>
|
||||
Returns an interface to a JavaScript object that can be used by scripts. The [code]interface[/code] must be a valid property of the JavaScript [code]window[/code]. The callback must accept a single [Array] argument, which will contain the JavaScript [code]arguments[/code]. See [JavaScriptObject] for usage.
|
||||
</description>
|
||||
</method>
|
||||
<method name="pwa_needs_update" qualifiers="const">
|
||||
<return type="bool" />
|
||||
<description>
|
||||
Returns [code]true[/code] if a new version of the progressive web app is waiting to be activated.
|
||||
[b]Note:[/b] Only relevant when exported as a Progressive Web App.
|
||||
</description>
|
||||
</method>
|
||||
<method name="pwa_update">
|
||||
<return type="int" enum="Error" />
|
||||
<description>
|
||||
Performs the live update of the progressive web app. Forcing the new version to be installed and the page to be reloaded.
|
||||
[b]Note:[/b] Your application will be [b]reloaded in all browser tabs[/b].
|
||||
[b]Note:[/b] Only relevant when exported as a Progressive Web App and [method pwa_needs_update] returns [code]true[/code].
|
||||
</description>
|
||||
</method>
|
||||
</methods>
|
||||
<signals>
|
||||
<signal name="pwa_update_available">
|
||||
<description>
|
||||
Emitted when an update for this progressive web app has been detected but is waiting to be activated because a previous version is active. See [method pwa_update] to force the update to take place immediately.
|
||||
</description>
|
||||
</signal>
|
||||
</signals>
|
||||
<constants>
|
||||
</constants>
|
||||
</class>
|
@ -1,42 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<class name="JavaScriptObject" inherits="Reference" version="4.2">
|
||||
<brief_description>
|
||||
A wrapper class for native JavaScript objects.
|
||||
</brief_description>
|
||||
<description>
|
||||
JavaScriptObject is used to interact with JavaScript objects retrieved or created via [method JavaScript.get_interface], [method JavaScript.create_object], or [method JavaScript.create_callback].
|
||||
Example:
|
||||
[codeblock]
|
||||
extends Node
|
||||
|
||||
var _my_js_callback = JavaScript.create_callback(self, "myCallback") # This reference must be kept
|
||||
var console = JavaScript.get_interface("console")
|
||||
|
||||
func _init():
|
||||
var buf = JavaScript.create_object("ArrayBuffer", 10) # new ArrayBuffer(10)
|
||||
print(buf) # prints [JavaScriptObject:OBJECT_ID]
|
||||
var uint8arr = JavaScript.create_object("Uint8Array", buf) # new Uint8Array(buf)
|
||||
uint8arr[1] = 255
|
||||
prints(uint8arr[1], uint8arr.byteLength) # prints 255 10
|
||||
console.log(uint8arr) # prints in browser console "Uint8Array(10) [ 0, 255, 0, 0, 0, 0, 0, 0, 0, 0 ]"
|
||||
|
||||
# Equivalent of JavaScript: Array.from(uint8arr).forEach(myCallback)
|
||||
JavaScript.get_interface("Array").from(uint8arr).forEach(_my_js_callback)
|
||||
|
||||
func myCallback(args):
|
||||
# Will be called with the parameters passed to the "forEach" callback
|
||||
# [0, 0, [JavaScriptObject:1173]]
|
||||
# [255, 1, [JavaScriptObject:1173]]
|
||||
# ...
|
||||
# [0, 9, [JavaScriptObject:1180]]
|
||||
print(args)
|
||||
[/codeblock]
|
||||
[b]Note:[/b] Only available in the HTML5 platform.
|
||||
</description>
|
||||
<tutorials>
|
||||
</tutorials>
|
||||
<methods>
|
||||
</methods>
|
||||
<constants>
|
||||
</constants>
|
||||
</class>
|
@ -1,30 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<class name="Joint" inherits="Spatial" version="4.2">
|
||||
<brief_description>
|
||||
Base class for all 3D joints.
|
||||
</brief_description>
|
||||
<description>
|
||||
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.
|
||||
</description>
|
||||
<tutorials>
|
||||
<link title="3D Truck Town Demo">https://godotengine.org/asset-library/asset/524</link>
|
||||
</tutorials>
|
||||
<methods>
|
||||
</methods>
|
||||
<members>
|
||||
<member name="collision/exclude_nodes" type="bool" setter="set_exclude_nodes_from_collision" getter="get_exclude_nodes_from_collision" default="true">
|
||||
If [code]true[/code], the two bodies of the nodes are not able to collide with each other.
|
||||
</member>
|
||||
<member name="nodes/node_a" type="NodePath" setter="set_node_a" getter="get_node_a" default="NodePath("")">
|
||||
The node attached to the first side (A) of the joint.
|
||||
</member>
|
||||
<member name="nodes/node_b" type="NodePath" setter="set_node_b" getter="get_node_b" default="NodePath("")">
|
||||
The node attached to the second side (B) of the joint.
|
||||
</member>
|
||||
<member name="solver/priority" type="int" setter="set_solver_priority" getter="get_solver_priority" default="1">
|
||||
The priority used to define which solver is executed first for multiple joints. The lower the value, the higher the priority.
|
||||
</member>
|
||||
</members>
|
||||
<constants>
|
||||
</constants>
|
||||
</class>
|
@ -1,191 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<class name="KinematicBody" inherits="PhysicsBody" version="4.2">
|
||||
<brief_description>
|
||||
Kinematic body 3D node.
|
||||
</brief_description>
|
||||
<description>
|
||||
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:
|
||||
[b]Simulated motion:[/b] When these bodies are moved manually, either from code or from an [AnimationPlayer] (with [member AnimationPlayer.playback_process_mode] 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).
|
||||
[b]Kinematic characters:[/b] KinematicBody also has an API for moving objects (the [method move_and_collide] and [method move_and_slide] methods) while performing collision tests. This makes them really useful to implement characters that collide against a world, but don't require advanced physics.
|
||||
[b]Warning:[/b] With a non-uniform scale this node will probably not function as expected. Please make sure to keep its scale uniform (i.e. the same on all axes), and change the size(s) of its collision shape(s) instead.
|
||||
</description>
|
||||
<tutorials>
|
||||
<link title="Kinematic character (2D)">$DOCS_URL/tutorials/physics/kinematic_character_2d.md</link>
|
||||
<link title="3D Kinematic Character Demo">https://godotengine.org/asset-library/asset/126</link>
|
||||
<link title="3D Platformer Demo">https://godotengine.org/asset-library/asset/125</link>
|
||||
<link title="3D Voxel Demo">https://godotengine.org/asset-library/asset/676</link>
|
||||
<link title="Third Person Shooter Demo">https://godotengine.org/asset-library/asset/678</link>
|
||||
</tutorials>
|
||||
<methods>
|
||||
<method name="get_axis_lock" qualifiers="const">
|
||||
<return type="bool" />
|
||||
<argument index="0" name="axis" type="int" enum="PhysicsServer.BodyAxis" />
|
||||
<description>
|
||||
Returns [code]true[/code] if the specified [code]axis[/code] is locked. See also [member move_lock_x], [member move_lock_y] and [member move_lock_z].
|
||||
</description>
|
||||
</method>
|
||||
<method name="get_floor_angle" qualifiers="const">
|
||||
<return type="float" />
|
||||
<argument index="0" name="up_direction" type="Vector3" default="Vector3( 0, 1, 0 )" />
|
||||
<description>
|
||||
Returns the floor's collision angle at the last collision point according to [code]up_direction[/code], which is [code]Vector3.UP[/code] by default. This value is always positive and only valid after calling [method move_and_slide] and when [method is_on_floor] returns [code]true[/code].
|
||||
</description>
|
||||
</method>
|
||||
<method name="get_floor_normal" qualifiers="const">
|
||||
<return type="Vector3" />
|
||||
<description>
|
||||
Returns the surface normal of the floor at the last collision point. Only valid after calling [method move_and_slide] or [method move_and_slide_with_snap] and when [method is_on_floor] returns [code]true[/code].
|
||||
</description>
|
||||
</method>
|
||||
<method name="get_floor_velocity" qualifiers="const">
|
||||
<return type="Vector3" />
|
||||
<description>
|
||||
Returns the linear velocity of the floor at the last collision point. Only valid after calling [method move_and_slide] or [method move_and_slide_with_snap] and when [method is_on_floor] returns [code]true[/code].
|
||||
</description>
|
||||
</method>
|
||||
<method name="get_last_slide_collision">
|
||||
<return type="KinematicCollision" />
|
||||
<description>
|
||||
Returns a [KinematicCollision], which contains information about the latest collision that occurred during the last call to [method move_and_slide].
|
||||
</description>
|
||||
</method>
|
||||
<method name="get_slide_collision">
|
||||
<return type="KinematicCollision" />
|
||||
<argument index="0" name="slide_idx" type="int" />
|
||||
<description>
|
||||
Returns a [KinematicCollision], which contains information about a collision that occurred during the last call to [method move_and_slide] or [method move_and_slide_with_snap]. Since the body can collide several times in a single call to [method move_and_slide], you must specify the index of the collision in the range 0 to ([method get_slide_count] - 1).
|
||||
</description>
|
||||
</method>
|
||||
<method name="get_slide_count" qualifiers="const">
|
||||
<return type="int" />
|
||||
<description>
|
||||
Returns the number of times the body collided and changed direction during the last call to [method move_and_slide] or [method move_and_slide_with_snap].
|
||||
</description>
|
||||
</method>
|
||||
<method name="is_on_ceiling" qualifiers="const">
|
||||
<return type="bool" />
|
||||
<description>
|
||||
Returns [code]true[/code] if the body collided with the ceiling on the last call of [method move_and_slide] or [method move_and_slide_with_snap]. Otherwise, returns [code]false[/code].
|
||||
</description>
|
||||
</method>
|
||||
<method name="is_on_floor" qualifiers="const">
|
||||
<return type="bool" />
|
||||
<description>
|
||||
Returns [code]true[/code] if the body collided with the floor on the last call of [method move_and_slide] or [method move_and_slide_with_snap]. Otherwise, returns [code]false[/code].
|
||||
</description>
|
||||
</method>
|
||||
<method name="is_on_wall" qualifiers="const">
|
||||
<return type="bool" />
|
||||
<description>
|
||||
Returns [code]true[/code] if the body collided with a wall on the last call of [method move_and_slide] or [method move_and_slide_with_snap]. Otherwise, returns [code]false[/code].
|
||||
</description>
|
||||
</method>
|
||||
<method name="move_and_collide">
|
||||
<return type="KinematicCollision" />
|
||||
<argument index="0" name="rel_vec" type="Vector3" />
|
||||
<argument index="1" name="infinite_inertia" type="bool" default="true" />
|
||||
<argument index="2" name="exclude_raycast_shapes" type="bool" default="true" />
|
||||
<argument index="3" name="test_only" type="bool" default="false" />
|
||||
<description>
|
||||
Moves the body along the vector [code]rel_vec[/code]. The body will stop if it collides. Returns a [KinematicCollision], which contains information about the collision when stopped, or when touching another body along the motion.
|
||||
If [code]test_only[/code] is [code]true[/code], the body does not move but the would-be collision information is given.
|
||||
</description>
|
||||
</method>
|
||||
<method name="move_and_slide">
|
||||
<return type="Vector3" />
|
||||
<argument index="0" name="linear_velocity" type="Vector3" />
|
||||
<argument index="1" name="up_direction" type="Vector3" default="Vector3( 0, 0, 0 )" />
|
||||
<argument index="2" name="stop_on_slope" type="bool" default="false" />
|
||||
<argument index="3" name="max_slides" type="int" default="4" />
|
||||
<argument index="4" name="floor_max_angle" type="float" default="0.785398" />
|
||||
<argument index="5" name="infinite_inertia" type="bool" default="true" />
|
||||
<description>
|
||||
Moves the body along a vector. If the body collides with another, it will slide along the other body rather than stop immediately. If the other body is a [KinematicBody] or [RigidBody], it will also be affected by the motion of the other body. You can use this to make moving and rotating platforms, or to make nodes push other nodes.
|
||||
This method should be used in [method Node._physics_process] (or in a method called by [method Node._physics_process]), as it uses the physics step's [code]delta[/code] value automatically in calculations. Otherwise, the simulation will run at an incorrect speed.
|
||||
[code]linear_velocity[/code] is the velocity vector (typically meters per second). Unlike in [method move_and_collide], you should [i]not[/i] multiply it by [code]delta[/code] — the physics engine handles applying the velocity.
|
||||
[code]up_direction[/code] is the up direction, used to determine what is a wall and what is a floor or a ceiling. If set to the default value of [code]Vector3(0, 0, 0)[/code], everything is considered a wall.
|
||||
If [code]stop_on_slope[/code] is [code]true[/code], body will not slide on slopes when you include gravity in [code]linear_velocity[/code] and the body is standing still.
|
||||
If the body collides, it will change direction a maximum of [code]max_slides[/code] times before it stops.
|
||||
[code]floor_max_angle[/code] is the maximum angle (in radians) where a slope is still considered a floor (or a ceiling), rather than a wall. The default value equals 45 degrees.
|
||||
If [code]infinite_inertia[/code] is [code]true[/code], body will be able to push [RigidBody] nodes, but it won't also detect any collisions with them. If [code]false[/code], it will interact with [RigidBody] nodes like with [StaticBody].
|
||||
Returns the [code]linear_velocity[/code] vector, rotated and/or scaled if a slide collision occurred. To get detailed information about collisions that occurred, use [method get_slide_collision].
|
||||
When the body touches a moving platform, the platform's velocity is automatically added to the body motion. If a collision occurs due to the platform's motion, it will always be first in the slide collisions.
|
||||
</description>
|
||||
</method>
|
||||
<method name="move_and_slide_with_snap">
|
||||
<return type="Vector3" />
|
||||
<argument index="0" name="linear_velocity" type="Vector3" />
|
||||
<argument index="1" name="snap" type="Vector3" />
|
||||
<argument index="2" name="up_direction" type="Vector3" default="Vector3( 0, 0, 0 )" />
|
||||
<argument index="3" name="stop_on_slope" type="bool" default="false" />
|
||||
<argument index="4" name="max_slides" type="int" default="4" />
|
||||
<argument index="5" name="floor_max_angle" type="float" default="0.785398" />
|
||||
<argument index="6" name="infinite_inertia" type="bool" default="true" />
|
||||
<description>
|
||||
Moves the body while keeping it attached to slopes. Similar to [method move_and_slide].
|
||||
As long as the [code]snap[/code] vector is in contact with the ground, the body will remain attached to the surface. This means you must disable snap in order to jump, for example. You can do this by setting [code]snap[/code] to [code](0, 0, 0)[/code] or by using [method move_and_slide] instead.
|
||||
</description>
|
||||
</method>
|
||||
<method name="set_axis_lock">
|
||||
<return type="void" />
|
||||
<argument index="0" name="axis" type="int" enum="PhysicsServer.BodyAxis" />
|
||||
<argument index="1" name="lock" type="bool" />
|
||||
<description>
|
||||
Locks or unlocks the specified [code]axis[/code] depending on the value of [code]lock[/code]. See also [member move_lock_x], [member move_lock_y] and [member move_lock_z].
|
||||
</description>
|
||||
</method>
|
||||
<method name="test_move">
|
||||
<return type="bool" />
|
||||
<argument index="0" name="from" type="Transform" />
|
||||
<argument index="1" name="rel_vec" type="Vector3" />
|
||||
<argument index="2" name="infinite_inertia" type="bool" default="true" />
|
||||
<description>
|
||||
Checks for collisions without moving the body. Virtually sets the node's position, scale and rotation to that of the given [Transform], then tries to move the body along the vector [code]rel_vec[/code]. Returns [code]true[/code] if a collision would stop the body from moving along the whole path.
|
||||
Use [method move_and_collide] instead for detecting collision with touching bodies.
|
||||
</description>
|
||||
</method>
|
||||
</methods>
|
||||
<members>
|
||||
<member name="axis_lock_motion_x" type="bool" setter="set_axis_lock" getter="get_axis_lock" default="false">
|
||||
Lock the body's X axis movement.
|
||||
</member>
|
||||
<member name="axis_lock_motion_y" type="bool" setter="set_axis_lock" getter="get_axis_lock" default="false">
|
||||
Lock the body's Y axis movement.
|
||||
</member>
|
||||
<member name="axis_lock_motion_z" type="bool" setter="set_axis_lock" getter="get_axis_lock" default="false">
|
||||
Lock the body's Z axis movement.
|
||||
</member>
|
||||
<member name="collision/safe_margin" type="float" setter="set_safe_margin" getter="get_safe_margin" default="0.001">
|
||||
Extra margin used for collision recovery in motion functions (see [method move_and_collide], [method move_and_slide], [method move_and_slide_with_snap]).
|
||||
If the body is at least this close to another body, it will consider them to be colliding and will be pushed away before performing the actual motion.
|
||||
A higher value means it's more flexible for detecting collision, which helps with consistently detecting walls and floors.
|
||||
A lower value forces the collision algorithm to use more exact detection, so it can be used in cases that specifically require precision, e.g at very low scale to avoid visible jittering, or for stability with a stack of kinematic bodies.
|
||||
</member>
|
||||
<member name="motion/sync_to_physics" type="bool" setter="set_sync_to_physics" getter="is_sync_to_physics_enabled" default="false">
|
||||
If [code]true[/code], the body's movement will be synchronized to the physics frame. This is useful when animating movement via [AnimationPlayer], for example on moving platforms. Do [b]not[/b] use together with [method move_and_slide] or [method move_and_collide] functions.
|
||||
</member>
|
||||
<member name="move_lock_x" type="bool" setter="set_axis_lock" getter="get_axis_lock" default="false">
|
||||
Lock the body's X axis movement. Deprecated alias for [member axis_lock_motion_x].
|
||||
</member>
|
||||
<member name="move_lock_y" type="bool" setter="set_axis_lock" getter="get_axis_lock" default="false">
|
||||
Lock the body's Y axis movement. Deprecated alias for [member axis_lock_motion_y].
|
||||
</member>
|
||||
<member name="move_lock_z" type="bool" setter="set_axis_lock" getter="get_axis_lock" default="false">
|
||||
Lock the body's Z axis movement. Deprecated alias for [member axis_lock_motion_z].
|
||||
</member>
|
||||
<member name="moving_platform_apply_velocity_on_leave" type="int" setter="set_moving_platform_apply_velocity_on_leave" getter="get_moving_platform_apply_velocity_on_leave" enum="KinematicBody.MovingPlatformApplyVelocityOnLeave" default="0">
|
||||
Sets the behavior to apply when you leave a moving platform. By default, to be physically accurate, when you leave the last platform velocity is applied. See [enum MovingPlatformApplyVelocityOnLeave] constants for available behavior.
|
||||
</member>
|
||||
</members>
|
||||
<constants>
|
||||
<constant name="PLATFORM_VEL_ON_LEAVE_ALWAYS" value="0" enum="MovingPlatformApplyVelocityOnLeave">
|
||||
Add the last platform velocity when you leave a moving platform.
|
||||
</constant>
|
||||
<constant name="PLATFORM_VEL_ON_LEAVE_UPWARD_ONLY" value="1" enum="MovingPlatformApplyVelocityOnLeave">
|
||||
Add the last platform velocity when you leave a moving platform, but any downward motion is ignored. It's useful to keep full jump height even when the platform is moving down.
|
||||
</constant>
|
||||
<constant name="PLATFORM_VEL_ON_LEAVE_NEVER" value="2" enum="MovingPlatformApplyVelocityOnLeave">
|
||||
Do nothing when leaving a platform.
|
||||
</constant>
|
||||
</constants>
|
||||
</class>
|
@ -1,61 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<class name="KinematicCollision" inherits="Reference" version="4.2">
|
||||
<brief_description>
|
||||
Collision data for [KinematicBody] collisions.
|
||||
</brief_description>
|
||||
<description>
|
||||
Contains collision data for [KinematicBody] collisions. When a [KinematicBody] is moved using [method KinematicBody.move_and_collide], 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.
|
||||
</description>
|
||||
<tutorials>
|
||||
</tutorials>
|
||||
<methods>
|
||||
<method name="get_angle" qualifiers="const">
|
||||
<return type="float" />
|
||||
<argument index="0" name="up_direction" type="Vector3" default="Vector3( 0, 1, 0 )" />
|
||||
<description>
|
||||
The collision angle according to [code]up_direction[/code], which is [code]Vector3.UP[/code] by default. This value is always positive.
|
||||
</description>
|
||||
</method>
|
||||
</methods>
|
||||
<members>
|
||||
<member name="collider" type="Object" setter="" getter="get_collider">
|
||||
The colliding body.
|
||||
</member>
|
||||
<member name="collider_id" type="int" setter="" getter="get_collider_id" default="0">
|
||||
The colliding body's unique instance ID. See [method Object.get_instance_id].
|
||||
</member>
|
||||
<member name="collider_metadata" type="Variant" setter="" getter="get_collider_metadata">
|
||||
The colliding body's metadata. See [Object].
|
||||
</member>
|
||||
<member name="collider_rid" type="RID" setter="" getter="get_collider_rid">
|
||||
The colliding body's [RID] used by the [PhysicsServer].
|
||||
</member>
|
||||
<member name="collider_shape" type="Object" setter="" getter="get_collider_shape">
|
||||
The colliding body's shape.
|
||||
</member>
|
||||
<member name="collider_shape_index" type="int" setter="" getter="get_collider_shape_index" default="0">
|
||||
The colliding shape's index. See [CollisionObject].
|
||||
</member>
|
||||
<member name="collider_velocity" type="Vector3" setter="" getter="get_collider_velocity" default="Vector3( 0, 0, 0 )">
|
||||
The colliding object's velocity.
|
||||
</member>
|
||||
<member name="local_shape" type="Object" setter="" getter="get_local_shape">
|
||||
The moving object's colliding shape.
|
||||
</member>
|
||||
<member name="normal" type="Vector3" setter="" getter="get_normal" default="Vector3( 0, 0, 0 )">
|
||||
The colliding body's shape's normal at the point of collision.
|
||||
</member>
|
||||
<member name="position" type="Vector3" setter="" getter="get_position" default="Vector3( 0, 0, 0 )">
|
||||
The point of collision, in global coordinates.
|
||||
</member>
|
||||
<member name="remainder" type="Vector3" setter="" getter="get_remainder" default="Vector3( 0, 0, 0 )">
|
||||
The moving object's remaining movement vector.
|
||||
</member>
|
||||
<member name="travel" type="Vector3" setter="" getter="get_travel" default="Vector3( 0, 0, 0 )">
|
||||
The distance the moving object traveled before collision.
|
||||
</member>
|
||||
</members>
|
||||
<constants>
|
||||
</constants>
|
||||
</class>
|
@ -1,156 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<class name="Label3D" inherits="GeometryInstance" version="4.2">
|
||||
<brief_description>
|
||||
Displays plain text in a 3D world.
|
||||
</brief_description>
|
||||
<description>
|
||||
Label3D displays plain text in a 3D world. It gives you control over the horizontal and vertical alignment.
|
||||
</description>
|
||||
<tutorials>
|
||||
</tutorials>
|
||||
<methods>
|
||||
<method name="generate_triangle_mesh" qualifiers="const">
|
||||
<return type="TriangleMesh" />
|
||||
<description>
|
||||
Returns a [TriangleMesh] with the label's vertices following its current configuration (such as its [member pixel_size]).
|
||||
</description>
|
||||
</method>
|
||||
<method name="get_draw_flag" qualifiers="const">
|
||||
<return type="bool" />
|
||||
<argument index="0" name="flag" type="int" enum="Label3D.DrawFlags" />
|
||||
<description>
|
||||
Returns the value of the specified flag.
|
||||
</description>
|
||||
</method>
|
||||
<method name="set_draw_flag">
|
||||
<return type="void" />
|
||||
<argument index="0" name="flag" type="int" enum="Label3D.DrawFlags" />
|
||||
<argument index="1" name="enabled" type="bool" />
|
||||
<description>
|
||||
If [code]true[/code], the specified flag will be enabled. See [enum Label3D.DrawFlags] for a list of flags.
|
||||
</description>
|
||||
</method>
|
||||
</methods>
|
||||
<members>
|
||||
<member name="alpha_cut" type="int" setter="set_alpha_cut_mode" getter="get_alpha_cut_mode" enum="Label3D.AlphaCutMode" default="0">
|
||||
The alpha cutting mode to use for the sprite. See [enum AlphaCutMode] for possible values.
|
||||
</member>
|
||||
<member name="alpha_scissor_threshold" type="float" setter="set_alpha_scissor_threshold" getter="get_alpha_scissor_threshold" default="0.5">
|
||||
Threshold at which the alpha scissor will discard values.
|
||||
</member>
|
||||
<member name="autowrap" type="bool" setter="set_autowrap" getter="get_autowrap" default="false">
|
||||
If [code]true[/code], wraps the text to the [member width].
|
||||
</member>
|
||||
<member name="billboard" type="int" setter="set_billboard_mode" getter="get_billboard_mode" enum="SpatialMaterial.BillboardMode" default="0">
|
||||
The billboard mode to use for the label. See [enum SpatialMaterial.BillboardMode] for possible values.
|
||||
</member>
|
||||
<member name="double_sided" type="bool" setter="set_draw_flag" getter="get_draw_flag" default="true">
|
||||
If [code]true[/code], text can be seen from the back as well, if [code]false[/code], it is invisible when looking at it from behind.
|
||||
</member>
|
||||
<member name="fixed_size" type="bool" setter="set_draw_flag" getter="get_draw_flag" default="false">
|
||||
If [code]true[/code], the label is rendered at the same size regardless of distance.
|
||||
</member>
|
||||
<member name="font" type="Font" setter="set_font" getter="get_font">
|
||||
[Font] used for the [Label3D]'s text.
|
||||
</member>
|
||||
<member name="horizontal_alignment" type="int" setter="set_horizontal_alignment" getter="get_horizontal_alignment" enum="Label3D.Align" default="1">
|
||||
Controls the text's horizontal alignment. Supports left, center, right. Set it to one of the [enum Align] constants.
|
||||
</member>
|
||||
<member name="line_spacing" type="float" setter="set_line_spacing" getter="get_line_spacing" default="0.0">
|
||||
Vertical space between lines in multiline [Label3D].
|
||||
</member>
|
||||
<member name="modulate" type="Color" setter="set_modulate" getter="get_modulate" default="Color( 1, 1, 1, 1 )">
|
||||
Text [Color] of the [Label3D].
|
||||
</member>
|
||||
<member name="no_depth_test" type="bool" setter="set_draw_flag" getter="get_draw_flag" default="false">
|
||||
If [code]true[/code], depth testing is disabled and the object will be drawn in render order.
|
||||
</member>
|
||||
<member name="offset" type="Vector2" setter="set_offset" getter="get_offset" default="Vector2( 0, 0 )">
|
||||
The text drawing offset (in pixels).
|
||||
</member>
|
||||
<member name="outline_modulate" type="Color" setter="set_outline_modulate" getter="get_outline_modulate" default="Color( 0, 0, 0, 1 )">
|
||||
The tint of [Font]'s outline.
|
||||
</member>
|
||||
<member name="outline_render_priority" type="int" setter="set_outline_render_priority" getter="get_outline_render_priority" default="-1">
|
||||
Sets the render priority for the text outline. Higher priority objects will be sorted in front of lower priority objects.
|
||||
[b]Node:[/b] This only applies if [member alpha_cut] is set to [constant ALPHA_CUT_DISABLED] (default value).
|
||||
[b]Note:[/b] This only applies to sorting of transparent objects. This will not impact how transparent objects are sorted relative to opaque objects. This is because opaque objects are not sorted, while transparent objects are sorted from back to front (subject to priority).
|
||||
</member>
|
||||
<member name="pixel_size" type="float" setter="set_pixel_size" getter="get_pixel_size" default="0.01">
|
||||
The size of one pixel's width on the label to scale it in 3D.
|
||||
</member>
|
||||
<member name="render_priority" type="int" setter="set_render_priority" getter="get_render_priority" default="0">
|
||||
Sets the render priority for the text. Higher priority objects will be sorted in front of lower priority objects.
|
||||
[b]Node:[/b] This only applies if [member alpha_cut] is set to [constant ALPHA_CUT_DISABLED] (default value).
|
||||
[b]Note:[/b] This only applies to sorting of transparent objects. This will not impact how transparent objects are sorted relative to opaque objects. This is because opaque objects are not sorted, while transparent objects are sorted from back to front (subject to priority).
|
||||
</member>
|
||||
<member name="shaded" type="bool" setter="set_draw_flag" getter="get_draw_flag" default="false">
|
||||
If [code]true[/code], the [Light] in the [Environment3D] has effects on the label.
|
||||
</member>
|
||||
<member name="text" type="String" setter="set_text" getter="get_text" default="""">
|
||||
The text to display on screen.
|
||||
</member>
|
||||
<member name="uppercase" type="bool" setter="set_uppercase" getter="is_uppercase" default="false">
|
||||
If [code]true[/code], all the text displays as UPPERCASE.
|
||||
</member>
|
||||
<member name="vertical_alignment" type="int" setter="set_vertical_alignment" getter="get_vertical_alignment" enum="Label3D.VAlign" default="1">
|
||||
Controls the text's vertical alignment. Supports top, center, bottom. Set it to one of the [enum VAlign] constants.
|
||||
</member>
|
||||
<member name="width" type="float" setter="set_width" getter="get_width" default="500.0">
|
||||
Text width (in pixels), used for autowrap and fill alignment.
|
||||
</member>
|
||||
</members>
|
||||
<constants>
|
||||
<constant name="FLAG_SHADED" value="0" enum="DrawFlags">
|
||||
If set, lights in the environment affect the label.
|
||||
</constant>
|
||||
<constant name="FLAG_DOUBLE_SIDED" value="1" enum="DrawFlags">
|
||||
If set, text can be seen from the back as well. If not, the texture is invisible when looking at it from behind.
|
||||
</constant>
|
||||
<constant name="FLAG_DISABLE_DEPTH_TEST" value="2" enum="DrawFlags">
|
||||
Disables the depth test, so this object is drawn on top of all others. However, objects drawn after it in the draw order may cover it.
|
||||
</constant>
|
||||
<constant name="FLAG_FIXED_SIZE" value="3" enum="DrawFlags">
|
||||
Label is scaled by depth so that it always appears the same size on screen.
|
||||
</constant>
|
||||
<constant name="FLAG_MAX" value="4" enum="DrawFlags">
|
||||
Represents the size of the [enum DrawFlags] enum.
|
||||
</constant>
|
||||
<constant name="ALPHA_CUT_DISABLED" value="0" enum="AlphaCutMode">
|
||||
This mode performs standard alpha blending. It can display translucent areas, but transparency sorting issues may be visible when multiple transparent materials are overlapping.
|
||||
</constant>
|
||||
<constant name="ALPHA_CUT_DISCARD" value="1" enum="AlphaCutMode">
|
||||
This mode only allows fully transparent or fully opaque pixels. This mode is also known as [i]alpha testing[/i] or [i]1-bit transparency[/i].
|
||||
[b]Note:[/b] This mode might have issues with anti-aliased fonts and outlines, try adjusting [member alpha_scissor_threshold] or using SDF font.
|
||||
[b]Note:[/b] When using text with overlapping glyphs (e.g., cursive scripts), this mode might have transparency sorting issues between the main text and the outline.
|
||||
</constant>
|
||||
<constant name="ALPHA_CUT_OPAQUE_PREPASS" value="2" enum="AlphaCutMode">
|
||||
This mode draws fully opaque pixels in the depth prepass. This is slower than [constant ALPHA_CUT_DISABLED] or [constant ALPHA_CUT_DISCARD], but it allows displaying translucent areas and smooth edges while using proper sorting.
|
||||
[b]Note:[/b] When using text with overlapping glyphs (e.g., cursive scripts), this mode might have transparency sorting issues between the main text and the outline.
|
||||
</constant>
|
||||
<constant name="ALIGN_LEFT" value="0" enum="Align">
|
||||
Align rows to the left (default).
|
||||
</constant>
|
||||
<constant name="ALIGN_CENTER" value="1" enum="Align">
|
||||
Align rows centered.
|
||||
</constant>
|
||||
<constant name="ALIGN_RIGHT" value="2" enum="Align">
|
||||
Align rows to the right.
|
||||
</constant>
|
||||
<constant name="ALIGN_FILL" value="3" enum="Align">
|
||||
Expand row whitespaces to fit the width.
|
||||
</constant>
|
||||
<constant name="VALIGN_TOP" value="0" enum="VAlign">
|
||||
Align the whole text to the top.
|
||||
</constant>
|
||||
<constant name="VALIGN_CENTER" value="1" enum="VAlign">
|
||||
Align the whole text to the center.
|
||||
</constant>
|
||||
<constant name="VALIGN_BOTTOM" value="2" enum="VAlign">
|
||||
Align the whole text to the bottom.
|
||||
</constant>
|
||||
<constant name="VALIGN_FILL" value="3" enum="VAlign">
|
||||
Align the whole text by spreading the rows.
|
||||
</constant>
|
||||
</constants>
|
||||
</class>
|
@ -1,126 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<class name="Light" inherits="VisualInstance" version="4.2">
|
||||
<brief_description>
|
||||
Provides a base class for different kinds of light nodes.
|
||||
</brief_description>
|
||||
<description>
|
||||
Light is the [i]abstract[/i] 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.
|
||||
</description>
|
||||
<tutorials>
|
||||
<link title="3D lights and shadows">$DOCS_URL/tutorials/3d/lights_and_shadows.md</link>
|
||||
<link title="Third Person Shooter Demo">https://godotengine.org/asset-library/asset/678</link>
|
||||
</tutorials>
|
||||
<methods>
|
||||
<method name="get_param" qualifiers="const">
|
||||
<return type="float" />
|
||||
<argument index="0" name="param" type="int" enum="Light.Param" />
|
||||
<description>
|
||||
Returns the value of the specified [enum Light.Param] parameter.
|
||||
</description>
|
||||
</method>
|
||||
<method name="set_param">
|
||||
<return type="void" />
|
||||
<argument index="0" name="param" type="int" enum="Light.Param" />
|
||||
<argument index="1" name="value" type="float" />
|
||||
<description>
|
||||
Sets the value of the specified [enum Light.Param] parameter.
|
||||
</description>
|
||||
</method>
|
||||
</methods>
|
||||
<members>
|
||||
<member name="editor_only" type="bool" setter="set_editor_only" getter="is_editor_only" default="false">
|
||||
If [code]true[/code], the light only appears in the editor and will not be visible at runtime.
|
||||
</member>
|
||||
<member name="light_color" type="Color" setter="set_color" getter="get_color" default="Color( 1, 1, 1, 1 )">
|
||||
The light's color. An [i]overbright[/i] color can be used to achieve a result equivalent to increasing the light's [member light_energy].
|
||||
</member>
|
||||
<member name="light_cull_mask" type="int" setter="set_cull_mask" getter="get_cull_mask" default="4294967295">
|
||||
The light will affect objects in the selected layers.
|
||||
</member>
|
||||
<member name="light_energy" type="float" setter="set_param" getter="get_param" default="1.0">
|
||||
The light's strength multiplier (this is not a physical unit). For [OmniLight] and [SpotLight], changing this value will only change the light color's intensity, not the light's radius.
|
||||
</member>
|
||||
<member name="light_indirect_energy" type="float" setter="set_param" getter="get_param" default="1.0">
|
||||
Secondary multiplier used with indirect light (light bounces). This works on both [BakedLightmap] and [GIProbe].
|
||||
</member>
|
||||
<member name="light_negative" type="bool" setter="set_negative" getter="is_negative" default="false">
|
||||
If [code]true[/code], the light's effect is reversed, darkening areas and casting bright shadows.
|
||||
</member>
|
||||
<member name="light_size" type="float" setter="set_param" getter="get_param" default="0.0">
|
||||
The size of the light in Godot units. Only considered in baked lightmaps and only if [member light_bake_mode] is set to [constant BAKE_ALL]. Increasing this value will make the shadows appear blurrier. This can be used to simulate area lights to an extent.
|
||||
[b]Note:[/b] [member light_size] is not affected by [member Spatial.scale] (the light's scale or its parent's scale).
|
||||
</member>
|
||||
<member name="light_specular" type="float" setter="set_param" getter="get_param" default="0.5">
|
||||
The intensity of the specular blob in objects affected by the light. At [code]0[/code], the light becomes a pure diffuse light. When not baking emission, this can be used to avoid unrealistic reflections when placing lights above an emissive surface.
|
||||
</member>
|
||||
<member name="shadow_bias" type="float" setter="set_param" getter="get_param" default="0.1">
|
||||
Used to adjust shadow appearance. Too small a value results in self-shadowing ("shadow acne"), while too large a value causes shadows to separate from casters ("peter-panning"). Adjust as needed.
|
||||
</member>
|
||||
<member name="shadow_color" type="Color" setter="set_shadow_color" getter="get_shadow_color" default="Color( 0, 0, 0, 1 )">
|
||||
The color of shadows cast by this light.
|
||||
</member>
|
||||
<member name="shadow_contact" type="float" setter="set_param" getter="get_param" default="0.0">
|
||||
Attempts to reduce [member shadow_bias] gap by rendering screen-space contact shadows. This has a performance impact, especially at higher values.
|
||||
[b]Note:[/b] Contact shadows can look broken, so leaving this property to [code]0.0[/code] is recommended.
|
||||
</member>
|
||||
<member name="shadow_enabled" type="bool" setter="set_shadow" getter="has_shadow" default="false">
|
||||
If [code]true[/code], the light will cast shadows.
|
||||
</member>
|
||||
<member name="shadow_reverse_cull_face" type="bool" setter="set_shadow_reverse_cull_face" getter="get_shadow_reverse_cull_face" default="false">
|
||||
If [code]true[/code], reverses the backface culling of the mesh. This can be useful when you have a flat mesh that has a light behind it. If you need to cast a shadow on both sides of the mesh, set the mesh to use double-sided shadows with [constant GeometryInstance.SHADOW_CASTING_SETTING_DOUBLE_SIDED].
|
||||
</member>
|
||||
</members>
|
||||
<constants>
|
||||
<constant name="PARAM_ENERGY" value="0" enum="Param">
|
||||
Constant for accessing [member light_energy].
|
||||
</constant>
|
||||
<constant name="PARAM_INDIRECT_ENERGY" value="1" enum="Param">
|
||||
Constant for accessing [member light_indirect_energy].
|
||||
</constant>
|
||||
<constant name="PARAM_SIZE" value="2" enum="Param">
|
||||
Constant for accessing [member light_size].
|
||||
</constant>
|
||||
<constant name="PARAM_SPECULAR" value="3" enum="Param">
|
||||
Constant for accessing [member light_specular].
|
||||
</constant>
|
||||
<constant name="PARAM_RANGE" value="4" enum="Param">
|
||||
Constant for accessing [member OmniLight.omni_range] or [member SpotLight.spot_range].
|
||||
</constant>
|
||||
<constant name="PARAM_ATTENUATION" value="5" enum="Param">
|
||||
Constant for accessing [member OmniLight.omni_attenuation] or [member SpotLight.spot_attenuation].
|
||||
</constant>
|
||||
<constant name="PARAM_SPOT_ANGLE" value="6" enum="Param">
|
||||
Constant for accessing [member SpotLight.spot_angle].
|
||||
</constant>
|
||||
<constant name="PARAM_SPOT_ATTENUATION" value="7" enum="Param">
|
||||
Constant for accessing [member SpotLight.spot_angle_attenuation].
|
||||
</constant>
|
||||
<constant name="PARAM_CONTACT_SHADOW_SIZE" value="8" enum="Param">
|
||||
Constant for accessing [member shadow_contact].
|
||||
</constant>
|
||||
<constant name="PARAM_SHADOW_MAX_DISTANCE" value="9" enum="Param">
|
||||
Constant for accessing [member DirectionalLight.directional_shadow_max_distance].
|
||||
</constant>
|
||||
<constant name="PARAM_SHADOW_SPLIT_1_OFFSET" value="10" enum="Param">
|
||||
Constant for accessing [member DirectionalLight.directional_shadow_split_1].
|
||||
</constant>
|
||||
<constant name="PARAM_SHADOW_SPLIT_2_OFFSET" value="11" enum="Param">
|
||||
Constant for accessing [member DirectionalLight.directional_shadow_split_2].
|
||||
</constant>
|
||||
<constant name="PARAM_SHADOW_SPLIT_3_OFFSET" value="12" enum="Param">
|
||||
Constant for accessing [member DirectionalLight.directional_shadow_split_3].
|
||||
</constant>
|
||||
<constant name="PARAM_SHADOW_NORMAL_BIAS" value="13" enum="Param">
|
||||
Constant for accessing [member DirectionalLight.directional_shadow_normal_bias].
|
||||
</constant>
|
||||
<constant name="PARAM_SHADOW_BIAS" value="14" enum="Param">
|
||||
Constant for accessing [member shadow_bias].
|
||||
</constant>
|
||||
<constant name="PARAM_SHADOW_BIAS_SPLIT_SCALE" value="15" enum="Param">
|
||||
Constant for accessing [member DirectionalLight.directional_shadow_bias_split_scale].
|
||||
</constant>
|
||||
<constant name="PARAM_MAX" value="16" enum="Param">
|
||||
Represents the size of the [enum Param] enum.
|
||||
</constant>
|
||||
</constants>
|
||||
</class>
|
@ -1,112 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<class name="Light2D" inherits="Node2D" version="4.2">
|
||||
<brief_description>
|
||||
Casts light in a 2D environment.
|
||||
</brief_description>
|
||||
<description>
|
||||
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).
|
||||
[b]Note:[/b] Light2D can also be used as a mask.
|
||||
</description>
|
||||
<tutorials>
|
||||
<link>$DOCS_URL/tutorials/2d/2d_lights_and_shadows.md</link>
|
||||
</tutorials>
|
||||
<methods>
|
||||
</methods>
|
||||
<members>
|
||||
<member name="color" type="Color" setter="set_color" getter="get_color" default="Color( 1, 1, 1, 1 )">
|
||||
The Light2D's [Color].
|
||||
</member>
|
||||
<member name="editor_only" type="bool" setter="set_editor_only" getter="is_editor_only" default="false">
|
||||
If [code]true[/code], Light2D will only appear when editing the scene.
|
||||
</member>
|
||||
<member name="enabled" type="bool" setter="set_enabled" getter="is_enabled" default="true">
|
||||
If [code]true[/code], Light2D will emit light.
|
||||
</member>
|
||||
<member name="energy" type="float" setter="set_energy" getter="get_energy" default="1.0">
|
||||
The Light2D's energy value. The larger the value, the stronger the light.
|
||||
</member>
|
||||
<member name="mode" type="int" setter="set_mode" getter="get_mode" enum="Light2D.Mode" default="0">
|
||||
The Light2D's mode. See [enum Mode] constants for values.
|
||||
</member>
|
||||
<member name="offset" type="Vector2" setter="set_texture_offset" getter="get_texture_offset" default="Vector2( 0, 0 )">
|
||||
The offset of the Light2D's [code]texture[/code].
|
||||
</member>
|
||||
<member name="range_height" type="float" setter="set_height" getter="get_height" default="0.0">
|
||||
The height of the Light2D. Used with 2D normal mapping.
|
||||
</member>
|
||||
<member name="range_item_cull_mask" type="int" setter="set_item_cull_mask" getter="get_item_cull_mask" default="1">
|
||||
The layer mask. Only objects with a matching mask will be affected by the Light2D.
|
||||
</member>
|
||||
<member name="range_layer_max" type="int" setter="set_layer_range_max" getter="get_layer_range_max" default="0">
|
||||
Maximum layer value of objects that are affected by the Light2D.
|
||||
</member>
|
||||
<member name="range_layer_min" type="int" setter="set_layer_range_min" getter="get_layer_range_min" default="0">
|
||||
Minimum layer value of objects that are affected by the Light2D.
|
||||
</member>
|
||||
<member name="range_z_max" type="int" setter="set_z_range_max" getter="get_z_range_max" default="1024">
|
||||
Maximum [code]z[/code] value of objects that are affected by the Light2D.
|
||||
</member>
|
||||
<member name="range_z_min" type="int" setter="set_z_range_min" getter="get_z_range_min" default="-1024">
|
||||
Minimum [code]z[/code] value of objects that are affected by the Light2D.
|
||||
</member>
|
||||
<member name="shadow_buffer_size" type="int" setter="set_shadow_buffer_size" getter="get_shadow_buffer_size" default="2048">
|
||||
Shadow buffer size.
|
||||
</member>
|
||||
<member name="shadow_color" type="Color" setter="set_shadow_color" getter="get_shadow_color" default="Color( 0, 0, 0, 0 )">
|
||||
[Color] of shadows cast by the Light2D.
|
||||
</member>
|
||||
<member name="shadow_enabled" type="bool" setter="set_shadow_enabled" getter="is_shadow_enabled" default="false">
|
||||
If [code]true[/code], the Light2D will cast shadows.
|
||||
</member>
|
||||
<member name="shadow_filter" type="int" setter="set_shadow_filter" getter="get_shadow_filter" enum="Light2D.ShadowFilter" default="0">
|
||||
Shadow filter type. See [enum ShadowFilter] for possible values.
|
||||
</member>
|
||||
<member name="shadow_filter_smooth" type="float" setter="set_shadow_smooth" getter="get_shadow_smooth" default="0.0">
|
||||
Smoothing value for shadows.
|
||||
</member>
|
||||
<member name="shadow_gradient_length" type="float" setter="set_shadow_gradient_length" getter="get_shadow_gradient_length" default="0.0">
|
||||
Smooth shadow gradient length.
|
||||
</member>
|
||||
<member name="shadow_item_cull_mask" type="int" setter="set_item_shadow_cull_mask" getter="get_item_shadow_cull_mask" default="1">
|
||||
The shadow mask. Used with [LightOccluder2D] to cast shadows. Only occluders with a matching light mask will cast shadows.
|
||||
</member>
|
||||
<member name="texture" type="Texture" setter="set_texture" getter="get_texture">
|
||||
[Texture] used for the Light2D's appearance.
|
||||
</member>
|
||||
<member name="texture_scale" type="float" setter="set_texture_scale" getter="get_texture_scale" default="1.0">
|
||||
The [code]texture[/code]'s scale factor.
|
||||
</member>
|
||||
</members>
|
||||
<constants>
|
||||
<constant name="MODE_ADD" value="0" enum="Mode">
|
||||
Adds the value of pixels corresponding to the Light2D to the values of pixels under it. This is the common behavior of a light.
|
||||
</constant>
|
||||
<constant name="MODE_SUB" value="1" enum="Mode">
|
||||
Subtracts the value of pixels corresponding to the Light2D to the values of pixels under it, resulting in inversed light effect.
|
||||
</constant>
|
||||
<constant name="MODE_MIX" value="2" enum="Mode">
|
||||
Mix the value of pixels corresponding to the Light2D to the values of pixels under it by linear interpolation.
|
||||
</constant>
|
||||
<constant name="MODE_MASK" value="3" enum="Mode">
|
||||
The light texture of the Light2D is used as a mask, hiding or revealing parts of the screen underneath depending on the value of each pixel of the light (mask) texture.
|
||||
</constant>
|
||||
<constant name="SHADOW_FILTER_NONE" value="0" enum="ShadowFilter">
|
||||
No filter applies to the shadow map. See [member shadow_filter].
|
||||
</constant>
|
||||
<constant name="SHADOW_FILTER_PCF3" value="1" enum="ShadowFilter">
|
||||
Percentage closer filtering (3 samples) applies to the shadow map. See [member shadow_filter].
|
||||
</constant>
|
||||
<constant name="SHADOW_FILTER_PCF5" value="2" enum="ShadowFilter">
|
||||
Percentage closer filtering (5 samples) applies to the shadow map. See [member shadow_filter].
|
||||
</constant>
|
||||
<constant name="SHADOW_FILTER_PCF7" value="3" enum="ShadowFilter">
|
||||
Percentage closer filtering (7 samples) applies to the shadow map. See [member shadow_filter].
|
||||
</constant>
|
||||
<constant name="SHADOW_FILTER_PCF9" value="4" enum="ShadowFilter">
|
||||
Percentage closer filtering (9 samples) applies to the shadow map. See [member shadow_filter].
|
||||
</constant>
|
||||
<constant name="SHADOW_FILTER_PCF13" value="5" enum="ShadowFilter">
|
||||
Percentage closer filtering (13 samples) applies to the shadow map. See [member shadow_filter].
|
||||
</constant>
|
||||
</constants>
|
||||
</class>
|
@ -1,24 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<class name="LightOccluder2D" inherits="Node2D" version="4.2">
|
||||
<brief_description>
|
||||
Occludes light cast by a Light2D, casting shadows.
|
||||
</brief_description>
|
||||
<description>
|
||||
Occludes light cast by a Light2D, casting shadows. The LightOccluder2D must be provided with an [OccluderPolygon2D] in order for the shadow to be computed.
|
||||
</description>
|
||||
<tutorials>
|
||||
<link>$DOCS_URL/tutorials/2d/2d_lights_and_shadows.md</link>
|
||||
</tutorials>
|
||||
<methods>
|
||||
</methods>
|
||||
<members>
|
||||
<member name="light_mask" type="int" setter="set_occluder_light_mask" getter="get_occluder_light_mask" default="1">
|
||||
The LightOccluder2D's light mask. The LightOccluder2D will cast shadows only from Light2D(s) that have the same light mask(s).
|
||||
</member>
|
||||
<member name="occluder" type="OccluderPolygon2D" setter="set_occluder_polygon" getter="get_occluder_polygon">
|
||||
The [OccluderPolygon2D] used to compute the shadow.
|
||||
</member>
|
||||
</members>
|
||||
<constants>
|
||||
</constants>
|
||||
</class>
|
@ -1,40 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<class name="Listener" inherits="Spatial" version="4.2">
|
||||
<brief_description>
|
||||
Overrides the location sounds are heard from.
|
||||
</brief_description>
|
||||
<description>
|
||||
Once added to the scene tree and enabled using [method make_current], this node will override the location sounds are heard from. This can be used to listen from a location different from the [Camera].
|
||||
</description>
|
||||
<tutorials>
|
||||
</tutorials>
|
||||
<methods>
|
||||
<method name="clear_current">
|
||||
<return type="void" />
|
||||
<description>
|
||||
Disables the listener to use the current camera's listener instead.
|
||||
</description>
|
||||
</method>
|
||||
<method name="get_listener_transform" qualifiers="const">
|
||||
<return type="Transform" />
|
||||
<description>
|
||||
Returns the listener's global orthonormalized [Transform].
|
||||
</description>
|
||||
</method>
|
||||
<method name="is_current" qualifiers="const">
|
||||
<return type="bool" />
|
||||
<description>
|
||||
Returns [code]true[/code] if the listener was made current using [method make_current], [code]false[/code] otherwise.
|
||||
[b]Note:[/b] There may be more than one Listener marked as "current" in the scene tree, but only the one that was made current last will be used.
|
||||
</description>
|
||||
</method>
|
||||
<method name="make_current">
|
||||
<return type="void" />
|
||||
<description>
|
||||
Enables the listener. This will override the current camera's listener.
|
||||
</description>
|
||||
</method>
|
||||
</methods>
|
||||
<constants>
|
||||
</constants>
|
||||
</class>
|
@ -13,16 +13,6 @@
|
||||
<link title="Third Person Shooter Demo">https://godotengine.org/asset-library/asset/678</link>
|
||||
</tutorials>
|
||||
<methods>
|
||||
<method name="create_convex_shape" qualifiers="const">
|
||||
<return type="Shape" />
|
||||
<argument index="0" name="clean" type="bool" default="true" />
|
||||
<argument index="1" name="simplify" type="bool" default="false" />
|
||||
<description>
|
||||
Calculate a [ConvexPolygonShape] from the mesh.
|
||||
If [code]clean[/code] is [code]true[/code] (default), duplicate and interior vertices are removed automatically. You can set it to [code]false[/code] to make the process faster if not needed.
|
||||
If [code]simplify[/code] is [code]true[/code], the geometry can be further simplified to reduce the amount of vertices. Disabled by default.
|
||||
</description>
|
||||
</method>
|
||||
<method name="create_outline" qualifiers="const">
|
||||
<return type="Mesh" />
|
||||
<argument index="0" name="margin" type="float" />
|
||||
@ -31,12 +21,6 @@
|
||||
[b]Note:[/b] This method typically returns the vertices in reverse order (e.g. clockwise to counterclockwise).
|
||||
</description>
|
||||
</method>
|
||||
<method name="create_trimesh_shape" qualifiers="const">
|
||||
<return type="Shape" />
|
||||
<description>
|
||||
Calculate a [ConcavePolygonShape] from the mesh.
|
||||
</description>
|
||||
</method>
|
||||
<method name="generate_triangle_mesh" qualifiers="const">
|
||||
<return type="TriangleMesh" />
|
||||
<description>
|
||||
@ -138,56 +122,38 @@
|
||||
<constant name="ARRAY_FORMAT_TEX_UV2" value="32" enum="ArrayFormat">
|
||||
Mesh array contains second UV.
|
||||
</constant>
|
||||
<constant name="ARRAY_FORMAT_BONES" value="64" enum="ArrayFormat">
|
||||
Mesh array contains bones.
|
||||
</constant>
|
||||
<constant name="ARRAY_FORMAT_WEIGHTS" value="128" enum="ArrayFormat">
|
||||
Mesh array contains bone weights.
|
||||
</constant>
|
||||
<constant name="ARRAY_FORMAT_INDEX" value="256" enum="ArrayFormat">
|
||||
<constant name="ARRAY_FORMAT_INDEX" value="64" enum="ArrayFormat">
|
||||
Mesh array uses indices.
|
||||
</constant>
|
||||
<constant name="ARRAY_COMPRESS_BASE" value="9" enum="ArrayFormat">
|
||||
<constant name="ARRAY_COMPRESS_BASE" value="7" enum="ArrayFormat">
|
||||
Used internally to calculate other [code]ARRAY_COMPRESS_*[/code] enum values. Do not use.
|
||||
</constant>
|
||||
<constant name="ARRAY_COMPRESS_VERTEX" value="512" enum="ArrayFormat">
|
||||
<constant name="ARRAY_COMPRESS_VERTEX" value="128" enum="ArrayFormat">
|
||||
Flag used to mark a compressed (half float) vertex array.
|
||||
</constant>
|
||||
<constant name="ARRAY_COMPRESS_NORMAL" value="1024" enum="ArrayFormat">
|
||||
<constant name="ARRAY_COMPRESS_NORMAL" value="256" enum="ArrayFormat">
|
||||
Flag used to mark a compressed (half float) normal array.
|
||||
</constant>
|
||||
<constant name="ARRAY_COMPRESS_TANGENT" value="2048" enum="ArrayFormat">
|
||||
<constant name="ARRAY_COMPRESS_TANGENT" value="512" enum="ArrayFormat">
|
||||
Flag used to mark a compressed (half float) tangent array.
|
||||
</constant>
|
||||
<constant name="ARRAY_COMPRESS_COLOR" value="4096" enum="ArrayFormat">
|
||||
<constant name="ARRAY_COMPRESS_COLOR" value="1024" enum="ArrayFormat">
|
||||
Flag used to mark a compressed (half float) color array.
|
||||
[b]Note:[/b] If this flag is enabled, vertex colors will be stored as 8-bit unsigned integers. This will clamp overbright colors to [code]Color(1, 1, 1, 1)[/code] and reduce colors' precision.
|
||||
</constant>
|
||||
<constant name="ARRAY_COMPRESS_TEX_UV" value="8192" enum="ArrayFormat">
|
||||
<constant name="ARRAY_COMPRESS_TEX_UV" value="2048" enum="ArrayFormat">
|
||||
Flag used to mark a compressed (half float) UV coordinates array.
|
||||
</constant>
|
||||
<constant name="ARRAY_COMPRESS_TEX_UV2" value="16384" enum="ArrayFormat">
|
||||
<constant name="ARRAY_COMPRESS_TEX_UV2" value="4096" enum="ArrayFormat">
|
||||
Flag used to mark a compressed (half float) UV coordinates array for the second UV coordinates.
|
||||
</constant>
|
||||
<constant name="ARRAY_COMPRESS_BONES" value="32768" enum="ArrayFormat">
|
||||
Flag used to mark a compressed bone array.
|
||||
</constant>
|
||||
<constant name="ARRAY_COMPRESS_WEIGHTS" value="65536" enum="ArrayFormat">
|
||||
Flag used to mark a compressed (half float) weight array.
|
||||
</constant>
|
||||
<constant name="ARRAY_COMPRESS_INDEX" value="131072" enum="ArrayFormat">
|
||||
<constant name="ARRAY_COMPRESS_INDEX" value="8192" enum="ArrayFormat">
|
||||
Flag used to mark a compressed index array.
|
||||
</constant>
|
||||
<constant name="ARRAY_FLAG_USE_2D_VERTICES" value="262144" enum="ArrayFormat">
|
||||
<constant name="ARRAY_FLAG_USE_2D_VERTICES" value="16384" enum="ArrayFormat">
|
||||
Flag used to mark that the array contains 2D vertices.
|
||||
</constant>
|
||||
<constant name="ARRAY_FLAG_USE_16_BIT_BONES" value="524288" enum="ArrayFormat">
|
||||
Flag used to mark that the array uses 16-bit bones instead of 8-bit.
|
||||
</constant>
|
||||
<constant name="ARRAY_FLAG_USE_OCTAHEDRAL_COMPRESSION" value="2097152" enum="ArrayFormat">
|
||||
Flag used to mark that the array uses an octahedral representation of normal and tangent vectors rather than cartesian.
|
||||
</constant>
|
||||
<constant name="ARRAY_COMPRESS_DEFAULT" value="2194432" enum="ArrayFormat">
|
||||
<constant name="ARRAY_COMPRESS_DEFAULT" value="7936" enum="ArrayFormat">
|
||||
Used to set flags [constant ARRAY_COMPRESS_VERTEX], [constant ARRAY_COMPRESS_NORMAL], [constant ARRAY_COMPRESS_TANGENT], [constant ARRAY_COMPRESS_COLOR], [constant ARRAY_COMPRESS_TEX_UV], [constant ARRAY_COMPRESS_TEX_UV2], [constant ARRAY_COMPRESS_WEIGHTS], and [constant ARRAY_FLAG_USE_OCTAHEDRAL_COMPRESSION] quickly.
|
||||
[b]Note:[/b] Since this flag enables [constant ARRAY_COMPRESS_COLOR], vertex colors will be stored as 8-bit unsigned integers. This will clamp overbright colors to [code]Color(1, 1, 1, 1)[/code] and reduce colors' precision.
|
||||
</constant>
|
||||
@ -209,16 +175,10 @@
|
||||
<constant name="ARRAY_TEX_UV2" value="5" enum="ArrayType">
|
||||
Array of second set of UV coordinates.
|
||||
</constant>
|
||||
<constant name="ARRAY_BONES" value="6" enum="ArrayType">
|
||||
Array of bone data.
|
||||
</constant>
|
||||
<constant name="ARRAY_WEIGHTS" value="7" enum="ArrayType">
|
||||
Array of weights.
|
||||
</constant>
|
||||
<constant name="ARRAY_INDEX" value="8" enum="ArrayType">
|
||||
<constant name="ARRAY_INDEX" value="6" enum="ArrayType">
|
||||
Array of indices.
|
||||
</constant>
|
||||
<constant name="ARRAY_MAX" value="9" enum="ArrayType">
|
||||
<constant name="ARRAY_MAX" value="7" enum="ArrayType">
|
||||
Represents the size of the [enum ArrayType] enum.
|
||||
</constant>
|
||||
</constants>
|
||||
|
@ -1,36 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<class name="MeshDataInstance2D" inherits="Node2D" version="4.2">
|
||||
<brief_description>
|
||||
</brief_description>
|
||||
<description>
|
||||
</description>
|
||||
<tutorials>
|
||||
</tutorials>
|
||||
<methods>
|
||||
<method name="refresh">
|
||||
<return type="void" />
|
||||
<description>
|
||||
</description>
|
||||
</method>
|
||||
</methods>
|
||||
<members>
|
||||
<member name="mesh_data" type="MeshDataResource" setter="set_mesh_data" getter="get_mesh_data">
|
||||
</member>
|
||||
<member name="normal_map" type="Texture" setter="set_normal_map" getter="get_normal_map">
|
||||
</member>
|
||||
<member name="texture" type="Texture" setter="set_texture" getter="get_texture">
|
||||
</member>
|
||||
</members>
|
||||
<signals>
|
||||
<signal name="mesh_data_resource_changed">
|
||||
<description>
|
||||
</description>
|
||||
</signal>
|
||||
<signal name="texture_changed">
|
||||
<description>
|
||||
</description>
|
||||
</signal>
|
||||
</signals>
|
||||
<constants>
|
||||
</constants>
|
||||
</class>
|
@ -139,13 +139,6 @@
|
||||
Returns the vertex at given index.
|
||||
</description>
|
||||
</method>
|
||||
<method name="get_vertex_bones" qualifiers="const">
|
||||
<return type="PoolIntArray" />
|
||||
<argument index="0" name="idx" type="int" />
|
||||
<description>
|
||||
Returns the bones of the given vertex.
|
||||
</description>
|
||||
</method>
|
||||
<method name="get_vertex_color" qualifiers="const">
|
||||
<return type="Color" />
|
||||
<argument index="0" name="idx" type="int" />
|
||||
@ -208,13 +201,6 @@
|
||||
Returns the UV2 of the given vertex.
|
||||
</description>
|
||||
</method>
|
||||
<method name="get_vertex_weights" qualifiers="const">
|
||||
<return type="PoolRealArray" />
|
||||
<argument index="0" name="idx" type="int" />
|
||||
<description>
|
||||
Returns bone weights of the given vertex.
|
||||
</description>
|
||||
</method>
|
||||
<method name="set_edge_meta">
|
||||
<return type="void" />
|
||||
<argument index="0" name="idx" type="int" />
|
||||
@ -246,14 +232,6 @@
|
||||
Sets the position of the given vertex.
|
||||
</description>
|
||||
</method>
|
||||
<method name="set_vertex_bones">
|
||||
<return type="void" />
|
||||
<argument index="0" name="idx" type="int" />
|
||||
<argument index="1" name="bones" type="PoolIntArray" />
|
||||
<description>
|
||||
Sets the bones of the given vertex.
|
||||
</description>
|
||||
</method>
|
||||
<method name="set_vertex_color">
|
||||
<return type="void" />
|
||||
<argument index="0" name="idx" type="int" />
|
||||
@ -302,14 +280,6 @@
|
||||
Sets the UV2 of the given vertex.
|
||||
</description>
|
||||
</method>
|
||||
<method name="set_vertex_weights">
|
||||
<return type="void" />
|
||||
<argument index="0" name="idx" type="int" />
|
||||
<argument index="1" name="weights" type="PoolRealArray" />
|
||||
<description>
|
||||
Sets the bone weights of the given vertex.
|
||||
</description>
|
||||
</method>
|
||||
</methods>
|
||||
<constants>
|
||||
</constants>
|
||||
|
@ -1,113 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<class name="MeshInstance" inherits="GeometryInstance" version="4.2">
|
||||
<brief_description>
|
||||
Node that instances meshes into a scenario.
|
||||
</brief_description>
|
||||
<description>
|
||||
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.
|
||||
</description>
|
||||
<tutorials>
|
||||
<link title="3D Material Testers Demo">https://godotengine.org/asset-library/asset/123</link>
|
||||
<link title="3D Kinematic Character Demo">https://godotengine.org/asset-library/asset/126</link>
|
||||
<link title="3D Platformer Demo">https://godotengine.org/asset-library/asset/125</link>
|
||||
<link title="Third Person Shooter Demo">https://godotengine.org/asset-library/asset/678</link>
|
||||
</tutorials>
|
||||
<methods>
|
||||
<method name="create_convex_collision">
|
||||
<return type="void" />
|
||||
<argument index="0" name="clean" type="bool" default="true" />
|
||||
<argument index="1" name="simplify" type="bool" default="false" />
|
||||
<description>
|
||||
This helper creates a [StaticBody] child node with a [ConvexPolygonShape] collision shape calculated from the mesh geometry. It's mainly used for testing.
|
||||
If [code]clean[/code] is [code]true[/code] (default), duplicate and interior vertices are removed automatically. You can set it to [code]false[/code] to make the process faster if not needed.
|
||||
If [code]simplify[/code] is [code]true[/code], the geometry can be further simplified to reduce the amount of vertices. Disabled by default.
|
||||
</description>
|
||||
</method>
|
||||
<method name="create_debug_tangents">
|
||||
<return type="void" />
|
||||
<description>
|
||||
This helper creates a [MeshInstance] child node with gizmos at every vertex calculated from the mesh geometry. It's mainly used for testing.
|
||||
</description>
|
||||
</method>
|
||||
<method name="create_multiple_convex_collisions">
|
||||
<return type="void" />
|
||||
<description>
|
||||
This helper creates a [StaticBody] child node with multiple [ConvexPolygonShape] collision shapes calculated from the mesh geometry via convex decomposition. It's mainly used for testing.
|
||||
</description>
|
||||
</method>
|
||||
<method name="create_trimesh_collision">
|
||||
<return type="void" />
|
||||
<description>
|
||||
This helper creates a [StaticBody] child node with a [ConcavePolygonShape] collision shape calculated from the mesh geometry. It's mainly used for testing.
|
||||
</description>
|
||||
</method>
|
||||
<method name="get_active_material" qualifiers="const">
|
||||
<return type="Material" />
|
||||
<argument index="0" name="surface" type="int" />
|
||||
<description>
|
||||
Returns the [Material] that will be used by the [Mesh] when drawing. This can return the [member GeometryInstance.material_override], the surface override [Material] defined in this [MeshInstance], or the surface [Material] defined in the [Mesh]. For example, if [member GeometryInstance.material_override] is used, all surfaces will return the override material.
|
||||
</description>
|
||||
</method>
|
||||
<method name="get_surface_material" qualifiers="const">
|
||||
<return type="Material" />
|
||||
<argument index="0" name="surface" type="int" />
|
||||
<description>
|
||||
Returns the override [Material] for a surface of the [Mesh] resource.
|
||||
[b]Note:[/b] This function only returns [i]override[/i] materials associated with this [MeshInstance]. Consider using [method get_active_material] or [method Mesh.surface_get_material] to get materials associated with the [Mesh] resource.
|
||||
</description>
|
||||
</method>
|
||||
<method name="get_surface_material_count" qualifiers="const">
|
||||
<return type="int" />
|
||||
<description>
|
||||
Returns the number of surface override materials.
|
||||
</description>
|
||||
</method>
|
||||
<method name="is_mergeable_with" qualifiers="const">
|
||||
<return type="bool" />
|
||||
<argument index="0" name="other_mesh_instance" type="Node" />
|
||||
<description>
|
||||
Returns [code]true[/code] if this [MeshInstance] can be merged with the specified [code]other_mesh_instance[/code], using the [method MeshInstance.merge_meshes] function.
|
||||
In order to be mergeable, properties of the [MeshInstance] must match, and each surface must match, in terms of material, attributes and vertex format.
|
||||
</description>
|
||||
</method>
|
||||
<method name="merge_meshes">
|
||||
<return type="bool" />
|
||||
<argument index="0" name="mesh_instances" type="Array" default="[ ]" />
|
||||
<argument index="1" name="use_global_space" type="bool" default="false" />
|
||||
<argument index="2" name="check_compatibility" type="bool" default="true" />
|
||||
<description>
|
||||
This function can merge together the data from several source [MeshInstance]s into a single destination [MeshInstance] (the MeshInstance the function is called from). This is primarily useful for improving performance by reducing the number of drawcalls and [Node]s.
|
||||
Merging should only be attempted for simple meshes that do not contain animation.
|
||||
The final vertices can either be returned in global space, or in local space relative to the destination [MeshInstance] global transform (the destination Node must be inside the [SceneTree] for local space to work).
|
||||
The function will make a final check for compatibility between the [MeshInstance]s by default, this should always be used unless you have previously checked for compatibility using [method MeshInstance.is_mergeable_with]. If the compatibility check is omitted and the meshes are merged, you may see rendering errors.
|
||||
[b]Note:[/b] The requirements for similarity between meshes are quite stringent. They can be checked using the [method MeshInstance.is_mergeable_with] function prior to calling [method MeshInstance.merge_meshes].
|
||||
Also note that any initial data in the destination [MeshInstance] data will be discarded.
|
||||
</description>
|
||||
</method>
|
||||
<method name="set_surface_material">
|
||||
<return type="void" />
|
||||
<argument index="0" name="surface" type="int" />
|
||||
<argument index="1" name="material" type="Material" />
|
||||
<description>
|
||||
Sets the override [Material] for the specified surface of the [Mesh] resource. This material is associated with this [MeshInstance] rather than with the [Mesh] resource.
|
||||
</description>
|
||||
</method>
|
||||
</methods>
|
||||
<members>
|
||||
<member name="mesh" type="Mesh" setter="set_mesh" getter="get_mesh">
|
||||
The [Mesh] resource for the instance.
|
||||
</member>
|
||||
<member name="skeleton" type="NodePath" setter="set_skeleton_path" getter="get_skeleton_path" default="NodePath("..")">
|
||||
[NodePath] to the [Skeleton] associated with the instance.
|
||||
</member>
|
||||
<member name="skin" type="Skin" setter="set_skin" getter="get_skin">
|
||||
Sets the skin to be used by this instance.
|
||||
</member>
|
||||
<member name="software_skinning_transform_normals" type="bool" setter="set_software_skinning_transform_normals" getter="is_software_skinning_transform_normals_enabled" default="true">
|
||||
If [code]true[/code], normals are transformed when software skinning is used. Set to [code]false[/code] when normals are not needed for better performance.
|
||||
See [member ProjectSettings.rendering/quality/skinning/software_skinning_fallback] for details about how software skinning is enabled.
|
||||
</member>
|
||||
</members>
|
||||
<constants>
|
||||
</constants>
|
||||
</class>
|
@ -1,24 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<class name="MultiMeshInstance" inherits="GeometryInstance" version="4.2">
|
||||
<brief_description>
|
||||
Node that instances a [MultiMesh].
|
||||
</brief_description>
|
||||
<description>
|
||||
[MultiMeshInstance] is a specialized node to instance [GeometryInstance]s 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).
|
||||
</description>
|
||||
<tutorials>
|
||||
<link>$DOCS_URL/tutorials/performance/vertex_animation/animating_thousands_of_fish.md</link>
|
||||
<link>$DOCS_URL/tutorials/3d/using_multi_mesh_instance.md</link>
|
||||
<link>$DOCS_URL/tutorials/performance/using_multimesh.md</link>
|
||||
</tutorials>
|
||||
<methods>
|
||||
</methods>
|
||||
<members>
|
||||
<member name="multimesh" type="MultiMesh" setter="set_multimesh" getter="get_multimesh">
|
||||
The [MultiMesh] resource that will be used and shared among all instances of the [MultiMeshInstance].
|
||||
</member>
|
||||
</members>
|
||||
<constants>
|
||||
</constants>
|
||||
</class>
|
@ -1,86 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<class name="Navigation" inherits="Spatial" version="4.2">
|
||||
<brief_description>
|
||||
Mesh-based navigation and pathfinding node.
|
||||
</brief_description>
|
||||
<description>
|
||||
Provides navigation and pathfinding within a collection of [NavigationMesh]es. By default, these will be automatically collected from child [NavigationMeshInstance] nodes. In addition to basic pathfinding, this class also assists with aligning navigation agents with the meshes they are navigating on.
|
||||
</description>
|
||||
<tutorials>
|
||||
<link title="3D Navmesh Demo">https://github.com/Relintai/pandemonium_demo_projects/tree/master/3d/navmesh</link>
|
||||
</tutorials>
|
||||
<methods>
|
||||
<method name="get_closest_point" qualifiers="const">
|
||||
<return type="Vector3" />
|
||||
<argument index="0" name="to_point" type="Vector3" />
|
||||
<description>
|
||||
Returns the navigation point closest to the point given. Points are in local coordinate space.
|
||||
</description>
|
||||
</method>
|
||||
<method name="get_closest_point_normal" qualifiers="const">
|
||||
<return type="Vector3" />
|
||||
<argument index="0" name="to_point" type="Vector3" />
|
||||
<description>
|
||||
Returns the surface normal at the navigation point closest to the point given. Useful for rotating a navigation agent according to the navigation mesh it moves on.
|
||||
</description>
|
||||
</method>
|
||||
<method name="get_closest_point_owner" qualifiers="const">
|
||||
<return type="RID" />
|
||||
<argument index="0" name="to_point" type="Vector3" />
|
||||
<description>
|
||||
Returns the owner of the [NavigationMesh] which contains the navigation point closest to the point given. This is usually a [NavigationMeshInstance].
|
||||
</description>
|
||||
</method>
|
||||
<method name="get_closest_point_to_segment" qualifiers="const">
|
||||
<return type="Vector3" />
|
||||
<argument index="0" name="start" type="Vector3" />
|
||||
<argument index="1" name="end" type="Vector3" />
|
||||
<argument index="2" name="use_collision" type="bool" default="false" />
|
||||
<description>
|
||||
Returns the navigation point closest to the given line segment. When enabling [code]use_collision[/code], only considers intersection points between segment and navigation meshes. If multiple intersection points are found, the one closest to the segment start point is returned.
|
||||
</description>
|
||||
</method>
|
||||
<method name="get_rid" qualifiers="const">
|
||||
<return type="RID" />
|
||||
<description>
|
||||
Returns the [RID] of the navigation map on the [NavigationServer].
|
||||
</description>
|
||||
</method>
|
||||
<method name="get_simple_path" qualifiers="const">
|
||||
<return type="PoolVector3Array" />
|
||||
<argument index="0" name="start" type="Vector3" />
|
||||
<argument index="1" name="end" type="Vector3" />
|
||||
<argument index="2" name="optimize" type="bool" default="true" />
|
||||
<description>
|
||||
Returns the path between two given points. Points are in local coordinate space. If [code]optimize[/code] is [code]true[/code] (the default), the agent properties associated with each [NavigationMesh] (radius, height, etc.) are considered in the path calculation, otherwise they are ignored.
|
||||
</description>
|
||||
</method>
|
||||
</methods>
|
||||
<members>
|
||||
<member name="cell_height" type="float" setter="set_cell_height" getter="get_cell_height" default="0.25">
|
||||
The cell height to use for fields.
|
||||
</member>
|
||||
<member name="cell_size" type="float" setter="set_cell_size" getter="get_cell_size" default="0.25">
|
||||
The XZ plane cell size to use for fields.
|
||||
</member>
|
||||
<member name="edge_connection_margin" type="float" setter="set_edge_connection_margin" getter="get_edge_connection_margin" default="0.25">
|
||||
This value is used to detect the near edges to connect compatible regions.
|
||||
</member>
|
||||
<member name="navigation_layers" type="int" setter="set_navigation_layers" getter="get_navigation_layers" default="1">
|
||||
A bitfield determining all navigation map layers the navigation can use on a [method Navigation.get_simple_path] path query.
|
||||
</member>
|
||||
<member name="up_vector" type="Vector3" setter="set_up_vector" getter="get_up_vector" default="Vector3( 0, 1, 0 )">
|
||||
Defines which direction is up. By default, this is [code](0, 1, 0)[/code], which is the world's "up" direction.
|
||||
</member>
|
||||
</members>
|
||||
<signals>
|
||||
<signal name="map_changed">
|
||||
<argument index="0" name="map" type="RID" />
|
||||
<description>
|
||||
Emitted when a navigation map is updated, when a region moves or is modified.
|
||||
</description>
|
||||
</signal>
|
||||
</signals>
|
||||
<constants>
|
||||
</constants>
|
||||
</class>
|
@ -1,56 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<class name="Navigation2D" inherits="Node2D" version="4.2">
|
||||
<brief_description>
|
||||
2D navigation and pathfinding node.
|
||||
</brief_description>
|
||||
<description>
|
||||
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.
|
||||
</description>
|
||||
<tutorials>
|
||||
<link title="2D Navigation Demo">https://github.com/Relintai/pandemonium_demo_projects/tree/master/2d/navigation</link>
|
||||
</tutorials>
|
||||
<methods>
|
||||
<method name="get_closest_point" qualifiers="const">
|
||||
<return type="Vector2" />
|
||||
<argument index="0" name="to_point" type="Vector2" />
|
||||
<description>
|
||||
Returns the navigation point closest to the point given. Points are in local coordinate space.
|
||||
</description>
|
||||
</method>
|
||||
<method name="get_closest_point_owner" qualifiers="const">
|
||||
<return type="RID" />
|
||||
<argument index="0" name="to_point" type="Vector2" />
|
||||
<description>
|
||||
Returns the owner of the [NavigationPolygon] which contains the navigation point closest to the point given. This is usually a [NavigationPolygonInstance].
|
||||
</description>
|
||||
</method>
|
||||
<method name="get_rid" qualifiers="const">
|
||||
<return type="RID" />
|
||||
<description>
|
||||
Returns the object's [RID].
|
||||
</description>
|
||||
</method>
|
||||
<method name="get_simple_path" qualifiers="const">
|
||||
<return type="PoolVector2Array" />
|
||||
<argument index="0" name="start" type="Vector2" />
|
||||
<argument index="1" name="end" type="Vector2" />
|
||||
<argument index="2" name="optimize" type="bool" default="true" />
|
||||
<description>
|
||||
Returns the path between two given points. Points are in local coordinate space. If [code]optimize[/code] is [code]true[/code] (the default), the path is smoothed by merging path segments where possible.
|
||||
</description>
|
||||
</method>
|
||||
</methods>
|
||||
<members>
|
||||
<member name="cell_size" type="float" setter="set_cell_size" getter="get_cell_size" default="1.0">
|
||||
The XY plane cell size to use for fields.
|
||||
</member>
|
||||
<member name="edge_connection_margin" type="float" setter="set_edge_connection_margin" getter="get_edge_connection_margin" default="1.0">
|
||||
This value is used to detect the near edges to connect compatible regions.
|
||||
</member>
|
||||
<member name="navigation_layers" type="int" setter="set_navigation_layers" getter="get_navigation_layers" default="1">
|
||||
A bitfield determining all navigation map layers the navigation can use on a [method Navigation2D.get_simple_path] path query.
|
||||
</member>
|
||||
</members>
|
||||
<constants>
|
||||
</constants>
|
||||
</class>
|
@ -1,766 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<class name="Navigation2DServer" inherits="Object" version="4.2">
|
||||
<brief_description>
|
||||
Server interface for low-level 2D navigation access.
|
||||
</brief_description>
|
||||
<description>
|
||||
Navigation2DServer is the server responsible for all 2D navigation. It handles several objects, namely maps, regions and agents.
|
||||
Maps are made up of regions, which are made of navigation polygons. Together, they define the navigable areas in the 2D world.
|
||||
[b]Note:[/b] Most NavigationServer changes take effect after the next physics frame and not immediately. This includes all changes made to maps, regions or agents by navigation related Nodes in the SceneTree or made through scripts.
|
||||
For two regions to be connected to each other, they must share a similar edge. An edge is considered connected to another if both of its two vertices are at a distance less than navigation map [code]edge_connection_margin[/code] to the respective other edge's vertex.
|
||||
You may assign navigation layers to regions with [method Navigation2DServer.region_set_navigation_layers], which then can be checked upon when requesting a path with [method Navigation2DServer.map_get_path]. This allows allowing or forbidding some areas to 2D objects.
|
||||
To use the collision avoidance system, you may use agents. You can set an agent's target velocity, then the servers will emit a callback with a modified velocity.
|
||||
[b]Note:[/b] The collision avoidance system ignores regions. Using the modified velocity as-is might lead to pushing and agent outside of a navigable area. This is a limitation of the collision avoidance system, any more complex situation may require the use of the physics engine.
|
||||
This server keeps tracks of any call and executes them during the sync phase. This means that you can request any change to the map, using any thread, without worrying.
|
||||
</description>
|
||||
<tutorials>
|
||||
<link title="2D Navigation Demo">https://github.com/Relintai/pandemonium_demo_projects/tree/master/2d/navigation</link>
|
||||
<link title="Using NavigationServer">$DOCS_URL/tutorials/navigation/navigation_using_navigationservers.md</link>
|
||||
</tutorials>
|
||||
<methods>
|
||||
<method name="agent_create">
|
||||
<return type="RID" />
|
||||
<description>
|
||||
Creates the agent.
|
||||
</description>
|
||||
</method>
|
||||
<method name="agent_get_avoidance_enabled" qualifiers="const">
|
||||
<return type="bool" />
|
||||
<argument index="0" name="agent" type="RID" />
|
||||
<description>
|
||||
Return [code]true[/code] if the specified [param agent] uses avoidance.
|
||||
</description>
|
||||
</method>
|
||||
<method name="agent_get_map" qualifiers="const">
|
||||
<return type="RID" />
|
||||
<argument index="0" name="agent" type="RID" />
|
||||
<description>
|
||||
Returns the navigation map [RID] the requested [code]agent[/code] is currently assigned to.
|
||||
</description>
|
||||
</method>
|
||||
<method name="agent_get_paused" qualifiers="const">
|
||||
<return type="bool" />
|
||||
<argument index="0" name="agent" type="RID" />
|
||||
<description>
|
||||
Returns [code]true[/code] if the specified [param agent] is paused.
|
||||
</description>
|
||||
</method>
|
||||
<method name="agent_is_map_changed" qualifiers="const">
|
||||
<return type="bool" />
|
||||
<argument index="0" name="agent" type="RID" />
|
||||
<description>
|
||||
Returns [code]true[/code] if the map got changed the previous frame.
|
||||
</description>
|
||||
</method>
|
||||
<method name="agent_set_avoidance_callback">
|
||||
<return type="void" />
|
||||
<argument index="0" name="agent" type="RID" />
|
||||
<argument index="1" name="object_id" type="int" />
|
||||
<argument index="2" name="method" type="StringName" />
|
||||
<argument index="3" name="userdata" type="Variant" default="null" />
|
||||
<description>
|
||||
Sets the callback [Callable] that gets called after each avoidance processing step for the [param agent]. The calculated [code]safe_velocity[/code] will be dispatched with a signal to the object just before the physics calculations.
|
||||
[b]Note:[/b] Created callbacks are always processed independently of the SceneTree state as long as the agent is on a navigation map and not freed. To disable the dispatch of a callback from an agent use [method agent_set_avoidance_callback] again with an empty [Callable].
|
||||
</description>
|
||||
</method>
|
||||
<method name="agent_set_avoidance_enabled">
|
||||
<return type="void" />
|
||||
<argument index="0" name="agent" type="RID" />
|
||||
<argument index="1" name="enabled" type="bool" />
|
||||
<description>
|
||||
If [param enabled] is [code]true[/code] the specified [param agent] uses avoidance.
|
||||
</description>
|
||||
</method>
|
||||
<method name="agent_set_avoidance_layers">
|
||||
<return type="void" />
|
||||
<argument index="0" name="agent" type="RID" />
|
||||
<argument index="1" name="layers" type="int" />
|
||||
<description>
|
||||
Set the agent's [code]avoidance_layers[/code] bitmask.
|
||||
</description>
|
||||
</method>
|
||||
<method name="agent_set_avoidance_mask">
|
||||
<return type="void" />
|
||||
<argument index="0" name="agent" type="RID" />
|
||||
<argument index="1" name="mask" type="int" />
|
||||
<description>
|
||||
Set the agent's [code]avoidance_mask[/code] bitmask.
|
||||
</description>
|
||||
</method>
|
||||
<method name="agent_set_avoidance_priority">
|
||||
<return type="void" />
|
||||
<argument index="0" name="agent" type="RID" />
|
||||
<argument index="1" name="priority" type="float" />
|
||||
<description>
|
||||
Set the agent's [code]avoidance_priority[/code] with a [param priority] between 0.0 (lowest priority) to 1.0 (highest priority).
|
||||
The specified [param agent] does not adjust the velocity for other agents that would match the [code]avoidance_mask[/code] but have a lower [code] avoidance_priority[/code]. This in turn makes the other agents with lower priority adjust their velocities even more to avoid collision with this agent.
|
||||
</description>
|
||||
</method>
|
||||
<method name="agent_set_map">
|
||||
<return type="void" />
|
||||
<argument index="0" name="agent" type="RID" />
|
||||
<argument index="1" name="map" type="RID" />
|
||||
<description>
|
||||
Puts the agent in the map.
|
||||
</description>
|
||||
</method>
|
||||
<method name="agent_set_max_neighbors">
|
||||
<return type="void" />
|
||||
<argument index="0" name="agent" type="RID" />
|
||||
<argument index="1" name="count" type="int" />
|
||||
<description>
|
||||
Sets the maximum number of other agents the agent takes into account in the navigation. The larger this number, the longer the running time of the simulation. If the number is too low, the simulation will not be safe.
|
||||
</description>
|
||||
</method>
|
||||
<method name="agent_set_max_speed">
|
||||
<return type="void" />
|
||||
<argument index="0" name="agent" type="RID" />
|
||||
<argument index="1" name="max_speed" type="float" />
|
||||
<description>
|
||||
Sets the maximum speed of the agent. Must be positive.
|
||||
</description>
|
||||
</method>
|
||||
<method name="agent_set_neighbor_distance">
|
||||
<return type="void" />
|
||||
<argument index="0" name="agent" type="RID" />
|
||||
<argument index="1" name="dist" type="float" />
|
||||
<description>
|
||||
Sets the maximum distance to other agents this agent takes into account in the navigation. The larger this number, the longer the running time of the simulation. If the number is too low, the simulation will not be safe.
|
||||
</description>
|
||||
</method>
|
||||
<method name="agent_set_paused">
|
||||
<return type="void" />
|
||||
<argument index="0" name="agent" type="RID" />
|
||||
<argument index="1" name="paused" type="bool" />
|
||||
<description>
|
||||
If [param paused] is true the specified [param agent] will not be processed, e.g. calculate avoidance velocities or receive avoidance callbacks.
|
||||
</description>
|
||||
</method>
|
||||
<method name="agent_set_position">
|
||||
<return type="void" />
|
||||
<argument index="0" name="agent" type="RID" />
|
||||
<argument index="1" name="position" type="Vector2" />
|
||||
<description>
|
||||
Sets the position of the agent in world space.
|
||||
</description>
|
||||
</method>
|
||||
<method name="agent_set_radius">
|
||||
<return type="void" />
|
||||
<argument index="0" name="agent" type="RID" />
|
||||
<argument index="1" name="radius" type="float" />
|
||||
<description>
|
||||
Sets the radius of the agent.
|
||||
</description>
|
||||
</method>
|
||||
<method name="agent_set_time_horizon_agents">
|
||||
<return type="void" />
|
||||
<argument index="0" name="agent" type="RID" />
|
||||
<argument index="1" name="time_horizon" type="float" />
|
||||
<description>
|
||||
The minimal amount of time for which the agent's velocities that are computed by the simulation are safe with respect to other agents. The larger this number, the sooner this agent will respond to the presence of other agents, but the less freedom this agent has in choosing its velocities. A too high value will slow down agents movement considerably. Must be positive.
|
||||
</description>
|
||||
</method>
|
||||
<method name="agent_set_time_horizon_obstacles">
|
||||
<return type="void" />
|
||||
<argument index="0" name="agent" type="RID" />
|
||||
<argument index="1" name="time_horizon" type="float" />
|
||||
<description>
|
||||
The minimal amount of time for which the agent's velocities that are computed by the simulation are safe with respect to static avoidance obstacles. The larger this number, the sooner this agent will respond to the presence of static avoidance obstacles, but the less freedom this agent has in choosing its velocities. A too high value will slow down agents movement considerably. Must be positive.
|
||||
</description>
|
||||
</method>
|
||||
<method name="agent_set_velocity">
|
||||
<return type="void" />
|
||||
<argument index="0" name="agent" type="RID" />
|
||||
<argument index="1" name="velocity" type="Vector2" />
|
||||
<description>
|
||||
Sets [param velocity] as the new wanted velocity for the specified [param agent]. The avoidance simulation will try to fulfil this velocity if possible but will modify it to avoid collision with other agent's and obstacles. When an agent is teleported to a new position far away use [method agent_set_velocity_forced] instead to reset the internal velocity state.
|
||||
</description>
|
||||
</method>
|
||||
<method name="agent_set_velocity_forced">
|
||||
<return type="void" />
|
||||
<argument index="0" name="agent" type="RID" />
|
||||
<argument index="1" name="velocity" type="Vector2" />
|
||||
<description>
|
||||
Replaces the internal velocity in the collision avoidance simulation with [param velocity] for the specified [param agent]. When an agent is teleported to a new position far away this function should be used in the same frame. If called frequently this function can get agents stuck.
|
||||
</description>
|
||||
</method>
|
||||
<method name="free_rid">
|
||||
<return type="void" />
|
||||
<argument index="0" name="rid" type="RID" />
|
||||
<description>
|
||||
Destroys the given RID.
|
||||
</description>
|
||||
</method>
|
||||
<method name="get_debug_enabled" qualifiers="const">
|
||||
<return type="bool" />
|
||||
<description>
|
||||
Returns [code]true[/code] when the NavigationServer has debug enabled.
|
||||
</description>
|
||||
</method>
|
||||
<method name="get_maps" qualifiers="const">
|
||||
<return type="Array" />
|
||||
<description>
|
||||
Returns all created navigation map [RID]s on the NavigationServer. This returns both 2D and 3D created navigation maps as there is technically no distinction between them.
|
||||
</description>
|
||||
</method>
|
||||
<method name="link_create">
|
||||
<return type="RID" />
|
||||
<description>
|
||||
Create a new link between two positions on a map.
|
||||
</description>
|
||||
</method>
|
||||
<method name="link_get_enabled" qualifiers="const">
|
||||
<return type="bool" />
|
||||
<argument index="0" name="link" type="RID" />
|
||||
<description>
|
||||
Returns [code]true[/code] if the specified [param link] is enabled.
|
||||
</description>
|
||||
</method>
|
||||
<method name="link_get_end_position" qualifiers="const">
|
||||
<return type="Vector2" />
|
||||
<argument index="0" name="link" type="RID" />
|
||||
<description>
|
||||
Returns the ending position of this [code]link[/code].
|
||||
</description>
|
||||
</method>
|
||||
<method name="link_get_enter_cost" qualifiers="const">
|
||||
<return type="float" />
|
||||
<argument index="0" name="link" type="RID" />
|
||||
<description>
|
||||
Returns the [code]enter_cost[/code] of this [code]link[/code].
|
||||
</description>
|
||||
</method>
|
||||
<method name="link_get_map" qualifiers="const">
|
||||
<return type="RID" />
|
||||
<argument index="0" name="link" type="RID" />
|
||||
<description>
|
||||
Returns the navigation map [RID] the requested [code]link[/code] is currently assigned to.
|
||||
</description>
|
||||
</method>
|
||||
<method name="link_get_navigation_layers" qualifiers="const">
|
||||
<return type="int" />
|
||||
<argument index="0" name="link" type="RID" />
|
||||
<description>
|
||||
Returns the navigation layers for this [code]link[/code].
|
||||
</description>
|
||||
</method>
|
||||
<method name="link_get_owner_id" qualifiers="const">
|
||||
<return type="int" />
|
||||
<argument index="0" name="link" type="RID" />
|
||||
<description>
|
||||
Returns the [code]ObjectID[/code] of the object which manages this link.
|
||||
</description>
|
||||
</method>
|
||||
<method name="link_get_start_position" qualifiers="const">
|
||||
<return type="Vector2" />
|
||||
<argument index="0" name="link" type="RID" />
|
||||
<description>
|
||||
Returns the starting position of this [code]link[/code].
|
||||
</description>
|
||||
</method>
|
||||
<method name="link_get_travel_cost" qualifiers="const">
|
||||
<return type="float" />
|
||||
<argument index="0" name="link" type="RID" />
|
||||
<description>
|
||||
Returns the [code]travel_cost[/code] of this [code]link[/code].
|
||||
</description>
|
||||
</method>
|
||||
<method name="link_is_bidirectional" qualifiers="const">
|
||||
<return type="bool" />
|
||||
<argument index="0" name="link" type="RID" />
|
||||
<description>
|
||||
Returns whether this [code]link[/code] can be travelled in both directions.
|
||||
</description>
|
||||
</method>
|
||||
<method name="link_set_bidirectional">
|
||||
<return type="void" />
|
||||
<argument index="0" name="link" type="RID" />
|
||||
<argument index="1" name="bidirectional" type="bool" />
|
||||
<description>
|
||||
Sets whether this [code]link[/code] can be travelled in both directions.
|
||||
</description>
|
||||
</method>
|
||||
<method name="link_set_enabled">
|
||||
<return type="void" />
|
||||
<argument index="0" name="link" type="RID" />
|
||||
<argument index="1" name="enabled" type="bool" />
|
||||
<description>
|
||||
If [param enabled] is [code]true[/code] the specified [param link] will contribute to its current navigation map.
|
||||
</description>
|
||||
</method>
|
||||
<method name="link_set_end_position">
|
||||
<return type="void" />
|
||||
<argument index="0" name="link" type="RID" />
|
||||
<argument index="1" name="position" type="Vector2" />
|
||||
<description>
|
||||
Sets the exit position for the [code]link[/code].
|
||||
</description>
|
||||
</method>
|
||||
<method name="link_set_enter_cost">
|
||||
<return type="void" />
|
||||
<argument index="0" name="link" type="RID" />
|
||||
<argument index="1" name="enter_cost" type="float" />
|
||||
<description>
|
||||
Sets the [code]enter_cost[/code] for this [code]link[/code].
|
||||
</description>
|
||||
</method>
|
||||
<method name="link_set_map">
|
||||
<return type="void" />
|
||||
<argument index="0" name="link" type="RID" />
|
||||
<argument index="1" name="map" type="RID" />
|
||||
<description>
|
||||
Sets the navigation map [RID] for the link.
|
||||
</description>
|
||||
</method>
|
||||
<method name="link_set_navigation_layers">
|
||||
<return type="void" />
|
||||
<argument index="0" name="link" type="RID" />
|
||||
<argument index="1" name="navigation_layers" type="int" />
|
||||
<description>
|
||||
Set the links's navigation layers. This allows selecting links from a path request (when using [method NavigationServer2D.map_get_path]).
|
||||
</description>
|
||||
</method>
|
||||
<method name="link_set_owner_id">
|
||||
<return type="void" />
|
||||
<argument index="0" name="link" type="RID" />
|
||||
<argument index="1" name="owner_id" type="int" />
|
||||
<description>
|
||||
Set the [code]ObjectID[/code] of the object which manages this link.
|
||||
</description>
|
||||
</method>
|
||||
<method name="link_set_start_position">
|
||||
<return type="void" />
|
||||
<argument index="0" name="link" type="RID" />
|
||||
<argument index="1" name="position" type="Vector2" />
|
||||
<description>
|
||||
Sets the entry position for this [code]link[/code].
|
||||
</description>
|
||||
</method>
|
||||
<method name="link_set_travel_cost">
|
||||
<return type="void" />
|
||||
<argument index="0" name="link" type="RID" />
|
||||
<argument index="1" name="travel_cost" type="float" />
|
||||
<description>
|
||||
Sets the [code]travel_cost[/code] for this [code]link[/code].
|
||||
</description>
|
||||
</method>
|
||||
<method name="map_create">
|
||||
<return type="RID" />
|
||||
<description>
|
||||
Create a new map.
|
||||
</description>
|
||||
</method>
|
||||
<method name="map_force_update">
|
||||
<return type="void" />
|
||||
<argument index="0" name="map" type="RID" />
|
||||
<description>
|
||||
This function immediately forces synchronization of the specified navigation [code]map[/code] [RID]. By default navigation maps are only synchronized at the end of each physics frame. This function can be used to immediately (re)calculate all the navigation meshes and region connections of the navigation map. This makes it possible to query a navigation path for a changed map immediately and in the same frame (multiple times if needed).
|
||||
Due to technical restrictions the current NavigationServer command queue will be flushed. This means all already queued update commands for this physics frame will be executed, even those intended for other maps, regions and agents not part of the specified map. The expensive computation of the navigation meshes and region connections of a map will only be done for the specified map. Other maps will receive the normal synchronization at the end of the physics frame. Should the specified map receive changes after the forced update it will update again as well when the other maps receive their update.
|
||||
Avoidance processing and dispatch of the [code]safe_velocity[/code] signals is untouched by this function and continues to happen for all maps and agents at the end of the physics frame.
|
||||
[b]Note:[/b] With great power comes great responsibility. This function should only be used by users that really know what they are doing and have a good reason for it. Forcing an immediate update of a navigation map requires locking the NavigationServer and flushing the entire NavigationServer command queue. Not only can this severely impact the performance of a game but it can also introduce bugs if used inappropriately without much foresight.
|
||||
</description>
|
||||
</method>
|
||||
<method name="map_get_agents" qualifiers="const">
|
||||
<return type="Array" />
|
||||
<argument index="0" name="map" type="RID" />
|
||||
<description>
|
||||
Returns all navigation agents [RID]s that are currently assigned to the requested navigation [code]map[/code].
|
||||
</description>
|
||||
</method>
|
||||
<method name="map_get_cell_size" qualifiers="const">
|
||||
<return type="float" />
|
||||
<argument index="0" name="map" type="RID" />
|
||||
<description>
|
||||
Returns the map cell size used to rasterize the navigation mesh vertices.
|
||||
</description>
|
||||
</method>
|
||||
<method name="map_get_closest_point" qualifiers="const">
|
||||
<return type="Vector2" />
|
||||
<argument index="0" name="map" type="RID" />
|
||||
<argument index="1" name="to_point" type="Vector2" />
|
||||
<description>
|
||||
Returns the point closest to the provided [code]to_point[/code] on the navigation mesh surface.
|
||||
</description>
|
||||
</method>
|
||||
<method name="map_get_closest_point_owner" qualifiers="const">
|
||||
<return type="RID" />
|
||||
<argument index="0" name="map" type="RID" />
|
||||
<argument index="1" name="to_point" type="Vector2" />
|
||||
<description>
|
||||
Returns the owner region RID for the point returned by [method map_get_closest_point].
|
||||
</description>
|
||||
</method>
|
||||
<method name="map_get_edge_connection_margin" qualifiers="const">
|
||||
<return type="float" />
|
||||
<argument index="0" name="map" type="RID" />
|
||||
<description>
|
||||
Returns the edge connection margin of the map. The edge connection margin is a distance used to connect two regions.
|
||||
</description>
|
||||
</method>
|
||||
<method name="map_get_link_connection_radius" qualifiers="const">
|
||||
<return type="float" />
|
||||
<argument index="0" name="map" type="RID" />
|
||||
<description>
|
||||
Returns the link connection radius of the map. This distance is the maximum range any link will search for navigation mesh polygons to connect to.
|
||||
</description>
|
||||
</method>
|
||||
<method name="map_get_links" qualifiers="const">
|
||||
<return type="Array" />
|
||||
<argument index="0" name="map" type="RID" />
|
||||
<description>
|
||||
Returns all navigation link [RID]s that are currently assigned to the requested navigation [code]map[/code].
|
||||
</description>
|
||||
</method>
|
||||
<method name="map_get_obstacles" qualifiers="const">
|
||||
<return type="Array" />
|
||||
<argument index="0" name="map" type="RID" />
|
||||
<description>
|
||||
Returns all navigation obstacle [RID]s that are currently assigned to the requested navigation [code]map[/code].
|
||||
</description>
|
||||
</method>
|
||||
<method name="map_get_path" qualifiers="const">
|
||||
<return type="PoolVector2Array" />
|
||||
<argument index="0" name="map" type="RID" />
|
||||
<argument index="1" name="origin" type="Vector2" />
|
||||
<argument index="2" name="destination" type="Vector2" />
|
||||
<argument index="3" name="optimize" type="bool" />
|
||||
<argument index="4" name="navigation_layers" type="int" default="1" />
|
||||
<description>
|
||||
Returns the navigation path to reach the destination from the origin. [code]navigation_layers[/code] is a bitmask of all region layers that are allowed to be in the path.
|
||||
</description>
|
||||
</method>
|
||||
<method name="map_get_regions" qualifiers="const">
|
||||
<return type="Array" />
|
||||
<argument index="0" name="map" type="RID" />
|
||||
<description>
|
||||
Returns all navigation regions [RID]s that are currently assigned to the requested navigation [code]map[/code].
|
||||
</description>
|
||||
</method>
|
||||
<method name="map_get_use_edge_connections" qualifiers="const">
|
||||
<return type="bool" />
|
||||
<argument index="0" name="map" type="RID" />
|
||||
<description>
|
||||
Returns whether the navigation [param map] allows navigation regions to use edge connections to connect with other navigation regions within proximity of the navigation map edge connection margin.
|
||||
</description>
|
||||
</method>
|
||||
<method name="map_is_active" qualifiers="const">
|
||||
<return type="bool" />
|
||||
<argument index="0" name="map" type="RID" />
|
||||
<description>
|
||||
Returns [code]true[/code] if the map is active.
|
||||
</description>
|
||||
</method>
|
||||
<method name="map_set_active">
|
||||
<return type="void" />
|
||||
<argument index="0" name="map" type="RID" />
|
||||
<argument index="1" name="active" type="bool" />
|
||||
<description>
|
||||
Sets the map active.
|
||||
</description>
|
||||
</method>
|
||||
<method name="map_set_cell_size">
|
||||
<return type="void" />
|
||||
<argument index="0" name="map" type="RID" />
|
||||
<argument index="1" name="cell_size" type="float" />
|
||||
<description>
|
||||
Sets the map cell size used to rasterize the navigation mesh vertices. Must match with the cell size of the used navigation meshes.
|
||||
</description>
|
||||
</method>
|
||||
<method name="map_set_edge_connection_margin">
|
||||
<return type="void" />
|
||||
<argument index="0" name="map" type="RID" />
|
||||
<argument index="1" name="margin" type="float" />
|
||||
<description>
|
||||
Set the map edge connection margin used to weld the compatible region edges.
|
||||
</description>
|
||||
</method>
|
||||
<method name="map_set_link_connection_radius">
|
||||
<return type="void" />
|
||||
<argument index="0" name="map" type="RID" />
|
||||
<argument index="1" name="radius" type="float" />
|
||||
<description>
|
||||
Set the map's link connection radius used to connect links to navigation polygons.
|
||||
</description>
|
||||
</method>
|
||||
<method name="map_set_use_edge_connections">
|
||||
<return type="void" />
|
||||
<argument index="0" name="map" type="RID" />
|
||||
<argument index="1" name="enabled" type="bool" />
|
||||
<description>
|
||||
Set the navigation [param map] edge connection use. If [param enabled] the navigation map allows navigation regions to use edge connections to connect with other navigation regions within proximity of the navigation map edge connection margin.
|
||||
</description>
|
||||
</method>
|
||||
<method name="obstacle_create">
|
||||
<return type="RID" />
|
||||
<description>
|
||||
Creates a new navigation obstacle.
|
||||
</description>
|
||||
</method>
|
||||
<method name="obstacle_get_avoidance_enabled" qualifiers="const">
|
||||
<return type="bool" />
|
||||
<argument index="0" name="obstacle" type="RID" />
|
||||
<description>
|
||||
Returns [code]true[/code] if the provided [param obstacle] has avoidance enabled.
|
||||
</description>
|
||||
</method>
|
||||
<method name="obstacle_get_map" qualifiers="const">
|
||||
<return type="RID" />
|
||||
<argument index="0" name="obstacle" type="RID" />
|
||||
<description>
|
||||
Returns the navigation map [RID] the requested [param obstacle] is currently assigned to.
|
||||
</description>
|
||||
</method>
|
||||
<method name="obstacle_get_paused" qualifiers="const">
|
||||
<return type="bool" />
|
||||
<argument index="0" name="obstacle" type="RID" />
|
||||
<description>
|
||||
Returns [code]true[/code] if the specified [param obstacle] is paused.
|
||||
</description>
|
||||
</method>
|
||||
<method name="obstacle_set_avoidance_enabled">
|
||||
<return type="void" />
|
||||
<argument index="0" name="obstacle" type="RID" />
|
||||
<argument index="1" name="enabled" type="bool" />
|
||||
<description>
|
||||
If [param enabled] the provided [param obstacle] affects avoidance using agents.
|
||||
</description>
|
||||
</method>
|
||||
<method name="obstacle_set_avoidance_layers">
|
||||
<return type="void" />
|
||||
<argument index="0" name="obstacle" type="RID" />
|
||||
<argument index="1" name="layers" type="int" />
|
||||
<description>
|
||||
Set the obstacles's [code]avoidance_layers[/code] bitmask.
|
||||
</description>
|
||||
</method>
|
||||
<method name="obstacle_set_map">
|
||||
<return type="void" />
|
||||
<argument index="0" name="obstacle" type="RID" />
|
||||
<argument index="1" name="map" type="RID" />
|
||||
<description>
|
||||
Sets the navigation map [RID] for the obstacle.
|
||||
</description>
|
||||
</method>
|
||||
<method name="obstacle_set_paused">
|
||||
<return type="void" />
|
||||
<argument index="0" name="obstacle" type="RID" />
|
||||
<argument index="1" name="paused" type="bool" />
|
||||
<description>
|
||||
If [param paused] is true the specified [param obstacle] will not be processed, e.g. affect avoidance velocities.
|
||||
</description>
|
||||
</method>
|
||||
<method name="obstacle_set_position">
|
||||
<return type="void" />
|
||||
<argument index="0" name="obstacle" type="RID" />
|
||||
<argument index="1" name="position" type="Vector2" />
|
||||
<description>
|
||||
Sets the position of the obstacle in world space.
|
||||
</description>
|
||||
</method>
|
||||
<method name="obstacle_set_radius">
|
||||
<return type="void" />
|
||||
<argument index="0" name="obstacle" type="RID" />
|
||||
<argument index="1" name="radius" type="float" />
|
||||
<description>
|
||||
Sets the radius of the dynamic obstacle.
|
||||
</description>
|
||||
</method>
|
||||
<method name="obstacle_set_velocity">
|
||||
<return type="void" />
|
||||
<argument index="0" name="obstacle" type="RID" />
|
||||
<argument index="1" name="velocity" type="Vector2" />
|
||||
<description>
|
||||
Sets [param velocity] of the dynamic [param obstacle]. Allows other agents to better predict the movement of the dynamic obstacle. Only works in combination with the radius of the obstacle.
|
||||
</description>
|
||||
</method>
|
||||
<method name="obstacle_set_vertices">
|
||||
<return type="void" />
|
||||
<argument index="0" name="obstacle" type="RID" />
|
||||
<argument index="1" name="vertices" type="PoolVector2Array" />
|
||||
<description>
|
||||
Sets the outline vertices for the obstacle. If the vertices are winded in clockwise order agents will be pushed in by the obstacle, else they will be pushed out.
|
||||
</description>
|
||||
</method>
|
||||
<method name="region_create">
|
||||
<return type="RID" />
|
||||
<description>
|
||||
Creates a new region.
|
||||
</description>
|
||||
</method>
|
||||
<method name="region_get_connection_pathway_end" qualifiers="const">
|
||||
<return type="Vector2" />
|
||||
<argument index="0" name="region" type="RID" />
|
||||
<argument index="1" name="connection" type="int" />
|
||||
<description>
|
||||
Returns the ending point of a connection door. [code]connection[/code] is an index between 0 and the return value of [method region_get_connections_count].
|
||||
</description>
|
||||
</method>
|
||||
<method name="region_get_connection_pathway_start" qualifiers="const">
|
||||
<return type="Vector2" />
|
||||
<argument index="0" name="region" type="RID" />
|
||||
<argument index="1" name="connection" type="int" />
|
||||
<description>
|
||||
Returns the starting point of a connection door. [code]connection[/code] is an index between 0 and the return value of [method region_get_connections_count].
|
||||
</description>
|
||||
</method>
|
||||
<method name="region_get_connections_count" qualifiers="const">
|
||||
<return type="int" />
|
||||
<argument index="0" name="region" type="RID" />
|
||||
<description>
|
||||
Returns how many connections this [code]region[/code] has with other regions in the map.
|
||||
</description>
|
||||
</method>
|
||||
<method name="region_get_enabled" qualifiers="const">
|
||||
<return type="bool" />
|
||||
<argument index="0" name="region" type="RID" />
|
||||
<description>
|
||||
Returns [code]true[/code] if the specified [param region] is enabled.
|
||||
</description>
|
||||
</method>
|
||||
<method name="region_get_enter_cost" qualifiers="const">
|
||||
<return type="float" />
|
||||
<argument index="0" name="region" type="RID" />
|
||||
<description>
|
||||
Returns the [code]enter_cost[/code] of this [code]region[/code].
|
||||
</description>
|
||||
</method>
|
||||
<method name="region_get_map" qualifiers="const">
|
||||
<return type="RID" />
|
||||
<argument index="0" name="region" type="RID" />
|
||||
<description>
|
||||
Returns the navigation map [RID] the requested [code]region[/code] is currently assigned to.
|
||||
</description>
|
||||
</method>
|
||||
<method name="region_get_navigation_layers" qualifiers="const">
|
||||
<return type="int" />
|
||||
<argument index="0" name="region" type="RID" />
|
||||
<description>
|
||||
Returns the region's navigation layers.
|
||||
</description>
|
||||
</method>
|
||||
<method name="region_get_owner_id" qualifiers="const">
|
||||
<return type="int" />
|
||||
<argument index="0" name="region" type="RID" />
|
||||
<description>
|
||||
Returns the [code]ObjectID[/code] of the object which manages this region.
|
||||
</description>
|
||||
</method>
|
||||
<method name="region_get_travel_cost" qualifiers="const">
|
||||
<return type="float" />
|
||||
<argument index="0" name="region" type="RID" />
|
||||
<description>
|
||||
Returns the [code]travel_cost[/code] of this [code]region[/code].
|
||||
</description>
|
||||
</method>
|
||||
<method name="region_get_use_edge_connections" qualifiers="const">
|
||||
<return type="bool" />
|
||||
<argument index="0" name="region" type="RID" />
|
||||
<description>
|
||||
Returns whether the navigation [param region] is set to use edge connections to connect with other navigation regions within proximity of the navigation map edge connection margin.
|
||||
</description>
|
||||
</method>
|
||||
<method name="region_owns_point" qualifiers="const">
|
||||
<return type="bool" />
|
||||
<argument index="0" name="region" type="RID" />
|
||||
<argument index="1" name="point" type="Vector2" />
|
||||
<description>
|
||||
Returns [code]true[/code] if the provided [code]point[/code] in world space is currently owned by the provided navigation [code]region[/code]. Owned in this context means that one of the region's navigation mesh polygon faces has a possible position at the closest distance to this point compared to all other navigation meshes from other navigation regions that are also registered on the navigation map of the provided region.
|
||||
If multiple navigation meshes have positions at equal distance the navigation region whose polygons are processed first wins the ownership. Polygons are processed in the same order that navigation regions were registered on the NavigationServer.
|
||||
[b]Note:[/b] If navigation meshes from different navigation regions overlap (which should be avoided in general) the result might not be what is expected.
|
||||
</description>
|
||||
</method>
|
||||
<method name="region_set_enabled">
|
||||
<return type="void" />
|
||||
<argument index="0" name="region" type="RID" />
|
||||
<argument index="1" name="enabled" type="bool" />
|
||||
<description>
|
||||
If [param enabled] is [code]true[/code] the specified [param region] will contribute to its current navigation map.
|
||||
</description>
|
||||
</method>
|
||||
<method name="region_set_enter_cost">
|
||||
<return type="void" />
|
||||
<argument index="0" name="region" type="RID" />
|
||||
<argument index="1" name="enter_cost" type="float" />
|
||||
<description>
|
||||
Sets the [code]enter_cost[/code] for this [code]region[/code].
|
||||
</description>
|
||||
</method>
|
||||
<method name="region_set_map">
|
||||
<return type="void" />
|
||||
<argument index="0" name="region" type="RID" />
|
||||
<argument index="1" name="map" type="RID" />
|
||||
<description>
|
||||
Sets the map for the region.
|
||||
</description>
|
||||
</method>
|
||||
<method name="region_set_navigation_layers">
|
||||
<return type="void" />
|
||||
<argument index="0" name="region" type="RID" />
|
||||
<argument index="1" name="navigation_layers" type="int" />
|
||||
<description>
|
||||
Set the region's navigation layers. This allows selecting regions from a path request (when using [method Navigation2DServer.map_get_path]).
|
||||
</description>
|
||||
</method>
|
||||
<method name="region_set_navigation_polygon">
|
||||
<return type="void" />
|
||||
<argument index="0" name="region" type="RID" />
|
||||
<argument index="1" name="nav_poly" type="NavigationPolygon" />
|
||||
<description>
|
||||
Sets the navigation mesh for the region.
|
||||
</description>
|
||||
</method>
|
||||
<method name="region_set_owner_id">
|
||||
<return type="void" />
|
||||
<argument index="0" name="region" type="RID" />
|
||||
<argument index="1" name="owner_id" type="int" />
|
||||
<description>
|
||||
Set the [code]ObjectID[/code] of the object which manages this region.
|
||||
</description>
|
||||
</method>
|
||||
<method name="region_set_transform">
|
||||
<return type="void" />
|
||||
<argument index="0" name="region" type="RID" />
|
||||
<argument index="1" name="transform" type="Transform2D" />
|
||||
<description>
|
||||
Sets the global transformation for the region.
|
||||
</description>
|
||||
</method>
|
||||
<method name="region_set_travel_cost">
|
||||
<return type="void" />
|
||||
<argument index="0" name="region" type="RID" />
|
||||
<argument index="1" name="travel_cost" type="float" />
|
||||
<description>
|
||||
Sets the [code]travel_cost[/code] for this [code]region[/code].
|
||||
</description>
|
||||
</method>
|
||||
<method name="region_set_use_edge_connections">
|
||||
<return type="void" />
|
||||
<argument index="0" name="region" type="RID" />
|
||||
<argument index="1" name="enabled" type="bool" />
|
||||
<description>
|
||||
If [param enabled] the navigation [param region] will use edge connections to connect with other navigation regions within proximity of the navigation map edge connection margin.
|
||||
</description>
|
||||
</method>
|
||||
<method name="set_debug_enabled">
|
||||
<return type="void" />
|
||||
<argument index="0" name="enabled" type="bool" />
|
||||
<description>
|
||||
</description>
|
||||
</method>
|
||||
</methods>
|
||||
<signals>
|
||||
<signal name="map_changed">
|
||||
<argument index="0" name="map" type="RID" />
|
||||
<description>
|
||||
Emitted when a navigation map is updated, when a region moves or is modified.
|
||||
</description>
|
||||
</signal>
|
||||
<signal name="navigation_debug_changed">
|
||||
<description>
|
||||
Emitted when navigation debug settings are changed. Only available in debug builds.
|
||||
</description>
|
||||
</signal>
|
||||
</signals>
|
||||
<constants>
|
||||
</constants>
|
||||
</class>
|
@ -1,288 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<class name="NavigationAgent" inherits="Node" version="4.2">
|
||||
<brief_description>
|
||||
3D agent used in navigation for collision avoidance.
|
||||
</brief_description>
|
||||
<description>
|
||||
3D agent that is used in navigation to reach a position while avoiding static and dynamic obstacles. The dynamic obstacles are avoided using RVO (Reciprocal Velocity Obstacles) collision avoidance. The agent needs navigation data to work correctly. By default this node will register to the default [World3D] navigation map. If this node is a child of a [Navigation] node it will register to the navigation map of the navigation node or the function [method set_navigation] can be used to set the navigation node directly. [NavigationAgent] is physics safe.
|
||||
[b]Note:[/b] After [member target_position] is set, the [method get_next_path_position] function must be used once every physics frame to update the internal path logic of the NavigationAgent. The returned position from this function should be used as the next movement position for the agent's parent node.
|
||||
</description>
|
||||
<tutorials>
|
||||
<link title="Using NavigationAgents">$DOCS_URL/tutorials/navigation/navigation_using_navigationagents.md</link>
|
||||
</tutorials>
|
||||
<methods>
|
||||
<method name="distance_to_target" qualifiers="const">
|
||||
<return type="float" />
|
||||
<description>
|
||||
Returns the distance to the target position, using the agent's global position. The user must set [member target_position] in order for this to be accurate.
|
||||
</description>
|
||||
</method>
|
||||
<method name="get_avoidance_layer_value" qualifiers="const">
|
||||
<return type="bool" />
|
||||
<argument index="0" name="layer_number" type="int" />
|
||||
<description>
|
||||
Returns whether or not the specified layer of the [member avoidance_layers] bitmask is enabled, given a [param layer_number] between 1 and 32.
|
||||
</description>
|
||||
</method>
|
||||
<method name="get_avoidance_mask_value" qualifiers="const">
|
||||
<return type="bool" />
|
||||
<argument index="0" name="mask_number" type="int" />
|
||||
<description>
|
||||
Returns whether or not the specified mask of the [member avoidance_mask] bitmask is enabled, given a [param mask_number] between 1 and 32.
|
||||
</description>
|
||||
</method>
|
||||
<method name="get_current_navigation_path" qualifiers="const">
|
||||
<return type="PoolVector3Array" />
|
||||
<description>
|
||||
Returns this agent's current path from start to finish in global coordinates. The path only updates when the target position is changed or the agent requires a repath. The path array is not intended to be used in direct path movement as the agent has its own internal path logic that would get corrupted by changing the path array manually. Use the intended [method get_next_position] once every physics frame to receive the next path point for the agents movement as this function also updates the internal path logic.
|
||||
</description>
|
||||
</method>
|
||||
<method name="get_current_navigation_path_index" qualifiers="const">
|
||||
<return type="int" />
|
||||
<description>
|
||||
Returns which index the agent is currently on in the navigation path's [PoolVector3Array].
|
||||
</description>
|
||||
</method>
|
||||
<method name="get_current_navigation_result" qualifiers="const">
|
||||
<return type="NavigationPathQueryResult3D" />
|
||||
<description>
|
||||
Returns the path query result for the path the agent is currently following.
|
||||
</description>
|
||||
</method>
|
||||
<method name="get_final_position">
|
||||
<return type="Vector3" />
|
||||
<description>
|
||||
Returns the reachable final position of the current navigation path in global coordinates. This position can change if the agent needs to update the navigation path which makes the agent emit the [signal path_changed] signal.
|
||||
</description>
|
||||
</method>
|
||||
<method name="get_navigation" qualifiers="const">
|
||||
<return type="Node" />
|
||||
<description>
|
||||
Returns the [Navigation] node that the agent is using for its navigation system.
|
||||
</description>
|
||||
</method>
|
||||
<method name="get_navigation_layer_value" qualifiers="const">
|
||||
<return type="bool" />
|
||||
<argument index="0" name="layer_number" type="int" />
|
||||
<description>
|
||||
Returns whether or not the specified layer of the [member navigation_layers] bitmask is enabled, given a [code]layer_number[/code] between 1 and 32.
|
||||
</description>
|
||||
</method>
|
||||
<method name="get_navigation_map" qualifiers="const">
|
||||
<return type="RID" />
|
||||
<description>
|
||||
Returns the [RID] of the navigation map for this NavigationAgent node. This function returns always the map set on the NavigationAgent node and not the map of the abstract agent on the NavigationServer. If the agent map is changed directly with the NavigationServer API the NavigationAgent node will not be aware of the map change. Use [method set_navigation_map] to change the navigation map for the NavigationAgent and also update the agent on the NavigationServer.
|
||||
</description>
|
||||
</method>
|
||||
<method name="get_next_position">
|
||||
<return type="Vector3" />
|
||||
<description>
|
||||
Returns the next position in global coordinates that can be moved to, making sure that there are no static objects in the way. If the agent does not have a navigation path, it will return the position of the agent's parent. The use of this function once every physics frame is required to update the internal path logic of the NavigationAgent.
|
||||
</description>
|
||||
</method>
|
||||
<method name="get_rid" qualifiers="const">
|
||||
<return type="RID" />
|
||||
<description>
|
||||
Returns the [RID] of this agent on the [NavigationServer].
|
||||
</description>
|
||||
</method>
|
||||
<method name="is_navigation_finished">
|
||||
<return type="bool" />
|
||||
<description>
|
||||
Returns [code]true[/code] if the end of the currently loaded navigation path has been reached.
|
||||
[b]Note:[/b] While true prefer to stop calling update functions like [method get_next_path_position]. This avoids jittering the standing agent due to calling repeated path updates.
|
||||
</description>
|
||||
</method>
|
||||
<method name="is_target_reachable">
|
||||
<return type="bool" />
|
||||
<description>
|
||||
Returns [code]true[/code] if [method get_final_position] is within [member target_desired_distance] of the [member target_position].
|
||||
</description>
|
||||
</method>
|
||||
<method name="is_target_reached" qualifiers="const">
|
||||
<return type="bool" />
|
||||
<description>
|
||||
Returns [code]true[/code] if [member target_position] is reached. It may not always be possible to reach the target position. It should always be possible to reach the final position though. See [method get_final_position].
|
||||
</description>
|
||||
</method>
|
||||
<method name="set_avoidance_layer_value">
|
||||
<return type="void" />
|
||||
<argument index="0" name="layer_number" type="int" />
|
||||
<argument index="1" name="value" type="bool" />
|
||||
<description>
|
||||
Based on [param value], enables or disables the specified layer in the [member avoidance_layers] bitmask, given a [param layer_number] between 1 and 32.
|
||||
</description>
|
||||
</method>
|
||||
<method name="set_avoidance_mask_value">
|
||||
<return type="void" />
|
||||
<argument index="0" name="mask_number" type="int" />
|
||||
<argument index="1" name="value" type="bool" />
|
||||
<description>
|
||||
Based on [param value], enables or disables the specified mask in the [member avoidance_mask] bitmask, given a [param mask_number] between 1 and 32.
|
||||
</description>
|
||||
</method>
|
||||
<method name="set_navigation">
|
||||
<return type="void" />
|
||||
<argument index="0" name="navigation" type="Node" />
|
||||
<description>
|
||||
Sets the [Navigation] node used by the agent. Useful when you don't want to make the agent a child of a [Navigation] node.
|
||||
</description>
|
||||
</method>
|
||||
<method name="set_navigation_layer_value">
|
||||
<return type="void" />
|
||||
<argument index="0" name="layer_number" type="int" />
|
||||
<argument index="1" name="value" type="bool" />
|
||||
<description>
|
||||
Based on [code]value[/code], enables or disables the specified layer in the [member navigation_layers] bitmask, given a [code]layer_number[/code] between 1 and 32.
|
||||
</description>
|
||||
</method>
|
||||
<method name="set_navigation_map">
|
||||
<return type="void" />
|
||||
<argument index="0" name="navigation_map" type="RID" />
|
||||
<description>
|
||||
Sets the [RID] of the navigation map this NavigationAgent node should use and also updates the [code]agent[/code] on the NavigationServer.
|
||||
</description>
|
||||
</method>
|
||||
<method name="set_velocity_forced">
|
||||
<return type="void" />
|
||||
<argument index="0" name="velocity" type="Vector3" />
|
||||
<description>
|
||||
Replaces the internal velocity in the collision avoidance simulation with [param velocity]. When an agent is teleported to a new position this function should be used in the same frame. If called frequently this function can get agents stuck.
|
||||
</description>
|
||||
</method>
|
||||
</methods>
|
||||
<members>
|
||||
<member name="avoidance_enabled" type="bool" setter="set_avoidance_enabled" getter="get_avoidance_enabled" default="false">
|
||||
If [code]true[/code] the agent is registered for an RVO avoidance callback on the [NavigationServer3D]. When [member velocity] is set and the processing is completed a [code]safe_velocity[/code] Vector3 is received with a signal connection to [signal velocity_computed]. Avoidance processing with many registered agents has a significant performance cost and should only be enabled on agents that currently require it.
|
||||
</member>
|
||||
<member name="avoidance_layers" type="int" setter="set_avoidance_layers" getter="get_avoidance_layers" default="1">
|
||||
A bitfield determining the avoidance layers for this NavigationAgent. Other agent's with a matching bit on the [member avoidance_mask] will avoid this agent.
|
||||
</member>
|
||||
<member name="avoidance_mask" type="int" setter="set_avoidance_mask" getter="get_avoidance_mask" default="1">
|
||||
A bitfield determining what other avoidance agents and obstacles this NavigationAgent will avoid when a bit matches at least one of their [member avoidance_layers].
|
||||
</member>
|
||||
<member name="avoidance_priority" type="float" setter="set_avoidance_priority" getter="get_avoidance_priority" default="1.0">
|
||||
The agent does not adjust the velocity for other agents that would match the [member avoidance_mask] but have a lower [member avoidance_priority]. This in turn makes the other agents with lower priority adjust their velocities even more to avoid collision with this agent.
|
||||
</member>
|
||||
<member name="debug_enabled" type="bool" setter="set_debug_enabled" getter="get_debug_enabled" default="false">
|
||||
If [code]true[/code] shows debug visuals for this agent.
|
||||
</member>
|
||||
<member name="debug_path_custom_color" type="Color" setter="set_debug_path_custom_color" getter="get_debug_path_custom_color" default="Color( 1, 1, 1, 1 )">
|
||||
If [member debug_use_custom] is [code]true[/code] uses this color for this agent instead of global color.
|
||||
</member>
|
||||
<member name="debug_path_custom_point_size" type="float" setter="set_debug_path_custom_point_size" getter="get_debug_path_custom_point_size" default="4.0">
|
||||
If [member debug_use_custom] is [code]true[/code] uses this rasterized point size for rendering path points for this agent instead of global point size.
|
||||
</member>
|
||||
<member name="debug_use_custom" type="bool" setter="set_debug_use_custom" getter="get_debug_use_custom" default="false">
|
||||
If [code]true[/code] uses the defined [member debug_path_custom_color] for this agent instead of global color.
|
||||
</member>
|
||||
<member name="height" type="float" setter="set_height" getter="get_height" default="1.0">
|
||||
The height of the avoidance agent. Agents will ignore other agents or obstacles that are above or below their current position + height in 2D avoidance. Does nothing in 3D avoidance which uses radius spheres alone.
|
||||
</member>
|
||||
<member name="max_neighbors" type="int" setter="set_max_neighbors" getter="get_max_neighbors" default="10">
|
||||
The maximum number of neighbors for the agent to consider.
|
||||
</member>
|
||||
<member name="max_speed" type="float" setter="set_max_speed" getter="get_max_speed" default="10.0">
|
||||
The maximum speed that an agent can move.
|
||||
</member>
|
||||
<member name="navigation_layers" type="int" setter="set_navigation_layers" getter="get_navigation_layers" default="1">
|
||||
A bitfield determining which navigation layers of navigation regions this agent will use to calculate a path. Changing it during runtime will clear the current navigation path and generate a new one, according to the new navigation layers.
|
||||
</member>
|
||||
<member name="neighbor_distance" type="float" setter="set_neighbor_distance" getter="get_neighbor_distance" default="50.0">
|
||||
The distance to search for other agents.
|
||||
</member>
|
||||
<member name="path_desired_distance" type="float" setter="set_path_desired_distance" getter="get_path_desired_distance" default="1.0">
|
||||
The distance threshold before a path point is considered to be reached. This allows agents to not have to hit a path point on the path exactly, but only to reach its general area. If this value is set too high, the NavigationAgent will skip points on the path, which can lead to leaving the navigation mesh. If this value is set too low, the NavigationAgent will be stuck in a repath loop because it will constantly overshoot or undershoot the distance to the next point on each physics frame update.
|
||||
</member>
|
||||
<member name="path_height_offset" type="float" setter="set_path_height_offset" getter="get_path_height_offset" default="0.0">
|
||||
The height offset is subtracted from the y-axis value of any vector path position for this NavigationAgent. The NavigationAgent height offset does not change or influence the navigation mesh or pathfinding query result. Additional navigation maps that use regions with navigation meshes that the developer baked with appropriate agent radius or height values are required to support different-sized agents.
|
||||
</member>
|
||||
<member name="path_max_distance" type="float" setter="set_path_max_distance" getter="get_path_max_distance" default="5.0">
|
||||
The maximum distance the agent is allowed away from the ideal path to the final position. This can happen due to trying to avoid collisions. When the maximum distance is exceeded, it recalculates the ideal path.
|
||||
</member>
|
||||
<member name="path_metadata_flags" type="int" setter="set_path_metadata_flags" getter="get_path_metadata_flags" default="7">
|
||||
Additional information to return with the navigation path.
|
||||
</member>
|
||||
<member name="path_postprocessing" type="int" setter="set_path_postprocessing" getter="get_path_postprocessing" enum="NavigationPathQueryParameters3D.PathPostProcessing" default="0">
|
||||
The path postprocessing applied to the raw path corridor found by the [member pathfinding_algorithm].
|
||||
</member>
|
||||
<member name="pathfinding_algorithm" type="int" setter="set_pathfinding_algorithm" getter="get_pathfinding_algorithm" enum="NavigationPathQueryParameters3D.PathfindingAlgorithm" default="0">
|
||||
The pathfinding algorithm used in the path query.
|
||||
</member>
|
||||
<member name="radius" type="float" setter="set_radius" getter="get_radius" default="0.5">
|
||||
The radius of the avoidance agent. This is the "body" of the avoidance agent and not the avoidance maneuver starting radius (which is controlled by [member neighbor_distance]).
|
||||
Does not affect normal pathfinding. To change an actor's pathfinding radius bake [NavigationMesh] resources with a different [member NavigationMesh.agent_radius] property and use different navigation maps for each actor size.
|
||||
</member>
|
||||
<member name="target_desired_distance" type="float" setter="set_target_desired_distance" getter="get_target_desired_distance" default="1.0">
|
||||
The distance threshold before the final target point is considered to be reached. This allows agents to not have to hit the point of the final target exactly, but only to reach its general. If this value is set too low, the NavigationAgent will be stuck in a repath loop because it will constantly overshoot or undershoot the distance to the final target point on each physics frame update.
|
||||
</member>
|
||||
<member name="target_position" type="Vector3" setter="set_target_position" getter="get_target_position" default="Vector3( 0, 0, 0 )">
|
||||
If set a new navigation path from the current agent position to the [member target_position] is requested from the NavigationServer.
|
||||
</member>
|
||||
<member name="time_horizon_agents" type="float" setter="set_time_horizon_agents" getter="get_time_horizon_agents" default="1.0">
|
||||
The minimal amount of time for which this agent's velocities, that are computed with the collision avoidance algorithm, are safe with respect to other agents. The larger the number, the sooner the agent will respond to other agents, but less freedom in choosing its velocities. A too high value will slow down agents movement considerably. Must be positive.
|
||||
</member>
|
||||
<member name="time_horizon_obstacles" type="float" setter="set_time_horizon_obstacles" getter="get_time_horizon_obstacles" default="0.0">
|
||||
The minimal amount of time for which this agent's velocities, that are computed with the collision avoidance algorithm, are safe with respect to static avoidance obstacles. The larger the number, the sooner the agent will respond to static avoidance obstacles, but less freedom in choosing its velocities. A too high value will slow down agents movement considerably. Must be positive.
|
||||
</member>
|
||||
<member name="use_3d_avoidance" type="bool" setter="set_use_3d_avoidance" getter="get_use_3d_avoidance" default="false">
|
||||
If [code]true[/code], the agent calculates avoidance velocities in 3D omnidirectionally, e.g. for games that take place in air, underwater or space. Agents using 3D avoidance only avoid other agents using 3D avoidance, and react to radius-based avoidance obstacles. They ignore any vertex-based obstacles.
|
||||
If [code]false[/code], the agent calculates avoidance velocities in 2D along the x and z-axes, ignoring the y-axis. Agents using 2D avoidance only avoid other agents using 2D avoidance, and react to radius-based avoidance obstacles or vertex-based avoidance obstacles. Other agents using 2D avoidance that are below or above their current position including [member height] are ignored.
|
||||
</member>
|
||||
<member name="velocity" type="Vector3" setter="set_velocity" getter="get_velocity" default="Vector3( 0, 0, 0 )">
|
||||
Sets the new wanted velocity for the agent. The avoidance simulation will try to fulfill this velocity if possible but will modify it to avoid collision with other agents and obstacles. When an agent is teleported to a new position, use [method set_velocity_forced] as well to reset the internal simulation velocity.
|
||||
</member>
|
||||
</members>
|
||||
<signals>
|
||||
<signal name="link_reached">
|
||||
<argument index="0" name="details" type="Dictionary" />
|
||||
<description>
|
||||
Notifies when a navigation link has been reached.
|
||||
The details dictionary may contain the following keys depending on the value of [member path_metadata_flags]:
|
||||
- [code]location[/code]: The start location of the link that was reached.
|
||||
- [code]type[/code]: Always [constant NavigationPathQueryResult3D.PATH_SEGMENT_TYPE_LINK].
|
||||
- [code]rid[/code]: The [RID] of the link.
|
||||
- [code]owner[/code]: The object which manages the link (usually [NavigationLink3D]).
|
||||
- [code]link_entry_position[/code]: If [code]owner[/code] is available and the owner is a [NavigationLink2D], it will contain the global position of the link's point the agent is entering.
|
||||
- [code]link_exit_position[/code]: If [code]owner[/code] is available and the owner is a [NavigationLink2D], it will contain the global position of the link's point which the agent is exiting.
|
||||
</description>
|
||||
</signal>
|
||||
<signal name="navigation_finished">
|
||||
<description>
|
||||
Emitted once per loaded path when the agent internal navigation path index reaches the last index of the loaded path array. The agent internal navigation path index can be received with [method get_current_navigation_path_index].
|
||||
</description>
|
||||
</signal>
|
||||
<signal name="path_changed">
|
||||
<description>
|
||||
Emitted when the agent had to update the loaded path:
|
||||
- because path was previously empty.
|
||||
- because navigation map has changed.
|
||||
- because agent pushed further away from the current path segment than the [member path_max_distance].
|
||||
</description>
|
||||
</signal>
|
||||
<signal name="target_reached">
|
||||
<description>
|
||||
Emitted once per loaded path when the agent's global position is the first time within [member target_desired_distance] to the [member target_position].
|
||||
</description>
|
||||
</signal>
|
||||
<signal name="velocity_computed">
|
||||
<argument index="0" name="safe_velocity" type="Vector3" />
|
||||
<description>
|
||||
Notifies when the collision avoidance velocity is calculated. Emitted when [member velocity] is set. Only emitted when [member avoidance_enabled] is true.
|
||||
</description>
|
||||
</signal>
|
||||
<signal name="waypoint_reached">
|
||||
<argument index="0" name="details" type="Dictionary" />
|
||||
<description>
|
||||
Notifies when a waypoint along the path has been reached.
|
||||
The details dictionary may contain the following keys depending on the value of [member path_metadata_flags]:
|
||||
- [code]location[/code]: The location of the waypoint that was reached.
|
||||
- [code]type[/code]: The type of navigation primitive (region or link) that contains this waypoint.
|
||||
- [code]rid[/code]: The [RID] of the containing navigation primitive (region or link).
|
||||
- [code]owner[/code]: The object which manages the containing navigation primitive (region or link).
|
||||
</description>
|
||||
</signal>
|
||||
</signals>
|
||||
<constants>
|
||||
</constants>
|
||||
</class>
|
@ -1,277 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<class name="NavigationAgent2D" inherits="Node" version="4.2">
|
||||
<brief_description>
|
||||
2D agent used in navigation for collision avoidance.
|
||||
</brief_description>
|
||||
<description>
|
||||
2D agent that is used in navigation to reach a position while avoiding static and dynamic obstacles. The dynamic obstacles are avoided using RVO (Reciprocal Velocity Obstacles) collision avoidance. The agent needs navigation data to work correctly. By default this node will register to the default [World2D] navigation map. If this node is a child of a [Navigation2D] node it will register to the navigation map of the navigation node or the function [method set_navigation] can be used to set the navigation node directly. [NavigationAgent2D] is physics safe.
|
||||
[b]Note:[/b] After [member target_position] is set, the [method get_next_path_position] function must be used once every physics frame to update the internal path logic of the NavigationAgent. The returned position from this function should be used as the next movement position for the agent's parent node.
|
||||
</description>
|
||||
<tutorials>
|
||||
<link title="Using NavigationAgents">$DOCS_URL/tutorials/navigation/navigation_using_navigationagents.md</link>
|
||||
</tutorials>
|
||||
<methods>
|
||||
<method name="distance_to_target" qualifiers="const">
|
||||
<return type="float" />
|
||||
<description>
|
||||
Returns the distance to the target position, using the agent's global position. The user must set [member target_position] in order for this to be accurate.
|
||||
</description>
|
||||
</method>
|
||||
<method name="get_avoidance_layer_value" qualifiers="const">
|
||||
<return type="bool" />
|
||||
<argument index="0" name="layer_number" type="int" />
|
||||
<description>
|
||||
Returns whether or not the specified layer of the [member avoidance_layers] bitmask is enabled, given a [param layer_number] between 1 and 32.
|
||||
</description>
|
||||
</method>
|
||||
<method name="get_avoidance_mask_value" qualifiers="const">
|
||||
<return type="bool" />
|
||||
<argument index="0" name="mask_number" type="int" />
|
||||
<description>
|
||||
Returns whether or not the specified mask of the [member avoidance_mask] bitmask is enabled, given a [param mask_number] between 1 and 32.
|
||||
</description>
|
||||
</method>
|
||||
<method name="get_current_navigation_path" qualifiers="const">
|
||||
<return type="PoolVector2Array" />
|
||||
<description>
|
||||
Returns this agent's current path from start to finish in global coordinates. The path only updates when the target position is changed or the agent requires a repath. The path array is not intended to be used in direct path movement as the agent has its own internal path logic that would get corrupted by changing the path array manually. Use the intended [method get_next_position] once every physics frame to receive the next path point for the agents movement as this function also updates the internal path logic.
|
||||
</description>
|
||||
</method>
|
||||
<method name="get_current_navigation_path_index" qualifiers="const">
|
||||
<return type="int" />
|
||||
<description>
|
||||
Returns which index the agent is currently on in the navigation path's [PoolVector2Array].
|
||||
</description>
|
||||
</method>
|
||||
<method name="get_current_navigation_result" qualifiers="const">
|
||||
<return type="NavigationPathQueryResult2D" />
|
||||
<description>
|
||||
Returns the path query result for the path the agent is currently following.
|
||||
</description>
|
||||
</method>
|
||||
<method name="get_final_position">
|
||||
<return type="Vector2" />
|
||||
<description>
|
||||
Returns the reachable final position of the current navigation path in global coordinates. This can change if the navigation path is altered in any way. Because of this, it would be best to check this each frame.
|
||||
</description>
|
||||
</method>
|
||||
<method name="get_navigation" qualifiers="const">
|
||||
<return type="Node" />
|
||||
<description>
|
||||
Returns the [Navigation2D] node that the agent is using for its navigation system.
|
||||
</description>
|
||||
</method>
|
||||
<method name="get_navigation_layer_value" qualifiers="const">
|
||||
<return type="bool" />
|
||||
<argument index="0" name="layer_number" type="int" />
|
||||
<description>
|
||||
Returns whether or not the specified layer of the [member navigation_layers] bitmask is enabled, given a [code]layer_number[/code] between 1 and 32.
|
||||
</description>
|
||||
</method>
|
||||
<method name="get_navigation_map" qualifiers="const">
|
||||
<return type="RID" />
|
||||
<description>
|
||||
Returns the [RID] of the navigation map for this NavigationAgent node. This function returns always the map set on the NavigationAgent node and not the map of the abstract agent on the NavigationServer. If the agent map is changed directly with the NavigationServer API the NavigationAgent node will not be aware of the map change. Use [method set_navigation_map] to change the navigation map for the NavigationAgent and also update the agent on the NavigationServer.
|
||||
</description>
|
||||
</method>
|
||||
<method name="get_next_position">
|
||||
<return type="Vector2" />
|
||||
<description>
|
||||
Returns the next position in global coordinates that can be moved to, making sure that there are no static objects in the way. If the agent does not have a navigation path, it will return the position of the agent's parent. The use of this function once every physics frame is required to update the internal path logic of the NavigationAgent.
|
||||
</description>
|
||||
</method>
|
||||
<method name="get_rid" qualifiers="const">
|
||||
<return type="RID" />
|
||||
<description>
|
||||
Returns the [RID] of this agent on the [Navigation2DServer].
|
||||
</description>
|
||||
</method>
|
||||
<method name="is_navigation_finished">
|
||||
<return type="bool" />
|
||||
<description>
|
||||
Returns [code]true[/code] if the navigation path's final position has been reached.
|
||||
</description>
|
||||
</method>
|
||||
<method name="is_target_reachable">
|
||||
<return type="bool" />
|
||||
<description>
|
||||
Returns true if [member target_position] is reachable. The target position is set using [member target_position].
|
||||
</description>
|
||||
</method>
|
||||
<method name="is_target_reached" qualifiers="const">
|
||||
<return type="bool" />
|
||||
<description>
|
||||
Returns [code]true[/code] if [member target_position] is reached. It may not always be possible to reach the target position. It should always be possible to reach the final position though. See [method get_final_position].
|
||||
</description>
|
||||
</method>
|
||||
<method name="set_avoidance_layer_value">
|
||||
<return type="void" />
|
||||
<argument index="0" name="layer_number" type="int" />
|
||||
<argument index="1" name="value" type="bool" />
|
||||
<description>
|
||||
Based on [param value], enables or disables the specified layer in the [member avoidance_layers] bitmask, given a [param layer_number] between 1 and 32.
|
||||
</description>
|
||||
</method>
|
||||
<method name="set_avoidance_mask_value">
|
||||
<return type="void" />
|
||||
<argument index="0" name="mask_number" type="int" />
|
||||
<argument index="1" name="value" type="bool" />
|
||||
<description>
|
||||
Based on [param value], enables or disables the specified mask in the [member avoidance_mask] bitmask, given a [param mask_number] between 1 and 32.
|
||||
</description>
|
||||
</method>
|
||||
<method name="set_navigation">
|
||||
<return type="void" />
|
||||
<argument index="0" name="navigation" type="Node" />
|
||||
<description>
|
||||
Sets the [Navigation2D] node used by the agent. Useful when you don't want to make the agent a child of a [Navigation2D] node.
|
||||
</description>
|
||||
</method>
|
||||
<method name="set_navigation_layer_value">
|
||||
<return type="void" />
|
||||
<argument index="0" name="layer_number" type="int" />
|
||||
<argument index="1" name="value" type="bool" />
|
||||
<description>
|
||||
Based on [code]value[/code], enables or disables the specified layer in the [member navigation_layers] bitmask, given a [code]layer_number[/code] between 1 and 32.
|
||||
</description>
|
||||
</method>
|
||||
<method name="set_navigation_map">
|
||||
<return type="void" />
|
||||
<argument index="0" name="navigation_map" type="RID" />
|
||||
<description>
|
||||
Sets the [RID] of the navigation map this NavigationAgent node should use and also updates the [code]agent[/code] on the NavigationServer.
|
||||
</description>
|
||||
</method>
|
||||
<method name="set_velocity_forced">
|
||||
<return type="void" />
|
||||
<argument index="0" name="velocity" type="Vector2" />
|
||||
<description>
|
||||
Replaces the internal velocity in the collision avoidance simulation with [param velocity]. When an agent is teleported to a new position this function should be used in the same frame. If called frequently this function can get agents stuck.
|
||||
</description>
|
||||
</method>
|
||||
</methods>
|
||||
<members>
|
||||
<member name="avoidance_enabled" type="bool" setter="set_avoidance_enabled" getter="get_avoidance_enabled" default="false">
|
||||
If [code]true[/code] the agent is registered for an RVO avoidance callback on the [NavigationServer2D]. When [member velocity] is used and the processing is completed a [code]safe_velocity[/code] Vector2 is received with a signal connection to [signal velocity_computed]. Avoidance processing with many registered agents has a significant performance cost and should only be enabled on agents that currently require it.
|
||||
</member>
|
||||
<member name="avoidance_layers" type="int" setter="set_avoidance_layers" getter="get_avoidance_layers" default="1">
|
||||
A bitfield determining the avoidance layers for this NavigationAgent. Other agents with a matching bit on the [member avoidance_mask] will avoid this agent.
|
||||
</member>
|
||||
<member name="avoidance_mask" type="int" setter="set_avoidance_mask" getter="get_avoidance_mask" default="1">
|
||||
A bitfield determining what other avoidance agents and obstacles this NavigationAgent will avoid when a bit matches at least one of their [member avoidance_layers].
|
||||
</member>
|
||||
<member name="avoidance_priority" type="float" setter="set_avoidance_priority" getter="get_avoidance_priority" default="1.0">
|
||||
The agent does not adjust the velocity for other agents that would match the [member avoidance_mask] but have a lower [member avoidance_priority]. This in turn makes the other agents with lower priority adjust their velocities even more to avoid collision with this agent.
|
||||
</member>
|
||||
<member name="debug_enabled" type="bool" setter="set_debug_enabled" getter="get_debug_enabled" default="false">
|
||||
If [code]true[/code] shows debug visuals for this agent.
|
||||
</member>
|
||||
<member name="debug_path_custom_color" type="Color" setter="set_debug_path_custom_color" getter="get_debug_path_custom_color" default="Color( 1, 1, 1, 1 )">
|
||||
If [member debug_use_custom] is [code]true[/code] uses this color for this agent instead of global color.
|
||||
</member>
|
||||
<member name="debug_path_custom_line_width" type="float" setter="set_debug_path_custom_line_width" getter="get_debug_path_custom_line_width" default="-1.0">
|
||||
If [member debug_use_custom] is [code]true[/code] uses this line width for rendering paths for this agent instead of global line width.
|
||||
</member>
|
||||
<member name="debug_path_custom_point_size" type="float" setter="set_debug_path_custom_point_size" getter="get_debug_path_custom_point_size" default="4.0">
|
||||
If [member debug_use_custom] is [code]true[/code] uses this rasterized point size for rendering path points for this agent instead of global point size.
|
||||
</member>
|
||||
<member name="debug_use_custom" type="bool" setter="set_debug_use_custom" getter="get_debug_use_custom" default="false">
|
||||
If [code]true[/code] uses the defined [member debug_path_custom_color] for this agent instead of global color.
|
||||
</member>
|
||||
<member name="max_neighbors" type="int" setter="set_max_neighbors" getter="get_max_neighbors" default="10">
|
||||
The maximum number of neighbors for the agent to consider.
|
||||
</member>
|
||||
<member name="max_speed" type="float" setter="set_max_speed" getter="get_max_speed" default="100.0">
|
||||
The maximum speed that an agent can move.
|
||||
</member>
|
||||
<member name="navigation_layers" type="int" setter="set_navigation_layers" getter="get_navigation_layers" default="1">
|
||||
A bitfield determining which navigation layers of navigation regions this agent will use to calculate a path. Changing it during runtime will clear the current navigation path and generate a new one, according to the new navigation layers.
|
||||
</member>
|
||||
<member name="neighbor_distance" type="float" setter="set_neighbor_distance" getter="get_neighbor_distance" default="500.0">
|
||||
The distance to search for other agents.
|
||||
</member>
|
||||
<member name="path_desired_distance" type="float" setter="set_path_desired_distance" getter="get_path_desired_distance" default="20.0">
|
||||
The distance threshold before a path point is considered to be reached. This allows agents to not have to hit a path point on the path exactly, but only to reach its general area. If this value is set too high, the NavigationAgent will skip points on the path, which can lead too leaving the navigation mesh. If this value is set too low, the NavigationAgent will be stuck in a repath loop because it will constantly overshoot or undershoot the distance to the next point on each physics frame update.
|
||||
</member>
|
||||
<member name="path_max_distance" type="float" setter="set_path_max_distance" getter="get_path_max_distance" default="100.0">
|
||||
The maximum distance the agent is allowed away from the ideal path to the final position. This can happen due to trying to avoid collisions. When the maximum distance is exceeded, it recalculates the ideal path.
|
||||
</member>
|
||||
<member name="path_metadata_flags" type="int" setter="set_path_metadata_flags" getter="get_path_metadata_flags" default="7">
|
||||
Additional information to return with the navigation path.
|
||||
</member>
|
||||
<member name="path_postprocessing" type="int" setter="set_path_postprocessing" getter="get_path_postprocessing" enum="NavigationPathQueryParameters2D.PathPostProcessing" default="0">
|
||||
The path postprocessing applied to the raw path corridor found by the [member pathfinding_algorithm].
|
||||
</member>
|
||||
<member name="pathfinding_algorithm" type="int" setter="set_pathfinding_algorithm" getter="get_pathfinding_algorithm" enum="NavigationPathQueryParameters2D.PathfindingAlgorithm" default="0">
|
||||
The pathfinding algorithm used in the path query.
|
||||
</member>
|
||||
<member name="radius" type="float" setter="set_radius" getter="get_radius" default="10.0">
|
||||
The radius of the avoidance agent. This is the "body" of the avoidance agent and not the avoidance maneuver starting radius (which is controlled by [member neighbor_distance]).
|
||||
Does not affect normal pathfinding. To change an actor's pathfinding radius bake [NavigationMesh] resources with a different [member NavigationMesh.agent_radius] property and use different navigation maps for each actor size.
|
||||
</member>
|
||||
<member name="target_desired_distance" type="float" setter="set_target_desired_distance" getter="get_target_desired_distance" default="10.0">
|
||||
The distance threshold before the final target point is considered to be reached. This allows agents to not have to hit the point of the final target exactly, but only to reach its general area. If this value is set too low, the NavigationAgent will be stuck in a repath loop because it will constantly overshoot or undershoot the distance to the final target point on each physics frame update.
|
||||
</member>
|
||||
<member name="target_position" type="Vector2" setter="set_target_position" getter="get_target_position" default="Vector2( 0, 0 )">
|
||||
If set a new navigation path from the current agent position to the [member target_position] is requested from the NavigationServer.
|
||||
</member>
|
||||
<member name="time_horizon_agents" type="float" setter="set_time_horizon_agents" getter="get_time_horizon_agents" default="1.0">
|
||||
The minimal amount of time for which this agent's velocities, that are computed with the collision avoidance algorithm, are safe with respect to other agents. The larger the number, the sooner the agent will respond to other agents, but less freedom in choosing its velocities. A too high value will slow down agents movement considerably. Must be positive.
|
||||
</member>
|
||||
<member name="time_horizon_obstacles" type="float" setter="set_time_horizon_obstacles" getter="get_time_horizon_obstacles" default="0.0">
|
||||
The minimal amount of time for which this agent's velocities, that are computed with the collision avoidance algorithm, are safe with respect to static avoidance obstacles. The larger the number, the sooner the agent will respond to static avoidance obstacles, but less freedom in choosing its velocities. A too high value will slow down agents movement considerably. Must be positive.
|
||||
</member>
|
||||
<member name="velocity" type="Vector2" setter="set_velocity" getter="get_velocity" default="Vector2( 0, 0 )">
|
||||
Sets the new wanted velocity for the agent. The avoidance simulation will try to fulfill this velocity if possible but will modify it to avoid collision with other agents and obstacles. When an agent is teleported to a new position, use [method set_velocity_forced] as well to reset the internal simulation velocity.
|
||||
</member>
|
||||
</members>
|
||||
<signals>
|
||||
<signal name="link_reached">
|
||||
<argument index="0" name="details" type="Dictionary" />
|
||||
<description>
|
||||
Notifies when a navigation link has been reached.
|
||||
The details dictionary may contain the following keys depending on the value of [member path_metadata_flags]:
|
||||
- [code]location[/code]: The start location of the link that was reached.
|
||||
- [code]type[/code]: Always [constant NavigationPathQueryResult2D.PATH_SEGMENT_TYPE_LINK].
|
||||
- [code]rid[/code]: The [RID] of the link.
|
||||
- [code]owner[/code]: The object which manages the link (usually [NavigationLink2D]).
|
||||
- [code]link_entry_position[/code]: If [code]owner[/code] is available and the owner is a [NavigationLink2D], it will contain the global position of the link's point the agent is entering.
|
||||
- [code]link_exit_position[/code]: If [code]owner[/code] is available and the owner is a [NavigationLink2D], it will contain the global position of the link's point which the agent is exiting.
|
||||
</description>
|
||||
</signal>
|
||||
<signal name="navigation_finished">
|
||||
<description>
|
||||
Notifies when the final position is reached.
|
||||
</description>
|
||||
</signal>
|
||||
<signal name="path_changed">
|
||||
<description>
|
||||
Notifies when the navigation path changes. This can be triggered by the navigation system or by the user changing the path.
|
||||
</description>
|
||||
</signal>
|
||||
<signal name="target_reached">
|
||||
<description>
|
||||
Notifies when the player-defined [member target_position] is reached.
|
||||
</description>
|
||||
</signal>
|
||||
<signal name="velocity_computed">
|
||||
<argument index="0" name="safe_velocity" type="Vector2" />
|
||||
<description>
|
||||
Notifies when the collision avoidance velocity is calculated. Emitted when [member velocity] is set. Only emitted when [member avoidance_enabled] is true.
|
||||
</description>
|
||||
</signal>
|
||||
<signal name="waypoint_reached">
|
||||
<argument index="0" name="details" type="Dictionary" />
|
||||
<description>
|
||||
Notifies when a waypoint along the path has been reached.
|
||||
The details dictionary may contain the following keys depending on the value of [member path_metadata_flags]:
|
||||
- [code]location[/code]: The location of the waypoint that was reached.
|
||||
- [code]type[/code]: The type of navigation primitive (region or link) that contains this waypoint.
|
||||
- [code]rid[/code]: The [RID] of the containing navigation primitive (region or link).
|
||||
- [code]owner[/code]: The object which manages the containing navigation primitive (region or link).
|
||||
</description>
|
||||
</signal>
|
||||
</signals>
|
||||
<constants>
|
||||
</constants>
|
||||
</class>
|
@ -1,31 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<class name="NavigationGeometryParser2D" inherits="Reference" version="4.2">
|
||||
<brief_description>
|
||||
Parser to contribute a node's geometry data for [NavigationPolygon] baking.
|
||||
</brief_description>
|
||||
<description>
|
||||
Parser to contribute a node's geometry data for [NavigationPolygon] baking. If a script extends this class and the function [method _parses_node] is overridden and returns [code]true[/code], the overridden function [method _parse_geometry] gets called and can be used to add custom geometry data for the [NavigationPolygon] baking process.
|
||||
</description>
|
||||
<tutorials>
|
||||
</tutorials>
|
||||
<methods>
|
||||
<method name="_parse_geometry" qualifiers="virtual">
|
||||
<return type="void" />
|
||||
<argument index="0" name="node" type="Node" />
|
||||
<argument index="1" name="navigation_polygon" type="NavigationPolygon" />
|
||||
<argument index="2" name="source_geometry" type="NavigationMeshSourceGeometryData2D" />
|
||||
<description>
|
||||
Called when overridden and the [NavigationMeshGenerator] is parsing geometry for [NavigationPolygon] baking. Custom 2D geometry can be added to the [param source_geometry].
|
||||
</description>
|
||||
</method>
|
||||
<method name="_parses_node" qualifiers="virtual">
|
||||
<return type="bool" />
|
||||
<argument index="0" name="node" type="Node" />
|
||||
<description>
|
||||
Called when parsing geometry nodes for [NavigationPolygon] baking. If [code]true[/code] will call [method _parse_geometry] with this node.
|
||||
</description>
|
||||
</method>
|
||||
</methods>
|
||||
<constants>
|
||||
</constants>
|
||||
</class>
|
@ -1,31 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<class name="NavigationGeometryParser3D" inherits="Reference" version="4.2">
|
||||
<brief_description>
|
||||
Parser to contribute a node's geometry data for [NavigationMesh] baking.
|
||||
</brief_description>
|
||||
<description>
|
||||
Parser to contribute a node's geometry data for [NavigationMesh] baking. If a script extends this class and the function [method _parses_node] is overridden and returns [code]true[/code], the overridden function [method _parse_geometry] gets called and can be used to add custom geometry data for the [NavigationMesh] baking process.
|
||||
</description>
|
||||
<tutorials>
|
||||
</tutorials>
|
||||
<methods>
|
||||
<method name="_parse_geometry" qualifiers="virtual">
|
||||
<return type="void" />
|
||||
<argument index="0" name="node" type="Node" />
|
||||
<argument index="1" name="navigation_mesh" type="NavigationMesh" />
|
||||
<argument index="2" name="source_geometry" type="NavigationMeshSourceGeometryData3D" />
|
||||
<description>
|
||||
Called when overridden and the [NavigationMeshGenerator] is parsing geometry for [NavigationMesh] baking. Custom 3D geometry can be added to the [param source_geometry].
|
||||
</description>
|
||||
</method>
|
||||
<method name="_parses_node" qualifiers="virtual">
|
||||
<return type="bool" />
|
||||
<argument index="0" name="node" type="Node" />
|
||||
<description>
|
||||
Called when parsing geometry nodes for [NavigationMesh] baking. If [code]true[/code] will call [method _parse_geometry] with this node.
|
||||
</description>
|
||||
</method>
|
||||
</methods>
|
||||
<constants>
|
||||
</constants>
|
||||
</class>
|
@ -1,84 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<class name="NavigationLink2D" inherits="Node2D" version="4.2">
|
||||
<brief_description>
|
||||
A link between two positions on [NavigationRegion2D]s that agents can be routed through.
|
||||
</brief_description>
|
||||
<description>
|
||||
A link between two positions on [NavigationRegion2D]s that agents can be routed through. These positions can be on the same [NavigationRegion2D] or on two different ones. Links are useful to express navigation methods other than traveling along the surface of the navigation polygon, such as ziplines, teleporters, or gaps that can be jumped across.
|
||||
</description>
|
||||
<tutorials>
|
||||
<link title="Using NavigationLinks">$DOCS_URL/tutorials/navigation/navigation_using_navigationlinks.md</link>
|
||||
</tutorials>
|
||||
<methods>
|
||||
<method name="get_global_end_position" qualifiers="const">
|
||||
<return type="Vector2" />
|
||||
<description>
|
||||
Returns the [member end_position] that is relative to the link as a global position.
|
||||
</description>
|
||||
</method>
|
||||
<method name="get_global_start_position" qualifiers="const">
|
||||
<return type="Vector2" />
|
||||
<description>
|
||||
Returns the [member start_position] that is relative to the link as a global position.
|
||||
</description>
|
||||
</method>
|
||||
<method name="get_navigation_layer_value" qualifiers="const">
|
||||
<return type="bool" />
|
||||
<argument index="0" name="layer_number" type="int" />
|
||||
<description>
|
||||
Returns whether or not the specified layer of the [member navigation_layers] bitmask is enabled, given a [param layer_number] between 1 and 32.
|
||||
</description>
|
||||
</method>
|
||||
<method name="set_global_end_position">
|
||||
<return type="void" />
|
||||
<argument index="0" name="position" type="Vector2" />
|
||||
<description>
|
||||
Sets the [member end_position] that is relative to the link from a global [param position].
|
||||
</description>
|
||||
</method>
|
||||
<method name="set_global_start_position">
|
||||
<return type="void" />
|
||||
<argument index="0" name="position" type="Vector2" />
|
||||
<description>
|
||||
Sets the [member start_position] that is relative to the link from a global [param position].
|
||||
</description>
|
||||
</method>
|
||||
<method name="set_navigation_layer_value">
|
||||
<return type="void" />
|
||||
<argument index="0" name="layer_number" type="int" />
|
||||
<argument index="1" name="value" type="bool" />
|
||||
<description>
|
||||
Based on [param value], enables or disables the specified layer in the [member navigation_layers] bitmask, given a [param layer_number] between 1 and 32.
|
||||
</description>
|
||||
</method>
|
||||
</methods>
|
||||
<members>
|
||||
<member name="bidirectional" type="bool" setter="set_bidirectional" getter="is_bidirectional" default="true">
|
||||
Whether this link can be traveled in both directions or only from [member start_position] to [member end_position].
|
||||
</member>
|
||||
<member name="enabled" type="bool" setter="set_enabled" getter="is_enabled" default="true">
|
||||
Whether this link is currently active. If [code]false[/code], [method NavigationServer2D.map_get_path] will ignore this link.
|
||||
</member>
|
||||
<member name="end_position" type="Vector2" setter="set_end_position" getter="get_end_position" default="Vector2( 0, 0 )">
|
||||
Ending position of the link.
|
||||
This position will search out the nearest polygon in the navigation mesh to attach to.
|
||||
The distance the link will search is controlled by [method NavigationServer2D.map_set_link_connection_radius].
|
||||
</member>
|
||||
<member name="enter_cost" type="float" setter="set_enter_cost" getter="get_enter_cost" default="0.0">
|
||||
When pathfinding enters this link from another regions navigation mesh the [member enter_cost] value is added to the path distance for determining the shortest path.
|
||||
</member>
|
||||
<member name="navigation_layers" type="int" setter="set_navigation_layers" getter="get_navigation_layers" default="1">
|
||||
A bitfield determining all navigation layers the link belongs to. These navigation layers will be checked when requesting a path with [method NavigationServer2D.map_get_path].
|
||||
</member>
|
||||
<member name="start_position" type="Vector2" setter="set_start_position" getter="get_start_position" default="Vector2( 0, 0 )">
|
||||
Starting position of the link.
|
||||
This position will search out the nearest polygon in the navigation mesh to attach to.
|
||||
The distance the link will search is controlled by [method NavigationServer2D.map_set_link_connection_radius].
|
||||
</member>
|
||||
<member name="travel_cost" type="float" setter="set_travel_cost" getter="get_travel_cost" default="1.0">
|
||||
When pathfinding moves along the link the traveled distance is multiplied with [member travel_cost] for determining the shortest path.
|
||||
</member>
|
||||
</members>
|
||||
<constants>
|
||||
</constants>
|
||||
</class>
|
@ -1,84 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<class name="NavigationLink3D" inherits="Spatial" version="4.2">
|
||||
<brief_description>
|
||||
A link between two positions on [NavigationRegion3D]s that agents can be routed through.
|
||||
</brief_description>
|
||||
<description>
|
||||
A link between two positions on [NavigationRegion3D]s that agents can be routed through. These positions can be on the same [NavigationRegion3D] or on two different ones. Links are useful to express navigation methods other than traveling along the surface of the navigation mesh, such as ziplines, teleporters, or gaps that can be jumped across.
|
||||
</description>
|
||||
<tutorials>
|
||||
<link title="Using NavigationLinks">$DOCS_URL/tutorials/navigation/navigation_using_navigationlinks.md</link>
|
||||
</tutorials>
|
||||
<methods>
|
||||
<method name="get_global_end_position" qualifiers="const">
|
||||
<return type="Vector3" />
|
||||
<description>
|
||||
Returns the [member end_position] that is relative to the link as a global position.
|
||||
</description>
|
||||
</method>
|
||||
<method name="get_global_start_position" qualifiers="const">
|
||||
<return type="Vector3" />
|
||||
<description>
|
||||
Returns the [member start_position] that is relative to the link as a global position.
|
||||
</description>
|
||||
</method>
|
||||
<method name="get_navigation_layer_value" qualifiers="const">
|
||||
<return type="bool" />
|
||||
<argument index="0" name="layer_number" type="int" />
|
||||
<description>
|
||||
Returns whether or not the specified layer of the [member navigation_layers] bitmask is enabled, given a [param layer_number] between 1 and 32.
|
||||
</description>
|
||||
</method>
|
||||
<method name="set_global_end_position">
|
||||
<return type="void" />
|
||||
<argument index="0" name="position" type="Vector3" />
|
||||
<description>
|
||||
Sets the [member end_position] that is relative to the link from a global [param position].
|
||||
</description>
|
||||
</method>
|
||||
<method name="set_global_start_position">
|
||||
<return type="void" />
|
||||
<argument index="0" name="position" type="Vector3" />
|
||||
<description>
|
||||
Sets the [member start_position] that is relative to the link from a global [param position].
|
||||
</description>
|
||||
</method>
|
||||
<method name="set_navigation_layer_value">
|
||||
<return type="void" />
|
||||
<argument index="0" name="layer_number" type="int" />
|
||||
<argument index="1" name="value" type="bool" />
|
||||
<description>
|
||||
Based on [param value], enables or disables the specified layer in the [member navigation_layers] bitmask, given a [param layer_number] between 1 and 32.
|
||||
</description>
|
||||
</method>
|
||||
</methods>
|
||||
<members>
|
||||
<member name="bidirectional" type="bool" setter="set_bidirectional" getter="is_bidirectional" default="true">
|
||||
Whether this link can be traveled in both directions or only from [member start_position] to [member end_position].
|
||||
</member>
|
||||
<member name="enabled" type="bool" setter="set_enabled" getter="is_enabled" default="true">
|
||||
Whether this link is currently active. If [code]false[/code], [method NavigationServer3D.map_get_path] will ignore this link.
|
||||
</member>
|
||||
<member name="end_position" type="Vector3" setter="set_end_position" getter="get_end_position" default="Vector3( 0, 0, 0 )">
|
||||
Ending position of the link.
|
||||
This position will search out the nearest polygon in the navigation mesh to attach to.
|
||||
The distance the link will search is controlled by [method NavigationServer3D.map_set_link_connection_radius].
|
||||
</member>
|
||||
<member name="enter_cost" type="float" setter="set_enter_cost" getter="get_enter_cost" default="0.0">
|
||||
When pathfinding enters this link from another regions navigation mesh the [member enter_cost] value is added to the path distance for determining the shortest path.
|
||||
</member>
|
||||
<member name="navigation_layers" type="int" setter="set_navigation_layers" getter="get_navigation_layers" default="1">
|
||||
A bitfield determining all navigation layers the link belongs to. These navigation layers will be checked when requesting a path with [method NavigationServer3D.map_get_path].
|
||||
</member>
|
||||
<member name="start_position" type="Vector3" setter="set_start_position" getter="get_start_position" default="Vector3( 0, 0, 0 )">
|
||||
Starting position of the link.
|
||||
This position will search out the nearest polygon in the navigation mesh to attach to.
|
||||
The distance the link will search is controlled by [method NavigationServer3D.map_set_link_connection_radius].
|
||||
</member>
|
||||
<member name="travel_cost" type="float" setter="set_travel_cost" getter="get_travel_cost" default="1.0">
|
||||
When pathfinding moves along the link the traveled distance is multiplied with [member travel_cost] for determining the shortest path.
|
||||
</member>
|
||||
</members>
|
||||
<constants>
|
||||
</constants>
|
||||
</class>
|
@ -1,203 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<class name="NavigationMesh" inherits="Resource" version="4.2">
|
||||
<brief_description>
|
||||
A mesh that defines the areas traversable by navigation agents that are safe from obstructions.
|
||||
</brief_description>
|
||||
<description>
|
||||
A NavigationMesh is used in pathfinding to describe the traversable area that is safe from collision and other obstructions, assuming an agent's center position at zero radius. The mesh data can be created and baked to polygons with the [NavigationMeshGenerator] by parsing source geometry from the [SceneTree]. The mesh data can also be created without baking by adding the required arrays of vertices and polygon indices with a script.
|
||||
When making procedual changes, a call to [method commit_changes] is required to apply these changes and to synchronize them with the [NavigationServer].
|
||||
</description>
|
||||
<tutorials>
|
||||
<link title="3D Navmesh Demo">https://github.com/Relintai/pandemonium_demo_projects/tree/master/3d/navmesh</link>
|
||||
<link title="Using NavigationMeshes">$DOCS_URL/tutorials/navigation/navigation_using_navigationmeshes.md</link>
|
||||
</tutorials>
|
||||
<methods>
|
||||
<method name="add_polygon">
|
||||
<return type="void" />
|
||||
<argument index="0" name="polygon" type="PoolIntArray" />
|
||||
<description>
|
||||
Adds a polygon using the indices of the vertices you get when calling [method get_vertices].
|
||||
</description>
|
||||
</method>
|
||||
<method name="clear">
|
||||
<return type="void" />
|
||||
<description>
|
||||
Clears both the internal polygons and vertices arrays.
|
||||
</description>
|
||||
</method>
|
||||
<method name="clear_polygons">
|
||||
<return type="void" />
|
||||
<description>
|
||||
Clears the array of polygons, but it doesn't clear the array of vertices.
|
||||
</description>
|
||||
</method>
|
||||
<method name="commit_changes">
|
||||
<return type="void" />
|
||||
<description>
|
||||
Applies all changes to vertices and polygons and synchronizes with the NavigationServer.
|
||||
</description>
|
||||
</method>
|
||||
<method name="create_from_mesh">
|
||||
<return type="void" />
|
||||
<argument index="0" name="mesh" type="Mesh" />
|
||||
<description>
|
||||
Initializes the navigation mesh by setting the vertices and indices according to a [Mesh].
|
||||
</description>
|
||||
</method>
|
||||
<method name="get_collision_mask_bit" qualifiers="const">
|
||||
<return type="bool" />
|
||||
<argument index="0" name="bit" type="int" />
|
||||
<description>
|
||||
Returns whether the specified [code]bit[/code] of the [member geometry_collision_mask] is set.
|
||||
</description>
|
||||
</method>
|
||||
<method name="get_polygon">
|
||||
<return type="PoolIntArray" />
|
||||
<argument index="0" name="idx" type="int" />
|
||||
<description>
|
||||
Returns a [PoolIntArray] containing the indices of the vertices of a created polygon.
|
||||
</description>
|
||||
</method>
|
||||
<method name="get_polygon_count" qualifiers="const">
|
||||
<return type="int" />
|
||||
<description>
|
||||
Returns the number of polygons in the navigation mesh.
|
||||
</description>
|
||||
</method>
|
||||
<method name="get_vertices" qualifiers="const">
|
||||
<return type="PoolVector3Array" />
|
||||
<description>
|
||||
Returns a [PoolVector3Array] containing all the vertices being used to create the polygons.
|
||||
</description>
|
||||
</method>
|
||||
<method name="set_collision_mask_bit">
|
||||
<return type="void" />
|
||||
<argument index="0" name="bit" type="int" />
|
||||
<argument index="1" name="value" type="bool" />
|
||||
<description>
|
||||
If [code]value[/code] is [code]true[/code], sets the specified [code]bit[/code] in the [member geometry_collision_mask].
|
||||
If [code]value[/code] is [code]false[/code], clears the specified [code]bit[/code] in the [member geometry_collision_mask].
|
||||
</description>
|
||||
</method>
|
||||
<method name="set_vertices">
|
||||
<return type="void" />
|
||||
<argument index="0" name="vertices" type="PoolVector3Array" />
|
||||
<description>
|
||||
Sets the vertices that need to be indexed with the [method add_polygon] or [method set_polygons] methods. When finished changing the navigation mesh call [method commit_changes] in order to synchronize the changes with the [NavigationServer].
|
||||
</description>
|
||||
</method>
|
||||
</methods>
|
||||
<members>
|
||||
<member name="agent_height" type="float" setter="set_agent_height" getter="get_agent_height" default="1.5">
|
||||
The minimum floor to ceiling height that will still allow the floor area to be considered walkable.
|
||||
[b]Note:[/b] While baking, this value will be rounded up to the nearest multiple of [member cell_height].
|
||||
</member>
|
||||
<member name="agent_max_climb" type="float" setter="set_agent_max_climb" getter="get_agent_max_climb" default="0.25">
|
||||
The minimum ledge height that is considered to still be traversable.
|
||||
[b]Note:[/b] While baking, this value will be rounded down to the nearest multiple of [member cell_height].
|
||||
</member>
|
||||
<member name="agent_max_slope" type="float" setter="set_agent_max_slope" getter="get_agent_max_slope" default="45.0">
|
||||
The maximum slope that is considered walkable, in degrees.
|
||||
</member>
|
||||
<member name="agent_radius" type="float" setter="set_agent_radius" getter="get_agent_radius" default="0.5">
|
||||
The distance to erode/shrink the walkable area of the heightfield away from obstructions.
|
||||
[b]Note:[/b] While baking, this value will be rounded up to the nearest multiple of [member cell_size].
|
||||
</member>
|
||||
<member name="cell_height" type="float" setter="set_cell_height" getter="get_cell_height" default="0.25">
|
||||
The cell height used to rasterize the navigation mesh vertices on the Y axis. Must match with the cell height on the navigation map.
|
||||
</member>
|
||||
<member name="cell_size" type="float" setter="set_cell_size" getter="get_cell_size" default="0.25">
|
||||
The cell size used to rasterize the navigation mesh vertices on the XZ plane. Must match with the cell size on the navigation map.
|
||||
</member>
|
||||
<member name="detail_sample_distance" type="float" setter="set_detail_sample_distance" getter="get_detail_sample_distance" default="6.0">
|
||||
The sampling distance to use when generating the detail mesh, in cell unit.
|
||||
</member>
|
||||
<member name="detail_sample_max_error" type="float" setter="set_detail_sample_max_error" getter="get_detail_sample_max_error" default="5.0">
|
||||
The maximum distance the detail mesh surface should deviate from heightfield, in cell unit.
|
||||
</member>
|
||||
<member name="edge_max_error" type="float" setter="set_edge_max_error" getter="get_edge_max_error" default="1.3">
|
||||
The maximum distance a simplfied contour's border edges should deviate the original raw contour.
|
||||
</member>
|
||||
<member name="edge_max_length" type="float" setter="set_edge_max_length" getter="get_edge_max_length" default="0.0">
|
||||
The maximum allowed length for contour edges along the border of the mesh. A value of [code]0.0[/code] disables this feature.
|
||||
[b]Note:[/b] While baking, this value will be rounded up to the nearest multiple of [member cell_size].
|
||||
</member>
|
||||
<member name="filter_baking_aabb" type="AABB" setter="set_filter_baking_aabb" getter="get_filter_baking_aabb" default="AABB( 0, 0, 0, 0, 0, 0 )">
|
||||
If the baking [AABB] has a volume the navigation mesh baking will be restricted to its enclosing area.
|
||||
</member>
|
||||
<member name="filter_baking_aabb_offset" type="Vector3" setter="set_filter_baking_aabb_offset" getter="get_filter_baking_aabb_offset" default="Vector3( 0, 0, 0 )">
|
||||
The position offset applied to the [member filter_baking_aabb] [AABB].
|
||||
</member>
|
||||
<member name="filter_ledge_spans" type="bool" setter="set_filter_ledge_spans" getter="get_filter_ledge_spans" default="false">
|
||||
</member>
|
||||
<member name="filter_low_hanging_obstacles" type="bool" setter="set_filter_low_hanging_obstacles" getter="get_filter_low_hanging_obstacles" default="false">
|
||||
</member>
|
||||
<member name="filter_walkable_low_height_spans" type="bool" setter="set_filter_walkable_low_height_spans" getter="get_filter_walkable_low_height_spans" default="false">
|
||||
</member>
|
||||
<member name="geometry_collision_mask" type="int" setter="set_collision_mask" getter="get_collision_mask" default="4294967295">
|
||||
The physics layers to scan for static colliders.
|
||||
Only used when [member geometry_parsed_geometry_type] is [constant PARSED_GEOMETRY_STATIC_COLLIDERS] or [constant PARSED_GEOMETRY_BOTH].
|
||||
</member>
|
||||
<member name="geometry_parsed_geometry_type" type="int" setter="set_parsed_geometry_type" getter="get_parsed_geometry_type" enum="NavigationMesh.ParsedGeometryType" default="0">
|
||||
Determines which type of nodes will be parsed as geometry. See [enum ParsedGeometryType] for possible values.
|
||||
</member>
|
||||
<member name="geometry_source_geometry_mode" type="int" setter="set_source_geometry_mode" getter="get_source_geometry_mode" enum="NavigationMesh.SourceGeometryMode" default="0">
|
||||
The source of the geometry used when baking. See [enum SourceGeometryMode] for possible values.
|
||||
</member>
|
||||
<member name="geometry_source_group_name" type="StringName" setter="set_source_group_name" getter="get_source_group_name" default="@"navigation_mesh"">
|
||||
The name of the group to scan for geometry.
|
||||
Only used when [member geometry_source_geometry_mode] is [constant SOURCE_GEOMETRY_GROUPS_WITH_CHILDREN] or [constant SOURCE_GEOMETRY_GROUPS_EXPLICIT].
|
||||
</member>
|
||||
<member name="region_merge_size" type="float" setter="set_region_merge_size" getter="get_region_merge_size" default="20.0">
|
||||
Any regions with a size smaller than this will be merged with larger regions if possible.
|
||||
[b]Note:[/b] This value will be squared to calculate the number of cells. For example, a value of 20 will set the number of cells to 400.
|
||||
</member>
|
||||
<member name="region_min_size" type="float" setter="set_region_min_size" getter="get_region_min_size" default="2.0">
|
||||
The minimum size of a region for it to be created.
|
||||
[b]Note:[/b] This value will be squared to calculate the minimum number of cells allowed to form isolated island areas. For example, a value of 8 will set the number of cells to 64.
|
||||
</member>
|
||||
<member name="sample_partition_type" type="int" setter="set_sample_partition_type" getter="get_sample_partition_type" enum="NavigationMesh.SamplePartitionType" default="0">
|
||||
</member>
|
||||
<member name="vertices_per_polygon" type="float" setter="set_vertices_per_polygon" getter="get_vertices_per_polygon" default="6.0">
|
||||
The maximum number of vertices allowed for polygons generated during the contour to polygon conversion process.
|
||||
</member>
|
||||
</members>
|
||||
<constants>
|
||||
<constant name="SAMPLE_PARTITION_WATERSHED" value="0" enum="SamplePartitionType">
|
||||
Watershed partitioning. Generally the best choice if you precompute the navigation mesh, use this if you have large open areas.
|
||||
</constant>
|
||||
<constant name="SAMPLE_PARTITION_MONOTONE" value="1" enum="SamplePartitionType">
|
||||
Monotone partitioning. Use this if you want fast navigation mesh generation.
|
||||
</constant>
|
||||
<constant name="SAMPLE_PARTITION_LAYERS" value="2" enum="SamplePartitionType">
|
||||
Layer partitioning. Good choice to use for tiled navigation mesh with medium and small sized tiles.
|
||||
</constant>
|
||||
<constant name="SAMPLE_PARTITION_MAX" value="3" enum="SamplePartitionType">
|
||||
Represents the size of the [enum SamplePartitionType] enum.
|
||||
</constant>
|
||||
<constant name="PARSED_GEOMETRY_MESH_INSTANCES" value="0" enum="ParsedGeometryType">
|
||||
Parses mesh instances as geometry. This includes [MeshInstance], [CSGShape], and [GridMap] nodes.
|
||||
</constant>
|
||||
<constant name="PARSED_GEOMETRY_STATIC_COLLIDERS" value="1" enum="ParsedGeometryType">
|
||||
Parses [StaticBody] colliders as geometry. The collider should be in any of the layers specified by [member geometry_collision_mask].
|
||||
</constant>
|
||||
<constant name="PARSED_GEOMETRY_BOTH" value="2" enum="ParsedGeometryType">
|
||||
Both [constant PARSED_GEOMETRY_MESH_INSTANCES] and [constant PARSED_GEOMETRY_STATIC_COLLIDERS].
|
||||
</constant>
|
||||
<constant name="PARSED_GEOMETRY_MAX" value="3" enum="ParsedGeometryType">
|
||||
Represents the size of the [enum ParsedGeometryType] enum.
|
||||
</constant>
|
||||
<constant name="SOURCE_GEOMETRY_ROOT_NODE_CHILDREN" value="0" enum="SourceGeometryMode">
|
||||
Scans the child nodes of the root node recursively for geometry.
|
||||
</constant>
|
||||
<constant name="SOURCE_GEOMETRY_GROUPS_WITH_CHILDREN" value="1" enum="SourceGeometryMode">
|
||||
Scans nodes in a group and their child nodes recursively for geometry. The group is specified by [member geometry_source_group_name].
|
||||
</constant>
|
||||
<constant name="SOURCE_GEOMETRY_GROUPS_EXPLICIT" value="2" enum="SourceGeometryMode">
|
||||
Uses nodes in a group for geometry. The group is specified by [member geometry_source_group_name].
|
||||
</constant>
|
||||
<constant name="SOURCE_GEOMETRY_MAX" value="3" enum="SourceGeometryMode">
|
||||
Represents the size of the [enum SourceGeometryMode] enum.
|
||||
</constant>
|
||||
</constants>
|
||||
</class>
|
@ -1,114 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<class name="NavigationMeshGenerator" inherits="Object" version="4.2">
|
||||
<brief_description>
|
||||
Server for navigation mesh baking and source geometry parsing.
|
||||
</brief_description>
|
||||
<description>
|
||||
Server for navigation mesh baking and source geometry parsing. [NavigationMesh] baking is the process of creating a simplified mesh used for pathfinding out of (complex) level geometry. For this process, the [NavigationMeshGenerator] parses scene geometry from nodes and uses this information for the creation of the final navigation mesh according to bake parameters.
|
||||
Source geometry parsing and navigation mesh baking are costly operations. It is best to do them infrequently and with the help of background threads at runtime. Source geometry parsing has to finish on the exact frame it was started even when using threads, as the scene tree is not safe to parse when doing updates, and also, by nature, the scene tree itself is not thread-safe. If the amount of geometry that must be parsed is too big, framerate issues may occur.
|
||||
To work around the runtime framerate issues, the source geometry can be parsed to a [NavigationMeshSourceGeometryData2D] or a [NavigationMeshSourceGeometryData3D] resource. This resource can later be (re)used at runtime to bake multiple navigation meshes with different parameters in background threads without touching the scene tree again (assuming the nodes that contribute source geometry have not changed).
|
||||
</description>
|
||||
<tutorials>
|
||||
<link title="Using NavigationMeshes">$DOCS_URL/tutorials/navigation/navigation_using_navigationmeshes.md</link>
|
||||
</tutorials>
|
||||
<methods>
|
||||
<method name="bake_2d_from_source_geometry_data">
|
||||
<return type="void" />
|
||||
<argument index="0" name="navigation_polygon" type="NavigationPolygon" />
|
||||
<argument index="1" name="source_geometry_data" type="NavigationMeshSourceGeometryData2D" />
|
||||
<argument index="2" name="callback" type="FuncRef" default="null" />
|
||||
<description>
|
||||
Bakes the provided [param navigation_polygon] with the data from the provided [param source_geometry_data]. After the process is finished the optional [param callback] will be called.
|
||||
</description>
|
||||
</method>
|
||||
<method name="bake_3d_from_source_geometry_data">
|
||||
<return type="void" />
|
||||
<argument index="0" name="navigation_mesh" type="NavigationMesh" />
|
||||
<argument index="1" name="source_geometry_data" type="NavigationMeshSourceGeometryData3D" />
|
||||
<argument index="2" name="callback" type="FuncRef" default="null" />
|
||||
<description>
|
||||
Bakes the provided [param navigation_mesh] with the data from the provided [param source_geometry_data]. After the process is finished the optional [param callback] will be called.
|
||||
</description>
|
||||
</method>
|
||||
<method name="is_navigation_mesh_baking" qualifiers="const">
|
||||
<return type="bool" />
|
||||
<argument index="0" name="navigation_mesh" type="NavigationMesh" />
|
||||
<description>
|
||||
Returns [code]true[/code] if [param navigation_mesh] is currently baking or geometry parsing.
|
||||
</description>
|
||||
</method>
|
||||
<method name="is_navigation_polygon_baking" qualifiers="const">
|
||||
<return type="bool" />
|
||||
<argument index="0" name="navigation_polygon" type="NavigationPolygon" />
|
||||
<description>
|
||||
Returns [code]true[/code] if [param navigation_polygon] is currently baking or geometry parsing.
|
||||
</description>
|
||||
</method>
|
||||
<method name="parse_2d_source_geometry_data">
|
||||
<return type="NavigationMeshSourceGeometryData2D" />
|
||||
<argument index="0" name="navigation_polygon" type="NavigationPolygon" />
|
||||
<argument index="1" name="root_node" type="Node" />
|
||||
<argument index="2" name="callback" type="FuncRef" default="null" />
|
||||
<description>
|
||||
Parses the [SceneTree] (not thread-safe) for source geometry according to the properties of [param navigation_polygon] and returns a [NavigationMeshSourceGeometryData2D] that can be used to bake a navigation mesh. After the process is finished the optional [param callback] will be called.
|
||||
</description>
|
||||
</method>
|
||||
<method name="parse_3d_source_geometry_data">
|
||||
<return type="NavigationMeshSourceGeometryData3D" />
|
||||
<argument index="0" name="navigation_mesh" type="NavigationMesh" />
|
||||
<argument index="1" name="root_node" type="Node" />
|
||||
<argument index="2" name="callback" type="FuncRef" default="null" />
|
||||
<description>
|
||||
Parses the [SceneTree] (not thread-safe) for source geometry according to the properties of [param navigation_mesh] and returns a [NavigationMeshSourceGeometryData2D] that can be used to bake a navigation mesh. After the process is finished the optional [param callback] will be called.
|
||||
</description>
|
||||
</method>
|
||||
<method name="parse_and_bake_2d">
|
||||
<return type="void" />
|
||||
<argument index="0" name="navigation_polygon" type="NavigationPolygon" />
|
||||
<argument index="1" name="root_node" type="Node" />
|
||||
<argument index="2" name="callback" type="FuncRef" default="null" />
|
||||
<description>
|
||||
Uses both [method parse_2d_source_geometry_data] and [method bake_2d_from_source_geometry_data] in sequence. After the process is finished the optional [param callback] will be called.
|
||||
</description>
|
||||
</method>
|
||||
<method name="parse_and_bake_3d">
|
||||
<return type="void" />
|
||||
<argument index="0" name="navigation_mesh" type="NavigationMesh" />
|
||||
<argument index="1" name="root_node" type="Node" />
|
||||
<argument index="2" name="callback" type="FuncRef" default="null" />
|
||||
<description>
|
||||
Uses both [method parse_3d_source_geometry_data] and [method bake_3d_from_source_geometry_data] in sequence. After the process is finished the optional [param callback] will be called.
|
||||
</description>
|
||||
</method>
|
||||
<method name="register_geometry_parser_2d">
|
||||
<return type="void" />
|
||||
<argument index="0" name="geometry_parser" type="NavigationGeometryParser2D" />
|
||||
<description>
|
||||
Registers a 2d navigation geometry parser to contribute geometry data from parser specified node class(es) for navigation mesh baking.
|
||||
</description>
|
||||
</method>
|
||||
<method name="register_geometry_parser_3d">
|
||||
<return type="void" />
|
||||
<argument index="0" name="geometry_parser" type="NavigationGeometryParser3D" />
|
||||
<description>
|
||||
Registers a 3d navigation geometry parser to contribute geometry data from parser specified node class(es) for navigation mesh baking.
|
||||
</description>
|
||||
</method>
|
||||
<method name="unregister_geometry_parser_2d">
|
||||
<return type="void" />
|
||||
<argument index="0" name="geometry_parser" type="NavigationGeometryParser2D" />
|
||||
<description>
|
||||
Unregisters the specific 2d navigation geometry parser.
|
||||
</description>
|
||||
</method>
|
||||
<method name="unregister_geometry_parser_3d">
|
||||
<return type="void" />
|
||||
<argument index="0" name="geometry_parser" type="NavigationGeometryParser3D" />
|
||||
<description>
|
||||
Unregisters the specific 3d navigation geometry parser.
|
||||
</description>
|
||||
</method>
|
||||
</methods>
|
||||
<constants>
|
||||
</constants>
|
||||
</class>
|
@ -1,96 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<class name="NavigationMeshInstance" inherits="Spatial" version="4.2">
|
||||
<brief_description>
|
||||
An instance of a [NavigationMesh]. It tells the [Navigation] node what can be navigated and what cannot, based on the [NavigationMesh] resource.
|
||||
By default this node will register to the default [World3D] navigation map. If this node is a child of a [Navigation] node it will register to the navigation map of the navigation node.
|
||||
Two regions can be connected to each other if they share a similar edge. You can set the minimum distance between two vertices required to connect two edges by using [method NavigationServer.map_set_edge_connection_margin].
|
||||
[b]Note:[/b] Overlapping two regions' navigation meshes is not enough for connecting two regions. They must share a similar edge.
|
||||
The cost of entering this region from another region can be controlled with the [member enter_cost] value.
|
||||
[b]Note[/b]: This value is not added to the path cost when the start position is already inside this region.
|
||||
The cost of traveling distances inside this region can be controlled with the [member travel_cost] multiplier.
|
||||
</brief_description>
|
||||
<description>
|
||||
Bakes the [NavigationMesh]. If [code]on_thread[/code] is set to [code]true[/code] (default), the baking is done on a separate thread. Baking on separate thread is useful because navigation baking is not a cheap operation. When it is completed, it automatically sets the new [NavigationMesh]. Please note that baking on separate thread may be very slow if geometry is parsed from meshes as async access to each mesh involves heavy synchronization. Also, please note that baking on a separate thread is automatically disabled on operating systems that cannot use threads (such as HTML5 with threads disabled).
|
||||
</description>
|
||||
<tutorials>
|
||||
<link title="Using NavigationRegions">$DOCS_URL/tutorials/navigation/navigation_using_navigationregions.md</link>
|
||||
</tutorials>
|
||||
<methods>
|
||||
<method name="bake_navigation_mesh">
|
||||
<return type="void" />
|
||||
<argument index="0" name="on_thread" type="bool" default="true" />
|
||||
<description>
|
||||
Bakes the [NavigationMesh]. If [code]on_thread[/code] is set to [code]true[/code] (default), the baking is done on a separate thread. Baking on separate thread is useful because navigation baking is not a cheap operation. When it is completed, it automatically sets the new [NavigationMesh]. Please note that baking on separate thread may be very slow if geometry is parsed from meshes as async access to each mesh involves heavy synchronization.
|
||||
[b]Note:[/b] Only functional in Pandemonium builds with a [NavigationMeshGenerator] implementation available.
|
||||
</description>
|
||||
</method>
|
||||
<method name="get_navigation_layer_value" qualifiers="const">
|
||||
<return type="bool" />
|
||||
<argument index="0" name="layer_number" type="int" />
|
||||
<description>
|
||||
Returns whether or not the specified layer of the [member navigation_layers] bitmask is enabled, given a [code]layer_number[/code] between 1 and 32.
|
||||
</description>
|
||||
</method>
|
||||
<method name="get_navigation_map" qualifiers="const">
|
||||
<return type="RID" />
|
||||
<description>
|
||||
Returns the current navigation map [RID] use by this region.
|
||||
</description>
|
||||
</method>
|
||||
<method name="get_region_rid" qualifiers="const">
|
||||
<return type="RID" />
|
||||
<description>
|
||||
Returns the [RID] of this region on the [NavigationServer]. Combined with [method NavigationServer.map_get_closest_point_owner] can be used to identify the [NavigationMeshInstance] closest to a point on the merged navigation map.
|
||||
</description>
|
||||
</method>
|
||||
<method name="set_navigation_layer_value">
|
||||
<return type="void" />
|
||||
<argument index="0" name="layer_number" type="int" />
|
||||
<argument index="1" name="value" type="bool" />
|
||||
<description>
|
||||
Based on [code]value[/code], enables or disables the specified layer in the [member navigation_layers] bitmask, given a [code]layer_number[/code] between 1 and 32.
|
||||
</description>
|
||||
</method>
|
||||
<method name="set_navigation_map">
|
||||
<return type="void" />
|
||||
<argument index="0" name="navigation_map" type="RID" />
|
||||
<description>
|
||||
Sets the [RID] of the navigation map this region should use. By default the region will automatically join the [World3D] default navigation map so this function is only required to override the default map.
|
||||
</description>
|
||||
</method>
|
||||
</methods>
|
||||
<members>
|
||||
<member name="enabled" type="bool" setter="set_enabled" getter="is_enabled" default="true">
|
||||
Determines if the [NavigationMeshInstance] is enabled or disabled.
|
||||
</member>
|
||||
<member name="enter_cost" type="float" setter="set_enter_cost" getter="get_enter_cost" default="0.0">
|
||||
When pathfinding enters this regions navigation mesh from another regions navigation mesh the [code]enter_cost[/code] value is added to the path distance for determining the shortest path.
|
||||
</member>
|
||||
<member name="navigation_layers" type="int" setter="set_navigation_layers" getter="get_navigation_layers" default="1">
|
||||
A bitfield determining all navigation map layers the [NavigationMesh] belongs to. On path requests with [method NavigationServer.map_get_path] navigation meshes without matching layers will be ignored and the navigation map will only proximity merge different navigation meshes with matching layers.
|
||||
</member>
|
||||
<member name="navigation_mesh" type="NavigationMesh" setter="set_navigation_mesh" getter="get_navigation_mesh">
|
||||
The [NavigationMesh] resource to use.
|
||||
</member>
|
||||
<member name="travel_cost" type="float" setter="set_travel_cost" getter="get_travel_cost" default="1.0">
|
||||
When pathfinding moves inside this regions navigation mesh the traveled distances are multiplied with [code]travel_cost[/code] for determining the shortest path.
|
||||
</member>
|
||||
<member name="use_edge_connections" type="bool" setter="set_use_edge_connections" getter="get_use_edge_connections" default="true">
|
||||
If enabled the navigation region will use edge connections to connect with other navigation regions within proximity of the navigation map edge connection margin.
|
||||
</member>
|
||||
</members>
|
||||
<signals>
|
||||
<signal name="bake_finished">
|
||||
<description>
|
||||
Emitted when a navigation mesh bake operation is completed.
|
||||
</description>
|
||||
</signal>
|
||||
<signal name="navigation_mesh_changed">
|
||||
<description>
|
||||
Emitted when the used navigation mesh is replaced or changes to the internals of the current navigation mesh are committed.
|
||||
</description>
|
||||
</signal>
|
||||
</signals>
|
||||
<constants>
|
||||
</constants>
|
||||
</class>
|
@ -1,67 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<class name="NavigationMeshSourceGeometryData2D" inherits="Resource" version="4.2">
|
||||
<brief_description>
|
||||
Contains parsed source geometry data for use in [NavigationPolygon] baking with the [NavigationMeshGenerator].
|
||||
</brief_description>
|
||||
<description>
|
||||
Contains parsed source geometry data for use in [NavigationPolygon] baking with the [NavigationMeshGenerator].
|
||||
</description>
|
||||
<tutorials>
|
||||
</tutorials>
|
||||
<methods>
|
||||
<method name="add_obstruction_outline">
|
||||
<return type="void" />
|
||||
<argument index="0" name="shape_outline" type="PoolVector2Array" />
|
||||
<description>
|
||||
Adds the outline points of a shape as obstructed area.
|
||||
</description>
|
||||
</method>
|
||||
<method name="add_traversable_outline">
|
||||
<return type="void" />
|
||||
<argument index="0" name="shape_outline" type="PoolVector2Array" />
|
||||
<description>
|
||||
Adds the outline points of a shape as traversable area.
|
||||
</description>
|
||||
</method>
|
||||
<method name="clear">
|
||||
<return type="void" />
|
||||
<description>
|
||||
Clears the internal data.
|
||||
</description>
|
||||
</method>
|
||||
<method name="get_obstruction_outlines" qualifiers="const">
|
||||
<return type="Array" />
|
||||
<description>
|
||||
Returns all the obstructed area outlines arrays.
|
||||
</description>
|
||||
</method>
|
||||
<method name="get_traversable_outlines" qualifiers="const">
|
||||
<return type="Array" />
|
||||
<description>
|
||||
Returns all the traversable area outlines arrays.
|
||||
</description>
|
||||
</method>
|
||||
<method name="has_data">
|
||||
<return type="bool" />
|
||||
<description>
|
||||
Returns [b]true[/b] when parsed source geometry data exists.
|
||||
</description>
|
||||
</method>
|
||||
<method name="set_obstruction_outlines">
|
||||
<return type="void" />
|
||||
<argument index="0" name="obstruction_outlines" type="Array" />
|
||||
<description>
|
||||
Sets all the obstructed area outlines arrays.
|
||||
</description>
|
||||
</method>
|
||||
<method name="set_traversable_outlines">
|
||||
<return type="void" />
|
||||
<argument index="0" name="traversable_outlines" type="Array" />
|
||||
<description>
|
||||
Sets all the traversable area outlines arrays.
|
||||
</description>
|
||||
</method>
|
||||
</methods>
|
||||
<constants>
|
||||
</constants>
|
||||
</class>
|
@ -1,79 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<class name="NavigationMeshSourceGeometryData3D" inherits="Resource" version="4.2">
|
||||
<brief_description>
|
||||
Contains parsed source geometry data for use in [NavigationMesh] baking with the [NavigationMeshGenerator].
|
||||
</brief_description>
|
||||
<description>
|
||||
Contains parsed source geometry data for use in [NavigationMesh] baking with the [NavigationMeshGenerator].
|
||||
</description>
|
||||
<tutorials>
|
||||
</tutorials>
|
||||
<methods>
|
||||
<method name="add_faces">
|
||||
<return type="void" />
|
||||
<argument index="0" name="faces" type="PoolVector3Array" />
|
||||
<argument index="1" name="xform" type="Transform" />
|
||||
<description>
|
||||
Adds an array of vertex positions to the geometry data for navigation mesh baking to form triangulated faces. For each face the array must have three vertex positions in clockwise winding order. Since [NavigationMesh] resource have no transform all vertex positions need to be offset by the node's transform using the [code]xform[/code] parameter.
|
||||
</description>
|
||||
</method>
|
||||
<method name="add_mesh">
|
||||
<return type="void" />
|
||||
<argument index="0" name="mesh" type="Mesh" />
|
||||
<argument index="1" name="xform" type="Transform" />
|
||||
<description>
|
||||
Adds the geometry data of a [Mesh] resource to the navigation mesh baking data. The mesh must have valid triangulated mesh data to be considered. Since [NavigationMesh] resource have no transform all vertex positions need to be offset by the node's transform using the [code]xform[/code] parameter.
|
||||
</description>
|
||||
</method>
|
||||
<method name="add_mesh_array">
|
||||
<return type="void" />
|
||||
<argument index="0" name="mesh_array" type="Array" />
|
||||
<argument index="1" name="xform" type="Transform" />
|
||||
<description>
|
||||
Adds an [Array] the size of [constant Mesh.ARRAY_MAX] and with vertices at index [constant Mesh.ARRAY_VERTEX] and indices at index [constant Mesh.ARRAY_INDEX] to the navigation mesh baking data. The array must have valid triangulated mesh data to be considered. Since [NavigationMesh] resource have no transform all vertex positions need to be offset by the node's transform using the [code]xform[/code] parameter.
|
||||
</description>
|
||||
</method>
|
||||
<method name="clear">
|
||||
<return type="void" />
|
||||
<description>
|
||||
Clears the internal data.
|
||||
</description>
|
||||
</method>
|
||||
<method name="get_indices" qualifiers="const">
|
||||
<return type="PoolIntArray" />
|
||||
<description>
|
||||
Returns the parsed source geometry data indices array.
|
||||
</description>
|
||||
</method>
|
||||
<method name="get_vertices" qualifiers="const">
|
||||
<return type="PoolRealArray" />
|
||||
<description>
|
||||
Returns the parsed source geometry data vertices array.
|
||||
</description>
|
||||
</method>
|
||||
<method name="has_data">
|
||||
<return type="bool" />
|
||||
<description>
|
||||
Returns [b]true[/b] when parsed source geometry data exists.
|
||||
</description>
|
||||
</method>
|
||||
<method name="set_indices">
|
||||
<return type="void" />
|
||||
<argument index="0" name="indices" type="PoolIntArray" />
|
||||
<description>
|
||||
Sets the parsed source geometry data indices. The indices need to be matched with appropriated vertices.
|
||||
[b]Warning:[/b] Inappropriate data can crash the baking process of the involved third-party libraries.
|
||||
</description>
|
||||
</method>
|
||||
<method name="set_vertices">
|
||||
<return type="void" />
|
||||
<argument index="0" name="vertices" type="PoolRealArray" />
|
||||
<description>
|
||||
Sets the parsed source geometry data vertices. The vertices need to be matched with appropriated indices.
|
||||
[b]Warning:[/b] Inappropriate data can crash the baking process of the involved third-party libraries.
|
||||
</description>
|
||||
</method>
|
||||
</methods>
|
||||
<constants>
|
||||
</constants>
|
||||
</class>
|
@ -1,90 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<class name="NavigationObstacle" inherits="Spatial" version="4.2">
|
||||
<brief_description>
|
||||
3D Obstacle used in navigation to constrain avoidance controlled agents outside or inside an area.
|
||||
</brief_description>
|
||||
<description>
|
||||
3D Obstacle used in navigation to constrain avoidance controlled agents outside or inside an area. The obstacle needs a navigation map and outline vertices defined to work correctly.
|
||||
If the obstacle's vertices are winded in clockwise order, avoidance agents will be pushed in by the obstacle, otherwise, avoidance agents will be pushed out. Outlines must not cross or overlap.
|
||||
Obstacles are [b]not[/b] a replacement for a (re)baked navigation mesh. Obstacles [b]don't[/b] change the resulting path from the pathfinding, obstacles only affect the navigation avoidance agent movement by altering the suggested velocity of the avoidance agent.
|
||||
Obstacles using vertices can warp to a new position but should not moved every frame as each move requires a rebuild of the avoidance map.
|
||||
</description>
|
||||
<tutorials>
|
||||
<link title="Using NavigationObstacles">$DOCS_URL/tutorials/navigation/navigation_using_navigationobstacles.md</link>
|
||||
</tutorials>
|
||||
<methods>
|
||||
<method name="get_avoidance_layer_value" qualifiers="const">
|
||||
<return type="bool" />
|
||||
<argument index="0" name="layer_number" type="int" />
|
||||
<description>
|
||||
Returns whether or not the specified layer of the [member avoidance_layers] bitmask is enabled, given a [param layer_number] between 1 and 32.
|
||||
</description>
|
||||
</method>
|
||||
<method name="get_navigation" qualifiers="const">
|
||||
<return type="Node" />
|
||||
<description>
|
||||
Returns the [Navigation] node that the obstacle is using for its navigation system.
|
||||
</description>
|
||||
</method>
|
||||
<method name="get_navigation_map" qualifiers="const">
|
||||
<return type="RID" />
|
||||
<description>
|
||||
Returns the [RID] of the navigation map for this NavigationObstacle node. This function returns always the map set on the NavigationObstacle node and not the map of the abstract obstacle on the NavigationServer. If the obstacle map is changed directly with the NavigationServer API the NavigationObstacle node will not be aware of the map change. Use [method set_navigation_map] to change the navigation map for the NavigationObstacle and also update the obstacle on the NavigationServer.
|
||||
</description>
|
||||
</method>
|
||||
<method name="get_rid" qualifiers="const">
|
||||
<return type="RID" />
|
||||
<description>
|
||||
Returns the [RID] of this obstacle on the [NavigationServer3D].
|
||||
</description>
|
||||
</method>
|
||||
<method name="set_avoidance_layer_value">
|
||||
<return type="void" />
|
||||
<argument index="0" name="layer_number" type="int" />
|
||||
<argument index="1" name="value" type="bool" />
|
||||
<description>
|
||||
Based on [param value], enables or disables the specified layer in the [member avoidance_layers] bitmask, given a [param layer_number] between 1 and 32.
|
||||
</description>
|
||||
</method>
|
||||
<method name="set_navigation">
|
||||
<return type="void" />
|
||||
<argument index="0" name="navigation" type="Node" />
|
||||
<description>
|
||||
Sets the [Navigation] node used by the obstacle. Useful when you don't want to make the obstacle a child of a [Navigation] node.
|
||||
</description>
|
||||
</method>
|
||||
<method name="set_navigation_map">
|
||||
<return type="void" />
|
||||
<argument index="0" name="navigation_map" type="RID" />
|
||||
<description>
|
||||
Sets the [RID] of the navigation map this NavigationObstacle node should use and also updates the [code]obstacle[/code] on the NavigationServer.
|
||||
</description>
|
||||
</method>
|
||||
</methods>
|
||||
<members>
|
||||
<member name="avoidance_enabled" type="bool" setter="set_avoidance_enabled" getter="get_avoidance_enabled" default="true">
|
||||
If [code]true[/code] the obstacle affects avoidance using agents.
|
||||
</member>
|
||||
<member name="avoidance_layers" type="int" setter="set_avoidance_layers" getter="get_avoidance_layers" default="1">
|
||||
A bitfield determining the avoidance layers for this obstacle. Agent's with a matching bit on the their avoidance mask will avoid this obstacle.
|
||||
</member>
|
||||
<member name="height" type="float" setter="set_height" getter="get_height" default="1.0">
|
||||
Sets the obstacle height used in 2D avoidance. 2D avoidance using agent's ignore obstacles that are below or above them.
|
||||
</member>
|
||||
<member name="radius" type="float" setter="set_radius" getter="get_radius" default="0.0">
|
||||
Sets the avoidance radius for the obstacle.
|
||||
</member>
|
||||
<member name="use_3d_avoidance" type="bool" setter="set_use_3d_avoidance" getter="get_use_3d_avoidance" default="false">
|
||||
If [code]true[/code] the obstacle affects 3D avoidance using agent's with obstacle [member radius].
|
||||
If [code]false[/code] the obstacle affects 2D avoidance using agent's with both obstacle [member vertices] as well as obstacle [member radius].
|
||||
</member>
|
||||
<member name="velocity" type="Vector3" setter="set_velocity" getter="get_velocity" default="Vector3( 0, 0, 0 )">
|
||||
Sets the wanted velocity for the obstacle so other agent's can better predict the obstacle if it is moved with a velocity regularly (every frame) instead of warped to a new position. Does only affect avoidance for the obstacles [member radius]. Does nothing for the obstacles static vertices.
|
||||
</member>
|
||||
<member name="vertices" type="PoolVector3Array" setter="set_vertices" getter="get_vertices" default="PoolVector3Array( )">
|
||||
The outline vertices of the obstacle. If the vertices are winded in clockwise order agents will be pushed in by the obstacle, else they will be pushed out. Outlines can not be crossed or overlap. Should the vertices using obstacle be warped to a new position agent's can not predict this movement and may get trapped inside the obstacle.
|
||||
</member>
|
||||
</members>
|
||||
<constants>
|
||||
</constants>
|
||||
</class>
|
@ -1,83 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<class name="NavigationObstacle2D" inherits="Node2D" version="4.2">
|
||||
<brief_description>
|
||||
2D Obstacle used in navigation to constrain avoidance controlled agents outside or inside an area.
|
||||
</brief_description>
|
||||
<description>
|
||||
2D Obstacle used in navigation to constrain avoidance controlled agents outside or inside an area. The obstacle needs a navigation map and outline vertices defined to work correctly.
|
||||
If the obstacle's vertices are winded in clockwise order, avoidance agents will be pushed in by the obstacle, otherwise, avoidance agents will be pushed out. Outlines must not cross or overlap.
|
||||
Obstacles are [b]not[/b] a replacement for a (re)baked navigation mesh. Obstacles [b]don't[/b] change the resulting path from the pathfinding, obstacles only affect the navigation avoidance agent movement by altering the suggested velocity of the avoidance agent.
|
||||
Obstacles using vertices can warp to a new position but should not moved every frame as each move requires a rebuild of the avoidance map.
|
||||
</description>
|
||||
<tutorials>
|
||||
<link title="Using NavigationObstacles">$DOCS_URL/tutorials/navigation/navigation_using_navigationobstacles.md</link>
|
||||
</tutorials>
|
||||
<methods>
|
||||
<method name="get_avoidance_layer_value" qualifiers="const">
|
||||
<return type="bool" />
|
||||
<argument index="0" name="layer_number" type="int" />
|
||||
<description>
|
||||
Returns whether or not the specified layer of the [member avoidance_layers] bitmask is enabled, given a [param layer_number] between 1 and 32.
|
||||
</description>
|
||||
</method>
|
||||
<method name="get_navigation" qualifiers="const">
|
||||
<return type="Node" />
|
||||
<description>
|
||||
Returns the [Navigation2D] node that the obstacle is using for its navigation system.
|
||||
</description>
|
||||
</method>
|
||||
<method name="get_navigation_map" qualifiers="const">
|
||||
<return type="RID" />
|
||||
<description>
|
||||
Returns the [RID] of the navigation map for this NavigationObstacle2D node. This function returns always the map set on the NavigationObstacle node and not the map of the abstract obstacle on the NavigationServer. If the obstacle map is changed directly with the NavigationServer API the NavigationObstacle node will not be aware of the map change. Use [method set_navigation_map] to change the navigation map for the NavigationObstacle2D and also update the obstacle on the [NavigationServer2D].
|
||||
</description>
|
||||
</method>
|
||||
<method name="get_rid" qualifiers="const">
|
||||
<return type="RID" />
|
||||
<description>
|
||||
Returns the [RID] of this obstacle on the [NavigationServer2D].
|
||||
</description>
|
||||
</method>
|
||||
<method name="set_avoidance_layer_value">
|
||||
<return type="void" />
|
||||
<argument index="0" name="layer_number" type="int" />
|
||||
<argument index="1" name="value" type="bool" />
|
||||
<description>
|
||||
Based on [param value], enables or disables the specified layer in the [member avoidance_layers] bitmask, given a [param layer_number] between 1 and 32.
|
||||
</description>
|
||||
</method>
|
||||
<method name="set_navigation">
|
||||
<return type="void" />
|
||||
<argument index="0" name="navigation" type="Node" />
|
||||
<description>
|
||||
Sets the [Navigation2D] node used by the obstacle. Useful when you don't want to make the obstacle a child of a [Navigation2D] node.
|
||||
</description>
|
||||
</method>
|
||||
<method name="set_navigation_map">
|
||||
<return type="void" />
|
||||
<argument index="0" name="navigation_map" type="RID" />
|
||||
<description>
|
||||
Sets the [RID] of the navigation map this NavigationObstacle2D node should use and also updates the [code]obstacle[/code] on the [NavigationServer2D].
|
||||
</description>
|
||||
</method>
|
||||
</methods>
|
||||
<members>
|
||||
<member name="avoidance_enabled" type="bool" setter="set_avoidance_enabled" getter="get_avoidance_enabled" default="true">
|
||||
If [code]true[/code] the obstacle affects avoidance using agents.
|
||||
</member>
|
||||
<member name="avoidance_layers" type="int" setter="set_avoidance_layers" getter="get_avoidance_layers" default="1">
|
||||
A bitfield determining the avoidance layers for this obstacle. Agent's with a matching bit on the their avoidance mask will avoid this obstacle.
|
||||
</member>
|
||||
<member name="radius" type="float" setter="set_radius" getter="get_radius" default="0.0">
|
||||
Sets the avoidance radius for the obstacle.
|
||||
</member>
|
||||
<member name="velocity" type="Vector2" setter="set_velocity" getter="get_velocity" default="Vector2( 0, 0 )">
|
||||
Sets the wanted velocity for the obstacle so other agent's can better predict the obstacle if it is moved with a velocity regularly (every frame) instead of warped to a new position. Does only affect avoidance for the obstacles [member radius]. Does nothing for the obstacles static vertices.
|
||||
</member>
|
||||
<member name="vertices" type="PoolVector2Array" setter="set_vertices" getter="get_vertices" default="PoolVector2Array( )">
|
||||
The outline vertices of the obstacle. If the vertices are winded in clockwise order agents will be pushed in by the obstacle, else they will be pushed out. Outlines can not be crossed or overlap. Should the vertices using obstacle be warped to a new position agent's can not predict this movement and may get trapped inside the obstacle.
|
||||
</member>
|
||||
</members>
|
||||
<constants>
|
||||
</constants>
|
||||
</class>
|
@ -1,63 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<class name="NavigationPathQueryParameters2D" inherits="Reference" version="4.2">
|
||||
<brief_description>
|
||||
Provides parameters for 2D navigation path queries.
|
||||
</brief_description>
|
||||
<description>
|
||||
By changing various properties of this object, such as the start and target position, you can configure path queries to the [NavigationServer2D].
|
||||
</description>
|
||||
<tutorials>
|
||||
<link title="Using NavigationPathQueryObjects">$DOCS_URL/tutorials/navigation/navigation_using_navigationpathqueryobjects.md</link>
|
||||
</tutorials>
|
||||
<methods>
|
||||
</methods>
|
||||
<members>
|
||||
<member name="map" type="RID" setter="set_map" getter="get_map">
|
||||
The navigation [code]map[/code] [RID] used in the path query.
|
||||
</member>
|
||||
<member name="metadata_flags" type="int" setter="set_metadata_flags" getter="get_metadata_flags" default="7">
|
||||
Additional information to include with the navigation path.
|
||||
</member>
|
||||
<member name="navigation_layers" type="int" setter="set_navigation_layers" getter="get_navigation_layers" default="1">
|
||||
The navigation layers the query will use (as a bitmask).
|
||||
</member>
|
||||
<member name="path_postprocessing" type="int" setter="set_path_postprocessing" getter="get_path_postprocessing" enum="NavigationPathQueryParameters2D.PathPostProcessing" default="0">
|
||||
The path postprocessing applied to the raw path corridor found by the [member pathfinding_algorithm].
|
||||
</member>
|
||||
<member name="pathfinding_algorithm" type="int" setter="set_pathfinding_algorithm" getter="get_pathfinding_algorithm" enum="NavigationPathQueryParameters2D.PathfindingAlgorithm" default="0">
|
||||
The pathfinding algorithm used in the path query.
|
||||
</member>
|
||||
<member name="start_position" type="Vector2" setter="set_start_position" getter="get_start_position" default="Vector2( 0, 0 )">
|
||||
The pathfinding start position in global coordinates.
|
||||
</member>
|
||||
<member name="target_position" type="Vector2" setter="set_target_position" getter="get_target_position" default="Vector2( 0, 0 )">
|
||||
The pathfinding target position in global coordinates.
|
||||
</member>
|
||||
</members>
|
||||
<constants>
|
||||
<constant name="PATHFINDING_ALGORITHM_ASTAR" value="0" enum="PathfindingAlgorithm">
|
||||
The path query uses the default A* pathfinding algorithm.
|
||||
</constant>
|
||||
<constant name="PATH_POSTPROCESSING_CORRIDORFUNNEL" value="0" enum="PathPostProcessing">
|
||||
Applies a funnel algorithm to the raw path corridor found by the pathfinding algorithm. This will result in the shortest path possible inside the path corridor. This postprocessing very much depends on the navigation mesh polygon layout and the created corridor. Especially tile- or gridbased layouts can face artificial corners with diagonal movement due to a jagged path corridor imposed by the cell shapes.
|
||||
</constant>
|
||||
<constant name="PATH_POSTPROCESSING_EDGECENTERED" value="1" enum="PathPostProcessing">
|
||||
Centers every path position in the middle of the traveled navigation mesh polygon edge. This creates better paths for tile- or gridbased layouts that restrict the movement to the cells center.
|
||||
</constant>
|
||||
<constant name="PATH_METADATA_INCLUDE_NONE" value="0" enum="PathMetadataFlags">
|
||||
Don't include any additional metadata about the returned path.
|
||||
</constant>
|
||||
<constant name="PATH_METADATA_INCLUDE_TYPES" value="1" enum="PathMetadataFlags">
|
||||
Include the type of navigation primitive (region or link) that each point of the path goes through.
|
||||
</constant>
|
||||
<constant name="PATH_METADATA_INCLUDE_RIDS" value="2" enum="PathMetadataFlags">
|
||||
Include the [RID]s of the regions and links that each point of the path goes through.
|
||||
</constant>
|
||||
<constant name="PATH_METADATA_INCLUDE_OWNERS" value="4" enum="PathMetadataFlags">
|
||||
Include the [code]ObjectID[/code]s of the [Object]s which manage the regions and links each point of the path goes through.
|
||||
</constant>
|
||||
<constant name="PATH_METADATA_INCLUDE_ALL" value="7" enum="PathMetadataFlags">
|
||||
Include all available metadata about the returned path.
|
||||
</constant>
|
||||
</constants>
|
||||
</class>
|
@ -1,63 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<class name="NavigationPathQueryParameters3D" inherits="Reference" version="4.2">
|
||||
<brief_description>
|
||||
Provides parameters for 3D navigation path queries.
|
||||
</brief_description>
|
||||
<description>
|
||||
By changing various properties of this object, such as the start and target position, you can configure path queries to the [NavigationServer3D].
|
||||
</description>
|
||||
<tutorials>
|
||||
<link title="Using NavigationPathQueryObjects">$DOCS_URL/tutorials/navigation/navigation_using_navigationpathqueryobjects.md</link>
|
||||
</tutorials>
|
||||
<methods>
|
||||
</methods>
|
||||
<members>
|
||||
<member name="map" type="RID" setter="set_map" getter="get_map">
|
||||
The navigation [code]map[/code] [RID] used in the path query.
|
||||
</member>
|
||||
<member name="metadata_flags" type="int" setter="set_metadata_flags" getter="get_metadata_flags" default="7">
|
||||
Additional information to include with the navigation path.
|
||||
</member>
|
||||
<member name="navigation_layers" type="int" setter="set_navigation_layers" getter="get_navigation_layers" default="1">
|
||||
The navigation layers the query will use (as a bitmask).
|
||||
</member>
|
||||
<member name="path_postprocessing" type="int" setter="set_path_postprocessing" getter="get_path_postprocessing" enum="NavigationPathQueryParameters3D.PathPostProcessing" default="0">
|
||||
The path postprocessing applied to the raw path corridor found by the [member pathfinding_algorithm].
|
||||
</member>
|
||||
<member name="pathfinding_algorithm" type="int" setter="set_pathfinding_algorithm" getter="get_pathfinding_algorithm" enum="NavigationPathQueryParameters3D.PathfindingAlgorithm" default="0">
|
||||
The pathfinding algorithm used in the path query.
|
||||
</member>
|
||||
<member name="start_position" type="Vector3" setter="set_start_position" getter="get_start_position" default="Vector3( 0, 0, 0 )">
|
||||
The pathfinding start position in global coordinates.
|
||||
</member>
|
||||
<member name="target_position" type="Vector3" setter="set_target_position" getter="get_target_position" default="Vector3( 0, 0, 0 )">
|
||||
The pathfinding target position in global coordinates.
|
||||
</member>
|
||||
</members>
|
||||
<constants>
|
||||
<constant name="PATHFINDING_ALGORITHM_ASTAR" value="0" enum="PathfindingAlgorithm">
|
||||
The path query uses the default A* pathfinding algorithm.
|
||||
</constant>
|
||||
<constant name="PATH_POSTPROCESSING_CORRIDORFUNNEL" value="0" enum="PathPostProcessing">
|
||||
Applies a funnel algorithm to the raw path corridor found by the pathfinding algorithm. This will result in the shortest path possible inside the path corridor. This postprocessing very much depends on the navigation mesh polygon layout and the created corridor. Especially tile- or gridbased layouts can face artificial corners with diagonal movement due to a jagged path corridor imposed by the cell shapes.
|
||||
</constant>
|
||||
<constant name="PATH_POSTPROCESSING_EDGECENTERED" value="1" enum="PathPostProcessing">
|
||||
Centers every path position in the middle of the traveled navigation mesh polygon edge. This creates better paths for tile- or gridbased layouts that restrict the movement to the cells center.
|
||||
</constant>
|
||||
<constant name="PATH_METADATA_INCLUDE_NONE" value="0" enum="PathMetadataFlags">
|
||||
Don't include any additional metadata about the returned path.
|
||||
</constant>
|
||||
<constant name="PATH_METADATA_INCLUDE_TYPES" value="1" enum="PathMetadataFlags">
|
||||
Include the type of navigation primitive (region or link) that each point of the path goes through.
|
||||
</constant>
|
||||
<constant name="PATH_METADATA_INCLUDE_RIDS" value="2" enum="PathMetadataFlags">
|
||||
Include the [RID]s of the regions and links that each point of the path goes through.
|
||||
</constant>
|
||||
<constant name="PATH_METADATA_INCLUDE_OWNERS" value="4" enum="PathMetadataFlags">
|
||||
Include the [code]ObjectID[/code]s of the [Object]s which manage the regions and links each point of the path goes through.
|
||||
</constant>
|
||||
<constant name="PATH_METADATA_INCLUDE_ALL" value="7" enum="PathMetadataFlags">
|
||||
Include all available metadata about the returned path.
|
||||
</constant>
|
||||
</constants>
|
||||
</class>
|
@ -1,42 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<class name="NavigationPathQueryResult2D" inherits="Reference" version="4.2">
|
||||
<brief_description>
|
||||
Represents the result of a 2D pathfinding query.
|
||||
</brief_description>
|
||||
<description>
|
||||
This class stores the result of a 2D navigation path query from the [NavigationServer2D].
|
||||
</description>
|
||||
<tutorials>
|
||||
<link title="Using NavigationPathQueryObjects">$DOCS_URL/tutorials/navigation/navigation_using_navigationpathqueryobjects.md</link>
|
||||
</tutorials>
|
||||
<methods>
|
||||
<method name="reset">
|
||||
<return type="void" />
|
||||
<description>
|
||||
Reset the result object to its initial state. This is useful to reuse the object across multiple queries.
|
||||
</description>
|
||||
</method>
|
||||
</methods>
|
||||
<members>
|
||||
<member name="path" type="PoolVector2Array" setter="set_path" getter="get_path" default="PoolVector2Array( )">
|
||||
The resulting path array from the navigation query. All path array positions are in global coordinates. Without customized query parameters this is the same path as returned by [method NavigationServer2D.map_get_path].
|
||||
</member>
|
||||
<member name="path_owner_ids" type="Array" setter="set_path_owner_ids" getter="get_path_owner_ids" default="[ ]">
|
||||
The [code]ObjectID[/code]s of the [Object]s which manage the regions and links each point of the path goes through.
|
||||
</member>
|
||||
<member name="path_rids" type="Array" setter="set_path_rids" getter="get_path_rids" default="[ ]">
|
||||
The [RID]s of the regions and links that each point of the path goes through.
|
||||
</member>
|
||||
<member name="path_types" type="PoolIntArray" setter="set_path_types" getter="get_path_types" default="PoolIntArray( )">
|
||||
The type of navigation primitive (region or link) that each point of the path goes through.
|
||||
</member>
|
||||
</members>
|
||||
<constants>
|
||||
<constant name="PATH_SEGMENT_TYPE_REGION" value="0" enum="PathSegmentType">
|
||||
This segment of the path goes through a region.
|
||||
</constant>
|
||||
<constant name="PATH_SEGMENT_TYPE_LINK" value="1" enum="PathSegmentType">
|
||||
This segment of the path goes through a link.
|
||||
</constant>
|
||||
</constants>
|
||||
</class>
|
@ -1,42 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<class name="NavigationPathQueryResult3D" inherits="Reference" version="4.2">
|
||||
<brief_description>
|
||||
Represents the result of a 3D pathfinding query.
|
||||
</brief_description>
|
||||
<description>
|
||||
This class stores the result of a 3D navigation path query from the [NavigationServer3D].
|
||||
</description>
|
||||
<tutorials>
|
||||
<link title="Using NavigationPathQueryObjects">$DOCS_URL/tutorials/navigation/navigation_using_navigationpathqueryobjects.md</link>
|
||||
</tutorials>
|
||||
<methods>
|
||||
<method name="reset">
|
||||
<return type="void" />
|
||||
<description>
|
||||
Reset the result object to its initial state. This is useful to reuse the object across multiple queries.
|
||||
</description>
|
||||
</method>
|
||||
</methods>
|
||||
<members>
|
||||
<member name="path" type="PoolVector3Array" setter="set_path" getter="get_path" default="PoolVector3Array( )">
|
||||
The resulting path array from the navigation query. All path array positions are in global coordinates. Without customized query parameters this is the same path as returned by [method NavigationServer3D.map_get_path].
|
||||
</member>
|
||||
<member name="path_owner_ids" type="Array" setter="set_path_owner_ids" getter="get_path_owner_ids" default="[ ]">
|
||||
The [code]ObjectID[/code]s of the [Object]s which manage the regions and links each point of the path goes through.
|
||||
</member>
|
||||
<member name="path_rids" type="Array" setter="set_path_rids" getter="get_path_rids" default="[ ]">
|
||||
The [RID]s of the regions and links that each point of the path goes through.
|
||||
</member>
|
||||
<member name="path_types" type="PoolIntArray" setter="set_path_types" getter="get_path_types" default="PoolIntArray( )">
|
||||
The type of navigation primitive (region or link) that each point of the path goes through.
|
||||
</member>
|
||||
</members>
|
||||
<constants>
|
||||
<constant name="PATH_SEGMENT_TYPE_REGION" value="0" enum="PathSegmentType">
|
||||
This segment of the path goes through a region.
|
||||
</constant>
|
||||
<constant name="PATH_SEGMENT_TYPE_LINK" value="1" enum="PathSegmentType">
|
||||
This segment of the path goes through a link.
|
||||
</constant>
|
||||
</constants>
|
||||
</class>
|
@ -1,271 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<class name="NavigationPolygon" inherits="Resource" version="4.2">
|
||||
<brief_description>
|
||||
A NavigationPolygon is used in pathfinding to describe the traversable area that is safe from collision and other obstructions, assuming an agent's center position at zero radius.
|
||||
</brief_description>
|
||||
<description>
|
||||
A NavigationPolygon is used in pathfinding to describe the traversable area that is safe from collision and other obstructions, assuming an agent's center position at zero radius. The mesh data can be created and baked to polygons with the [NavigationMeshGenerator] by drawing outlines in the Editor, or defining outlines by script, or by parsing source geometry from the [SceneTree]. The mesh data can also be created without outlines and baking by adding the required arrays of vertices and polygon indices more manually and calling [method commit_changes] afterwards.
|
||||
When doing procedual changes a call to [method commit_changes] is required to apply all the made changes and to synchronize the changes with the [NavigationServer2D].
|
||||
In scripts there are two more manual ways to create navigation polygons. Either by using the [method add_outline] method and baking with the [NavigationMeshGenerator], or using the methods [method set_vertices] and [method set_polygons] directly.
|
||||
Using [method add_outline]:
|
||||
[codeblock]
|
||||
var new_navigation_polygon = NavigationPolygon.new()
|
||||
var new_navigation_polygon_outline = PoolVector2Array([Vector2(0, 0), Vector2(0, 50), Vector2(50, 50), Vector2(50, 0)])
|
||||
new_navigation_polygon.add_outline(new_navigation_polygon_outline)
|
||||
NavigationMeshGenerator.bake_2d_from_source_geometry_data(new_navigation_polygon, NavigationMeshSourceGeometryData2D.new());
|
||||
$NavigationRegion2D.navigation_polygon = new_navigation_polygon
|
||||
[/codeblock]
|
||||
Using [method add_polygon] and indices of the vertices array.
|
||||
[codeblock]
|
||||
var new_navigation_polygon = NavigationPolygon.new()
|
||||
var new_navigation_polygon_vertices = PoolVector2Array([Vector2(0, 0), Vector2(0, 50), Vector2(50, 50), Vector2(50, 0)])
|
||||
new_navigation_polygon.vertices = new_navigation_polygon_vertices
|
||||
var new_navigation_polygon_polygon_indices = PoolIntArray([0, 1, 2, 3])
|
||||
new_navigation_polygon.add_polygon(new_navigation_polygon_polygon_indices)
|
||||
new_navigation_polygon.commit_changes()
|
||||
$NavigationRegion2D.navigation_polygon = new_navigation_polygon
|
||||
[/codeblock]
|
||||
</description>
|
||||
<tutorials>
|
||||
<link title="2D Navigation Demo">https://github.com/Relintai/pandemonium_demo_projects/tree/master/2d/navigation</link>
|
||||
<link title="Using NavigationMeshes">$DOCS_URL/tutorials/navigation/navigation_using_navigationmeshes.md</link>
|
||||
</tutorials>
|
||||
<methods>
|
||||
<method name="add_outline">
|
||||
<return type="void" />
|
||||
<argument index="0" name="outline" type="PoolVector2Array" />
|
||||
<description>
|
||||
Appends a [PoolVector2Array] that contains the vertices of an outline to the internal array that contains all the outlines. You have to call [method make_polygons_from_outlines] in order for this array to be converted to polygons that the engine will use.
|
||||
</description>
|
||||
</method>
|
||||
<method name="add_outline_at_index">
|
||||
<return type="void" />
|
||||
<argument index="0" name="outline" type="PoolVector2Array" />
|
||||
<argument index="1" name="index" type="int" />
|
||||
<description>
|
||||
Adds a [PoolVector2Array] that contains the vertices of an outline to the internal array that contains all the outlines at a fixed position. You have to call [method make_polygons_from_outlines] in order for this array to be converted to polygons that the engine will use.
|
||||
</description>
|
||||
</method>
|
||||
<method name="add_polygon">
|
||||
<return type="void" />
|
||||
<argument index="0" name="polygon" type="PoolIntArray" />
|
||||
<description>
|
||||
Adds a polygon using the indices of the vertices you get when calling [method get_vertices].
|
||||
</description>
|
||||
</method>
|
||||
<method name="clear_outlines">
|
||||
<return type="void" />
|
||||
<description>
|
||||
Clears the array of the outlines, but it doesn't clear the vertices and the polygons that were created by them.
|
||||
</description>
|
||||
</method>
|
||||
<method name="clear_polygons">
|
||||
<return type="void" />
|
||||
<description>
|
||||
Clears the array of polygons, but it doesn't clear the array of outlines and vertices.
|
||||
</description>
|
||||
</method>
|
||||
<method name="commit_changes">
|
||||
<return type="void" />
|
||||
<description>
|
||||
Applies all changes to vertices and polygons and synchronizes with the [NavigationServer2D].
|
||||
</description>
|
||||
</method>
|
||||
<method name="get_baked_outlines" qualifiers="const">
|
||||
<return type="Array" />
|
||||
<description>
|
||||
Returns the array of baked outlines. The baked outlines are the result of a finished [NavigationMeshGenerator] baking process and primarily used for debugging purposes.
|
||||
</description>
|
||||
</method>
|
||||
<method name="get_collision_mask_value" qualifiers="const">
|
||||
<return type="bool" />
|
||||
<argument index="0" name="layer_number" type="int" />
|
||||
<description>
|
||||
Returns whether or not the specified layer of the [member geometry_collision_mask] is enabled, given a [param layer_number] between 1 and 32.
|
||||
</description>
|
||||
</method>
|
||||
<method name="get_navigation_mesh">
|
||||
<return type="NavigationMesh" />
|
||||
<description>
|
||||
</description>
|
||||
</method>
|
||||
<method name="get_outline" qualifiers="const">
|
||||
<return type="PoolVector2Array" />
|
||||
<argument index="0" name="idx" type="int" />
|
||||
<description>
|
||||
Returns a [PoolVector2Array] containing the vertices of an outline that was created in the editor or by script.
|
||||
</description>
|
||||
</method>
|
||||
<method name="get_outline_count" qualifiers="const">
|
||||
<return type="int" />
|
||||
<description>
|
||||
Returns the number of outlines that were created in the editor or by script.
|
||||
</description>
|
||||
</method>
|
||||
<method name="get_outlines" qualifiers="const">
|
||||
<return type="Array" />
|
||||
<description>
|
||||
</description>
|
||||
</method>
|
||||
<method name="get_polygon">
|
||||
<return type="PoolIntArray" />
|
||||
<argument index="0" name="idx" type="int" />
|
||||
<description>
|
||||
Returns a [PoolIntArray] containing the indices of the vertices of a created polygon.
|
||||
</description>
|
||||
</method>
|
||||
<method name="get_polygon_count" qualifiers="const">
|
||||
<return type="int" />
|
||||
<description>
|
||||
Returns the number of polygons.
|
||||
</description>
|
||||
</method>
|
||||
<method name="get_polygons" qualifiers="const">
|
||||
<return type="Array" />
|
||||
<description>
|
||||
Returns the array of polygons used by the internal navigation mesh. Each polygon array consists of the indices for the vertices that make the polygon.
|
||||
</description>
|
||||
</method>
|
||||
<method name="get_vertices" qualifiers="const">
|
||||
<return type="PoolVector2Array" />
|
||||
<description>
|
||||
Returns a [PoolVector2Array] containing all the vertices being used to create the polygons.
|
||||
</description>
|
||||
</method>
|
||||
<method name="make_polygons_from_outlines">
|
||||
<return type="void" />
|
||||
<description>
|
||||
Creates polygons from the outlines added in the editor or by script.
|
||||
</description>
|
||||
</method>
|
||||
<method name="remove_outline">
|
||||
<return type="void" />
|
||||
<argument index="0" name="idx" type="int" />
|
||||
<description>
|
||||
Removes an outline created in the editor or by script.
|
||||
</description>
|
||||
</method>
|
||||
<method name="set_baked_outlines">
|
||||
<return type="void" />
|
||||
<argument index="0" name="outlines" type="Array" />
|
||||
<description>
|
||||
Sets the array of baked outlines. The baked outlines are the result of a finished [NavigationMeshGenerator] baking process and primarily used for debugging purposes.
|
||||
</description>
|
||||
</method>
|
||||
<method name="set_collision_mask_value">
|
||||
<return type="void" />
|
||||
<argument index="0" name="layer_number" type="int" />
|
||||
<argument index="1" name="value" type="bool" />
|
||||
<description>
|
||||
</description>
|
||||
</method>
|
||||
<method name="set_outline">
|
||||
<return type="void" />
|
||||
<argument index="0" name="idx" type="int" />
|
||||
<argument index="1" name="outline" type="PoolVector2Array" />
|
||||
<description>
|
||||
Changes an outline created in the editor or by script.
|
||||
</description>
|
||||
</method>
|
||||
<method name="set_outlines">
|
||||
<return type="void" />
|
||||
<argument index="0" name="outlines" type="Array" />
|
||||
<description>
|
||||
Sets the outline arrays. The outlines need to be baked to actual navigation mesh polygons by using the [NavigationMeshGenerator].
|
||||
</description>
|
||||
</method>
|
||||
<method name="set_polygons">
|
||||
<return type="void" />
|
||||
<argument index="0" name="polygons" type="Array" />
|
||||
<description>
|
||||
Sets the navigation mesh polygons. Each polygon array needs to consist of the indices for the vertices that make the polygon.
|
||||
</description>
|
||||
</method>
|
||||
<method name="set_vertices">
|
||||
<return type="void" />
|
||||
<argument index="0" name="vertices" type="PoolVector2Array" />
|
||||
<description>
|
||||
Sets the vertices that need to be indexed with the [method add_polygon] or [method set_polygons] methods. When finished changing the navigation polygon call [method commit_changes] in order to synchronize the changes with the [Navigation2DServer].
|
||||
</description>
|
||||
</method>
|
||||
</methods>
|
||||
<members>
|
||||
<member name="agent_radius" type="float" setter="set_agent_radius" getter="get_agent_radius" default="10.0">
|
||||
The distance to erode/shrink the traversable area from obstructions when baking polygons.
|
||||
</member>
|
||||
<member name="cell_size" type="float" setter="set_cell_size" getter="get_cell_size" default="1.0">
|
||||
The cell size used to rasterize the navigation mesh vertices. Must match with the cell size on the navigation map.
|
||||
</member>
|
||||
<member name="geometry_collision_mask" type="int" setter="set_collision_mask" getter="get_collision_mask" default="4294967295">
|
||||
The physics layers to scan for static colliders. Only used when [member geometry_parsed_geometry_type] is [constant PARSED_GEOMETRY_STATIC_COLLIDERS] or [constant PARSED_GEOMETRY_BOTH].
|
||||
</member>
|
||||
<member name="geometry_parsed_geometry_type" type="int" setter="set_parsed_geometry_type" getter="get_parsed_geometry_type" enum="NavigationPolygon.ParsedGeometryType" default="0">
|
||||
Determines which type of nodes will be parsed as geometry. See [enum ParsedGeometryType] for possible values.
|
||||
</member>
|
||||
<member name="geometry_source_geometry_mode" type="int" setter="set_source_geometry_mode" getter="get_source_geometry_mode" enum="NavigationPolygon.SourceGeometryMode" default="0">
|
||||
The source of the geometry used when baking. See [enum SourceGeometryMode] for possible values.
|
||||
</member>
|
||||
<member name="geometry_source_group_name" type="StringName" setter="set_source_group_name" getter="get_source_group_name" default="@"navigation_polygon_source_group"">
|
||||
The name of the group to scan for geometry. Only used when [member geometry_source_geometry_mode] is [constant SOURCE_GEOMETRY_GROUPS_WITH_CHILDREN] or [constant SOURCE_GEOMETRY_GROUPS_EXPLICIT].
|
||||
</member>
|
||||
<member name="offsetting_jointype" type="int" setter="set_offsetting_jointype" getter="get_offsetting_jointype" enum="NavigationPolygon.OffsettingJoinType" default="2">
|
||||
The [enum OffsettingJoinType] used for joins when offsetting the bake polygons by [member agent_radius].
|
||||
</member>
|
||||
<member name="polygon_bake_fillrule" type="int" setter="set_polygon_bake_fillrule" getter="get_polygon_bake_fillrule" enum="NavigationPolygon.PolygonFillRule" default="0">
|
||||
Filling rule for baking polygons that defines in complex polygons which polygon sub-regions will be considered inside a given polygon, and which sub-regions will not, aka what is a hole.
|
||||
</member>
|
||||
</members>
|
||||
<constants>
|
||||
<constant name="PARSED_GEOMETRY_MESH_INSTANCES" value="0" enum="ParsedGeometryType">
|
||||
Parses mesh instances and other visual shapes as geometry. This includes [MeshInstance2D], [MultiMeshInstance2D], [Polygon2D], and [TileMap] (first TileMapLayer only) nodes.
|
||||
</constant>
|
||||
<constant name="PARSED_GEOMETRY_STATIC_COLLIDERS" value="1" enum="ParsedGeometryType">
|
||||
Parses [StaticBody2D], and [TileMap] (first TileMapLayer only) colliders as geometry. The collider should be in any of the layers specified by [member geometry_collision_mask].
|
||||
</constant>
|
||||
<constant name="PARSED_GEOMETRY_BOTH" value="2" enum="ParsedGeometryType">
|
||||
Both [constant PARSED_GEOMETRY_MESH_INSTANCES] and [constant PARSED_GEOMETRY_STATIC_COLLIDERS].
|
||||
</constant>
|
||||
<constant name="PARSED_GEOMETRY_MAX" value="3" enum="ParsedGeometryType">
|
||||
Represents the size of the [enum ParsedGeometryType] enum.
|
||||
</constant>
|
||||
<constant name="SOURCE_GEOMETRY_ROOT_NODE_CHILDREN" value="0" enum="SourceGeometryMode">
|
||||
Scans the child nodes of the root node recursively for geometry.
|
||||
</constant>
|
||||
<constant name="SOURCE_GEOMETRY_GROUPS_WITH_CHILDREN" value="1" enum="SourceGeometryMode">
|
||||
Scans nodes in a group and their child nodes recursively for geometry. The group is specified by [member geometry_source_group_name].
|
||||
</constant>
|
||||
<constant name="SOURCE_GEOMETRY_GROUPS_EXPLICIT" value="2" enum="SourceGeometryMode">
|
||||
Uses nodes in a group for geometry. The group is specified by [member geometry_source_group_name].
|
||||
</constant>
|
||||
<constant name="SOURCE_GEOMETRY_MAX" value="3" enum="SourceGeometryMode">
|
||||
Represents the size of the [enum SourceGeometryMode] enum.
|
||||
</constant>
|
||||
<constant name="POLYGON_FILLRULE_EVENODD" value="0" enum="PolygonFillRule">
|
||||
Only odd numbered sub-regions are filled
|
||||
</constant>
|
||||
<constant name="POLYGON_FILLRULE_NONZERO" value="1" enum="PolygonFillRule">
|
||||
Only non-zero sub-regions are filled
|
||||
</constant>
|
||||
<constant name="POLYGON_FILLRULE_POSITIVE" value="2" enum="PolygonFillRule">
|
||||
Only sub-regions with winding counts greater zero are filled.
|
||||
</constant>
|
||||
<constant name="POLYGON_FILLRULE_NEGATIVE" value="3" enum="PolygonFillRule">
|
||||
Only sub-regions with winding counts smaller zero are filled.
|
||||
</constant>
|
||||
<constant name="POLYGON_FILLRULE_MAX" value="4" enum="PolygonFillRule">
|
||||
Represents the size of the [enum PolygonFillRule] enum.
|
||||
</constant>
|
||||
<constant name="OFFSETTING_JOINTYPE_SQUARE" value="0" enum="OffsettingJoinType">
|
||||
Squaring is applied uniformally at all joins where the internal join angle is less that 90 degrees. The squared edge will be at exactly the offset distance from the join vertex.
|
||||
</constant>
|
||||
<constant name="OFFSETTING_JOINTYPE_ROUND" value="1" enum="OffsettingJoinType">
|
||||
Rounding is applied to all joins that have convex external angles and the exact offset distance from the join vertex is maintained.
|
||||
</constant>
|
||||
<constant name="OFFSETTING_JOINTYPE_MITER" value="2" enum="OffsettingJoinType">
|
||||
Creates mitered joins such that the line of junction bisects the angle. To avoid narrow angled joins producing excessively long and narrow spikes mitered joins are automatically squared when they exceed a given maximum miter distance relative to the offset distance.
|
||||
</constant>
|
||||
<constant name="OFFSETTING_JOINTYPE_MAX" value="3" enum="OffsettingJoinType">
|
||||
Represents the size of the [enum OffsettingJoinType] enum.
|
||||
</constant>
|
||||
</constants>
|
||||
</class>
|
@ -1,117 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<class name="NavigationPolygonInstance" inherits="Node2D" version="4.2">
|
||||
<brief_description>
|
||||
A region of the 2D navigation map.
|
||||
</brief_description>
|
||||
<description>
|
||||
A region of the navigation map. It tells the [Navigation2DServer] what can be navigated and what cannot, based on its [NavigationPolygon] resource.
|
||||
By default this node will register to the default [World2D] navigation map. If this node is a child of a [Navigation2D] node it will register to the navigation map of the navigation node.
|
||||
Two regions can be connected to each other if they share a similar edge. You can set the minimum distance between two vertices required to connect two edges by using [method Navigation2DServer.map_set_edge_connection_margin].
|
||||
[b]Note:[/b] Overlapping two regions' polygons is not enough for connecting two regions. They must share a similar edge.
|
||||
The pathfinding cost of entering this region from another region can be controlled with the [member enter_cost] value.
|
||||
[b]Note[/b]: This value is not added to the path cost when the start position is already inside this region.
|
||||
The pathfinding cost of traveling distances inside this region can be controlled with the [member travel_cost] multiplier.
|
||||
</description>
|
||||
<tutorials>
|
||||
<link title="Using NavigationRegions">$DOCS_URL/tutorials/navigation/navigation_using_navigationregions.md</link>
|
||||
</tutorials>
|
||||
<methods>
|
||||
<method name="bake_navigation_polygon">
|
||||
<return type="void" />
|
||||
<argument index="0" name="on_thread" type="bool" />
|
||||
<description>
|
||||
Bakes the [NavigationPolygon]. If [param on_thread] is set to [code]true[/code] (default), the baking is done on a separate thread.
|
||||
</description>
|
||||
</method>
|
||||
<method name="get_avoidance_layer_value" qualifiers="const">
|
||||
<return type="bool" />
|
||||
<argument index="0" name="layer_number" type="int" />
|
||||
<description>
|
||||
Returns whether or not the specified layer of the [member avoidance_layers] bitmask is enabled, given a [param layer_number] between 1 and 32.
|
||||
</description>
|
||||
</method>
|
||||
<method name="get_navigation_layer_value" qualifiers="const">
|
||||
<return type="bool" />
|
||||
<argument index="0" name="layer_number" type="int" />
|
||||
<description>
|
||||
Returns whether or not the specified layer of the [member navigation_layers] bitmask is enabled, given a [code]layer_number[/code] between 1 and 32.
|
||||
</description>
|
||||
</method>
|
||||
<method name="get_navigation_map" qualifiers="const">
|
||||
<return type="RID" />
|
||||
<description>
|
||||
Returns the current navigation map [RID] use by this region.
|
||||
</description>
|
||||
</method>
|
||||
<method name="get_region_rid" qualifiers="const">
|
||||
<return type="RID" />
|
||||
<description>
|
||||
Returns the [RID] of this region on the [Navigation2DServer]. Combined with [method Navigation2DServer.map_get_closest_point_owner] can be used to identify the [NavigationPolygonInstance] closest to a point on the merged navigation map.
|
||||
</description>
|
||||
</method>
|
||||
<method name="set_avoidance_layer_value">
|
||||
<return type="void" />
|
||||
<argument index="0" name="layer_number" type="int" />
|
||||
<argument index="1" name="value" type="bool" />
|
||||
<description>
|
||||
Based on [param value], enables or disables the specified layer in the [member avoidance_layers] bitmask, given a [param layer_number] between 1 and 32.
|
||||
</description>
|
||||
</method>
|
||||
<method name="set_navigation_layer_value">
|
||||
<return type="void" />
|
||||
<argument index="0" name="layer_number" type="int" />
|
||||
<argument index="1" name="value" type="bool" />
|
||||
<description>
|
||||
Based on [code]value[/code], enables or disables the specified layer in the [member navigation_layers] bitmask, given a [code]layer_number[/code] between 1 and 32.
|
||||
</description>
|
||||
</method>
|
||||
<method name="set_navigation_map">
|
||||
<return type="void" />
|
||||
<argument index="0" name="navigation_map" type="RID" />
|
||||
<description>
|
||||
Sets the [RID] of the navigation map this region should use. By default the region will automatically join the [World2D] default navigation map so this function is only required to override the default map.
|
||||
</description>
|
||||
</method>
|
||||
</methods>
|
||||
<members>
|
||||
<member name="avoidance_layers" type="int" setter="set_avoidance_layers" getter="get_avoidance_layers" default="1">
|
||||
A bitfield determining all avoidance layers for the avoidance constrain.
|
||||
</member>
|
||||
<member name="constrain_avoidance" type="bool" setter="set_constrain_avoidance" getter="get_constrain_avoidance" default="false">
|
||||
If [code]true[/code] constraints avoidance agent's with an avoidance mask bit that matches with a bit of the [member avoidance_layers] to the navigation polygon. Due to each navigation polygon outline creating an obstacle and each polygon edge creating an avoidance line constrain keep the navigation polygon shape as simple as possible for performance.
|
||||
[b]Experimental:[/b] This is an experimental feature and should not be used in production as agent's can get stuck on the navigation polygon corners and edges especially at high frame rate.
|
||||
</member>
|
||||
<member name="enabled" type="bool" setter="set_enabled" getter="is_enabled" default="true">
|
||||
Determines if the [NavigationPolygonInstance] is enabled or disabled.
|
||||
</member>
|
||||
<member name="enter_cost" type="float" setter="set_enter_cost" getter="get_enter_cost" default="0.0">
|
||||
When pathfinding enters this regions navigation mesh from another regions navigation mesh the [code]enter_cost[/code] value is added to the path distance for determining the shortest path.
|
||||
</member>
|
||||
<member name="navigation_layers" type="int" setter="set_navigation_layers" getter="get_navigation_layers" default="1">
|
||||
A bitfield determining all navigation map layers the [NavigationPolygon] belongs to. On path requests with [method Navigation2DServer.map_get_path] navigation meshes without matching layers will be ignored and the navigation map will only proximity merge different navigation meshes with matching layers.
|
||||
</member>
|
||||
<member name="navigation_polygon" type="NavigationPolygon" setter="set_navigation_polygon" getter="get_navigation_polygon">
|
||||
The [NavigationPolygon] resource to use.
|
||||
</member>
|
||||
<member name="travel_cost" type="float" setter="set_travel_cost" getter="get_travel_cost" default="1.0">
|
||||
When pathfinding moves inside this regions navigation mesh the traveled distances are multiplied with [code]travel_cost[/code] for determining the shortest path.
|
||||
</member>
|
||||
<member name="use_edge_connections" type="bool" setter="set_use_edge_connections" getter="get_use_edge_connections" default="true">
|
||||
If enabled the navigation region will use edge connections to connect with other navigation regions within proximity of the navigation map edge connection margin.
|
||||
</member>
|
||||
</members>
|
||||
<signals>
|
||||
<signal name="bake_finished">
|
||||
<description>
|
||||
Emitted when a navigation polygon bake operation is completed.
|
||||
</description>
|
||||
</signal>
|
||||
<signal name="navigation_polygon_changed">
|
||||
<description>
|
||||
Emitted when the used navigation polygon is replaced or changes to the internals of the current navigation polygon are committed.
|
||||
</description>
|
||||
</signal>
|
||||
</signals>
|
||||
<constants>
|
||||
</constants>
|
||||
</class>
|
@ -1,916 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<class name="NavigationServer" inherits="Object" version="4.2">
|
||||
<brief_description>
|
||||
Server interface for low-level 3D navigation access.
|
||||
</brief_description>
|
||||
<description>
|
||||
NavigationServer is the server responsible for all 3D navigation. It handles several objects, namely maps, regions and agents.
|
||||
Maps are made up of regions, which are made of navigation meshes. Together, they define the navigable areas in the 3D world.
|
||||
[b]Note:[/b] Most NavigationServer changes take effect after the next physics frame and not immediately. This includes all changes made to maps, regions or agents by navigation related Nodes in the SceneTree or made through scripts.
|
||||
For two regions to be connected to each other, they must share a similar edge. An edge is considered connected to another if both of its two vertices are at a distance less than [member Navigation.edge_connection_margin] to the respective other edge's vertex.
|
||||
To use the collision avoidance system, you may use agents. You can set an agent's target velocity, then the servers will emit a callback with a modified velocity.
|
||||
[b]Note:[/b] The collision avoidance system ignores regions. Using the modified velocity as-is might lead to pushing and agent outside of a navigable area. This is a limitation of the collision avoidance system, any more complex situation may require the use of the physics engine.
|
||||
[b]Note:[/b] By default, the expensive calculations for avoidance are done in a thread. In HTML5 exports without thread support, they will be done on the main thread, which can lead to performance issues.
|
||||
This server keeps tracks of any call and executes them during the sync phase. This means that you can request any change to the map, using any thread, without worrying.
|
||||
</description>
|
||||
<tutorials>
|
||||
<link title="3D Navmesh Demo">https://github.com/Relintai/pandemonium_demo_projects/tree/master/3d/navmesh</link>
|
||||
<link title="Using NavigationServer">$DOCS_URL/tutorials/navigation/navigation_using_navigationservers.md</link>
|
||||
</tutorials>
|
||||
<methods>
|
||||
<method name="agent_create">
|
||||
<return type="RID" />
|
||||
<description>
|
||||
Creates the agent.
|
||||
</description>
|
||||
</method>
|
||||
<method name="agent_get_avoidance_enabled" qualifiers="const">
|
||||
<return type="bool" />
|
||||
<argument index="0" name="agent" type="RID" />
|
||||
<description>
|
||||
Returns [code]true[/code] if the provided [param agent] has avoidance enabled.
|
||||
</description>
|
||||
</method>
|
||||
<method name="agent_get_map" qualifiers="const">
|
||||
<return type="RID" />
|
||||
<argument index="0" name="agent" type="RID" />
|
||||
<description>
|
||||
Returns the navigation map [RID] the requested [code]agent[/code] is currently assigned to.
|
||||
</description>
|
||||
</method>
|
||||
<method name="agent_get_paused" qualifiers="const">
|
||||
<return type="bool" />
|
||||
<argument index="0" name="agent" type="RID" />
|
||||
<description>
|
||||
Returns [code]true[/code] if the specified [param agent] is paused.
|
||||
</description>
|
||||
</method>
|
||||
<method name="agent_get_use_3d_avoidance" qualifiers="const">
|
||||
<return type="bool" />
|
||||
<argument index="0" name="agent" type="RID" />
|
||||
<description>
|
||||
Returns [code]true[/code] if the provided [param agent] uses avoidance in 3D space Vector3(x,y,z) instead of horizontal 2D Vector2(x,y) / Vector3(x,0.0,z).
|
||||
</description>
|
||||
</method>
|
||||
<method name="agent_is_map_changed" qualifiers="const">
|
||||
<return type="bool" />
|
||||
<argument index="0" name="agent" type="RID" />
|
||||
<description>
|
||||
Returns [code]true[/code] if the map got changed the previous frame.
|
||||
</description>
|
||||
</method>
|
||||
<method name="agent_set_avoidance_callback">
|
||||
<return type="void" />
|
||||
<argument index="0" name="agent" type="RID" />
|
||||
<argument index="1" name="object_id" type="int" />
|
||||
<argument index="2" name="method" type="StringName" />
|
||||
<argument index="3" name="userdata" type="Variant" default="null" />
|
||||
<description>
|
||||
Sets the callback [Callable] that gets called after each avoidance processing step for the [param agent]. The calculated [code]safe_velocity[/code] will be dispatched with a signal to the object just before the physics calculations.
|
||||
[b]Note:[/b] Created callbacks are always processed independently of the SceneTree state as long as the agent is on a navigation map and not freed. To disable the dispatch of a callback from an agent use [method agent_set_avoidance_callback] again with an empty [Callable].
|
||||
</description>
|
||||
</method>
|
||||
<method name="agent_set_avoidance_enabled">
|
||||
<return type="void" />
|
||||
<argument index="0" name="agent" type="RID" />
|
||||
<argument index="1" name="enabled" type="bool" />
|
||||
<description>
|
||||
If [param enabled] the provided [param agent] calculates avoidance.
|
||||
</description>
|
||||
</method>
|
||||
<method name="agent_set_avoidance_layers">
|
||||
<return type="void" />
|
||||
<argument index="0" name="agent" type="RID" />
|
||||
<argument index="1" name="layers" type="int" />
|
||||
<description>
|
||||
Set the agent's [code]avoidance_layers[/code] bitmask.
|
||||
</description>
|
||||
</method>
|
||||
<method name="agent_set_avoidance_mask">
|
||||
<return type="void" />
|
||||
<argument index="0" name="agent" type="RID" />
|
||||
<argument index="1" name="mask" type="int" />
|
||||
<description>
|
||||
Set the agent's [code]avoidance_mask[/code] bitmask.
|
||||
</description>
|
||||
</method>
|
||||
<method name="agent_set_avoidance_priority">
|
||||
<return type="void" />
|
||||
<argument index="0" name="agent" type="RID" />
|
||||
<argument index="1" name="priority" type="float" />
|
||||
<description>
|
||||
Set the agent's [code]avoidance_priority[/code] with a [param priority] between 0.0 (lowest priority) to 1.0 (highest priority).
|
||||
The specified [param agent] does not adjust the velocity for other agents that would match the [code]avoidance_mask[/code] but have a lower [code] avoidance_priority[/code]. This in turn makes the other agents with lower priority adjust their velocities even more to avoid collision with this agent.
|
||||
</description>
|
||||
</method>
|
||||
<method name="agent_set_height">
|
||||
<return type="void" />
|
||||
<argument index="0" name="agent" type="RID" />
|
||||
<argument index="1" name="height" type="float" />
|
||||
<description>
|
||||
Updates the provided [param agent] [param height].
|
||||
</description>
|
||||
</method>
|
||||
<method name="agent_set_map">
|
||||
<return type="void" />
|
||||
<argument index="0" name="agent" type="RID" />
|
||||
<argument index="1" name="map" type="RID" />
|
||||
<description>
|
||||
Puts the agent in the map.
|
||||
</description>
|
||||
</method>
|
||||
<method name="agent_set_max_neighbors">
|
||||
<return type="void" />
|
||||
<argument index="0" name="agent" type="RID" />
|
||||
<argument index="1" name="count" type="int" />
|
||||
<description>
|
||||
Sets the maximum number of other agents the agent takes into account in the navigation. The larger this number, the longer the running time of the simulation. If the number is too low, the simulation will not be safe.
|
||||
</description>
|
||||
</method>
|
||||
<method name="agent_set_max_speed">
|
||||
<return type="void" />
|
||||
<argument index="0" name="agent" type="RID" />
|
||||
<argument index="1" name="max_speed" type="float" />
|
||||
<description>
|
||||
Sets the maximum speed of the agent. Must be positive.
|
||||
</description>
|
||||
</method>
|
||||
<method name="agent_set_neighbor_distance">
|
||||
<return type="void" />
|
||||
<argument index="0" name="agent" type="RID" />
|
||||
<argument index="1" name="dist" type="float" />
|
||||
<description>
|
||||
Sets the maximum distance to other agents this agent takes into account in the navigation. The larger this number, the longer the running time of the simulation. If the number is too low, the simulation will not be safe.
|
||||
</description>
|
||||
</method>
|
||||
<method name="agent_set_paused">
|
||||
<return type="void" />
|
||||
<argument index="0" name="agent" type="RID" />
|
||||
<argument index="1" name="paused" type="bool" />
|
||||
<description>
|
||||
If [param paused] is true the specified [param agent] will not be processed, e.g. calculate avoidance velocities or receive avoidance callbacks.
|
||||
</description>
|
||||
</method>
|
||||
<method name="agent_set_position">
|
||||
<return type="void" />
|
||||
<argument index="0" name="agent" type="RID" />
|
||||
<argument index="1" name="position" type="Vector3" />
|
||||
<description>
|
||||
Sets the position of the agent in world space.
|
||||
</description>
|
||||
</method>
|
||||
<method name="agent_set_radius">
|
||||
<return type="void" />
|
||||
<argument index="0" name="agent" type="RID" />
|
||||
<argument index="1" name="radius" type="float" />
|
||||
<description>
|
||||
Sets the radius of the agent.
|
||||
</description>
|
||||
</method>
|
||||
<method name="agent_set_time_horizon_agents">
|
||||
<return type="void" />
|
||||
<argument index="0" name="agent" type="RID" />
|
||||
<argument index="1" name="time_horizon" type="float" />
|
||||
<description>
|
||||
The minimal amount of time for which the agent's velocities that are computed by the simulation are safe with respect to other agents. The larger this number, the sooner this agent will respond to the presence of other agents, but the less freedom this agent has in choosing its velocities. A too high value will slow down agents movement considerably. Must be positive.
|
||||
</description>
|
||||
</method>
|
||||
<method name="agent_set_time_horizon_obstacles">
|
||||
<return type="void" />
|
||||
<argument index="0" name="agent" type="RID" />
|
||||
<argument index="1" name="time_horizon" type="float" />
|
||||
<description>
|
||||
The minimal amount of time for which the agent's velocities that are computed by the simulation are safe with respect to static avoidance obstacles. The larger this number, the sooner this agent will respond to the presence of static avoidance obstacles, but the less freedom this agent has in choosing its velocities. A too high value will slow down agents movement considerably. Must be positive.
|
||||
</description>
|
||||
</method>
|
||||
<method name="agent_set_use_3d_avoidance">
|
||||
<return type="void" />
|
||||
<argument index="0" name="agent" type="RID" />
|
||||
<argument index="1" name="enabled" type="bool" />
|
||||
<description>
|
||||
Sets if the agent uses the 2D avoidance or the 3D avoidance while avoidance is enabled.
|
||||
If [code]true[/code] the agent calculates avoidance velocities in 3D for the xyz-axis, e.g. for games that take place in air, unterwater or space. The 3D using agent only avoids other 3D avoidance using agent's. The 3D using agent only reacts to radius based avoidance obstacles. The 3D using agent ignores any vertices based obstacles. The 3D using agent only avoids other 3D using agent's.
|
||||
If [code]false[/code] the agent calculates avoidance velocities in 2D along the xz-axis ignoring the y-axis. The 2D using agent only avoids other 2D avoidance using agent's. The 2D using agent reacts to radius avoidance obstacles. The 2D using agent reacts to vertices based avoidance obstacles. The 2D using agent only avoids other 2D using agent's. 2D using agents will ignore other 2D using agents or obstacles that are below their current position or above their current position including the agents height in 2D avoidance.
|
||||
</description>
|
||||
</method>
|
||||
<method name="agent_set_velocity">
|
||||
<return type="void" />
|
||||
<argument index="0" name="agent" type="RID" />
|
||||
<argument index="1" name="velocity" type="Vector3" />
|
||||
<description>
|
||||
Sets [param velocity] as the new wanted velocity for the specified [param agent]. The avoidance simulation will try to fulfil this velocity if possible but will modify it to avoid collision with other agent's and obstacles. When an agent is teleported to a new position use [method agent_set_velocity_forced] as well to reset the internal simulation velocity.
|
||||
</description>
|
||||
</method>
|
||||
<method name="agent_set_velocity_forced">
|
||||
<return type="void" />
|
||||
<argument index="0" name="agent" type="RID" />
|
||||
<argument index="1" name="velocity" type="Vector3" />
|
||||
<description>
|
||||
Replaces the internal velocity in the collision avoidance simulation with [param velocity] for the specified [param agent]. When an agent is teleported to a new position this function should be used in the same frame. If called frequently this function can get agents stuck.
|
||||
</description>
|
||||
</method>
|
||||
<method name="free_rid">
|
||||
<return type="void" />
|
||||
<argument index="0" name="rid" type="RID" />
|
||||
<description>
|
||||
Destroys the given RID.
|
||||
</description>
|
||||
</method>
|
||||
<method name="get_debug_enabled" qualifiers="const">
|
||||
<return type="bool" />
|
||||
<description>
|
||||
</description>
|
||||
</method>
|
||||
<method name="get_maps" qualifiers="const">
|
||||
<return type="Array" />
|
||||
<description>
|
||||
Returns all created navigation map [RID]s on the NavigationServer. This returns both 2D and 3D created navigation maps as there is technically no distinction between them.
|
||||
</description>
|
||||
</method>
|
||||
<method name="get_process_info" qualifiers="const">
|
||||
<return type="int" />
|
||||
<argument index="0" name="process_info" type="int" enum="NavigationServer.ProcessInfo" />
|
||||
<description>
|
||||
Returns information about the current state of the NavigationServer. See [enum ProcessInfo] for a list of available states.
|
||||
</description>
|
||||
</method>
|
||||
<method name="link_create">
|
||||
<return type="RID" />
|
||||
<description>
|
||||
Create a new link between two positions on a map.
|
||||
</description>
|
||||
</method>
|
||||
<method name="link_get_enabled" qualifiers="const">
|
||||
<return type="bool" />
|
||||
<argument index="0" name="link" type="RID" />
|
||||
<description>
|
||||
Returns [code]true[/code] if the specified [param link] is enabled.
|
||||
</description>
|
||||
</method>
|
||||
<method name="link_get_end_position" qualifiers="const">
|
||||
<return type="Vector3" />
|
||||
<argument index="0" name="link" type="RID" />
|
||||
<description>
|
||||
Returns the ending position of this [code]link[/code].
|
||||
</description>
|
||||
</method>
|
||||
<method name="link_get_enter_cost" qualifiers="const">
|
||||
<return type="float" />
|
||||
<argument index="0" name="link" type="RID" />
|
||||
<description>
|
||||
Returns the [code]enter_cost[/code] of this [code]link[/code].
|
||||
</description>
|
||||
</method>
|
||||
<method name="link_get_map" qualifiers="const">
|
||||
<return type="RID" />
|
||||
<argument index="0" name="link" type="RID" />
|
||||
<description>
|
||||
Returns the navigation map [RID] the requested [code]link[/code] is currently assigned to.
|
||||
</description>
|
||||
</method>
|
||||
<method name="link_get_navigation_layers" qualifiers="const">
|
||||
<return type="int" />
|
||||
<argument index="0" name="link" type="RID" />
|
||||
<description>
|
||||
Returns the navigation layers for this [code]link[/code].
|
||||
</description>
|
||||
</method>
|
||||
<method name="link_get_owner_id" qualifiers="const">
|
||||
<return type="int" />
|
||||
<argument index="0" name="link" type="RID" />
|
||||
<description>
|
||||
Returns the [code]ObjectID[/code] of the object which manages this link.
|
||||
</description>
|
||||
</method>
|
||||
<method name="link_get_start_position" qualifiers="const">
|
||||
<return type="Vector3" />
|
||||
<argument index="0" name="link" type="RID" />
|
||||
<description>
|
||||
Returns the starting position of this [code]link[/code].
|
||||
</description>
|
||||
</method>
|
||||
<method name="link_get_travel_cost" qualifiers="const">
|
||||
<return type="float" />
|
||||
<argument index="0" name="link" type="RID" />
|
||||
<description>
|
||||
Returns the [code]travel_cost[/code] of this [code]link[/code].
|
||||
</description>
|
||||
</method>
|
||||
<method name="link_is_bidirectional" qualifiers="const">
|
||||
<return type="bool" />
|
||||
<argument index="0" name="link" type="RID" />
|
||||
<description>
|
||||
Returns whether this [code]link[/code] can be travelled in both directions.
|
||||
</description>
|
||||
</method>
|
||||
<method name="link_set_bidirectional">
|
||||
<return type="void" />
|
||||
<argument index="0" name="link" type="RID" />
|
||||
<argument index="1" name="bidirectional" type="bool" />
|
||||
<description>
|
||||
Sets whether this [code]link[/code] can be travelled in both directions.
|
||||
</description>
|
||||
</method>
|
||||
<method name="link_set_enabled">
|
||||
<return type="void" />
|
||||
<argument index="0" name="link" type="RID" />
|
||||
<argument index="1" name="enabled" type="bool" />
|
||||
<description>
|
||||
If [param enabled] is [code]true[/code] the specified [param link] will contribute to its current navigation map.
|
||||
</description>
|
||||
</method>
|
||||
<method name="link_set_end_position">
|
||||
<return type="void" />
|
||||
<argument index="0" name="link" type="RID" />
|
||||
<argument index="1" name="position" type="Vector3" />
|
||||
<description>
|
||||
Sets the exit position for the [code]link[/code].
|
||||
</description>
|
||||
</method>
|
||||
<method name="link_set_enter_cost">
|
||||
<return type="void" />
|
||||
<argument index="0" name="link" type="RID" />
|
||||
<argument index="1" name="enter_cost" type="float" />
|
||||
<description>
|
||||
Sets the [code]enter_cost[/code] for this [code]link[/code].
|
||||
</description>
|
||||
</method>
|
||||
<method name="link_set_map">
|
||||
<return type="void" />
|
||||
<argument index="0" name="link" type="RID" />
|
||||
<argument index="1" name="map" type="RID" />
|
||||
<description>
|
||||
Sets the navigation map [RID] for the link.
|
||||
</description>
|
||||
</method>
|
||||
<method name="link_set_navigation_layers">
|
||||
<return type="void" />
|
||||
<argument index="0" name="link" type="RID" />
|
||||
<argument index="1" name="navigation_layers" type="int" />
|
||||
<description>
|
||||
Set the links's navigation layers. This allows selecting links from a path request (when using [method NavigationServer3D.map_get_path]).
|
||||
</description>
|
||||
</method>
|
||||
<method name="link_set_owner_id">
|
||||
<return type="void" />
|
||||
<argument index="0" name="link" type="RID" />
|
||||
<argument index="1" name="owner_id" type="int" />
|
||||
<description>
|
||||
Set the [code]ObjectID[/code] of the object which manages this link.
|
||||
</description>
|
||||
</method>
|
||||
<method name="link_set_start_position">
|
||||
<return type="void" />
|
||||
<argument index="0" name="link" type="RID" />
|
||||
<argument index="1" name="position" type="Vector3" />
|
||||
<description>
|
||||
Sets the entry position for this [code]link[/code].
|
||||
</description>
|
||||
</method>
|
||||
<method name="link_set_travel_cost">
|
||||
<return type="void" />
|
||||
<argument index="0" name="link" type="RID" />
|
||||
<argument index="1" name="travel_cost" type="float" />
|
||||
<description>
|
||||
Sets the [code]travel_cost[/code] for this [code]link[/code].
|
||||
</description>
|
||||
</method>
|
||||
<method name="map_create">
|
||||
<return type="RID" />
|
||||
<description>
|
||||
Create a new map.
|
||||
</description>
|
||||
</method>
|
||||
<method name="map_force_update">
|
||||
<return type="void" />
|
||||
<argument index="0" name="map" type="RID" />
|
||||
<description>
|
||||
This function immediately forces synchronization of the specified navigation [code]map[/code] [RID]. By default navigation maps are only synchronized at the end of each physics frame. This function can be used to immediately (re)calculate all the navigation meshes and region connections of the navigation map. This makes it possible to query a navigation path for a changed map immediately and in the same frame (multiple times if needed).
|
||||
Due to technical restrictions the current NavigationServer command queue will be flushed. This means all already queued update commands for this physics frame will be executed, even those intended for other maps, regions and agents not part of the specified map. The expensive computation of the navigation meshes and region connections of a map will only be done for the specified map. Other maps will receive the normal synchronization at the end of the physics frame. Should the specified map receive changes after the forced update it will update again as well when the other maps receive their update.
|
||||
Avoidance processing and dispatch of the [code]safe_velocity[/code] signals is untouched by this function and continues to happen for all maps and agents at the end of the physics frame.
|
||||
[b]Note:[/b] With great power comes great responsibility. This function should only be used by users that really know what they are doing and have a good reason for it. Forcing an immediate update of a navigation map requires locking the NavigationServer and flushing the entire NavigationServer command queue. Not only can this severely impact the performance of a game but it can also introduce bugs if used inappropriately without much foresight.
|
||||
</description>
|
||||
</method>
|
||||
<method name="map_get_agents" qualifiers="const">
|
||||
<return type="Array" />
|
||||
<argument index="0" name="map" type="RID" />
|
||||
<description>
|
||||
Returns all navigation agents [RID]s that are currently assigned to the requested navigation [code]map[/code].
|
||||
</description>
|
||||
</method>
|
||||
<method name="map_get_cell_height" qualifiers="const">
|
||||
<return type="float" />
|
||||
<argument index="0" name="map" type="RID" />
|
||||
<description>
|
||||
Returns the map cell height used to rasterize the navigation mesh vertices on the Y axis.
|
||||
</description>
|
||||
</method>
|
||||
<method name="map_get_cell_size" qualifiers="const">
|
||||
<return type="float" />
|
||||
<argument index="0" name="map" type="RID" />
|
||||
<description>
|
||||
Returns the map cell size used to rasterize the navigation mesh vertices on the XZ plane.
|
||||
</description>
|
||||
</method>
|
||||
<method name="map_get_closest_point" qualifiers="const">
|
||||
<return type="Vector3" />
|
||||
<argument index="0" name="map" type="RID" />
|
||||
<argument index="1" name="to_point" type="Vector3" />
|
||||
<description>
|
||||
Returns the point closest to the provided [code]to_point[/code] on the navigation mesh surface.
|
||||
</description>
|
||||
</method>
|
||||
<method name="map_get_closest_point_normal" qualifiers="const">
|
||||
<return type="Vector3" />
|
||||
<argument index="0" name="map" type="RID" />
|
||||
<argument index="1" name="to_point" type="Vector3" />
|
||||
<description>
|
||||
Returns the normal for the point returned by [method map_get_closest_point].
|
||||
</description>
|
||||
</method>
|
||||
<method name="map_get_closest_point_owner" qualifiers="const">
|
||||
<return type="RID" />
|
||||
<argument index="0" name="map" type="RID" />
|
||||
<argument index="1" name="to_point" type="Vector3" />
|
||||
<description>
|
||||
Returns the owner region RID for the point returned by [method map_get_closest_point].
|
||||
</description>
|
||||
</method>
|
||||
<method name="map_get_closest_point_to_segment" qualifiers="const">
|
||||
<return type="Vector3" />
|
||||
<argument index="0" name="map" type="RID" />
|
||||
<argument index="1" name="start" type="Vector3" />
|
||||
<argument index="2" name="end" type="Vector3" />
|
||||
<argument index="3" name="use_collision" type="bool" default="false" />
|
||||
<description>
|
||||
Returns the closest point between the navigation surface and the segment.
|
||||
</description>
|
||||
</method>
|
||||
<method name="map_get_edge_connection_margin" qualifiers="const">
|
||||
<return type="float" />
|
||||
<argument index="0" name="map" type="RID" />
|
||||
<description>
|
||||
Returns the edge connection margin of the map. This distance is the minimum vertex distance needed to connect two edges from different regions.
|
||||
</description>
|
||||
</method>
|
||||
<method name="map_get_link_connection_radius" qualifiers="const">
|
||||
<return type="float" />
|
||||
<argument index="0" name="map" type="RID" />
|
||||
<description>
|
||||
Returns the link connection radius of the map. This distance is the maximum range any link will search for navigation mesh polygons to connect to.
|
||||
</description>
|
||||
</method>
|
||||
<method name="map_get_links" qualifiers="const">
|
||||
<return type="Array" />
|
||||
<argument index="0" name="map" type="RID" />
|
||||
<description>
|
||||
Returns all navigation link [RID]s that are currently assigned to the requested navigation [code]map[/code].
|
||||
</description>
|
||||
</method>
|
||||
<method name="map_get_obstacles" qualifiers="const">
|
||||
<return type="Array" />
|
||||
<argument index="0" name="map" type="RID" />
|
||||
<description>
|
||||
Returns all navigation obstacle [RID]s that are currently assigned to the requested navigation [code]map[/code].
|
||||
</description>
|
||||
</method>
|
||||
<method name="map_get_path" qualifiers="const">
|
||||
<return type="PoolVector3Array" />
|
||||
<argument index="0" name="map" type="RID" />
|
||||
<argument index="1" name="origin" type="Vector3" />
|
||||
<argument index="2" name="destination" type="Vector3" />
|
||||
<argument index="3" name="optimize" type="bool" />
|
||||
<argument index="4" name="navigation_layers" type="int" default="1" />
|
||||
<description>
|
||||
Returns the navigation path to reach the destination from the origin. [code]navigation_layers[/code] is a bitmask of all region layers that are allowed to be in the path.
|
||||
</description>
|
||||
</method>
|
||||
<method name="map_get_regions" qualifiers="const">
|
||||
<return type="Array" />
|
||||
<argument index="0" name="map" type="RID" />
|
||||
<description>
|
||||
Returns all navigation regions [RID]s that are currently assigned to the requested navigation [code]map[/code].
|
||||
</description>
|
||||
</method>
|
||||
<method name="map_get_up" qualifiers="const">
|
||||
<return type="Vector3" />
|
||||
<argument index="0" name="map" type="RID" />
|
||||
<description>
|
||||
Returns the map's up direction.
|
||||
</description>
|
||||
</method>
|
||||
<method name="map_get_use_edge_connections" qualifiers="const">
|
||||
<return type="bool" />
|
||||
<argument index="0" name="map" type="RID" />
|
||||
<description>
|
||||
Returns true if the navigation [param map] allows navigation regions to use edge connections to connect with other navigation regions within proximity of the navigation map edge connection margin.
|
||||
</description>
|
||||
</method>
|
||||
<method name="map_is_active" qualifiers="const">
|
||||
<return type="bool" />
|
||||
<argument index="0" name="map" type="RID" />
|
||||
<description>
|
||||
Returns [code]true[/code] if the map is active.
|
||||
</description>
|
||||
</method>
|
||||
<method name="map_set_active">
|
||||
<return type="void" />
|
||||
<argument index="0" name="map" type="RID" />
|
||||
<argument index="1" name="active" type="bool" />
|
||||
<description>
|
||||
Sets the map active.
|
||||
</description>
|
||||
</method>
|
||||
<method name="map_set_cell_height">
|
||||
<return type="void" />
|
||||
<argument index="0" name="map" type="RID" />
|
||||
<argument index="1" name="cell_height" type="float" />
|
||||
<description>
|
||||
Sets the map cell height used to rasterize the navigation mesh vertices on the Y axis. Must match with the cell height of the used navigation meshes.
|
||||
</description>
|
||||
</method>
|
||||
<method name="map_set_cell_size">
|
||||
<return type="void" />
|
||||
<argument index="0" name="map" type="RID" />
|
||||
<argument index="1" name="cell_size" type="float" />
|
||||
<description>
|
||||
Set the map cell size used to weld the navigation mesh polygons.
|
||||
</description>
|
||||
</method>
|
||||
<method name="map_set_edge_connection_margin">
|
||||
<return type="void" />
|
||||
<argument index="0" name="map" type="RID" />
|
||||
<argument index="1" name="margin" type="float" />
|
||||
<description>
|
||||
Set the map edge connection margin used to weld the compatible region edges.
|
||||
</description>
|
||||
</method>
|
||||
<method name="map_set_link_connection_radius">
|
||||
<return type="void" />
|
||||
<argument index="0" name="map" type="RID" />
|
||||
<argument index="1" name="radius" type="float" />
|
||||
<description>
|
||||
Set the map's link connection radius used to connect links to navigation polygons.
|
||||
</description>
|
||||
</method>
|
||||
<method name="map_set_up">
|
||||
<return type="void" />
|
||||
<argument index="0" name="map" type="RID" />
|
||||
<argument index="1" name="up" type="Vector3" />
|
||||
<description>
|
||||
Sets the map up direction.
|
||||
</description>
|
||||
</method>
|
||||
<method name="map_set_use_edge_connections">
|
||||
<return type="void" />
|
||||
<argument index="0" name="map" type="RID" />
|
||||
<argument index="1" name="enabled" type="bool" />
|
||||
<description>
|
||||
Set the navigation [param map] edge connection use. If [param enabled] the navigation map allows navigation regions to use edge connections to connect with other navigation regions within proximity of the navigation map edge connection margin.
|
||||
</description>
|
||||
</method>
|
||||
<method name="obstacle_create">
|
||||
<return type="RID" />
|
||||
<description>
|
||||
Creates a new obstacle.
|
||||
</description>
|
||||
</method>
|
||||
<method name="obstacle_get_avoidance_enabled" qualifiers="const">
|
||||
<return type="bool" />
|
||||
<argument index="0" name="obstacle" type="RID" />
|
||||
<description>
|
||||
Returns [code]true[/code] if the provided [param obstacle] has avoidance enabled.
|
||||
</description>
|
||||
</method>
|
||||
<method name="obstacle_get_map" qualifiers="const">
|
||||
<return type="RID" />
|
||||
<argument index="0" name="obstacle" type="RID" />
|
||||
<description>
|
||||
Returns the navigation map [RID] the requested [param obstacle] is currently assigned to.
|
||||
</description>
|
||||
</method>
|
||||
<method name="obstacle_get_paused" qualifiers="const">
|
||||
<return type="bool" />
|
||||
<argument index="0" name="obstacle" type="RID" />
|
||||
<description>
|
||||
Returns [code]true[/code] if the specified [param obstacle] is paused.
|
||||
</description>
|
||||
</method>
|
||||
<method name="obstacle_get_use_3d_avoidance" qualifiers="const">
|
||||
<return type="bool" />
|
||||
<argument index="0" name="obstacle" type="RID" />
|
||||
<description>
|
||||
Returns [code]true[/code] if the provided [param obstacle] uses avoidance in 3D space Vector3(x,y,z) instead of horizontal 2D Vector2(x,y) / Vector3(x,0.0,z).
|
||||
</description>
|
||||
</method>
|
||||
<method name="obstacle_set_avoidance_enabled">
|
||||
<return type="void" />
|
||||
<argument index="0" name="obstacle" type="RID" />
|
||||
<argument index="1" name="enabled" type="bool" />
|
||||
<description>
|
||||
If [param enabled] the provided [param obstacle] affects avoidance using agents.
|
||||
</description>
|
||||
</method>
|
||||
<method name="obstacle_set_avoidance_layers">
|
||||
<return type="void" />
|
||||
<argument index="0" name="obstacle" type="RID" />
|
||||
<argument index="1" name="layers" type="int" />
|
||||
<description>
|
||||
Set the obstacles's [code]avoidance_layers[/code] bitmask.
|
||||
</description>
|
||||
</method>
|
||||
<method name="obstacle_set_height">
|
||||
<return type="void" />
|
||||
<argument index="0" name="obstacle" type="RID" />
|
||||
<argument index="1" name="height" type="float" />
|
||||
<description>
|
||||
Sets the [param height] for the [param obstacle]. In 3D agents will ignore obstacles that are above or below them while using 2D avoidance.
|
||||
</description>
|
||||
</method>
|
||||
<method name="obstacle_set_map">
|
||||
<return type="void" />
|
||||
<argument index="0" name="obstacle" type="RID" />
|
||||
<argument index="1" name="map" type="RID" />
|
||||
<description>
|
||||
Assigns the [param obstacle] to a navigation map.
|
||||
</description>
|
||||
</method>
|
||||
<method name="obstacle_set_paused">
|
||||
<return type="void" />
|
||||
<argument index="0" name="obstacle" type="RID" />
|
||||
<argument index="1" name="paused" type="bool" />
|
||||
<description>
|
||||
If [param paused] is true the specified [param obstacle] will not be processed, e.g. affect avoidance velocities.
|
||||
</description>
|
||||
</method>
|
||||
<method name="obstacle_set_position">
|
||||
<return type="void" />
|
||||
<argument index="0" name="obstacle" type="RID" />
|
||||
<argument index="1" name="position" type="Vector3" />
|
||||
<description>
|
||||
Updates the [param position] in world space for the [param obstacle].
|
||||
</description>
|
||||
</method>
|
||||
<method name="obstacle_set_radius">
|
||||
<return type="void" />
|
||||
<argument index="0" name="obstacle" type="RID" />
|
||||
<argument index="1" name="radius" type="float" />
|
||||
<description>
|
||||
Sets the radius of the dynamic obstacle.
|
||||
</description>
|
||||
</method>
|
||||
<method name="obstacle_set_use_3d_avoidance">
|
||||
<return type="void" />
|
||||
<argument index="0" name="obstacle" type="RID" />
|
||||
<argument index="1" name="enabled" type="bool" />
|
||||
<description>
|
||||
Sets if the [param obstacle] uses the 2D avoidance or the 3D avoidance while avoidance is enabled.
|
||||
</description>
|
||||
</method>
|
||||
<method name="obstacle_set_velocity">
|
||||
<return type="void" />
|
||||
<argument index="0" name="obstacle" type="RID" />
|
||||
<argument index="1" name="velocity" type="Vector3" />
|
||||
<description>
|
||||
Sets [param velocity] of the dynamic [param obstacle]. Allows other agents to better predict the movement of the dynamic obstacle. Only works in combination with the radius of the obstacle.
|
||||
</description>
|
||||
</method>
|
||||
<method name="obstacle_set_vertices">
|
||||
<return type="void" />
|
||||
<argument index="0" name="obstacle" type="RID" />
|
||||
<argument index="1" name="vertices" type="PoolVector3Array" />
|
||||
<description>
|
||||
Sets the outline vertices for the obstacle. If the vertices are winded in clockwise order agents will be pushed in by the obstacle, else they will be pushed out.
|
||||
</description>
|
||||
</method>
|
||||
<method name="query_path" qualifiers="const">
|
||||
<return type="void" />
|
||||
<argument index="0" name="parameters" type="NavigationPathQueryParameters3D" />
|
||||
<argument index="1" name="result" type="NavigationPathQueryResult3D" />
|
||||
<description>
|
||||
Queries a path in a given navigation map. Start and target position and other parameters are defined through [NavigationPathQueryParameters3D]. Updates the provided [NavigationPathQueryResult3D] result object with the path among other results requested by the query.
|
||||
</description>
|
||||
</method>
|
||||
<method name="region_create">
|
||||
<return type="RID" />
|
||||
<description>
|
||||
Creates a new region.
|
||||
</description>
|
||||
</method>
|
||||
<method name="region_get_connection_pathway_end" qualifiers="const">
|
||||
<return type="Vector3" />
|
||||
<argument index="0" name="region" type="RID" />
|
||||
<argument index="1" name="connection" type="int" />
|
||||
<description>
|
||||
Returns the ending point of a connection door. [code]connection[/code] is an index between 0 and the return value of [method region_get_connections_count].
|
||||
</description>
|
||||
</method>
|
||||
<method name="region_get_connection_pathway_start" qualifiers="const">
|
||||
<return type="Vector3" />
|
||||
<argument index="0" name="region" type="RID" />
|
||||
<argument index="1" name="connection" type="int" />
|
||||
<description>
|
||||
Returns the starting point of a connection door. [code]connection[/code] is an index between 0 and the return value of [method region_get_connections_count].
|
||||
</description>
|
||||
</method>
|
||||
<method name="region_get_connections_count" qualifiers="const">
|
||||
<return type="int" />
|
||||
<argument index="0" name="region" type="RID" />
|
||||
<description>
|
||||
Returns how many connections this [code]region[/code] has with other regions in the map.
|
||||
</description>
|
||||
</method>
|
||||
<method name="region_get_enabled" qualifiers="const">
|
||||
<return type="bool" />
|
||||
<argument index="0" name="region" type="RID" />
|
||||
<description>
|
||||
Returns [code]true[/code] if the specified [param region] is enabled.
|
||||
</description>
|
||||
</method>
|
||||
<method name="region_get_enter_cost" qualifiers="const">
|
||||
<return type="float" />
|
||||
<argument index="0" name="region" type="RID" />
|
||||
<description>
|
||||
Returns the [code]enter_cost[/code] of this [code]region[/code].
|
||||
</description>
|
||||
</method>
|
||||
<method name="region_get_map" qualifiers="const">
|
||||
<return type="RID" />
|
||||
<argument index="0" name="region" type="RID" />
|
||||
<description>
|
||||
Returns the navigation map [RID] the requested [code]region[/code] is currently assigned to.
|
||||
</description>
|
||||
</method>
|
||||
<method name="region_get_navigation_layers" qualifiers="const">
|
||||
<return type="int" />
|
||||
<argument index="0" name="region" type="RID" />
|
||||
<description>
|
||||
Returns the region's navigation layers.
|
||||
</description>
|
||||
</method>
|
||||
<method name="region_get_owner_id" qualifiers="const">
|
||||
<return type="int" />
|
||||
<argument index="0" name="region" type="RID" />
|
||||
<description>
|
||||
Returns the [code]ObjectID[/code] of the object which manages this region.
|
||||
</description>
|
||||
</method>
|
||||
<method name="region_get_travel_cost" qualifiers="const">
|
||||
<return type="float" />
|
||||
<argument index="0" name="region" type="RID" />
|
||||
<description>
|
||||
Returns the [code]travel_cost[/code] of this [code]region[/code].
|
||||
</description>
|
||||
</method>
|
||||
<method name="region_get_use_edge_connections" qualifiers="const">
|
||||
<return type="bool" />
|
||||
<argument index="0" name="region" type="RID" />
|
||||
<description>
|
||||
Returns true if the navigation [param region] is set to use edge connections to connect with other navigation regions within proximity of the navigation map edge connection margin.
|
||||
</description>
|
||||
</method>
|
||||
<method name="region_owns_point" qualifiers="const">
|
||||
<return type="bool" />
|
||||
<argument index="0" name="region" type="RID" />
|
||||
<argument index="1" name="point" type="Vector3" />
|
||||
<description>
|
||||
Returns [code]true[/code] if the provided [code]point[/code] in world space is currently owned by the provided navigation [code]region[/code]. Owned in this context means that one of the region's navigation mesh polygon faces has a possible position at the closest distance to this point compared to all other navigation meshes from other navigation regions that are also registered on the navigation map of the provided region.
|
||||
If multiple navigation meshes have positions at equal distance the navigation region whose polygons are processed first wins the ownership. Polygons are processed in the same order that navigation regions were registered on the NavigationServer.
|
||||
[b]Note:[/b] If navigation meshes from different navigation regions overlap (which should be avoided in general) the result might not be what is expected.
|
||||
</description>
|
||||
</method>
|
||||
<method name="region_set_enabled">
|
||||
<return type="void" />
|
||||
<argument index="0" name="region" type="RID" />
|
||||
<argument index="1" name="enabled" type="bool" />
|
||||
<description>
|
||||
If [param enabled] is [code]true[/code] the specified [param region] will contribute to its current navigation map.
|
||||
</description>
|
||||
</method>
|
||||
<method name="region_set_enter_cost">
|
||||
<return type="void" />
|
||||
<argument index="0" name="region" type="RID" />
|
||||
<argument index="1" name="enter_cost" type="float" />
|
||||
<description>
|
||||
Sets the [code]enter_cost[/code] for this [code]region[/code].
|
||||
</description>
|
||||
</method>
|
||||
<method name="region_set_map">
|
||||
<return type="void" />
|
||||
<argument index="0" name="region" type="RID" />
|
||||
<argument index="1" name="map" type="RID" />
|
||||
<description>
|
||||
Sets the map for the region.
|
||||
</description>
|
||||
</method>
|
||||
<method name="region_set_navigation_layers">
|
||||
<return type="void" />
|
||||
<argument index="0" name="region" type="RID" />
|
||||
<argument index="1" name="navigation_layers" type="int" />
|
||||
<description>
|
||||
Set the region's navigation layers. This allows selecting regions from a path request (when using [method NavigationServer.map_get_path]).
|
||||
</description>
|
||||
</method>
|
||||
<method name="region_set_navigation_mesh">
|
||||
<return type="void" />
|
||||
<argument index="0" name="region" type="RID" />
|
||||
<argument index="1" name="navigation_mesh" type="NavigationMesh" />
|
||||
<description>
|
||||
Sets the navigation mesh for the region.
|
||||
</description>
|
||||
</method>
|
||||
<method name="region_set_owner_id">
|
||||
<return type="void" />
|
||||
<argument index="0" name="region" type="RID" />
|
||||
<argument index="1" name="owner_id" type="int" />
|
||||
<description>
|
||||
Set the [code]ObjectID[/code] of the object which manages this region.
|
||||
</description>
|
||||
</method>
|
||||
<method name="region_set_transform">
|
||||
<return type="void" />
|
||||
<argument index="0" name="region" type="RID" />
|
||||
<argument index="1" name="transform" type="Transform" />
|
||||
<description>
|
||||
Sets the global transformation for the region.
|
||||
</description>
|
||||
</method>
|
||||
<method name="region_set_travel_cost">
|
||||
<return type="void" />
|
||||
<argument index="0" name="region" type="RID" />
|
||||
<argument index="1" name="travel_cost" type="float" />
|
||||
<description>
|
||||
Sets the [code]travel_cost[/code] for this [code]region[/code].
|
||||
</description>
|
||||
</method>
|
||||
<method name="region_set_use_edge_connections">
|
||||
<return type="void" />
|
||||
<argument index="0" name="region" type="RID" />
|
||||
<argument index="1" name="enabled" type="bool" />
|
||||
<description>
|
||||
If [param enabled] the navigation [param region] will use edge connections to connect with other navigation regions within proximity of the navigation map edge connection margin.
|
||||
</description>
|
||||
</method>
|
||||
<method name="set_active">
|
||||
<return type="void" />
|
||||
<argument index="0" name="active" type="bool" />
|
||||
<description>
|
||||
Control activation of this server.
|
||||
</description>
|
||||
</method>
|
||||
<method name="set_debug_enabled">
|
||||
<return type="void" />
|
||||
<argument index="0" name="enabled" type="bool" />
|
||||
<description>
|
||||
If [code]true[/code] enables debug mode on the NavigationServer.
|
||||
</description>
|
||||
</method>
|
||||
</methods>
|
||||
<signals>
|
||||
<signal name="avoidance_debug_changed">
|
||||
<description>
|
||||
Emitted when avoidance debug settings are changed. Only available in debug builds.
|
||||
</description>
|
||||
</signal>
|
||||
<signal name="map_changed">
|
||||
<argument index="0" name="map" type="RID" />
|
||||
<description>
|
||||
Emitted when a navigation map is updated, when a region moves or is modified.
|
||||
</description>
|
||||
</signal>
|
||||
<signal name="navigation_debug_changed">
|
||||
<description>
|
||||
Emitted when navigation debug settings are changed. Only available in debug builds.
|
||||
</description>
|
||||
</signal>
|
||||
</signals>
|
||||
<constants>
|
||||
<constant name="INFO_ACTIVE_MAPS" value="0" enum="ProcessInfo">
|
||||
Constant to get the number of active navigation maps.
|
||||
</constant>
|
||||
<constant name="INFO_REGION_COUNT" value="1" enum="ProcessInfo">
|
||||
Constant to get the number of active navigation regions.
|
||||
</constant>
|
||||
<constant name="INFO_AGENT_COUNT" value="2" enum="ProcessInfo">
|
||||
Constant to get the number of active navigation agents processing avoidance.
|
||||
</constant>
|
||||
<constant name="INFO_LINK_COUNT" value="3" enum="ProcessInfo">
|
||||
Constant to get the number of active navigation links.
|
||||
</constant>
|
||||
<constant name="INFO_POLYGON_COUNT" value="4" enum="ProcessInfo">
|
||||
Constant to get the number of navigation mesh polygons.
|
||||
</constant>
|
||||
<constant name="INFO_EDGE_COUNT" value="5" enum="ProcessInfo">
|
||||
Constant to get the number of navigation mesh polygon edges.
|
||||
</constant>
|
||||
<constant name="INFO_EDGE_MERGE_COUNT" value="6" enum="ProcessInfo">
|
||||
Constant to get the number of navigation mesh polygon edges that were merged due to edge key overlap.
|
||||
</constant>
|
||||
<constant name="INFO_EDGE_CONNECTION_COUNT" value="7" enum="ProcessInfo">
|
||||
Constant to get the number of navigation mesh polygon edges that are considered connected by edge proximity.
|
||||
</constant>
|
||||
<constant name="INFO_EDGE_FREE_COUNT" value="8" enum="ProcessInfo">
|
||||
Constant to get the number of navigation mesh polygon edges that could not be merged but may be still connected by edge proximity or with links.
|
||||
</constant>
|
||||
</constants>
|
||||
</class>
|
@ -440,21 +440,6 @@
|
||||
<description>
|
||||
</description>
|
||||
</method>
|
||||
<method name="is_physics_interpolated" qualifiers="const">
|
||||
<return type="bool" />
|
||||
<description>
|
||||
Returns [code]true[/code] if the physics interpolated flag is set for this Node (see [member physics_interpolation_mode]).
|
||||
[b]Note:[/b] Interpolation will only be active is both the flag is set [b]and[/b] physics interpolation is enabled within the [SceneTree]. This can be tested using [method is_physics_interpolated_and_enabled].
|
||||
</description>
|
||||
</method>
|
||||
<method name="is_physics_interpolated_and_enabled" qualifiers="const">
|
||||
<return type="bool" />
|
||||
<description>
|
||||
Returns [code]true[/code] if physics interpolation is enabled (see [member physics_interpolation_mode]) [b]and[/b] enabled in the [SceneTree].
|
||||
This is a convenience version of [method is_physics_interpolated] that also checks whether physics interpolation is enabled globally.
|
||||
See [member SceneTree.physics_interpolation] and [member ProjectSettings.physics/common/physics_interpolation].
|
||||
</description>
|
||||
</method>
|
||||
<method name="is_physics_processing" qualifiers="const">
|
||||
<return type="bool" />
|
||||
<description>
|
||||
@ -632,15 +617,6 @@
|
||||
Requests that [code]_ready[/code] be called again. Note that the method won't be called immediately, but is scheduled for when the node is added to the scene tree again (see [method _ready]). [code]_ready[/code] is called only for the node which requested it, which means that you need to request ready for each child if you want them to call [code]_ready[/code] too (in which case, [code]_ready[/code] will be called in the same order as it would normally).
|
||||
</description>
|
||||
</method>
|
||||
<method name="reset_physics_interpolation">
|
||||
<return type="void" />
|
||||
<description>
|
||||
When physics interpolation is active, moving a node to a radically different transform (such as placement within a level) can result in a visible glitch as the object is rendered moving from the old to new position over the physics tick.
|
||||
This glitch can be prevented by calling [code]reset_physics_interpolation[/code], which temporarily turns off interpolation until the physics tick is complete.
|
||||
[constant NOTIFICATION_RESET_PHYSICS_INTERPOLATION] will be received by the node and all children recursively.
|
||||
[b]Note:[/b] This function should be called [b]after[/b] moving the node, rather than before.
|
||||
</description>
|
||||
</method>
|
||||
<method name="rpc" qualifiers="vararg">
|
||||
<return type="Variant" />
|
||||
<argument index="0" name="method" type="StringName" />
|
||||
@ -885,10 +861,6 @@
|
||||
<member name="pause_mode" type="int" setter="set_pause_mode" getter="get_pause_mode" enum="Node.PauseMode" default="0">
|
||||
Pause mode. How the node will behave if the [SceneTree] is paused.
|
||||
</member>
|
||||
<member name="physics_interpolation_mode" type="int" setter="set_physics_interpolation_mode" getter="get_physics_interpolation_mode" enum="Node.PhysicsInterpolationMode" default="0">
|
||||
Allows enabling or disabling physics interpolation per node, offering a finer grain of control than turning physics interpolation on and off globally.
|
||||
[b]Note:[/b] This can be especially useful for [Camera]s, where custom interpolation can sometimes give superior results.
|
||||
</member>
|
||||
<member name="process_priority" type="int" setter="set_process_priority" getter="get_process_priority" default="0">
|
||||
The node's priority in the execution order of the enabled processing callbacks (i.e. [constant NOTIFICATION_PROCESS], [constant NOTIFICATION_PHYSICS_PROCESS] and their internal counterparts). Nodes whose process priority value is [i]lower[/i] will have their processing callbacks executed first.
|
||||
</member>
|
||||
@ -1003,9 +975,6 @@
|
||||
<constant name="NOTIFICATION_POST_ENTER_TREE" value="27">
|
||||
Notification received when the node is ready, just before [constant NOTIFICATION_READY] is received. Unlike the latter, it's sent every time the node enters tree, instead of only once.
|
||||
</constant>
|
||||
<constant name="NOTIFICATION_RESET_PHYSICS_INTERPOLATION" value="28">
|
||||
Notification received when [method reset_physics_interpolation] is called on the node or parent nodes.
|
||||
</constant>
|
||||
<constant name="NOTIFICATION_EDITOR_PRE_SAVE" value="9001">
|
||||
Notification received right before the scene with the node is saved in the editor. This notification is only sent in the Godot editor and will not occur in exported projects.
|
||||
</constant>
|
||||
|
@ -1,29 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<class name="Occluder" inherits="Spatial" version="4.2">
|
||||
<brief_description>
|
||||
Allows [OccluderShape]s to be used for occlusion culling.
|
||||
</brief_description>
|
||||
<description>
|
||||
[Occluder]s that are placed within your scene will automatically cull objects that are hidden from view by the occluder. This can increase performance by decreasing the amount of objects drawn.
|
||||
[Occluder]s are totally dynamic, you can move them as you wish. This means you can for example, place occluders on a moving spaceship, and have it occlude objects as it flies past.
|
||||
You can place a large number of [Occluder]s within a scene. As it would be counterproductive to cull against hundreds of occluders, the system will automatically choose a selection of these for active use during any given frame, based a screen space metric. Larger occluders are favored, as well as those close to the camera. Note that a small occluder close to the camera may be a better occluder in terms of screen space than a large occluder far in the distance.
|
||||
The type of occlusion primitive is determined by the [OccluderShape] that you add to the [Occluder]. Some [OccluderShape]s may allow more than one primitive in a single, node, for greater efficiency.
|
||||
Although [Occluder]s work in general use, they also become even more powerful when used in conjunction with the portal system. Occluders are placed in rooms (based on their origin), and can block portals (and thus entire rooms) as well as objects from rendering.
|
||||
</description>
|
||||
<tutorials>
|
||||
</tutorials>
|
||||
<methods>
|
||||
<method name="resource_changed">
|
||||
<return type="void" />
|
||||
<argument index="0" name="resource" type="Resource" />
|
||||
<description>
|
||||
</description>
|
||||
</method>
|
||||
</methods>
|
||||
<members>
|
||||
<member name="shape" type="OccluderShape" setter="set_shape" getter="get_shape">
|
||||
</member>
|
||||
</members>
|
||||
<constants>
|
||||
</constants>
|
||||
</class>
|
@ -1,36 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<class name="OccluderPolygon2D" inherits="Resource" version="4.2">
|
||||
<brief_description>
|
||||
Defines a 2D polygon for LightOccluder2D.
|
||||
</brief_description>
|
||||
<description>
|
||||
Editor facility that helps you draw a 2D polygon used as resource for [LightOccluder2D].
|
||||
</description>
|
||||
<tutorials>
|
||||
</tutorials>
|
||||
<methods>
|
||||
</methods>
|
||||
<members>
|
||||
<member name="closed" type="bool" setter="set_closed" getter="is_closed" default="true">
|
||||
If [code]true[/code], closes the polygon. A closed OccluderPolygon2D occludes the light coming from any direction. An opened OccluderPolygon2D occludes the light only at its outline's direction.
|
||||
</member>
|
||||
<member name="cull_mode" type="int" setter="set_cull_mode" getter="get_cull_mode" enum="OccluderPolygon2D.CullMode" default="0">
|
||||
The culling mode to use.
|
||||
</member>
|
||||
<member name="polygon" type="PoolVector2Array" setter="set_polygon" getter="get_polygon" default="PoolVector2Array( )">
|
||||
A [Vector2] array with the index for polygon's vertices positions.
|
||||
[b]Note:[/b] The returned value is a copy of the underlying array, rather than a reference.
|
||||
</member>
|
||||
</members>
|
||||
<constants>
|
||||
<constant name="CULL_DISABLED" value="0" enum="CullMode">
|
||||
Culling is disabled. See [member cull_mode].
|
||||
</constant>
|
||||
<constant name="CULL_CLOCKWISE" value="1" enum="CullMode">
|
||||
Culling is performed in the clockwise direction. See [member cull_mode].
|
||||
</constant>
|
||||
<constant name="CULL_COUNTER_CLOCKWISE" value="2" enum="CullMode">
|
||||
Culling is performed in the counterclockwise direction. See [member cull_mode].
|
||||
</constant>
|
||||
</constants>
|
||||
</class>
|
@ -1,15 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<class name="OccluderShape" inherits="Resource" version="4.2">
|
||||
<brief_description>
|
||||
Base class for shapes used for occlusion culling by the [Occluder] node.
|
||||
</brief_description>
|
||||
<description>
|
||||
[Occluder]s can use any primitive shape derived from [OccluderShape].
|
||||
</description>
|
||||
<tutorials>
|
||||
</tutorials>
|
||||
<methods>
|
||||
</methods>
|
||||
<constants>
|
||||
</constants>
|
||||
</class>
|
@ -1,45 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<class name="OccluderShapePolygon" inherits="OccluderShape" version="4.2">
|
||||
<brief_description>
|
||||
Polygon occlusion primitive for use with the [Occluder] node.
|
||||
</brief_description>
|
||||
<description>
|
||||
[OccluderShape]s are resources used by [Occluder] nodes, allowing geometric occlusion culling.
|
||||
The polygon must be a convex polygon. The polygon points can be created and deleted either in the Editor inspector or by calling [code]set_polygon_points[/code]. The points of the edges can be set by dragging the handles in the Editor viewport.
|
||||
Additionally each polygon occluder can optionally support a single hole. If you add at least three points in the Editor inspector to the hole, you can drag the edge points of the hole in the Editor viewport.
|
||||
In general, the lower the number of edges in polygons and holes, the faster the system will operate at runtime, so in most cases you will want to use 4 points for each.
|
||||
</description>
|
||||
<tutorials>
|
||||
</tutorials>
|
||||
<methods>
|
||||
<method name="set_hole_point">
|
||||
<return type="void" />
|
||||
<argument index="0" name="index" type="int" />
|
||||
<argument index="1" name="position" type="Vector2" />
|
||||
<description>
|
||||
Sets an individual hole point position.
|
||||
</description>
|
||||
</method>
|
||||
<method name="set_polygon_point">
|
||||
<return type="void" />
|
||||
<argument index="0" name="index" type="int" />
|
||||
<argument index="1" name="position" type="Vector2" />
|
||||
<description>
|
||||
Sets an individual polygon point position.
|
||||
</description>
|
||||
</method>
|
||||
</methods>
|
||||
<members>
|
||||
<member name="hole_points" type="PoolVector2Array" setter="set_hole_points" getter="get_hole_points" default="PoolVector2Array( )">
|
||||
Allows changing the hole geometry from code.
|
||||
</member>
|
||||
<member name="polygon_points" type="PoolVector2Array" setter="set_polygon_points" getter="get_polygon_points" default="PoolVector2Array( 1, -1, 1, 1, -1, 1, -1, -1 )">
|
||||
Allows changing the polygon geometry from code.
|
||||
</member>
|
||||
<member name="two_way" type="bool" setter="set_two_way" getter="is_two_way" default="true">
|
||||
Specifies whether the occluder should operate from both sides. If [code]false[/code], the occluder will operate one way only.
|
||||
</member>
|
||||
</members>
|
||||
<constants>
|
||||
</constants>
|
||||
</class>
|
@ -1,37 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<class name="OccluderShapeSphere" inherits="OccluderShape" version="4.2">
|
||||
<brief_description>
|
||||
Spherical occlusion primitive for use with the [Occluder] node.
|
||||
</brief_description>
|
||||
<description>
|
||||
[OccluderShape]s are resources used by [Occluder] nodes, allowing geometric occlusion culling.
|
||||
This shape can include multiple spheres. These can be created and deleted either in the Editor inspector or by calling [code]set_spheres[/code]. The sphere positions can be set by dragging the handle in the Editor viewport. The radius can be set with the smaller handle.
|
||||
</description>
|
||||
<tutorials>
|
||||
</tutorials>
|
||||
<methods>
|
||||
<method name="set_sphere_position">
|
||||
<return type="void" />
|
||||
<argument index="0" name="index" type="int" />
|
||||
<argument index="1" name="position" type="Vector3" />
|
||||
<description>
|
||||
Sets an individual sphere's position.
|
||||
</description>
|
||||
</method>
|
||||
<method name="set_sphere_radius">
|
||||
<return type="void" />
|
||||
<argument index="0" name="index" type="int" />
|
||||
<argument index="1" name="radius" type="float" />
|
||||
<description>
|
||||
Sets an individual sphere's radius.
|
||||
</description>
|
||||
</method>
|
||||
</methods>
|
||||
<members>
|
||||
<member name="spheres" type="Array" setter="set_spheres" getter="get_spheres" default="[ Plane( 0, 0, 0, 1 ) ]">
|
||||
The sphere data can be accessed as an array of [Plane]s. The position of each sphere is stored in the [code]normal[/code], and the radius is stored in the [code]d[/code] value of the plane.
|
||||
</member>
|
||||
</members>
|
||||
<constants>
|
||||
</constants>
|
||||
</class>
|
@ -1,46 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<class name="OmniLight" inherits="Light" version="4.2">
|
||||
<brief_description>
|
||||
Omnidirectional light, such as a light bulb or a candle.
|
||||
</brief_description>
|
||||
<description>
|
||||
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.
|
||||
[b]Note:[/b] By default, only 32 OmniLights may affect a single mesh [i]resource[/i] 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 [member ProjectSettings.rendering/limits/rendering/max_lights_per_object] at the cost of shader compilation times.
|
||||
</description>
|
||||
<tutorials>
|
||||
<link>$DOCS_URL/tutorials/3d/lights_and_shadows.md</link>
|
||||
</tutorials>
|
||||
<methods>
|
||||
</methods>
|
||||
<members>
|
||||
<member name="omni_attenuation" type="float" setter="set_param" getter="get_param" default="1.0">
|
||||
The light's attenuation (drop-off) curve. A number of presets are available in the [b]Inspector[/b] by right-clicking the curve.
|
||||
</member>
|
||||
<member name="omni_range" type="float" setter="set_param" getter="get_param" default="5.0">
|
||||
The light's radius. Note that the effectively lit area may appear to be smaller depending on the [member omni_attenuation] in use. No matter the [member omni_attenuation] in use, the light will never reach anything outside this radius.
|
||||
[b]Note:[/b] [member omni_range] is not affected by [member Spatial.scale] (the light's scale or its parent's scale).
|
||||
</member>
|
||||
<member name="omni_shadow_detail" type="int" setter="set_shadow_detail" getter="get_shadow_detail" enum="OmniLight.ShadowDetail" default="1">
|
||||
See [enum ShadowDetail].
|
||||
</member>
|
||||
<member name="omni_shadow_mode" type="int" setter="set_shadow_mode" getter="get_shadow_mode" enum="OmniLight.ShadowMode" default="1">
|
||||
The shadow rendering mode to use for this [OmniLight]. See [enum ShadowMode].
|
||||
[b]Note:[/b] In GLES2, [constant SHADOW_CUBE] is only supported on GPUs that feature support for depth cubemaps. Old GPUs such as the Radeon HD 4000 series don't support cubemap shadows and will fall back to dual paraboloid shadows as a result.
|
||||
</member>
|
||||
<member name="shadow_bias" type="float" setter="set_param" getter="get_param" overrides="Light" default="0.15" />
|
||||
</members>
|
||||
<constants>
|
||||
<constant name="SHADOW_DUAL_PARABOLOID" value="0" enum="ShadowMode">
|
||||
Shadows are rendered to a dual-paraboloid texture. Faster than [constant SHADOW_CUBE], but lower-quality.
|
||||
</constant>
|
||||
<constant name="SHADOW_CUBE" value="1" enum="ShadowMode">
|
||||
Shadows are rendered to a cubemap. Slower than [constant SHADOW_DUAL_PARABOLOID], but higher-quality.
|
||||
</constant>
|
||||
<constant name="SHADOW_DETAIL_VERTICAL" value="0" enum="ShadowDetail">
|
||||
Use more detail vertically when computing the shadow.
|
||||
</constant>
|
||||
<constant name="SHADOW_DETAIL_HORIZONTAL" value="1" enum="ShadowDetail">
|
||||
Use more detail horizontally when computing the shadow.
|
||||
</constant>
|
||||
</constants>
|
||||
</class>
|
@ -1,45 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<class name="PCKPacker" inherits="Reference" version="4.2">
|
||||
<brief_description>
|
||||
Creates packages that can be loaded into a running project.
|
||||
</brief_description>
|
||||
<description>
|
||||
The [PCKPacker] is used to create packages that can be loaded into a running project using [method ProjectSettings.load_resource_pack].
|
||||
[codeblock]
|
||||
var packer = PCKPacker.new()
|
||||
packer.pck_start("test.pck")
|
||||
packer.add_file("res://text.txt", "text.txt")
|
||||
packer.flush()
|
||||
[/codeblock]
|
||||
The above [PCKPacker] creates package [code]test.pck[/code], then adds a file named [code]text.txt[/code] at the root of the package.
|
||||
</description>
|
||||
<tutorials>
|
||||
</tutorials>
|
||||
<methods>
|
||||
<method name="add_file">
|
||||
<return type="int" enum="Error" />
|
||||
<argument index="0" name="pck_path" type="String" />
|
||||
<argument index="1" name="source_path" type="String" />
|
||||
<description>
|
||||
Adds the [code]source_path[/code] file to the current PCK package at the [code]pck_path[/code] internal path (should start with [code]res://[/code]).
|
||||
</description>
|
||||
</method>
|
||||
<method name="flush">
|
||||
<return type="int" enum="Error" />
|
||||
<argument index="0" name="verbose" type="bool" default="false" />
|
||||
<description>
|
||||
Writes the files specified using all [method add_file] calls since the last flush. If [code]verbose[/code] is [code]true[/code], a list of files added will be printed to the console for easier debugging.
|
||||
</description>
|
||||
</method>
|
||||
<method name="pck_start">
|
||||
<return type="int" enum="Error" />
|
||||
<argument index="0" name="pck_name" type="String" />
|
||||
<argument index="1" name="alignment" type="int" default="0" />
|
||||
<description>
|
||||
Creates a new PCK file with the name [code]pck_name[/code]. The [code].pck[/code] file extension isn't added automatically, so it should be part of [code]pck_name[/code] (even though it's not required).
|
||||
</description>
|
||||
</method>
|
||||
</methods>
|
||||
<constants>
|
||||
</constants>
|
||||
</class>
|
@ -1,22 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<class name="PHashTranslation" inherits="Translation" version="4.2">
|
||||
<brief_description>
|
||||
Optimized translation.
|
||||
</brief_description>
|
||||
<description>
|
||||
Optimized translation. Uses real-time compressed translations, which results in very small dictionaries.
|
||||
</description>
|
||||
<tutorials>
|
||||
</tutorials>
|
||||
<methods>
|
||||
<method name="generate">
|
||||
<return type="void" />
|
||||
<argument index="0" name="from" type="Translation" />
|
||||
<description>
|
||||
Generates and sets an optimized translation from the given [Translation] resource.
|
||||
</description>
|
||||
</method>
|
||||
</methods>
|
||||
<constants>
|
||||
</constants>
|
||||
</class>
|
@ -1,22 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<class name="PanoramaSky" inherits="Sky" version="4.2">
|
||||
<brief_description>
|
||||
A type of [Sky] used to draw a background texture.
|
||||
</brief_description>
|
||||
<description>
|
||||
A resource referenced in an [Environment3D] 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 ([code].hdr[/code]) and OpenEXR ([code].exr[/code]) image formats for this purpose.
|
||||
You can use [url=https://danilw.github.io/GLSL-howto/cubemap_to_panorama_js/cubemap_to_panorama.html]this tool[/url] to convert a cube map to an equirectangular sky map.
|
||||
</description>
|
||||
<tutorials>
|
||||
</tutorials>
|
||||
<methods>
|
||||
</methods>
|
||||
<members>
|
||||
<member name="panorama" type="Texture" setter="set_panorama" getter="get_panorama">
|
||||
[Texture] to be applied to the PanoramaSky.
|
||||
</member>
|
||||
</members>
|
||||
<constants>
|
||||
</constants>
|
||||
</class>
|
@ -23,7 +23,6 @@
|
||||
<member name="motion_scale" type="Vector2" setter="set_motion_scale" getter="get_motion_scale" default="Vector2( 1, 1 )">
|
||||
Multiplies the ParallaxLayer's motion. If an axis is set to [code]0[/code], it will not scroll.
|
||||
</member>
|
||||
<member name="physics_interpolation_mode" type="int" setter="set_physics_interpolation_mode" getter="get_physics_interpolation_mode" overrides="Node" enum="Node.PhysicsInterpolationMode" default="1" />
|
||||
</members>
|
||||
<constants>
|
||||
</constants>
|
||||
|
@ -1,334 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<class name="ParticlesMaterial" inherits="Material" version="4.2">
|
||||
<brief_description>
|
||||
Particle properties for [Particles] and [Particles2D] nodes.
|
||||
</brief_description>
|
||||
<description>
|
||||
ParticlesMaterial defines particle properties and behavior. It is used in the [code]process_material[/code] 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 [code]1.0[/code] 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 [code]0.4[/code] would scale the original property between [code]0.4-1.0[/code] of its original value.
|
||||
</description>
|
||||
<tutorials>
|
||||
</tutorials>
|
||||
<methods>
|
||||
<method name="get_flag" qualifiers="const">
|
||||
<return type="bool" />
|
||||
<argument index="0" name="flag" type="int" enum="ParticlesMaterial.Flags" />
|
||||
<description>
|
||||
Returns [code]true[/code] if the specified flag is enabled.
|
||||
</description>
|
||||
</method>
|
||||
<method name="get_param" qualifiers="const">
|
||||
<return type="float" />
|
||||
<argument index="0" name="param" type="int" enum="ParticlesMaterial.Parameter" />
|
||||
<description>
|
||||
Returns the value of the specified parameter.
|
||||
</description>
|
||||
</method>
|
||||
<method name="get_param_randomness" qualifiers="const">
|
||||
<return type="float" />
|
||||
<argument index="0" name="param" type="int" enum="ParticlesMaterial.Parameter" />
|
||||
<description>
|
||||
Returns the randomness ratio associated with the specified parameter.
|
||||
</description>
|
||||
</method>
|
||||
<method name="get_param_texture" qualifiers="const">
|
||||
<return type="Texture" />
|
||||
<argument index="0" name="param" type="int" enum="ParticlesMaterial.Parameter" />
|
||||
<description>
|
||||
Returns the [Texture] used by the specified parameter.
|
||||
</description>
|
||||
</method>
|
||||
<method name="set_flag">
|
||||
<return type="void" />
|
||||
<argument index="0" name="flag" type="int" enum="ParticlesMaterial.Flags" />
|
||||
<argument index="1" name="enable" type="bool" />
|
||||
<description>
|
||||
If [code]true[/code], enables the specified flag. See [enum Flags] for options.
|
||||
</description>
|
||||
</method>
|
||||
<method name="set_param">
|
||||
<return type="void" />
|
||||
<argument index="0" name="param" type="int" enum="ParticlesMaterial.Parameter" />
|
||||
<argument index="1" name="value" type="float" />
|
||||
<description>
|
||||
Sets the specified [enum Parameter].
|
||||
</description>
|
||||
</method>
|
||||
<method name="set_param_randomness">
|
||||
<return type="void" />
|
||||
<argument index="0" name="param" type="int" enum="ParticlesMaterial.Parameter" />
|
||||
<argument index="1" name="randomness" type="float" />
|
||||
<description>
|
||||
Sets the randomness ratio for the specified [enum Parameter].
|
||||
</description>
|
||||
</method>
|
||||
<method name="set_param_texture">
|
||||
<return type="void" />
|
||||
<argument index="0" name="param" type="int" enum="ParticlesMaterial.Parameter" />
|
||||
<argument index="1" name="texture" type="Texture" />
|
||||
<description>
|
||||
Sets the [Texture] for the specified [enum Parameter].
|
||||
</description>
|
||||
</method>
|
||||
</methods>
|
||||
<members>
|
||||
<member name="angle" type="float" setter="set_param" getter="get_param" default="0.0">
|
||||
Initial rotation applied to each particle, in degrees.
|
||||
[b]Note:[/b] Only applied when [member flag_disable_z] or [member flag_rotate_y] are [code]true[/code] or the [SpatialMaterial] being used to draw the particle is using [constant SpatialMaterial.BILLBOARD_PARTICLES].
|
||||
</member>
|
||||
<member name="angle_curve" type="Texture" setter="set_param_texture" getter="get_param_texture">
|
||||
Each particle's rotation will be animated along this [CurveTexture].
|
||||
</member>
|
||||
<member name="angle_random" type="float" setter="set_param_randomness" getter="get_param_randomness" default="0.0">
|
||||
Rotation randomness ratio.
|
||||
</member>
|
||||
<member name="angular_velocity" type="float" setter="set_param" getter="get_param" default="0.0">
|
||||
Initial angular velocity applied to each particle in [i]degrees[/i] per second. Sets the speed of rotation of the particle.
|
||||
[b]Note:[/b] Only applied when [member flag_disable_z] or [member flag_rotate_y] are [code]true[/code] or the [SpatialMaterial] being used to draw the particle is using [constant SpatialMaterial.BILLBOARD_PARTICLES].
|
||||
</member>
|
||||
<member name="angular_velocity_curve" type="Texture" setter="set_param_texture" getter="get_param_texture">
|
||||
Each particle's angular velocity will vary along this [CurveTexture].
|
||||
</member>
|
||||
<member name="angular_velocity_random" type="float" setter="set_param_randomness" getter="get_param_randomness" default="0.0">
|
||||
Angular velocity randomness ratio.
|
||||
</member>
|
||||
<member name="anim_offset" type="float" setter="set_param" getter="get_param" default="0.0">
|
||||
Particle animation offset.
|
||||
</member>
|
||||
<member name="anim_offset_curve" type="Texture" setter="set_param_texture" getter="get_param_texture">
|
||||
Each particle's animation offset will vary along this [CurveTexture].
|
||||
</member>
|
||||
<member name="anim_offset_random" type="float" setter="set_param_randomness" getter="get_param_randomness" default="0.0">
|
||||
Animation offset randomness ratio.
|
||||
</member>
|
||||
<member name="anim_speed" type="float" setter="set_param" getter="get_param" default="0.0">
|
||||
Particle animation speed.
|
||||
</member>
|
||||
<member name="anim_speed_curve" type="Texture" setter="set_param_texture" getter="get_param_texture">
|
||||
Each particle's animation speed will vary along this [CurveTexture].
|
||||
</member>
|
||||
<member name="anim_speed_random" type="float" setter="set_param_randomness" getter="get_param_randomness" default="0.0">
|
||||
Animation speed randomness ratio.
|
||||
</member>
|
||||
<member name="color" type="Color" setter="set_color" getter="get_color" default="Color( 1, 1, 1, 1 )">
|
||||
Each particle's initial color. If the [Particles2D]'s [code]texture[/code] is defined, it will be multiplied by this color. To have particle display color in a [SpatialMaterial] make sure to set [member SpatialMaterial.vertex_color_use_as_albedo] to [code]true[/code].
|
||||
</member>
|
||||
<member name="color_initial_ramp" type="Texture" setter="set_color_initial_ramp" getter="get_color_initial_ramp">
|
||||
Each particle's initial color will vary along this [GradientTexture] (multiplied with [member color]).
|
||||
</member>
|
||||
<member name="color_ramp" type="Texture" setter="set_color_ramp" getter="get_color_ramp">
|
||||
Each particle's color will vary along this [GradientTexture] over its lifetime (multiplied with [member color]).
|
||||
</member>
|
||||
<member name="damping" type="float" setter="set_param" getter="get_param" default="0.0">
|
||||
The rate at which particles lose velocity.
|
||||
</member>
|
||||
<member name="damping_curve" type="Texture" setter="set_param_texture" getter="get_param_texture">
|
||||
Damping will vary along this [CurveTexture].
|
||||
</member>
|
||||
<member name="damping_random" type="float" setter="set_param_randomness" getter="get_param_randomness" default="0.0">
|
||||
Damping randomness ratio.
|
||||
</member>
|
||||
<member name="direction" type="Vector3" setter="set_direction" getter="get_direction" default="Vector3( 1, 0, 0 )">
|
||||
Unit vector specifying the particles' emission direction.
|
||||
</member>
|
||||
<member name="emission_box_extents" type="Vector3" setter="set_emission_box_extents" getter="get_emission_box_extents">
|
||||
The box's extents if [code]emission_shape[/code] is set to [constant EMISSION_SHAPE_BOX].
|
||||
</member>
|
||||
<member name="emission_color_texture" type="Texture" setter="set_emission_color_texture" getter="get_emission_color_texture">
|
||||
Particle color will be modulated by color determined by sampling this texture at the same point as the [member emission_point_texture].
|
||||
</member>
|
||||
<member name="emission_normal_texture" type="Texture" setter="set_emission_normal_texture" getter="get_emission_normal_texture">
|
||||
Particle velocity and rotation will be set by sampling this texture at the same point as the [member emission_point_texture]. Used only in [constant EMISSION_SHAPE_DIRECTED_POINTS]. Can be created automatically from mesh or node by selecting "Create Emission Points from Mesh/Node" under the "Particles" tool in the toolbar.
|
||||
</member>
|
||||
<member name="emission_point_count" type="int" setter="set_emission_point_count" getter="get_emission_point_count">
|
||||
The number of emission points if [code]emission_shape[/code] is set to [constant EMISSION_SHAPE_POINTS] or [constant EMISSION_SHAPE_DIRECTED_POINTS].
|
||||
</member>
|
||||
<member name="emission_point_texture" type="Texture" setter="set_emission_point_texture" getter="get_emission_point_texture">
|
||||
Particles will be emitted at positions determined by sampling this texture at a random position. Used with [constant EMISSION_SHAPE_POINTS] and [constant EMISSION_SHAPE_DIRECTED_POINTS]. Can be created automatically from mesh or node by selecting "Create Emission Points from Mesh/Node" under the "Particles" tool in the toolbar.
|
||||
</member>
|
||||
<member name="emission_ring_axis" type="Vector3" setter="set_emission_ring_axis" getter="get_emission_ring_axis">
|
||||
The axis of the ring when using the emitter [constant EMISSION_SHAPE_RING].
|
||||
</member>
|
||||
<member name="emission_ring_height" type="float" setter="set_emission_ring_height" getter="get_emission_ring_height">
|
||||
The height of the ring when using the emitter [constant EMISSION_SHAPE_RING].
|
||||
</member>
|
||||
<member name="emission_ring_inner_radius" type="float" setter="set_emission_ring_inner_radius" getter="get_emission_ring_inner_radius">
|
||||
The inner radius of the ring when using the emitter [constant EMISSION_SHAPE_RING].
|
||||
</member>
|
||||
<member name="emission_ring_radius" type="float" setter="set_emission_ring_radius" getter="get_emission_ring_radius">
|
||||
The radius of the ring when using the emitter [constant EMISSION_SHAPE_RING].
|
||||
</member>
|
||||
<member name="emission_shape" type="int" setter="set_emission_shape" getter="get_emission_shape" enum="ParticlesMaterial.EmissionShape" default="0">
|
||||
Particles will be emitted inside this region. Use [enum EmissionShape] constants for values.
|
||||
</member>
|
||||
<member name="emission_sphere_radius" type="float" setter="set_emission_sphere_radius" getter="get_emission_sphere_radius">
|
||||
The sphere's radius if [code]emission_shape[/code] is set to [constant EMISSION_SHAPE_SPHERE].
|
||||
</member>
|
||||
<member name="flag_align_y" type="bool" setter="set_flag" getter="get_flag" default="false">
|
||||
Align Y axis of particle with the direction of its velocity.
|
||||
</member>
|
||||
<member name="flag_disable_z" type="bool" setter="set_flag" getter="get_flag" default="false">
|
||||
If [code]true[/code], particles will not move on the z axis.
|
||||
</member>
|
||||
<member name="flag_rotate_y" type="bool" setter="set_flag" getter="get_flag" default="false">
|
||||
If [code]true[/code], particles rotate around Y axis by [member angle].
|
||||
</member>
|
||||
<member name="flatness" type="float" setter="set_flatness" getter="get_flatness" default="0.0">
|
||||
Amount of [member spread] along the Y axis.
|
||||
</member>
|
||||
<member name="gravity" type="Vector3" setter="set_gravity" getter="get_gravity" default="Vector3( 0, -9.8, 0 )">
|
||||
Gravity applied to every particle.
|
||||
</member>
|
||||
<member name="hue_variation" type="float" setter="set_param" getter="get_param" default="0.0">
|
||||
Initial hue variation applied to each particle.
|
||||
</member>
|
||||
<member name="hue_variation_curve" type="Texture" setter="set_param_texture" getter="get_param_texture">
|
||||
Each particle's hue will vary along this [CurveTexture].
|
||||
</member>
|
||||
<member name="hue_variation_random" type="float" setter="set_param_randomness" getter="get_param_randomness" default="0.0">
|
||||
Hue variation randomness ratio.
|
||||
</member>
|
||||
<member name="initial_velocity" type="float" setter="set_param" getter="get_param" default="0.0">
|
||||
Initial velocity magnitude for each particle. Direction comes from [member spread] and the node's orientation.
|
||||
</member>
|
||||
<member name="initial_velocity_random" type="float" setter="set_param_randomness" getter="get_param_randomness" default="0.0">
|
||||
Initial velocity randomness ratio.
|
||||
</member>
|
||||
<member name="lifetime_randomness" type="float" setter="set_lifetime_randomness" getter="get_lifetime_randomness" default="0.0">
|
||||
Particle lifetime randomness ratio.
|
||||
</member>
|
||||
<member name="linear_accel" type="float" setter="set_param" getter="get_param" default="0.0">
|
||||
Linear acceleration applied to each particle in the direction of motion.
|
||||
</member>
|
||||
<member name="linear_accel_curve" type="Texture" setter="set_param_texture" getter="get_param_texture">
|
||||
Each particle's linear acceleration will vary along this [CurveTexture].
|
||||
</member>
|
||||
<member name="linear_accel_random" type="float" setter="set_param_randomness" getter="get_param_randomness" default="0.0">
|
||||
Linear acceleration randomness ratio.
|
||||
</member>
|
||||
<member name="orbit_velocity" type="float" setter="set_param" getter="get_param">
|
||||
Orbital velocity applied to each particle. Makes the particles circle around origin. Specified in number of full rotations around origin per second.
|
||||
[b]Note:[/b] Only available when [member flag_disable_z] is [code]true[/code].
|
||||
</member>
|
||||
<member name="orbit_velocity_curve" type="Texture" setter="set_param_texture" getter="get_param_texture">
|
||||
Each particle's orbital velocity will vary along this [CurveTexture].
|
||||
</member>
|
||||
<member name="orbit_velocity_random" type="float" setter="set_param_randomness" getter="get_param_randomness">
|
||||
Orbital velocity randomness ratio.
|
||||
</member>
|
||||
<member name="radial_accel" type="float" setter="set_param" getter="get_param" default="0.0">
|
||||
Radial acceleration applied to each particle. Makes particle accelerate away from origin.
|
||||
</member>
|
||||
<member name="radial_accel_curve" type="Texture" setter="set_param_texture" getter="get_param_texture">
|
||||
Each particle's radial acceleration will vary along this [CurveTexture].
|
||||
</member>
|
||||
<member name="radial_accel_random" type="float" setter="set_param_randomness" getter="get_param_randomness" default="0.0">
|
||||
Radial acceleration randomness ratio.
|
||||
</member>
|
||||
<member name="scale" type="float" setter="set_param" getter="get_param" default="1.0">
|
||||
Initial scale applied to each particle.
|
||||
</member>
|
||||
<member name="scale_curve" type="Texture" setter="set_param_texture" getter="get_param_texture">
|
||||
Each particle's scale will vary along this [CurveTexture].
|
||||
</member>
|
||||
<member name="scale_random" type="float" setter="set_param_randomness" getter="get_param_randomness" default="0.0">
|
||||
Scale randomness ratio.
|
||||
</member>
|
||||
<member name="spread" type="float" setter="set_spread" getter="get_spread" default="45.0">
|
||||
Each particle's initial direction range from [code]+spread[/code] to [code]-spread[/code] degrees.
|
||||
</member>
|
||||
<member name="tangential_accel" type="float" setter="set_param" getter="get_param" default="0.0">
|
||||
Tangential acceleration applied to each particle. Tangential acceleration is perpendicular to the particle's velocity giving the particles a swirling motion.
|
||||
</member>
|
||||
<member name="tangential_accel_curve" type="Texture" setter="set_param_texture" getter="get_param_texture">
|
||||
Each particle's tangential acceleration will vary along this [CurveTexture].
|
||||
</member>
|
||||
<member name="tangential_accel_random" type="float" setter="set_param_randomness" getter="get_param_randomness" default="0.0">
|
||||
Tangential acceleration randomness ratio.
|
||||
</member>
|
||||
<member name="trail_color_modifier" type="GradientTexture" setter="set_trail_color_modifier" getter="get_trail_color_modifier">
|
||||
Trail particles' color will vary along this [GradientTexture].
|
||||
</member>
|
||||
<member name="trail_divisor" type="int" setter="set_trail_divisor" getter="get_trail_divisor" default="1">
|
||||
Emitter will emit [code]amount[/code] divided by [code]trail_divisor[/code] particles. The remaining particles will be used as trail(s).
|
||||
</member>
|
||||
<member name="trail_size_modifier" type="CurveTexture" setter="set_trail_size_modifier" getter="get_trail_size_modifier">
|
||||
Trail particles' size will vary along this [CurveTexture].
|
||||
</member>
|
||||
</members>
|
||||
<constants>
|
||||
<constant name="PARAM_INITIAL_LINEAR_VELOCITY" value="0" enum="Parameter">
|
||||
Use with [method set_param], [method set_param_randomness], and [method set_param_texture] to set initial velocity properties.
|
||||
</constant>
|
||||
<constant name="PARAM_ANGULAR_VELOCITY" value="1" enum="Parameter">
|
||||
Use with [method set_param], [method set_param_randomness], and [method set_param_texture] to set angular velocity properties.
|
||||
</constant>
|
||||
<constant name="PARAM_ORBIT_VELOCITY" value="2" enum="Parameter">
|
||||
Use with [method set_param], [method set_param_randomness], and [method set_param_texture] to set orbital velocity properties.
|
||||
</constant>
|
||||
<constant name="PARAM_LINEAR_ACCEL" value="3" enum="Parameter">
|
||||
Use with [method set_param], [method set_param_randomness], and [method set_param_texture] to set linear acceleration properties.
|
||||
</constant>
|
||||
<constant name="PARAM_RADIAL_ACCEL" value="4" enum="Parameter">
|
||||
Use with [method set_param], [method set_param_randomness], and [method set_param_texture] to set radial acceleration properties.
|
||||
</constant>
|
||||
<constant name="PARAM_TANGENTIAL_ACCEL" value="5" enum="Parameter">
|
||||
Use with [method set_param], [method set_param_randomness], and [method set_param_texture] to set tangential acceleration properties.
|
||||
</constant>
|
||||
<constant name="PARAM_DAMPING" value="6" enum="Parameter">
|
||||
Use with [method set_param], [method set_param_randomness], and [method set_param_texture] to set damping properties.
|
||||
</constant>
|
||||
<constant name="PARAM_ANGLE" value="7" enum="Parameter">
|
||||
Use with [method set_param], [method set_param_randomness], and [method set_param_texture] to set angle properties.
|
||||
</constant>
|
||||
<constant name="PARAM_SCALE" value="8" enum="Parameter">
|
||||
Use with [method set_param], [method set_param_randomness], and [method set_param_texture] to set scale properties.
|
||||
</constant>
|
||||
<constant name="PARAM_HUE_VARIATION" value="9" enum="Parameter">
|
||||
Use with [method set_param], [method set_param_randomness], and [method set_param_texture] to set hue variation properties.
|
||||
</constant>
|
||||
<constant name="PARAM_ANIM_SPEED" value="10" enum="Parameter">
|
||||
Use with [method set_param], [method set_param_randomness], and [method set_param_texture] to set animation speed properties.
|
||||
</constant>
|
||||
<constant name="PARAM_ANIM_OFFSET" value="11" enum="Parameter">
|
||||
Use with [method set_param], [method set_param_randomness], and [method set_param_texture] to set animation offset properties.
|
||||
</constant>
|
||||
<constant name="PARAM_MAX" value="12" enum="Parameter">
|
||||
Represents the size of the [enum Parameter] enum.
|
||||
</constant>
|
||||
<constant name="FLAG_ALIGN_Y_TO_VELOCITY" value="0" enum="Flags">
|
||||
Use with [method set_flag] to set [member flag_align_y].
|
||||
</constant>
|
||||
<constant name="FLAG_ROTATE_Y" value="1" enum="Flags">
|
||||
Use with [method set_flag] to set [member flag_rotate_y].
|
||||
</constant>
|
||||
<constant name="FLAG_DISABLE_Z" value="2" enum="Flags">
|
||||
Use with [method set_flag] to set [member flag_disable_z].
|
||||
</constant>
|
||||
<constant name="FLAG_MAX" value="3" enum="Flags">
|
||||
Represents the size of the [enum Flags] enum.
|
||||
</constant>
|
||||
<constant name="EMISSION_SHAPE_POINT" value="0" enum="EmissionShape">
|
||||
All particles will be emitted from a single point.
|
||||
</constant>
|
||||
<constant name="EMISSION_SHAPE_SPHERE" value="1" enum="EmissionShape">
|
||||
Particles will be emitted in the volume of a sphere.
|
||||
</constant>
|
||||
<constant name="EMISSION_SHAPE_BOX" value="2" enum="EmissionShape">
|
||||
Particles will be emitted in the volume of a box.
|
||||
</constant>
|
||||
<constant name="EMISSION_SHAPE_POINTS" value="3" enum="EmissionShape">
|
||||
Particles will be emitted at a position determined by sampling a random point on the [member emission_point_texture]. Particle color will be modulated by [member emission_color_texture].
|
||||
</constant>
|
||||
<constant name="EMISSION_SHAPE_DIRECTED_POINTS" value="4" enum="EmissionShape">
|
||||
Particles will be emitted at a position determined by sampling a random point on the [member emission_point_texture]. Particle velocity and rotation will be set based on [member emission_normal_texture]. Particle color will be modulated by [member emission_color_texture].
|
||||
</constant>
|
||||
<constant name="EMISSION_SHAPE_RING" value="5" enum="EmissionShape">
|
||||
Particles will be emitted in a ring or cylinder.
|
||||
</constant>
|
||||
<constant name="EMISSION_SHAPE_MAX" value="6" enum="EmissionShape">
|
||||
Represents the size of the [enum EmissionShape] enum.
|
||||
</constant>
|
||||
</constants>
|
||||
</class>
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user