raycast and fun
This commit is contained in:
parent
d4d1fb6463
commit
bb702a88f0
4 changed files with 92 additions and 30 deletions
|
@ -31,6 +31,14 @@ func _unhandled_input(event: InputEvent) -> void:
|
|||
|
||||
func _physics_process(delta: float) -> void:
|
||||
if Input.is_action_just_pressed(&"jump"): jumping = true
|
||||
#Touch
|
||||
if Input.is_action_just_pressed("touch"):
|
||||
print("touch")
|
||||
%AnimationPlayer.play("touch")
|
||||
#Look
|
||||
if %RayCast3D.is_colliding():
|
||||
print(%RayCast3D.get_collider())
|
||||
|
||||
if mouse_captured: _handle_joypad_camera_rotation(delta)
|
||||
velocity = _walk(delta) + _gravity(delta) + _jump(delta)
|
||||
move_and_slide()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue