1
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 1 year has passed since last update.

[UnrealEngine5]ダッシュ機能

Last updated at Posted at 2024-03-30

概要

Enhanced Input機能でShiftキーが押されている間プレイヤーがダッシュする機能を実装します。
合わせてTimeline機能を使って速度がなだらかに変化するようにします。

本文

今回はファーストパーソンテンプレートで新規作成してプレイヤーキャラにダッシュ機能を追加しました。

Enhanced InputでShiftキーを設定

Input Mapping Context
スクリーンショット 2024-03-30 211624.png

Input Action
スクリーンショット 2024-03-30 211526.png

プレイヤーキャラのブループリント(今回はBP_FirstPersonCharacter)を変更

Event BeginPlayでプレイヤーの初期速度を設定
スクリーンショット 2024-03-30 211402.png
Shiftキーをトリガーにして速度を変更します。
スクリーンショット 2024-03-30 211410.png
タイムラインを設定。時間0の値は0で最後の時間で1に設定します。
スクリーンショット 2024-03-30 211428.png

1
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?