Регулируемый прыжок в ГОДОТ4 как в Undertale --Урок 4#godot #tutorial #undertale #howto #каксделать

7 подписчиков

12+
12+

3 просмотра

23 дня назад

ПожаловатьсяНарушение авторских прав

7 подписчиков

12+
12+

3 просмотра

23 дня назад

ПожаловатьсяНарушение авторских прав
12+
12+

3 просмотра

23 дня назад

Привет надеюсь МОИ ШУТКИ ТЕБЯ РАЗВЕСИЛИЛИ!!!! --------------------------------------------------------------------------------------------------------------------------- Код из видео: @export var JUMP_VELOCITY = -450.0 @export var GRAVITY = 100.0 @export var RELEASE_MULTIPLIER = 0.1 const SPEED = 200.0 func _ready() -˃ void: add_to_group("player") func _physics_process(delta: float) -˃ void: if not is_on_floor(): velocity.y += GRAVITY * delta if Input.is_action_just_pressed("w") and is_on_floor(): velocity.y = JUMP_VELOCITY if Input.is_action_just_released("w") and velocity.y ˂ 0: velocity.y *= RELEASE_MULTIPLIER move_and_slide() if not is_on_floor(): velocity += get_gravity() * delta if Input.is_action_just_pressed("w") and is_on_floor(): velocity.y = JUMP_VELOCITY var direction := Input.get_axis("a", "d") if direction: velocity.x = direction * SPEED else: velocity.x = move_toward(velocity.x, 0, SPEED) move_and_slide() --------------------------------------------------------------------------------------------------------------------------- В коде ЕСЛИ ОШЫБКА ТО ЗАМЕНИ ЭТО ˃, ˂ НА МАЛЕНИКИЙ АНАЛОГ!!!!!!!!!!!

Название:

Регулируемый прыжок в ГОДОТ4 как в Undertale --Урок 4#godot #tutorial #undertale #howto #каксделать

Категория:

Разное