mirror of
https://github.com/godotengine/godot-demo-projects.git
synced 2026-01-06 16:00:08 +01:00
Enable physics interpolation in all 3D demos (#1074)
This makes use of the new built-in 3D physics interpolation added in Godot 4.4.
This commit is contained in:
@@ -11,6 +11,10 @@ func _physics_process(delta: float) -> void:
|
||||
# Pressed the reset key or fell off the ground.
|
||||
position = start_position
|
||||
linear_velocity = Vector3.ZERO
|
||||
# We teleported the player on the lines above. Reset interpolation
|
||||
# to prevent it from interpolating from the old player position
|
||||
# to the new position.
|
||||
reset_physics_interpolation()
|
||||
|
||||
var dir := Vector3()
|
||||
dir.x = Input.get_axis(&"move_left", &"move_right")
|
||||
|
||||
@@ -84,6 +84,7 @@ exit={
|
||||
|
||||
common/physics_ticks_per_second=120
|
||||
3d/default_gravity=13.0
|
||||
common/physics_interpolation=true
|
||||
|
||||
[rendering]
|
||||
|
||||
|
||||
Reference in New Issue
Block a user