Update most demos for Godot 4.0.beta10 (#782)

This commit is contained in:
Hugo Locurcio
2023-01-05 16:50:17 +01:00
committed by GitHub
parent 85ca2fb2a1
commit 1d5184e235
758 changed files with 24258 additions and 9624 deletions

View File

@@ -1,4 +1,4 @@
extends RigidDynamicBody2D
extends RigidBody2D
var _initial_velocity = Vector2.ZERO
@@ -62,11 +62,11 @@ func _integrate_forces(state):
var normal = state.get_contact_local_normal(i)
# Detect floor.
if acos(normal.dot(Vector2.UP)) <= deg2rad(_floor_max_angle) + 0.01:
if acos(normal.dot(Vector2.UP)) <= deg_to_rad(_floor_max_angle) + 0.01:
_on_floor = true
# Detect ceiling.
if acos(normal.dot(-Vector2.UP)) <= deg2rad(_floor_max_angle) + 0.01:
if acos(normal.dot(-Vector2.UP)) <= deg_to_rad(_floor_max_angle) + 0.01:
_jumping = false
_velocity.y = 0.0