Enable physics interpolation in all 2D demos (#1070)

This makes uses of the new built-in 2D physics interpolation
added in 4.3.

For 3D demos, a separate PR requiring `master` will be made later.
This commit is contained in:
Hugo Locurcio
2025-04-14 18:58:38 +02:00
committed by GitHub
parent 90617ba1e8
commit 7befd7c718
30 changed files with 134 additions and 426 deletions

View File

@@ -12,7 +12,9 @@ script = ExtResource("2")
[node name="Level" parent="." instance=ExtResource("3")]
[node name="Player" parent="Level" instance=ExtResource("4")]
position = Vector2(90, 546)
z_index = 3
position = Vector2(90, 636.5)
scale = Vector2(1, 1)
[node name="InterfaceLayer" type="CanvasLayer" parent="."]
layer = 100

View File

@@ -55,13 +55,17 @@ render_target_update_mode = 4
[node name="Player1" parent="Black/SplitContainer/ViewportContainer1/Viewport1" instance=ExtResource("4_8j0va")]
unique_name_in_owner = true
modulate = Color(1, 1.5, 2.5, 1)
position = Vector2(90, 546)
z_index = 3
position = Vector2(100, 636.5)
scale = Vector2(1, 1)
action_suffix = "_p1"
[node name="Player2" parent="Black/SplitContainer/ViewportContainer1/Viewport1" instance=ExtResource("4_8j0va")]
unique_name_in_owner = true
modulate = Color(3, 1, 1, 1)
position = Vector2(120, 546)
z_index = 3
position = Vector2(160, 636.5)
scale = Vector2(1, 1)
action_suffix = "_p2"
[node name="ViewportContainer2" type="SubViewportContainer" parent="Black/SplitContainer"]

View File

@@ -1,6 +1,7 @@
class_name Player
extends CharacterBody2D
@warning_ignore("unused_signal")
signal coin_collected()
const WALK_SPEED = 300.0

View File

@@ -205,6 +205,7 @@ position = Vector2(0, -14)
texture = ExtResource("9")
hframes = 8
vframes = 8
frame = 42
[node name="Gun" type="Marker2D" parent="Sprite2D"]
position = Vector2(14, 1)
@@ -226,6 +227,7 @@ libraries = {
[node name="Camera" type="Camera2D" parent="."]
position = Vector2(0, -28)
offset = Vector2(0, 50)
process_callback = 0
limit_left = -715
limit_top = -250
limit_right = 1425

View File

@@ -184,6 +184,7 @@ splitscreen={
common/physics_ticks_per_second=120
2d/default_gravity=2100
common/physics_interpolation=true
[rendering]