20 lines
468 B
GDScript
20 lines
468 B
GDScript
extends PlayerState
|
|
class_name PlayerClamber
|
|
|
|
var clamber_point
|
|
|
|
func Enter():
|
|
clamber_point = character.get_clamber_point()
|
|
|
|
func Physics_Update(delta):
|
|
character.velocity = Vector3.ZERO
|
|
|
|
character.global_position.y = lerp(character.global_position.y,clamber_point.y,delta * 2)
|
|
|
|
if Input.is_action_just_pressed("jump"):
|
|
jump_with_weight_mod()
|
|
Transitioned.emit(self,"in air")
|
|
|
|
if Input.is_action_just_pressed("crouch"):
|
|
Transitioned.emit(self,"in air")
|