2
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?

[Teleport] UnrealのPIE等でプレイヤーをテレポート [BugItGo]

Posted at

概要

プレイヤーを任意の位置に瞬間移動させるコンソールコマンドを紹介します。

Teleportは照準を合わせた場所に瞬間移動します。
BugItGoは、任意の座標に瞬間移動します。
ButItGoを使うと空中に浮いたままになりますが、Walkコマンドで着地できます。

ShowDebug CAMERAコマンドで現在位置を座標値で表示できるので、合わせて使うと便利です。

Teleport

引数をとらないコマンドです。
カメラが向く方向に対しLineTraceSingleByChannelしてヒットした場所にテレポートします。

Untitled video - Made with Clipchamp.gif

Third Personサンプルでは、仕組み上カメラは常にプレイヤーキャラの腰骨を見ているので、腰骨で照準をあわせると考えると狙った場所に行きやすいです。

BugItGo

引数として座標値と回転値を取るため、自由な位置にテレポートできます。

Untitled video - Made with Clipchamp (1).gif

X Y Z Pitch Yaw Rollの順に6つの引数をとります。

> BugItGo 100 200 500 0 90 0

もしくは、回転値を省略して、以下のように入力してもOKです。

> BugItGo 0 0 1000

瞬間移動後は宙に浮いたままになるので、Walkコマンドで着地します。

2
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
2
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?