extends Node3D

@export var physicsBody: PhysicsBody3D
func playerHit() -> void:
	pass
	
func moveObsticle(moveDistance: float) -> void:	
	position.z -= moveDistance
	
func _physics_process(delta: float) -> void:
	if is_instance_valid(physicsBody):		
		var hasCollision = physicsBody.move_and_collide(Vector3(0,0,-1), true)
		if hasCollision:
			if hasCollision.get_collider().has_meta("isPlayer"):
				playerHit()
