19 lines
488 B
GDScript
19 lines
488 B
GDScript
extends PlayerState
|
|
class_name PlayerClamber
|
|
|
|
var clamber_point
|
|
|
|
func Enter():
|
|
clamber_point = character.get_clamber_point()
|
|
character.standing_collision.disabled = true
|
|
character.crouching_collision.disabled = true
|
|
|
|
func Physics_Update(delta):
|
|
character.velocity = Vector3.ZERO
|
|
character.global_position = clamber_point + Vector3(0,1,0)
|
|
Transitioned.emit(self,"on foot")
|
|
|
|
func Exit():
|
|
character.standing_collision.disabled = false
|
|
character.crouching_collision.disabled = false
|