mirror of
https://github.com/godotengine/godot-demo-projects.git
synced 2026-01-06 07:50:22 +01:00
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:
@@ -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
|
||||
|
||||
@@ -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"]
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
class_name Player
|
||||
extends CharacterBody2D
|
||||
|
||||
@warning_ignore("unused_signal")
|
||||
signal coin_collected()
|
||||
|
||||
const WALK_SPEED = 300.0
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -184,6 +184,7 @@ splitscreen={
|
||||
|
||||
common/physics_ticks_per_second=120
|
||||
2d/default_gravity=2100
|
||||
common/physics_interpolation=true
|
||||
|
||||
[rendering]
|
||||
|
||||
|
||||
Reference in New Issue
Block a user