のぼるゲーム開発備忘録

ゲーム開発のプログラマーです。ゲーム開発関連、調べた内容をアップしていきます。Unityを使用して個人開発を行っています。

【Unity】アセット紹介-Third Person Controller

はじめに

以前購入していたバージョンは使用できなくなっていたので、新しく買い直しました。
デモを中心に挙動を確認した際の備忘録と気になる点をまとめました。

確認環境

・Unity 2021.3.15f1

・Third Person Controller 3.0.4

 

初期設定

インストール

Installを選択します。

セットアップ

Update Buttons and Layersを選択します。
レイヤーと入力の設定が行われます。

The default button mapping or layers have not been added. If you are just getting started you should update the button mappings and layers with the button below. This can be changed later.

<翻訳>デフォルトのボタンマッピングやレイヤーは追加されていません。これから始める方は、下のボタンでボタンマッピングとレイヤーを更新してください。これは後で変更することができます。

設定されたレイヤー

デモの確認

デモの場所

Assets/Opsive/UltimateCharacterController/Demo/Demo.unity

デモ起動時にTextMeshProのインポート確認が出ましたのでImport TMP Essentialsを選択し×で閉じます。

デモ画面トップに説明がついています。

Demo scene uses the built-in render pipeline and TextMesh Pro.
Bake the lightmaps to light up the scene.


Import errors? The documentation explains how to fix:
https://opsive.com/support/documentation/ultimate-character-controller/getting-started/importing/

<翻訳>

デモシーンでは、内蔵のレンダーパイプラインとTextMesh Proを使用しています。
ライトマップをベイクして、シーンをライトアップします。


インポートエラー?ドキュメントで修正方法が説明されています。
https://opsive.com/support/documentation/ultimate-character-controller/getting-started/importing/

デモ確認

初期画面は各デモへのリンクになっています。

デモ操作方法
操作 説明
Esc デモ選択に戻る

WASD

移動

マウスドラッグ

視点操作

左Shift

 

ダッシュ

左マウス

左Ctrl

右パンチ→左パンチ→回し蹴り
Escキー デモ選択に戻る

コントローラー操作のヘルプがあります。

私の手元のXBoxコントローラーではダッシュの操作が行えませんでした。

デモ共通

ゲートに入るとチュートリアル選択に戻る

Locomotion

The core controller features a cool, tweakable motor and determinstic kinematic physics simulation. This allows for ultra smooth movement with infinite movement possibilities.

<翻訳>コアとなるコントローラーには、クールで微調整可能なモーターと決定論的な運動学的物理シミュレーションが搭載されています。これにより、無限の動きの可能性を秘めた超スムーズな動きを実現します。

高いところから落ちると落下ダメージを受ける

Dynamic Gravity

This is where it gets really fun. The character controller allows for gravity directional changes giving your character the flexibility to walk around a planet.

<翻訳>ここが面白いところです。キャラクターコントローラーで重力の方向を変えられるので、キャラクターが惑星を自由に歩き回ることができます。

Character Switch

Seamlessly switch character models at runtime. The controller natively supports any number of character models.

<翻訳>ランタイムにシームレスにキャラクタモデルを切り替えられます。コントローラは、任意の数のキャラクタモデルをネイティブでサポートします。

Shooter

Shootable weapons use the modular item system which allow your character to damage their enemy with hitscan or projectile bullets. The same scripts can be used for weapons such as a bow and arrow or dual wield pistols.

<翻訳>射撃可能な武器は、モジュラーアイテムシステムを使用しており、キャラクターがヒットスキャンや投射弾で敵にダメージを与えることができます。弓矢や二丁拳銃などの武器にも同じスクリプトを使用することができます。

パネルでシチュエーション選択

武器交換

落ちている武器を拾って装備

エイムアシスト

アシストを有効にすると近くのターゲットの頭に吸い付くようになる

Assault Rifle-アサルトライフル

Single Pistol-ピストル

Dual Pistol-両手持ちピストル

左クリックで左ピストル、右クリックで右ピストル

ロックオンはできない

Bow-弓

Roket Launcher-ロケットランチャー

Shotgun-ショットガン

Sniper-スナイパーライフル

Frag Grenade-グレネード

Melee

Melee weapons give your character the ability to attack short range targets. The melee weapon system is flexible allowing for a variety of melee weapon types, including a two handed sword attack or punching and kicking.

<翻訳>近接武器は、キャラクターが近距離のターゲットを攻撃する能力を提供します。近接武器システムは柔軟性があり、両手剣による攻撃やパンチやキックなど、様々な近接武器タイプを使用できます。

Sword-剣

攻撃順 右→左→回転切り→...

コンボ機能は無しで、攻撃した順番に切り替わる

左が最後の攻撃の場合は次の攻撃は、回転切りになる

ジャンプ攻撃は切り下ろし

Katana-刀

攻撃順 右→左→回転切り→...

コンボ機能は無しで、攻撃した順番に切り替わる

Knife-ナイフ

攻撃順 右→左→...

コンボ機能は無しで、攻撃した順番に切り替わる

ジャンプ攻撃は切り下ろし、判定はかなりシビアでエイムサポート無しでは当たり辛い

Shield-盾

剣を盾でガード、攻撃を弾き返す動作は無し

Sword & Shield-剣盾

攻撃動作は剣と同じ

Body-拳

攻撃順 右→左→回転切り→...

コンボ機能は無しで、攻撃したら順番に切り替わる

Magic

Magic items are a versitile type of action that allow your character to cast spells. Different spell varieties can be created by combining magic modules on the item.

<翻訳>マジックアイテムは、キャラクターが呪文を唱えることができる汎用性の高いアクションの一種です。アイテムに搭載されたマジックモジュールを組み合わせることで、さまざまな呪文の種類を作り出すことができます。

Fireball-ファイアボール

Heal-ヒール

緑色の味方が回復対象

Particle Stream-照射型

押しっぱなしで続けて攻撃でる、照射中は方向変更可能

ロックオン状態になると対象から動かせない

攻撃終了時気になる動きしている

Ricochet-巻き込み型

敵に攻撃が当たった際に周りの敵にも攻撃が当たる

Shield Bubble-バブルシールド

Teleport-テレポート

Throwable

Throwable items can be used to throw any type of object, such as grenades. A trajectory curve can be drawn to the screen allowing you to see the path of the throw.

<翻訳>投擲可能なアイテムは、手榴弾などあらゆるものを投げることができる。画面上に軌跡を描くことができ、投げる際の軌道を確認することができます。

Grenade

狙いを絞った状態で軌跡を確認できる

エフェクトと効果範囲は調整が必要そう

Flashlight

The flashlight is a genric modular item which turns on and off a light source.

<翻訳>フラッシュライトは、光源を点灯・消灯するジェネリックモジュールのアイテムです。

クリックでライトのON/OFF

手が壁に触れるとライトが自動的に消える

Moving Platforms

The character will stay on moving platforms, no matter what speed the platforms are moving at. This can be combined with the dynamic gravity abilities allowing your character to rotate upside down with the platform.

<翻訳>プラットフォームがどのような速度で移動していても、キャラクターは移動するプラットフォーム上に留まります。これは、ダイナミックグラビティ能力と組み合わせることで、キャラクターがプラットフォームと一緒に逆さまに回転することを可能にします。

床が早すぎるためか落ちるときがある

Drive

The Drive ability works with vehicle controllers and allows your character to drive any type of vehicle. The ability was created with extensibility in mind enabling integration with other vehicle controllers.

<翻訳>ドライブ機能は、ビークルコントローラーと連動し、キャラクターがあらゆるタイプの乗り物を運転できるようにします。このアビリティは、他の乗り物コントローラーとの統合を可能にする拡張性を念頭に置いて作成されています。

車の操作は慣れが必要、スピードを出したまま曲がろうとするとスリップする

後ろ入力でバック

運転席の横まで移動してから乗るのですが、反対側、後ろから乗るときは挙動が怪しいです。

Ride

The Ride ability allows your character to ride other character controllers. In this zone the horse is controlled by the Ultimate Character Controller.

<翻訳>ライド能力は、自分のキャラクターが他のキャラクターコントローラーに乗ることができる能力です。このゾーンでは、馬はアルティメットキャラクターコントローラーで操作します。

馬は左右どちらからでも乗馬できる

左側の可動域は広め、右側の可動域がほぼ無い

動画は左右限界まで入力をいれています

IK

Inverse Kinematics can be used allowing your character to accurately place their limbs on other surfaces.

<翻訳>インバースキネマティクスを使用することで、キャラクターの手足を正確に他の表面に配置することができます。

Interact

An extremely extensible ability system is included allowing for new functionality without having to change the core character controller code. In this zone  the Interact ability allows the character to open a door, open a treasure chest, or press a button.

<翻訳>非常に拡張性の高いアビリティシステムを搭載しており、キャラクターのコアとなるコントローラーコードを変更することなく、新たな機能を実現することができます。このゾーンでは、「扉を開ける」「宝箱を開ける」「ボタンを押す」といった能力を持つ「インターアクト」が登場します。

左側の扉は開けた後、中に入るまで一連の動作になっている

Third Person Movement Types

The Third Person Movement Types allow your character to move in an Adventure, Combat, RPG, 2.5D, Top Down, or Point & Click style.

<翻訳>三人称視点の移動タイプでは、アドベンチャー、コンバット、RPG、2.5D、トップダウン、ポイント&クリックのスタイルでキャラクターを移動させることができます。

アドベンチャー

The Adventure type allows the character to freely move in any direction independent of the camera direction.

<翻訳>アドベンチャータイプは、カメラの向きに関係なく、キャラクターが自由に動き回ることができます。

コンバット

The Combat type will keep the character facing in the direction of the camera.

<翻訳>コンバットは、キャラクターがカメラの方向を向いたままになります。

RPG

The RPG type uses the movement and view mechanics for RPG games. The character can turn with the A and D button, auto move with the F button, and free rotate with the middle mouse button.

<翻訳>RPGタイプは、RPGゲームの移動と視界の仕組みを使っています。キャラクターはAボタンとDボタンで旋回、Fボタンで自動移動、マウス中ボタンで自由回転が可能です。

2.5D

The 2.5D type allows your character to move with a 2.5D camera. The character can optionally move along a specified path.

<翻訳>2.5Dタイプは、2.5Dカメラでキャラクターを移動させることができます。オプションで指定した経路に沿ってキャラクターを移動させることができます。

トップダウン

Top Down characters will move with the camera overhead. The Object Fader component will optionally fade any objects that would otherwise obstruct the view the character.

<翻訳>トップダウンのキャラクターは、カメラの俯瞰に合わせて動きます。オブジェクトフェーダーコンポーネントは、オプションでキャラクタの視界を遮るようなオブジェクトをフェードさせます。

ポイントクリック

Point & Click will use pathfinding to the move the character to the position clicked on by the cursor or finger.

ポイント&クリックは、カーソルや指でクリックした位置にキャラクターを移動させるパスファインディングを使用します。

Effects

The Effects System allows the character to play localized effects such as a camera shake or boss stomp. Step on the pad to play each effect.

<翻訳>エフェクトシステムとは、キャラクターが手振れやボスを踏みつけるなど、局所的な効果を奏でることができるシステムです。パッドを踏むと各エフェクトが再生されます。

SHAKE

This effect will shake the camera, item, or character based on a specified force.

<翻訳>指定した力に応じてカメラやアイテム、キャラクターを揺らすエフェクトです。

BOSS STOMP

This effect will shake the camera similar to how  a large boss would shake the camera as they  are stomping on the ground

<翻訳>このエフェクトは、大型のボスを撮影する際にカメラが揺れるのと同じような効果があります。

PLAY AUDIO CLIP

This effect will play an audio clip, perfect for the one off audio clips

<翻訳>このエフェクトは、オーディオクリップを再生します。

Die & Revive

The Die and Ragdoll abilities allow for death effects through dynamic ragdoll physics or a precreated death animation. The character can then respawn or pick themself up with the Revive ability.

<翻訳>DieとRagdollアビリティは、ダイナミックなラグドール物理学や事前に作成されたデスアニメーションによるデスエフェクトが可能です。その後、キャラクターはRespawnするか、Reviveアビリティで自身を復活させることができます。

Mirros & Split Screen

Mirrors will render the full body character in either a first or third person perspective. Multiple characters can be used by multiple players for a Split Screen mode.

<翻訳>ミラーズは、一人称視点または三人称視点のどちらかで全身キャラクターをレンダリングします。複数のキャラクターを複数のプレイヤーで使用するSplit Screenモードが可能です。

Surface System

The Surface System is responsible for spawning effects caused by collisions and impacts. It is designed to be dynamic, powerful, and useful in a broad range of possible physics situations.

<翻訳>サーフェスシステムは、衝突や衝撃によって生じるエフェクトを生み出す役割を担っています。ダイナミックでパワフル、そして様々な物理現象に対応できるように設計されています。

Virtual Controls

The Ultimate Character Controller is extremely well optimized and designed to run on mobile devices. Mobile controls are included within the asset, or you can use a dedicated mobile input asset.

<翻訳>究極のキャラクターコントローラーは、モバイルデバイスで動作するように非常によく最適化され、設計されています。モバイルコントロールはアセット内に含まれていますが、専用のモバイル入力アセットを使用することも可能です。

States

The Ultimate Character Controller components use an extremely useful state system which allows you to easily change the component values at runtime using a set of presets. Most of this demo was created using the state system.

<翻訳>Ultimate Character Controllerのコンポーネントは、非常に便利なステートシステムを使用しており、プリセットのセットを使用して、実行時にコンポーネントの値を簡単に変更することができます。このデモのほとんどは、このステート・システムを使って作成されています。

気になる挙動

ジャンプ攻撃で地面につかない場合固まる

カメラ操作は可能ですが、移動などは行えない

剣、刀、ナイフで確認

ナイフの当たり判定が怪しい

設定でどうにかなるのか要確認が必要

足元への照射攻撃、終わり際

実装時は範囲の制限設定は必要

終わり際手に持ったようになっている、こちらも対応が必要

壁際でのジャンプで詰まりを感じる

挙動としては間違っていないかもしれませんが、これは飛び越えて欲しいと感じています

おわりに

多少気になるところはありますが、通常の攻撃の他、魔法攻撃や宝箱を開けるや、乗り物に乗ったりと機能が豊富でぜひともモノにしたいアセットだと感じています。
実装スクリプトC#で触れるようになっていますので拡張や改造もできそうです。
通信を挟んだマルチプレイと共存ができるかどうか気になっています。

今後調べていきたいと思います。

関連アセット

Ultimate Character Controller

UFPS: Ultimate FPS と Third Person Controller がセットになったフル版のアセット

UFPS: Ultimate FPS

今回紹介したアセットの一人称視点版のアセット