Skip to content

Commit 7befd7c

Browse files
authored
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.
1 parent 90617ba commit 7befd7c

File tree

30 files changed

+128
-420
lines changed

30 files changed

+128
-420
lines changed

2d/dynamic_tilemap_layers/project.godot

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,7 @@ move_right={
6363

6464
common/physics_ticks_per_second=120
6565
2d/default_gravity=500
66+
common/physics_interpolation=true
6667

6768
[rendering]
6869

2d/dynamic_tilemap_layers/world.tscn

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@ script = ExtResource("2_q8fhk")
3434

3535
[node name="Camera2D" type="Camera2D" parent="."]
3636
offset = Vector2(265, 247)
37+
process_callback = 0
3738

3839
[node name="Player" parent="." instance=ExtResource("3")]
3940
position = Vector2(120, 456)

2d/finite_state_machine/Demo.tscn

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,7 @@ libraries = {
4545
}
4646

4747
[node name="StateNameDisplayer" parent="Player" index="5"]
48+
physics_interpolation_mode = 1
4849
theme_override_fonts/font = ExtResource("2_r1c5f")
4950

5051
[node name="Explanations" type="RichTextLabel" parent="."]

2d/finite_state_machine/player/bullet/bullet_spawner.gd

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,6 @@ func fire() -> void:
1313

1414
$CooldownTimer.start()
1515
var new_bullet := bullet.instantiate()
16-
add_child(new_bullet)
1716
new_bullet.position = global_position
1817
new_bullet.direction = owner.look_direction
18+
add_child(new_bullet)

2d/finite_state_machine/project.godot

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -98,6 +98,7 @@ attack={
9898
[physics]
9999

100100
common/physics_ticks_per_second=120
101+
common/physics_interpolation=true
101102

102103
[rendering]
103104

2d/hexagonal_map/project.godot

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,7 @@ move_up={
6464
[physics]
6565

6666
common/physics_ticks_per_second=120
67+
common/physics_interpolation=true
6768

6869
[rendering]
6970

2d/hexagonal_map/troll.tscn

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,3 +25,4 @@ position = Vector2(3.24216, 19.453)
2525
shape = SubResource("1")
2626

2727
[node name="Camera2D" type="Camera2D" parent="."]
28+
process_callback = 0

2d/instancing/project.godot

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ window/stretch/aspect="expand"
3131

3232
common/physics_ticks_per_second=120
3333
2d/default_gravity=300
34+
common/physics_interpolation=true
3435

3536
[rendering]
3637

2d/instancing/scene_instancing.tscn

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -101,3 +101,4 @@ physics_material_override = SubResource("10")
101101

102102
[node name="Camera2D" type="Camera2D" parent="."]
103103
offset = Vector2(576, 324)
104+
process_callback = 0

2d/isometric/player/goblin.tscn

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1916,6 +1916,7 @@ rotation = 1.5708
19161916
shape = SubResource("1")
19171917

19181918
[node name="Camera2D" type="Camera2D" parent="."]
1919+
process_callback = 0
19191920

19201921
[node name="LightOccluder2D" type="LightOccluder2D" parent="."]
19211922
visible = false

0 commit comments

Comments
 (0)