You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2026-01-06 19:41:11 +00:00
Merge pull request #92391 from rburing/fti_3d
Physics interpolation (3D)
This commit is contained in:
@@ -46,6 +46,14 @@
|
||||
Returns all the gizmos attached to this [Node3D].
|
||||
</description>
|
||||
</method>
|
||||
<method name="get_global_transform_interpolated">
|
||||
<return type="Transform3D" />
|
||||
<description>
|
||||
When using physics interpolation, there will be circumstances in which you want to know the interpolated (displayed) transform of a node rather than the standard transform (which may only be accurate to the most recent physics tick).
|
||||
This is particularly important for frame-based operations that take place in [method Node._process], rather than [method Node._physics_process]. Examples include [Camera3D]s focusing on a node, or finding where to fire lasers from on a frame rather than physics tick.
|
||||
[b]Note:[/b] This function creates an interpolation pump on the [Node3D] the first time it is called, which can respond to physics interpolation resets. If you get problems with "streaking" when initially following a [Node3D], be sure to call [method get_global_transform_interpolated] at least once [i]before[/i] resetting the [Node3D] physics interpolation.
|
||||
</description>
|
||||
</method>
|
||||
<method name="get_parent_node_3d" qualifiers="const">
|
||||
<return type="Node3D" />
|
||||
<description>
|
||||
|
||||
@@ -630,6 +630,10 @@
|
||||
<member name="debug/settings/gdscript/max_call_stack" type="int" setter="" getter="" default="1024">
|
||||
Maximum call stack allowed for debugging GDScript.
|
||||
</member>
|
||||
<member name="debug/settings/physics_interpolation/enable_warnings" type="bool" setter="" getter="" default="true">
|
||||
If [code]true[/code], enables warnings which can help pinpoint where nodes are being incorrectly updated, which will result in incorrect interpolation and visual glitches.
|
||||
When a node is being interpolated, it is essential that the transform is set during [method Node._physics_process] (during a physics tick) rather than [method Node._process] (during a frame).
|
||||
</member>
|
||||
<member name="debug/settings/profiler/max_functions" type="int" setter="" getter="" default="16384">
|
||||
Maximum number of functions per frame allowed when profiling.
|
||||
</member>
|
||||
@@ -2322,7 +2326,8 @@
|
||||
</member>
|
||||
<member name="physics/common/physics_jitter_fix" type="float" setter="" getter="" default="0.5">
|
||||
Controls how much physics ticks are synchronized with real time. For 0 or less, the ticks are synchronized. Such values are recommended for network games, where clock synchronization matters. Higher values cause higher deviation of in-game clock and real clock, but allows smoothing out framerate jitters. The default value of 0.5 should be good enough for most; values above 2 could cause the game to react to dropped frames with a noticeable delay and are not recommended.
|
||||
[b]Note:[/b] When using a physics interpolation solution (such as enabling [member physics/common/physics_interpolation] or using a custom solution), the physics jitter fix should be disabled by setting [member physics/common/physics_jitter_fix] to [code]0.0[/code].
|
||||
[b]Note:[/b] Jitter fix is automatically disabled at runtime when [member physics/common/physics_interpolation] is enabled.
|
||||
[b]Note:[/b] When using a custom physics interpolation solution, the physics jitter fix should be disabled by setting [member physics/common/physics_jitter_fix] to [code]0.0[/code].
|
||||
[b]Note:[/b] This property is only read when the project starts. To change the physics jitter fix at runtime, set [member Engine.physics_jitter_fix] instead.
|
||||
</member>
|
||||
<member name="physics/common/physics_ticks_per_second" type="int" setter="" getter="" default="60">
|
||||
|
||||
@@ -1855,6 +1855,14 @@
|
||||
Sets the visibility range values for the given geometry instance. Equivalent to [member GeometryInstance3D.visibility_range_begin] and related properties.
|
||||
</description>
|
||||
</method>
|
||||
<method name="instance_reset_physics_interpolation">
|
||||
<return type="void" />
|
||||
<param index="0" name="instance" type="RID" />
|
||||
<description>
|
||||
Prevents physics interpolation for the current physics tick.
|
||||
This is useful when moving an instance to a new location, to give an instantaneous change rather than interpolation from the previous location.
|
||||
</description>
|
||||
</method>
|
||||
<method name="instance_set_base">
|
||||
<return type="void" />
|
||||
<param index="0" name="instance" type="RID" />
|
||||
@@ -1896,6 +1904,14 @@
|
||||
If [code]true[/code], ignores both frustum and occlusion culling on the specified 3D geometry instance. This is not the same as [member GeometryInstance3D.ignore_occlusion_culling], which only ignores occlusion culling and leaves frustum culling intact.
|
||||
</description>
|
||||
</method>
|
||||
<method name="instance_set_interpolated">
|
||||
<return type="void" />
|
||||
<param index="0" name="instance" type="RID" />
|
||||
<param index="1" name="interpolated" type="bool" />
|
||||
<description>
|
||||
Turns on and off physics interpolation for the instance.
|
||||
</description>
|
||||
</method>
|
||||
<method name="instance_set_layer_mask">
|
||||
<return type="void" />
|
||||
<param index="0" name="instance" type="RID" />
|
||||
|
||||
@@ -301,6 +301,7 @@
|
||||
<member name="own_world_3d" type="bool" setter="set_use_own_world_3d" getter="is_using_own_world_3d" default="false">
|
||||
If [code]true[/code], the viewport will use a unique copy of the [World3D] defined in [member world_3d].
|
||||
</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="physics_object_picking" type="bool" setter="set_physics_object_picking" getter="get_physics_object_picking" default="false">
|
||||
If [code]true[/code], the objects rendered by viewport become subjects of mouse picking process.
|
||||
[b]Note:[/b] The number of simultaneously pickable objects is limited to 64 and they are selected in a non-deterministic order, which can be different in each picking process.
|
||||
|
||||
Reference in New Issue
Block a user