[過去ログ] 【ゲームエンジン】Godot Engine (1002レス)
前次1-
抽出解除 必死チェッカー(本家) (べ) 自ID レス栞 あぼーん

このスレッドは過去ログ倉庫に格納されています。
次スレ検索 歴削→次スレ 栞削→次スレ 過去ログメニュー
800: 2020/07/02(木)13:39 ID:kDnXyHP9(1/3) AAS
extends KinematicBody2D

func _process(delta):
var velocity = Vector2()
var speed = 400

if Input.is_action_pressed("ui_right"):
velocity.x += 1
if Input.is_action_pressed("ui_left"):
velocity.x -= 1
if Input.is_action_pressed("ui_down"):
velocity.y += 1
if Input.is_action_pressed("ui_up"):
velocity.y -= 1

if Input.is_action_pressed("ui_accept"):
speed = 200

if velocity.length() > 0:
velocity = velocity.normalized() * speed

position += velocity * delta

これで上と右とシフト押せば右斜め上方向にゆっくり移動すると思うんだけどそれができない
シフトの代わりにスペースとかエンター押すとできる
801: 2020/07/02(木)13:42 ID:kDnXyHP9(2/3) AAS
それ以外の7方向には動ける
803: 2020/07/02(木)16:18 ID:kDnXyHP9(3/3) AAS
>>802
そうそう
ハードウェアの問題なのか
前次1-
スレ情報 赤レス抽出 画像レス抽出 歴の未読スレ

ぬこの手 ぬこTOP 0.037s