JP7672888B2 - Game program, information processing device, and camera control method - Google Patents
Game program, information processing device, and camera control method Download PDFInfo
- Publication number
- JP7672888B2 JP7672888B2 JP2021095263A JP2021095263A JP7672888B2 JP 7672888 B2 JP7672888 B2 JP 7672888B2 JP 2021095263 A JP2021095263 A JP 2021095263A JP 2021095263 A JP2021095263 A JP 2021095263A JP 7672888 B2 JP7672888 B2 JP 7672888B2
- Authority
- JP
- Japan
- Prior art keywords
- virtual camera
- camera
- height
- virtual
- control unit
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Active
Links
- 238000000034 method Methods 0.000 title claims description 35
- 230000010365 information processing Effects 0.000 title claims description 31
- 238000012545 processing Methods 0.000 claims description 26
- 230000004044 response Effects 0.000 claims description 9
- 238000013459 approach Methods 0.000 claims description 8
- 230000008569 process Effects 0.000 claims description 8
- 238000001514 detection method Methods 0.000 claims 3
- 230000003247 decreasing effect Effects 0.000 claims 1
- 238000010586 diagram Methods 0.000 description 29
- 230000006870 function Effects 0.000 description 6
- 230000008859 change Effects 0.000 description 4
- 230000005484 gravity Effects 0.000 description 4
- 230000003287 optical effect Effects 0.000 description 4
- 238000004891 communication Methods 0.000 description 3
- 230000000694 effects Effects 0.000 description 3
- 230000007423 decrease Effects 0.000 description 2
- 201000003152 motion sickness Diseases 0.000 description 2
- 239000011435 rock Substances 0.000 description 2
- 238000012935 Averaging Methods 0.000 description 1
- 230000001133 acceleration Effects 0.000 description 1
- 238000013500 data storage Methods 0.000 description 1
- 238000005516 engineering process Methods 0.000 description 1
- 230000006872 improvement Effects 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
- 230000007935 neutral effect Effects 0.000 description 1
- 238000009877 rendering Methods 0.000 description 1
- 239000004065 semiconductor Substances 0.000 description 1
- 239000007787 solid Substances 0.000 description 1
- 230000009466 transformation Effects 0.000 description 1
Images
Landscapes
- Processing Or Creating Images (AREA)
Description
本発明は、ゲームプログラム、情報処理装置、及び、カメラ制御方法に関する。 The present invention relates to a game program, an information processing device, and a camera control method.
仮想空間(例えば仮想的な三次元空間)で移動するプレイヤーキャラクターや敵キャラクターなどのオブジェクトを仮想的な仮想カメラを視点とする画像に変換し、ディスプレイ等に表示するゲームプログラムが知られている。仮想カメラの制御方法の1つに、仮想カメラの注視点をプレイヤーキャラクターに合致させながら、仮想カメラをプレイヤーキャラクターに追従させて移動させる方法がある。これにより、ゲームプログラムは画像のほぼ中央に常にプレイヤーキャラクターを表示させることができる。 There is known a game program that converts objects such as player characters and enemy characters moving in a virtual space (for example, a virtual three-dimensional space) into an image with a virtual virtual camera as the viewpoint, and displays the image on a display or the like. One method of controlling the virtual camera is to move the virtual camera to follow the player character while aligning the virtual camera's gaze point with the player character. This allows the game program to always display the player character in approximately the center of the image.
プレイヤーキャラクターが壁などの障害物の近くに移動した場合、又は、プレイヤーの操作で仮想カメラが壁などの障害物の近くに移動した場合等、仮想カメラがプレイヤーキャラクターよりも障害物に近づく場合がある。この場合、仮想カメラが障害物と当たらないように、仮想カメラを上に移動する技術が知られている(例えば、特許文献1参照。)。特許文献1には、プレイヤーキャラクターが壁などの障害物の近くに移動した場合、仮想カメラを上に移動し、仮想カメラの注視点を変更する技術が開示されている。
When the player character moves close to an obstacle such as a wall, or when the player operates the virtual camera to move close to an obstacle such as a wall, the virtual camera may come closer to the obstacle than the player character. In such cases, a technique is known for moving the virtual camera up so that it does not collide with the obstacle (see, for example, Patent Document 1).
上記技術のように障害物の近くで適切に画像を写す方法が色々と考案されているが、なお、改善の余地がある。 Although various methods have been devised to capture images properly near obstacles, such as the technology mentioned above, there is still room for improvement.
本発明は、上記課題に鑑み、障害物の近くにおいて仮想カメラが適切な画像を写すことができるゲームプログラムを提供することを目的とする。 In view of the above problems, the present invention aims to provide a game program that enables a virtual camera to capture appropriate images near obstacles.
上記課題に鑑み、本発明は、情報処理装置を、仮想空間における仮想カメラと、前記仮想空間におけるオブジェクトのうち接触判定対象オブジェクトとの接触を判定する接触判定部と、前記オブジェクトのうち追従対象オブジェクトの動きに仮想カメラを追従させるカメラ制御部と、前記仮想カメラが撮影した画像データを生成する画像データ生成部、として機能させ、前記カメラ制御部は、閾値以下の高さの前記接触判定対象オブジェクトと接触した場合、前記仮想カメラの追従移動を行わず、前記仮想カメラの高さを高くさせ、前記閾値を超える高さの前記接触判定対象オブジェクトと接触した場合、前記仮想カメラの追従移動を行わず、前記仮想カメラの高さを低くさせる回避処理を行うプログラムを提供する。 In consideration of the above problems, the present invention provides a program that causes an information processing device to function as a virtual camera in a virtual space, a contact determination unit that determines contact with an object in the virtual space that is a target for contact determination, a camera control unit that causes the virtual camera to follow the movement of an object to be followed among the objects, and an image data generation unit that generates image data captured by the virtual camera, and the camera control unit performs avoidance processing such that, when contact is made with the object subject to contact determination that has a height equal to or less than a threshold, the virtual camera does not move to follow the object, but increases the height of the virtual camera, and when contact is made with the object subject to contact determination that has a height exceeding the threshold, the virtual camera does not move to follow the object, and decreases the height of the virtual camera .
障害物の近くにおいて仮想カメラが適切な画像を写せるゲームプログラムを提供することができる。 It is possible to provide a game program that enables the virtual camera to capture appropriate images near obstacles.
以下、本開示のゲームプログラムを実施するための形態について図面を参照して説明する。なお、本明細書及び図面において、実質的に同一の構成については、同一の符号を付することにより重複した説明を省く。 Below, a description will be given of an embodiment of the game program disclosed herein with reference to the drawings. Note that in this specification and the drawings, substantially identical configurations will be denoted by the same reference numerals to avoid redundant description.
本実施例では、仮想カメラを障害物の上に移動させることができる障害物の近くにおける仮想カメラの姿勢の制御方法(カメラ制御方法)について説明する。なお、本実施例では障害物の一例として壁を用いて説明する。 In this embodiment, a method for controlling the attitude of a virtual camera near an obstacle (camera control method) that can move the virtual camera onto the obstacle will be described. Note that in this embodiment, a wall will be used as an example of an obstacle.
<ゲームシステム>
まず、図1を参照して、ゲームシステムの構成例を説明する。図1は、本実施形態のゲームシステム1の構成を示す図である。ゲームシステム1は、情報処理装置3と、ゲームコントローラ5と、表示装置7とを有する。ゲームコントローラ5及び表示装置7の各々は、情報処理装置3と有線又は無線により通信可能に接続されている。
<Game System>
First, an example of the configuration of a game system will be described with reference to Fig. 1. Fig. 1 is a diagram showing the configuration of a
情報処理装置3は、例えば据え置き型のゲーム専用機である。但し、これに限定されるものではなく、情報処理装置3は、例えば入力部や表示部等を一体に備えた携帯型のゲーム機でもよい。 The information processing device 3 is, for example, a stationary game console. However, this is not limited to this, and the information processing device 3 may be, for example, a portable game console that is equipped with an input unit, a display unit, etc.
また、情報処理装置3はゲーム専用機でなくてよく、例えば、コンピュータ、デスクトップ型コンピュータ、ノート型コンピュータ、タブレット型コンピュータ等のように、コンピュータとして製造、販売等されているものや、スマートフォン、携帯電話、ファブレット等のように、電話機として製造、販売等されているものでもよい。これらの装置は、普段は汎用的な情報処理端末として利用されるが、プレイヤーがインストールされたゲームプログラムを実行すると、ゲーム専用機と同様、プレイヤーがゲームを進行できるようになる。 In addition, the information processing device 3 does not have to be a dedicated game machine, and may be, for example, a computer, desktop computer, notebook computer, tablet computer, etc. that is manufactured and sold as a computer, or a smartphone, mobile phone, phablet, etc. that is manufactured and sold as a telephone. These devices are usually used as general-purpose information processing terminals, but when a player executes the installed game program, the player can progress through the game just like a dedicated game machine.
情報処理装置3には、本実施形態のゲームプログラムがインストールされる。ゲームプログラムはCD-ROMなどの光記憶媒体やUSBメモリなどの半導体メモリに記憶された状態で配布されたり、サーバーからダウンロードされたりする形態で配布される。 The game program of this embodiment is installed in the information processing device 3. The game program is distributed in a state stored on an optical storage medium such as a CD-ROM or a semiconductor memory such as a USB memory, or is distributed by being downloaded from a server.
プレイヤーは、ゲームコントローラ5を用いて各種の操作入力を行う。図1に示す例では、ゲームコントローラ5は例えば十字キー9、複数のボタン8、及び、カメラ操作スティック6等を有する。なお、ゲームコントローラ5は上記に代えて又は加えて、例えばジョイスティックやタッチパッド等を有してもよい。また、ゲームコントローラ5がマイクを備え、音声操作が可能でもよい。ゲームコントローラ5がジャイロセンサや加速度センサ等を備え、プレイヤーがゲームコントローラ5の姿勢を変えることで操作が可能でもよい。
The player uses the
また、情報処理装置3が更にネットワーク上のサーバーと通信してもよい。この場合、同じゲームプログラムを実行する複数の情報処理装置3がサーバーに接続するので、いわゆるオンラインゲームが可能になる。オンラインゲームとは、例えば、多人数で同じゲームプログラムを協調して操作できるゲームをいう。オンラインゲームのサーバーは、他のプレイヤーの位置や操作コマンドを受け付け、他のプレイヤーの情報処理装置3に送信するという最低限の処理を行う。情報処理装置3は、各プレイヤーの描画や操作コマンドの反映処理など実際のゲーム処理を行う。 In addition, the information processing device 3 may further communicate with a server on the network. In this case, multiple information processing devices 3 executing the same game program connect to the server, making so-called online games possible. An online game is, for example, a game in which multiple players can operate the same game program in a cooperative manner. The server of an online game performs the minimum processing of accepting the positions and operation commands of other players and transmitting them to the information processing devices 3 of the other players. The information processing device 3 performs the actual game processing, such as drawing each player and reflecting the operation commands.
また、ゲームシステム1は、情報処理装置3が別の情報処理装置3と通信するいわゆるP2P(Peer To Peer)方式でもよい。
The
また、ゲームシステム1はいわゆるクラウドゲームでもよい。以下では、主に図1の構成を用いて本実施形態のゲームシステム1について説明する。
The
<情報処理装置のハードウェア構成例>
図2は、情報処理装置3のハードウェア構成図の一例である。図2に示すように、情報処理装置3は、例えば、CPU501と、ROM502と、RAM503と、GPU504と、例えばASIC又はFPGA等の特定の用途向けに構築された専用集積回路505と、入力装置506と、出力装置507と、記録装置508と、ドライブ509と、接続ポート510と、通信装置511を有する。これらの構成は、バス513や入出力インターフェース514等を介し相互に信号を伝達可能に接続されている。
<Example of hardware configuration of information processing device>
Fig. 2 is an example of a hardware configuration diagram of the information processing device 3. As shown in Fig. 2, the information processing device 3 includes, for example, a
ゲームプログラムは、例えば、ROM502やRAM503、記録装置508等に記録しておくことができる。
The game program can be recorded, for example, in
CPU501は、例えば、上記記録装置508からゲームプログラムを、直接読み出して実行してもよく、RAM503に一旦ロードした上で実行してもよい。更にCPU501は、例えば、ゲームプログラムを通信装置511やドライブ509、接続ポート510を介し受信する場合、受信したゲームプログラムを記録装置508に記録せずに直接実行してもよい。
The
また、CPU501は、必要に応じて、前述のゲームコントローラ5を含む、例えばマウス、キーボード、マイク等(図示せず)の入力装置506から入力する信号や情報に基づいて各種の処理を行ってもよい。
The
GPU504は、CPU501からの指示に応じて例えばレンダリング処理などの画像表示のための処理を行う。
The GPU 504 performs image display processing, such as rendering processing, in response to instructions from the
そして、CPU501及びGPU504は、上記の処理を実行した結果を、例えば前述の表示装置7や音声出力部を含む、出力装置507から出力する。CPU501及びGPU504は、必要に応じてこの処理結果を通信装置511や接続ポート510を介し送信してもよく、上記記録装置508や記録媒体512に記録させてもよい。
The
なお、サーバー又は汎用的な情報処理装置のハードウェア構成は、情報処理装置3と同様か、又は、異なっても本実施形態の説明の都合上、支障がないものとする。 The hardware configuration of the server or general-purpose information processing device may be the same as that of the information processing device 3, or may be different, but for the sake of convenience in explaining this embodiment, it will not cause any problems.
<機能について>
図3は、情報処理装置3の機能をブロック状に分けて説明する機能ブロック図の一例である。図3に示すように、情報処理装置3は、オブジェクト制御部31、画像データ生成部32、表示制御部33、接触判定部34、カメラ制御部35、及び、操作受付部36を有している。情報処理装置3が有するこれら各機能部は、図2に示したCPU501が、RAM503に展開されたゲームプログラムを実行することで実現される機能又は手段である。
<About the function>
Fig. 3 is an example of a functional block diagram for explaining functions of the information processing device 3 in blocks. As shown in Fig. 3, the information processing device 3 has an
まず、本実施形態では、仮想空間(例えば仮想的な三次元空間)に配置された仮想カメラがオブジェクトを撮影した画像が得られる。オブジェクトも三次元の立体物である。コンピュータグラフィックでは、三次元のオブジェクトはポリゴン(又は三次元点の集まり)で構成される。ポリゴンとは、3点以上の頂点を結んでできた多角形データであり、曲面を構成する最小単位である。オブジェクトデータ記憶部38には、各オブジェクトを形成するポリゴン、各オブジェクトの属性、及び、位置情報など、オブジェクトに関する情報が記憶されている。
First, in this embodiment, an image of an object is obtained by a virtual camera placed in a virtual space (for example, a virtual three-dimensional space). The object is also a three-dimensional solid object. In computer graphics, a three-dimensional object is composed of polygons (or a collection of three-dimensional points). A polygon is polygonal data formed by connecting three or more vertices, and is the smallest unit that composes a curved surface. The object
オブジェクト制御部31は、プレイヤーキャラクター(対象オブジェクトの一例。以下、PCという)を除くキャラクターの位置や挙動を制御する。例えば、位置は、キャラクターに応じて決められた範囲においてキャラクターの性質(敵、味方、役割など)に応じてフレームごとに更新される。また、キャラクターの位置は、ナビゲーションメッシュと呼ばれるメッシュ上をキャラクターの性質に応じて移動するように決定される。また、挙動は、例えば、攻撃する、話しかける、又は単に移動するなどであり、これもキャラクターの性質に応じてオブジェクト制御部31が決定する。
The
接触判定部34は、オブジェクト同士の接触を検出する。接触が判定されるオブジェクト同士には、PCと他のキャラクター、PCと地面に固定された地物(壁、岩、建物、植木など)、移動可能な物(家具、家電、ドアなど)、銃弾や魔法力などの飛翔体とPC(又は敵キャラクター)、仮想カメラと地物又は移動可能な物、など様々である。PCから所定範囲(PC4に影響しないほど遠いキャラクターはそもそも停止している)にある、オブジェクトは他のオブジェクトとの接触判定が行われる場合がある。本実施形態では、主に、仮想カメラと地物の接触判定について説明する。以下、地物を単に「障害物」という。
The
接触判定部34による接触の判定結果はオブジェクト制御部31に通知される。オブジェクト制御部31は、どのオブジェクトが何のオブジェクトに接触したかに応じて、オブジェクトを制御する。例えば、障害物のオブジェクトと仮想カメラが接触した場合、仮想カメラは、オブジェクトと接触した分だけオブジェクトとは反対方向に押し出される。「押し出し」に代えて、仮想カメラをオブジェクトの「表面で停止させる」でも良い。
The result of the contact determination by the
カメラ制御部35は、カメラ設定情報記憶部39に記憶されているカメラ設定情報に基づいて、仮想カメラの姿勢を制御する。詳細は図4にて説明する。
The
操作受付部36は、ゲームコントローラ5に対するプレイヤーからの操作を受け付ける。操作受付部36は、ゲームプログラム内で可能な操作であれば受け付けられるが、本実施形態では、主にPCの移動や仮想カメラの姿勢に関する操作を受け付ける。
The
画像データ生成部32は、仮想カメラを視点としたゲーム空間のオブジェクトを画像データに変換する。表示制御部33は、画像データ生成部32が生成した画像データを表示装置7に表示する。
The image
図4は、カメラ設定情報について説明する図の一例である。カメラ設定情報は、「状況」と「カメラの手動操作」に応じて、カメラ制御部35がカメラの姿勢をどのように制御するかを定義する。
Figure 4 is an example diagram explaining the camera setting information. The camera setting information defines how the
・「状況」は、仮想カメラの姿勢を制御する具体的な状況である。図4では、仮想カメラがスロープに接触したという状況が指定されている。 - "Situation" is the specific situation that controls the attitude of the virtual camera. In Figure 4, the situation is specified in which the virtual camera has come into contact with a slope.
・「カメラの手動操作」は、カメラ操作スティック6が操作されたか否かを示す。カメラ操作スティック6が操作された場合、原則はプレイヤーの手動操作が優先される。例外的に、全体の光景などプレイヤーに見せる必要があるような場面では、プレイヤーの手動操作よりも自動的なカメラ制御が優先される。
- "Manual camera operation" indicates whether the
・「ロックオン」は、プレイヤーがロックオンしたか否かを示す。ロックオンとは、PCと敵キャラクターの両方が画角に入るように自動的にカメラの姿勢が調整される状態をいう。なお、ロックオンは、カメラ操作スティック6の押下により開始するが、自動的に開始してもよい。
- "Lock-on" indicates whether the player has locked on or not. Lock-on refers to a state in which the camera's position is automatically adjusted so that both the PC and enemy character are in the field of view. Lock-on is initiated by pressing the
・「仮想カメラの姿勢」は、当該状況で仮想カメラの姿勢がどのように制御されるかを定義する。図4のカメラ設定情報(1行目)では、「状況」として仮想カメラ10が、スロープ13と接触した場合に、操作に応じて仮想カメラ10が円弧軌道に沿ってXおよびY軸座標方向に移動され、仮想カメラ10とPCとの距離に限界距離Lが設定されている。
- "Virtual camera attitude" defines how the attitude of the virtual camera is controlled in the situation. In the camera setting information (first line) of FIG. 4, when the
なお、本実施形態では、仮想カメラ10に2種類の高さ移動がある。
(i)円弧軌道に沿ったXおよびY軸座標方向の移動処理(X、Y、Zの各方向については図5参照)。プレイヤーがカメラ操作スティック6を操作してピッチングの変更を行う際はこの移動処理を用いる。
(ii) Y軸方向の単純な上下移動。本実施形態では、「高さ」と表現される。
In this embodiment, the
(i) Movement processing in the X and Y axis coordinate directions along a circular arc trajectory (see FIG. 5 for the X, Y, and Z directions). This movement processing is used when the player operates the
(ii) Simple up/down movement in the Y-axis direction, which is expressed as "height" in this embodiment.
また、ロックオン時(3行目)では、仮想カメラの高さ(Y軸方向の移動)がPCの高さに応じて調整され、ピッチング角が敵キャラクターの高さに応じて調整される。 Also, when locked on (line 3), the height of the virtual camera (movement along the Y axis) is adjusted according to the height of the PC, and the pitching angle is adjusted according to the height of the enemy character.
・「調整速度」は、仮想カメラ10の姿勢の制御にカメラ制御部35が費やすフレーム数である。例えば図4の3行目のNフレームはロックオンされていない状態からロックオンされた状態になるまでに、カメラ制御部35が費やす一般的なフレーム数である。Nフレームは例えば数フレームから数十フレームである。
- "Adjustment speed" is the number of frames the
<仮想カメラの姿勢>
図5は、仮想カメラ10の姿勢を説明する図である。仮想カメラ10の姿勢は、例えば、位置、注視点、及び、カメラの上方向により定まる。位置は、仮想空間内のX,Y,Z座標である。注視点41は、仮想カメラ10の光軸42がオブジェクト(図5ではPC4)と接触する点である。光軸42と接触するオブジェクトの存在は必須でなく、光軸42上の任意の点は注視点となりうる。カメラの上方向とは、仮想カメラ10を直方体とみなした場合に底面と上面に垂直な軸であって、底面から上面に向かう方向である。
<Virtual camera posture>
5 is a diagram for explaining the attitude of the
仮想カメラ10は、中立状態の仮想カメラ10に直交する3つの軸を中心に回転できる。各軸に対応した角度をヨー角β、ロール角α、及び、ピッチング角γという。本実施形態では、注視点41の制御について説明するが、この時、ピッチング角も変化する。したがって、注視点41を制御することでピッチング角が変わる場合があり、ピッチング角を制御することで注視点41が変わる場合がある。
The
PC4が単に移動するなどの状態では、カメラ制御部35は、PC4からの決まった距離だけ後方の決まった高さA[m]からPC4上の点を注視点41とするように仮想カメラ10を制御する(追従移動)。これに対し、スロープのある壁際など、予め定められている条件の下では、カメラ制御部35はカメラ設定情報記憶部39に記憶されているカメラ設定情報に基づいて仮想カメラ10の姿勢を制御する。
When PC4 is simply moving, the
また、カメラ制御部35は、ゲームコントローラ5に配置されたカメラ操作スティック6の操作に応じて、仮想カメラ10の姿勢を制御する。
The
図6は、プレイヤーによる仮想カメラ10の姿勢の操作を説明する図である。図6(a)はPC4を上面から見た上面図である。プレイヤーの操作に応じて、仮想カメラ10がPC4を中心に水平に360°回転する。回転しても、注視点はPC4に維持されるため、仮想カメラ10の画角には常にPC4が含まれる。
Figure 6 is a diagram explaining the operation of the attitude of the
図6(b)はPC4を側面から見た側面図である。仮想カメラ10は仮想空間に配置されているため、プレイヤーの操作に応じて、PC4を中心に垂直方向に一定角度回転する。一定角度とは、地面からPC4の天頂方向(又はその手前)などである。実施形態では、仮想カメラ10の姿勢が操作された場合、仮想カメラ10の注視点は、円弧の中心(PC4)に制御される。
Figure 6(b) is a side view of PC4. Since the
しかしながら、このように仮想カメラ10が仮想空間で移動できることは、周囲のオブジェクトと仮想カメラ10の接触を生じさせる場合がある。
However, being able to move the
<壁際における仮想カメラの姿勢の制御方法>
追従状態では、仮想カメラ10はPC4のある決まった距離だけ後方の高さA[m]からPC4の例えば腰を注視点とする。プレイヤーがゲーム空間のPC4を移動させる場合、PC4の移動に応じて、仮想カメラ10も移動する。このような仮想カメラ10の移動の仕方を追従移動という。仮想カメラ10とPCとの距離や高さA[m]は仮想カメラ10の画角が、好ましくはPC4の全体を含み、更に、PC4の周囲の状況をプレイヤーが確認できる程度の余裕を有するように決定されている。
<How to control the orientation of a virtual camera near a wall>
In the following state, the
なお、画角を大きくすれば、仮想カメラ10とPC4の相対的な位置関係に関わらず、画角に常にPC4や周囲の状況を含められる。しかし、画角が大きいと、画角に含まれるオブジェクトの数も多くなる。このため、画像生成(透視投影変換)の処理負荷が増大し、fps(flame per second)の低下の原因となる。
In addition, if the angle of view is increased, the
図7は、高さが閾値以下の壁際における仮想カメラ10の姿勢の制御方法を説明する図である。高さH[m]が閾値以下の壁12は、仮想カメラ10を壁12の上に移動させる余地のある障害物となる。本実施形態では、高さが閾値以下の壁12にスロープが配置されている。なお、例えば、追従状態の仮想カメラ10の高さA[m]よりも低い障害物(仮想カメラ10と接触するおそれがない)ではスロープがなくてよい。
Figure 7 is a diagram explaining a method for controlling the attitude of the
また、閾値は、スロープのふもとのPC4を壁12の上から適切なピッチング角で仮想カメラ10が見下ろした場合に、PC4が画角に入る程度の高さであることが好ましい。 仮想カメラ10を壁12の上に移動させる余地がある場合、仮想カメラ10が壁12に接触しても、カメラ制御部35は、仮想カメラ10を壁12の上に移動させることができる。
The threshold value is preferably set to a height that allows PC4 to be within the viewing angle when
しかし、カメラ制御部35が壁際で短時間に仮想カメラ10の高さを高くすると、プレイヤーが視認する画像が急に変化するため、酔いが生じるなどして興趣性等が低下するおそれがある。そこで、本実施例では、オブジェクト制御部31が壁12の上端からカメラ用のスロープ13(これは可視化されず透明である)を配置し、カメラ制御部35がスロープ13の面に沿って仮想カメラ10を移動させる。これにより、徐々にカメラの高さを高くすることができ、なめらかに画像が変化するため酔いが生じにくくなる。このスロープ13より内側に仮想カメラ10は移動できないが、PC4はスロープ13の内側に移動できる。すなわち、仮想カメラ10とスロープ13は衝突判定されるが、PC4とスロープ13は衝突判定されない。
However, if the
図7(a)はPC4が壁12に近づいたため、仮想カメラ10がスロープ13に接した状態を示す。スロープ13と仮想カメラ10が接触する状況は、例えばプレイヤーが壁12を背にしたPC4を後ずさりさせたり、プレイヤーが敵からの攻撃で強制的に移動したりした場合、又は、カメラ操作スティック6の操作により、仮想カメラ10が水平に回転しスロープ13と接触するような場合である。
Figure 7(a) shows a state in which the
接触判定部34がスロープ13と仮想カメラ10が接触したと判定すると、カメラ制御部35はスロープ13の内側に仮想カメラ10を移動させることができないので、仮想カメラ10をスロープ13の面に沿って移動させる。なお、スロープ13の面に沿って移動させる場合、仮想カメラ10の注視点は常にPC4に調整される。
When the
図7(b)は図7(a)よりもPC4が壁12に近づいたため、仮想カメラ10がスロープ13の低い位置からより高い位置に移動した状態を示す。PC4が壁12に近づいた分、仮想カメラ10も壁12に近づく。しかし、仮想カメラ10はスロープ13の内側に入れないので、PC4と仮想カメラ10の水平距離は図7(a)と同じだが、仮想カメラ10の高さが高くなっている。
Figure 7(b) shows a state in which PC4 is closer to wall 12 than in Figure 7(a), and
図7(c)は、PC4がスロープ13のふもとに達した状態の仮想カメラ10を示す。仮想カメラ10はスロープ13の面に沿って移動し、高さが壁12の上に達している。
Figure 7(c) shows the
図7のスロープを用いた仮想カメラ10の姿勢の制御は障害物回避処理の一例である。
Controlling the attitude of the
なお、図7では、スロープ13の角度Dが、壁12の高さH[m]と、仮想カメラ10とPC4との間の水平距離(PCからの決まった距離だけ後方)により定まっている。これは一例であって、スロープ13の角度は壁12の高さH[m]に関係なく一定でもよいし、壁12の高さH[m]が異なってもスロープの底辺の長さK[m]を一定にして、角度Dを変えてよい。
In FIG. 7, the angle D of the
<プレイヤーが仮想カメラの姿勢を操作した場合>
次に、プレイヤーが仮想カメラ10の姿勢を操作した場合を説明する。図6にて説明したように、プレイヤーはカメラ操作スティック6を操作して、仮想空間を垂直方向に仮想カメラ10を回転できる。しかし、仮想カメラ10は壁12及びスロープ13の内側に移動できない。したがって、図7(a)~(c)の状態で、プレイヤーが円弧軌道に沿ってXおよびY軸座標方向に仮想カメラ10を移動する操作をしても、仮想カメラ10はスロープ13の上を移動する。しかし、カメラ操作スティック6の操作時、仮想カメラ10は円弧の中心を注視点とするため、仮想カメラ10が下に操作されるほど、仮想カメラ10が見上げる角度になり、PC4が画角に入らなくなる。
<When the player manipulates the virtual camera's position>
Next, a case where the player operates the attitude of the
図8は、プレイヤーがカメラ操作スティック6で仮想カメラ10の姿勢を操作した場合の不都合を説明する図である。図8の壁12の上の仮想カメラ10は、カメラ操作スティック6の操作により、本来、点線の軌道43を移動する。しかし、仮想カメラ10はスロープ13によりPC側に押し出されるので、軌道43(円弧)の中心を注視点とした状態でスロープ13の上に存在する(仮想カメラ10a、10b)。仮想カメラ10bのピッチング角から分かるように、仮想カメラ10が円弧軌道に沿ってXおよびY軸座標方向に移動(主に下に移動)されるほど、仮想カメラ10が見上げる角度になり、PC4が画角に入りにくくなる。
Figure 8 is a diagram explaining the inconvenience that occurs when the player manipulates the attitude of the
そこで、本実施例では図9に示すように、プレイヤーが仮想カメラ10を円弧軌道に沿ってXおよびY軸座標方向に移動させる操作をしても、カメラ制御部35がPC4との限界距離L以内には仮想カメラ10を近づけない。限界距離Lはカメラ設定情報に設定されている。
In this embodiment, as shown in FIG. 9, even if the player performs an operation to move the
図9は、仮想カメラ10とPC4との間の限界距離Lを説明する図である。限界距離Lを設けると、プレイヤーはカメラ操作をPC4が画角に入る範囲でのみ行えるようになるため、PC4が画角から外れることを防止できる。
Figure 9 is a diagram explaining the limit distance L between the
なお、図9では、仮想カメラ10とPC4との間に限界距離Lが設定されているが、仮想カメラ10の高さに下限Cを設けてもよい。この場合も、同様の効果が得られる。
In FIG. 9, a limit distance L is set between the
<ロックオン時における仮想カメラの姿勢の制御>
次に、仮想カメラ10を上に移動させる余地がある壁における仮想カメラ10の姿勢の制御にスロープ13が使用された場合であって、敵キャラクター15がロックオンされた場合の仮想カメラ10の姿勢の制御方法を説明する。なお、ロックオン時の処理の詳細については図13,図14にて説明する。
<Controlling the virtual camera attitude when locked on>
Next, a method for controlling the attitude of the
図10は、ロックオン時の不都合を説明する図である。プレイヤーが敵キャラクターをロックオンする。例えば図7(c)の状況でPC4に向かって右側(図示なし)に敵キャラクター15が存在する場合に、ロックオンをしたとする。仮想カメラは現在の位置で敵キャラクターを画角に入れるため、ピッチング角γを調整する。そうすると、ピッチング角γは、スロープ13の頂上(壁の上)からPC4を写すように調整されていたときとは当然異なる角度(上向き)になり、PC4が映りにくくなる。図7(a)~(c)のような状況であれば、多少、ピッチング角γが上向きの角度に調整されてもPC4が画角に入る可能性はあるが、図10のようにPC4がスロープ13の内部に入っている状況であれば、確実に画角から外れてしまう。
Figure 10 is a diagram explaining inconveniences during lock-on. The player locks on to an enemy character. For example, let us assume that the player locks on to an enemy character when
そこで、ロックオン時、オブジェクト制御部31がスロープ13を削除する。スロープ13を削除したうえで、カメラ制御部35は、閾値以下の壁であっても閾値超の壁とみなし、実施例2と同様の処理を行う。
Therefore, when locking on, the
<動作手順>
図11は、カメラ制御部35が仮想カメラ10の姿勢を制御する手順を示すフローチャート図の一例である。図11の処理は、例えば、毎フレーム実行される。
<Operation procedure>
Fig. 11 is an example of a flowchart showing a procedure in which the
接触判定部34は仮想カメラ10とスロープ13が接触したか否かを判定する(S1)。この判定は(所定の条件下の一例)、PC4が障害物から所定距離内に存在する場合にだけ行ってもよい。スロープ13は透明なので、ロックオン時以外は、常に配置されているが、PCが障害物から所定距離内に存在する場合だけスロープが配置されてもよい。接触判定部34は例えば、仮想カメラ10の中心からスロープ13(面)に垂線(レイキャスト)を照射し、仮想カメラ10と交点までの距離が閾値以内であるかどうかにより接触したか否かを判定する。
The
ステップS1の判定がYesの場合、カメラ制御部35は仮想カメラ10のスロープ13より内側への移動を制限する(S2)。つまり、カメラ制御部35は、仮想カメラ10の壁への接近は許可するが、スロープの内側への仮想カメラ10の移動を禁止する。
If the determination in step S1 is Yes, the
そして、カメラ制御部35はロックオンされたか否かを判定する(S3)。
Then, the
ステップS3の判定がNoの場合、カメラ制御部35は、操作受付部36がカメラの手動操作を受け付けたか否かを判定する(S4)。
If the determination in step S3 is No, the
ステップS4の判定がYesの場合、カメラ制御部35はプレイヤーの操作に応じて、仮想カメラ10を円弧軌道に沿ってXおよびY軸座標方向に移動するが、仮想カメラ10とPC4との距離が限界距離L以内にならないように制限する(S5)。
If the determination in step S4 is Yes, the
ステップS3の判定がYesの場合、オブジェクト制御部31は、仮想カメラ10と接触したスロープ13を削除する(S6)。すなわち、オブジェクト制御部31は、スロープ13を仮想空間に存在しないようにする。あるいは、接触判定部34が仮想カメラ10とスロープ13の接触判定を行わないようにしてもよい。
If the determination in step S3 is Yes, the
そして、カメラ制御部35は、壁が閾値以下でも閾値超の壁として処理する(S7)。すなわち、この後の処理は実施例2のフローに移る。
Then, the
<主な効果>
本実施例によれば、仮想カメラ10を障害物の上に移動させる余地がある障害物の近くにおいて、スロープ13の面に沿って仮想カメラ10が移動するので、プレイヤーから見た画像が急に変化することを抑制し、興趣性等を向上できる。また、プレイヤーが仮想カメラ10の高さを操作した場合、仮想カメラ10がPC4に近づかないようにするので、PC4が画角に入るようになる。また、ロックオン時にはスロープ13が削除され、仮想カメラ10の高さが低くなるので、PC4と敵キャラクター15が画角に入るようになる。
<Major Effects>
According to this embodiment, the
本実施例では、仮想カメラ10を壁12の上に移動させる余地がない障害物の近くにおける仮想カメラ10の姿勢の制御方法について説明する。
In this embodiment, we explain how to control the attitude of the
なお、本実施例においては、上記の実施例にて説明した図2のハードウェア構成図、及び、図3に示した機能ブロック図を援用できるものとして説明する。 In this embodiment, the hardware configuration diagram in FIG. 2 and the functional block diagram in FIG. 3 described in the above embodiment can be used.
図12は、本実施例のカメラ設定情報の一例である。図12では主に図4との相違を説明する。本実施例では、壁の周囲にスロープが配置されておらず、仮想カメラ10が壁オブジェクトと接触した場合の制御が定義されている。
Figure 12 is an example of camera setting information in this embodiment. Figure 12 mainly explains the differences from Figure 4. In this embodiment, there is no slope around the wall, and control is defined for when the
図12では、この状況において、カメラの手動操作がない場合、「仮想カメラの高さ」として、高さB[m]が設定されている。また、「調整速度」には30フレームが設定されている。カメラ制御部35が瞬間的に仮想カメラの高さを変える(単純な上下移動)と、画面が急に変わってプレイヤーに違和感を生じさせるおそれがあるからである。30フレームは一例であり、例えば数十フレームでよい。また、fpsに応じて異なる値が採用されてもよい。
In FIG. 12, in this situation, if there is no manual operation of the camera, height B [m] is set as the "virtual camera height." In addition, 30 frames is set as the "adjustment speed." This is because if the
同様の状況でロックオンされた場合、仮想カメラ10の高さ(Y軸方向の移動)がPCの高さに応じて調整され、ピッチング角が敵キャラクターの高さに応じて調整される。この「仮想カメラの高さがPCの高さに応じて調整」されることは、仮想カメラをB[m]の高さに調整することと同じ意味である。 When locked on in a similar situation, the height of the virtual camera 10 (movement in the Y-axis direction) is adjusted according to the height of the PC, and the pitching angle is adjusted according to the height of the enemy character. This "adjusting the height of the virtual camera according to the height of the PC" is the same as adjusting the virtual camera to a height of B [m].
また、同様の状況でカメラの手動操作がある場合、仮想カメラ10はプレイヤー操作で、円弧軌道に沿ってXおよびY軸座標方向に移動する。また、注視点は、仮想カメラ10の高さ、壁からの距離、敵との距離、及び、敵の高さから決定される。
When the camera is manually operated in a similar situation, the
<仮想カメラを壁の上に移動させる余地がない障害物の近くにおける仮想カメラの姿勢の制御>
図13は、本実施例において高さが閾値超の壁際における仮想カメラ10の姿勢の制御方法を説明する図である。図13(a)は、仮想カメラ10が壁11の内部に入り込んだ状態を示す。仮想カメラ10は壁11と接触判定され、カメラ制御部35がPC4側に仮想カメラ10を押し出す。
<Controlling the virtual camera's pose near an obstacle with no room to move the virtual camera over the wall>
13A and 13B are diagrams for explaining a method for controlling the attitude of the
図13(b)は、押し出された状態の仮想カメラ10を示す。仮想カメラ10が押し出されることで、壁11のPC4側の表面に仮想カメラ10が存在する。なお、図13(b)のような状態が生じる理由は図7(a)で説明した。
Figure 13(b) shows the
壁11の存在に関わらず、仮想カメラ10がPC4と一定の距離を維持すると、仮想カメラ10が壁11の内部に入る。仮想カメラ10が壁11の内部に入ると仮想カメラ10の画角に壁11が入り込んでしまい、画像データ生成部32が生成する画像データにPC4が反映されなくなる。そこで、本実施形態では、接触判定部34が仮想カメラ10と壁11の接触判定を行い、接触した場合、カメラ制御部35が仮想カメラ10の壁方向への移動を制限する。したがって、PC4が壁11に接近しても仮想カメラ10は壁の内部に入り込むことなく、押し出される。
Regardless of the presence of
しかし、仮想カメラ10が壁11から押し出され、PC4が壁11の方向に移動すると、PC4と仮想カメラ10との間の距離が短くなり、画角にPC4が入らなくなる。
However, when the
そこで、カメラ制御部35は、カメラ設定情報を参照して、仮想カメラ10の高さを低くする。すなわち、カメラ制御部35は例えば30フレームをかけて、仮想カメラ10の高さを単純な上下移動として、A[m]からB[m]に制御する(A(第1の高さの一例)>B(第2の高さの一例))。図13(c)は、高さが低くなった仮想カメラ10を示す。図13(c)の仮想カメラ10の高さはB[m]である。B[m]は例えばPC4の高さに基づいて調整されるなど、PC4が仮想カメラの画角に入るように調整される。また、壁の内部にも入ることができる理想位置の仮想カメラを用意した上で、PC4から仮想カメラにレイキャストを飛ばし、PC4から仮想カメラまでの距離と、PC4から壁にレイキャストが当たった位置の距離との割合で仮想カメラの高さを低くしてもよい。また、仮想カメラ10の注視点はPC4の腰などでよい。仮想カメラ10の高さをA[m]からB[m]に制御することは障害物回避処理の一例である。
Therefore, the
以上により、PC4が壁際に接近しても、カメラ制御部35はPC4が画角に入るように仮想カメラ10の姿勢を制御できる。
As a result, even if PC4 approaches a wall, the
<壁際でロックオンされた場合における仮想カメラの姿勢の制御方法>
次に、図14を参照して、仮想カメラ10がロックオンされた場合の仮想カメラ10の姿勢の制御方法を説明する。図14は、壁際で仮想カメラ10が敵キャラクターをロックオンした場合の仮想カメラの姿勢の制御方法を説明する図である。ロックオン前の図13(c)の仮想カメラ10(点線で示す)の注視点はPC4であるため、ロックオンされた敵キャラクターが画角に入らないおそれがある。このため、ロックオン時、カメラ制御部35は、カメラ設定情報を参照し、ロックオン時に適した仮想カメラ10の姿勢に制御する。すなわち、カメラ制御部35は、敵キャラクターの高さに基づき、敵キャラクターが画角に入るようにピッチング角を調整する。こうすることで、仮想カメラ10の画角に、PC4とロックオン中の敵キャラクター15の両方が入る。
<How to control the virtual camera's attitude when locked on to the wall>
Next, referring to FIG. 14, a method for controlling the attitude of the
<動作手順>
図15は、カメラ制御部35が仮想カメラ10の姿勢を制御する手順を示すフローチャート図の一例である。図15の処理は、例えば、毎フレーム実行される。
<Operation procedure>
Fig. 15 is an example of a flowchart showing a procedure in which the
オブジェクト制御部31はPC4が壁11から閾値内かどうかを判定する(S11)。例えば、ナビゲーションメッシュの壁際のメッシュにPC4が存在する場合、オブジェクト制御部31はPC4が壁11から閾値内と判定する。
The
ステップS11の判定がYesの場合、接触判定部34は仮想カメラ10と壁11が接触したか否かを判定する(S12)。接触判定部34は例えば、仮想カメラ10の中心から壁11に垂線(レイキャスト)を照射し、仮想カメラ10から交点までの距離が閾値以内かどうかにより、仮想カメラ10が壁11に接触したかどうかを判定する。なお、接触判定部34は、ステップS11の判定を行うことなく、ステップS12のみを判定してもよい(S11又はS12は所定の条件下の一例である)。
If the determination in step S11 is Yes, the
ステップS12の判定がYesの場合、オブジェクト制御部31は、壁11の高さが閾値超か否かを判定する(S13)。つまり、仮想カメラ10を壁11の上に移動させる余地があるかどうかを判定する。この判定は、例えば、仮想カメラ10が接触したオブジェクトの属性が有する高さに基づいて判定されてもよいし、スロープの有無に基づいて判定されてもよい。
If the determination in step S12 is Yes, the
ステップS13の判定がYesの場合、カメラ制御部35は仮想カメラ10の壁方向への移動を制限する(S14)。つまり、カメラ制御部35は、壁に仮想カメラ10が接触しても、壁の内側への仮想カメラ10の移動を禁止する(接触した分だけ押し出す)。
If the determination in step S13 is Yes, the
カメラ制御部35は、例えば30フレームをかけて、単純な上下移動として、仮想カメラ10の高さをA[m]からB[m]に変更する(S15)。
The
そして、カメラ制御部35はロックオンされたか否かを判定する(S16)。ステップS16の判定がYesの場合、カメラ制御部35は、ステップS15で決定したB〔m〕の高さにおいて、敵キャラクター15とPC4が画角に入るようにピッチング角を調整する(S17)。
Then, the
<プレイヤーが仮想カメラの姿勢を操作した場合>
図6にて説明したように、壁際でない場合にプレイヤーがカメラ操作スティック6を操作した場合、仮想カメラ10は、垂直方向の円弧上を移動する。注視点は、円弧の中心方向(PC4)とする。
<When the player manipulates the virtual camera's position>
6, when the player operates the
しかし、壁際でプレイヤーが同様の操作を行うと、仮想カメラ10の軌跡と壁11が接触する。この場合、カメラ制御部35は、軌跡が壁11に接触(カメラが壁に入り込んでいる)した場合だけ押し出しを行うことになり、円弧に沿ってカメラを動かすことができない。そこで、カメラ制御部35は、壁際では軌跡をゆがめ、仮想カメラ10のピッチが上に向きやすくなるように(敵キャラクターが早く画角に入るように)仮想カメラ10の姿勢を制御する。カメラ制御部35は、仮想カメラ10の高さ、仮想カメラ10の壁11からの距離、敵キャラクター15との距離、及び、敵キャラクター15の高さから注視点を決定する。簡単には、敵キャラクター15とPC4の重心を注視点とすればよい。
However, if the player performs a similar operation near a wall, the trajectory of the
図16は、壁際の場合にプレイヤーがカメラ操作スティック6を操作した場合の仮想カメラ10の姿勢の制御方法の一例の説明図である。
Figure 16 is an explanatory diagram of an example of a method for controlling the attitude of the
まず、カメラ制御部35は、仮想カメラ10の最大高さHmaxを決定する。最大高さHmaxは、PC4と敵キャラクター15のうち大きい方の高さ+m(マージン)である。
First, the
この最大高さHmaxの範囲で仮想カメラ10の円弧軌道上の位置を、プレイヤーがカメラ操作スティック6を操作して決定している。図16に示すように、PC4及び敵キャラクター15と壁11の距離が比較的大きい場合、仮想カメラ10の高さが低くないと仮想カメラ10の画角に、PC4及び敵キャラクター15が入らない。したがって、プレイヤーは仮想カメラ10を円弧軌道に沿ってXおよびY軸座標方向に(主に下に)移動するよう操作する。プレイヤーがこのように操作するという前提で、カメラ制御部35は、仮想カメラ10が最大高さHmaxの高さ方向の中心Pより低い場合、壁11からの仮想カメラ10の距離を、仮想カメラ10が中心Pより上にある場合よりも長くなるように軌跡を変形する。
The player operates the
仮想カメラ10が最も低い場合の壁11からの仮想カメラ10の距離Mは、例えば、最大高さHmaxの50%~100%など、予め固定値が定められている。仮想カメラ10が最も高い場合の壁11からの仮想カメラ10の距離Nは、例えば、距離Mの半分程度である。壁11からの仮想カメラ10の距離は、中心Pより下ほど大きくなり、最大がMである。壁11からの仮想カメラ10の距離は、中心Pより上ほど大きくなり、最大がNである。中心Pは上下にずれていてもよいし、最大高さHmaxの3/4などに設定されてもよい。
The distance M of the
また、カメラ制御部35はPC4及び敵キャラクター15の重心21を注視点に制御する。重心とは、PC4及び敵キャラクター15が有するポリゴンの頂点の座標の平均をX軸、Y軸、Z軸ごとに算出した仮想空間の位置である。
The
壁際において軌跡を変形させることにより、ピッチング角を上に向けやすくすることができるので、プレイヤーが円弧上でカメラを下に移動させた場合よりも敵キャラクターが早く画角に入るようになる。 By deforming the trajectory near a wall, it becomes easier to pitch the camera upwards, bringing enemy characters into view sooner than if the player were to move the camera downwards on an arc.
図17は、プレイヤーが壁際で仮想カメラ10の姿勢を操作した場合の仮想カメラ10の姿勢の制御方法を説明するフローチャート図の一例である。
Figure 17 is an example of a flowchart illustrating a method for controlling the attitude of the
カメラ制御部35は、操作受付部36が仮想カメラ10の姿勢を制御するカメラ操作スティック6の操作を受け付けたか否かを判定する(S21)。
The
ステップS21の判定がYesの場合、接触判定部34は仮想カメラ10が壁11と接触したか否かを判定する(S22)。仮想カメラ10が壁11と接触する場合、仮想カメラ10の軌道をゆがめるためである。
If the determination in step S21 is Yes, the
ステップS22の判定がYesの場合、カメラ制御部35は、最大高さHmaxの中心から高さが高いほど又は低いほど仮想カメラ10を押し出し、低い側の押し出し量を大きくする仮想カメラ10の軌道を設定する(S23)。
If the determination in step S22 is Yes, the
カメラ制御部35は、プレイヤーが操作する円弧軌道に沿った仮想カメラ10のXおよびY軸座標に応じて、PC4と敵キャラクター15の重心21を注視点に制御する(S24)。
The
<主な効果>
以上説明したように、本実施形態のゲームシステムによれば、PC4が壁11に接近した場合、仮想カメラ10を単純な上下移動で低くするので、PC4が画角に入るように仮想カメラ10の姿勢を制御できる。また、ロックオン時には、PC4及び敵キャラクター15が画角に入るように注視点を決定することで、PC4及び敵キャラクター15が画角に入るように仮想カメラ10の姿勢を制御できる。また、プレイヤーが壁際でカメラ操作スティック6を操作した場合、仮想カメラ10の高さが低い場合には早めにPC4と敵キャラクター15を見上げる注視点となり、プレイヤーが敵キャラクター15を視認しやすい。
<Major Effects>
As described above, according to the game system of this embodiment, when the
<その他の適用例等>
なお、本発明は、上記の実施形態に限られるものではなく、その趣旨及び技術的思想を逸脱しない範囲内で種々の変形が可能である。
<Other application examples>
The present invention is not limited to the above-described embodiment, and various modifications are possible without departing from the spirit and technical concept of the present invention.
例えば、本実施形態では、障害物として壁11,12を例にしたが、障害物はどのようなオブジェクトでもよい。障害物は、壁のような人工物の他、岩、樹木などの自然物でもよい。また、オブジェクトが移動する仮想空間は、地上の他、空中、水中、又は、地中などでもよいし、車、船、又は飛行機などの内部でもよい。
For example, in this embodiment,
また、仮想カメラ10がPC4に対し追従移動すると説明したが、仮想カメラ10は敵キャラクターに追従移動してもよい。
In addition, although it has been described that the
また、図3などの構成例は、情報処理装置3による処理の理解を容易にするために、主な機能に応じて分割したものである。処理単位の分割の仕方や名称によって本願発明が制限されることはない。情報処理装置3の処理は、処理内容に応じて更に多くの処理単位に分割することもできる。また、1つの処理単位が更に多くの処理を含むように分割することもできる。 The configuration examples in FIG. 3 and the like are divided according to main functions to facilitate understanding of the processing by the information processing device 3. The present invention is not limited by the manner in which the processing units are divided or the names of the processing units. The processing by the information processing device 3 can be divided into even more processing units depending on the processing content. It can also be divided so that one processing unit includes even more processes.
また、本実施形態ではゲームプログラムが行うとした処理の一部又は全体を、ASIC(Application Specific Integrated Circuit)、DSP(digital signal processor)、FPGA(field programmable gate array)等のハード的な処理回路が行ってもよい。 In addition, in this embodiment, some or all of the processing performed by the game program may be performed by hardware processing circuits such as an ASIC (Application Specific Integrated Circuit), DSP (digital signal processor), or FPGA (field programmable gate array).
1 ゲームシステム
3 情報処理装置
5 ゲームコントローラ
7 表示装置
1 Game system 3
Claims (11)
仮想空間における仮想カメラと、前記仮想空間におけるオブジェクトのうち接触判定対象オブジェクトとの接触を判定する接触判定部と、
前記オブジェクトのうち追従対象オブジェクトの動きに仮想カメラを追従させるカメラ制御部と、
前記仮想カメラが撮影した画像データを生成する画像データ生成部、として機能させ、
前記カメラ制御部は、閾値以下の高さの前記接触判定対象オブジェクトと接触した場合、前記仮想カメラの追従移動を行わず、前記仮想カメラの高さを高くさせ、
前記閾値を超える高さの前記接触判定対象オブジェクトと接触した場合、前記仮想カメラの追従移動を行わず、前記仮想カメラの高さを低くさせる回避処理を行うゲームプログラム。 An information processing device,
a collision determination unit that determines a collision between a virtual camera in a virtual space and a collision determination target object among objects in the virtual space;
a camera control unit that causes a virtual camera to follow the movement of a target object among the objects ;
an image data generating unit that generates image data captured by the virtual camera;
the camera control unit, when making contact with the collision determination target object having a height equal to or less than a threshold, does not perform tracking movement of the virtual camera but increases the height of the virtual camera;
a game program that performs avoidance processing by lowering the height of the virtual camera rather than moving the virtual camera to follow the collision when the virtual camera comes into contact with the object subject to collision detection that has a height exceeding the threshold value ;
プレイヤーの操作に応じて前記追従対象オブジェクトが前記障害物オブジェクトに近づいた場合、前記カメラ制御部は、前記回避処理として、前記スロープオブジェクト上を低い方から高い方に前記仮想カメラを移動させる請求項2に記載のゲームプログラム。 the virtual camera is restricted from moving to the inside of the slope object ;
3. The game program according to claim 2, wherein, when the object to be followed approaches the obstacle object in response to an operation by a player, the camera control unit moves the virtual camera from a lower side to a higher side on the slope object as the avoidance processing.
前記追従対象オブジェクトが、前記仮想カメラと前記追従対象オブジェクトの間の距離よりも前記障害物オブジェクトに近づいた場合、前記カメラ制御部は、前記仮想カメラを前記障害物オブジェクトの上に移動させる請求項3に記載のゲームプログラム。 the obstacle object has a height equal to or less than the threshold ;
4. The computer- readable storage medium according to claim 3, wherein, when the object to be followed comes closer to the obstacle object than a distance between the virtual camera and the object to be followed , the camera control unit moves the virtual camera onto the obstacle object.
前記スロープオブジェクトを削除し、
前記カメラ制御部は、前記仮想カメラの高さを前記追従対象オブジェクトの高さに応じて調整し、前記敵キャラクターと前記追従対象オブジェクトが画角に入るようにピッチング角を決定する請求項2~5のいずれか1項に記載のゲームプログラム。 When the virtual camera locks on to an enemy character arranged in the virtual space,
Delete the slope object ;
The game program according to any one of claims 2 to 5, wherein the camera control unit adjusts a height of the virtual camera in accordance with a height of the object to be followed , and determines a pitching angle so that the enemy character and the object to be followed are included in an angle of view.
前記カメラ制御部は、前記障害物オブジェクトと接触した場合、前記回避処理として、前記仮想カメラを前記障害物オブジェクトから押し出し、更に、前記仮想カメラの高さを、前記追従移動における第1の高さよりも低い第2の高さに変更する請求項1に記載のゲームプログラム。 the collision determination target object having a height exceeding the threshold is an obstacle object that serves as an obstacle among the objects,
2. The game program according to claim 1, wherein the camera control unit, when coming into contact with the obstacle object, pushes the virtual camera away from the obstacle object as the avoidance processing, and further changes the height of the virtual camera to a second height lower than the first height in the following movement.
前記軌跡が前記障害物オブジェクトと接触する場合、前記カメラ制御部は、前記障害物オブジェクトに接近した前記追従対象オブジェクトと前記敵キャラクターを前記仮想カメラが円弧を軌跡として移動する場合よりも早くピッチング角を上向きにする軌跡に変形する請求項8に記載のゲームプログラム。 when the virtual camera does not come into contact with the obstacle object, the camera control unit moves the virtual camera along a circular arc in a vertical direction in the virtual space in response to an operation by a player;
9. The game program according to claim 8, wherein, when the trajectory comes into contact with the obstacle object , the camera control unit deforms the object to be tracked and the enemy character approaching the obstacle object into a trajectory that has an upward pitching angle faster than when the virtual camera moves along a circular arc trajectory.
前記オブジェクトのうち追従対象オブジェクトの動きに仮想カメラを追従させるカメラ制御部と、
前記仮想カメラが撮影した画像データを生成する画像データ生成部、とを有し、
前記カメラ制御部は、閾値以下の高さの前記接触判定対象オブジェクトと接触した場合、前記仮想カメラの追従移動を行わず、前記仮想カメラの高さを高くさせ、
前記閾値を超える高さの前記接触判定対象オブジェクトと接触した場合、前記仮想カメラの追従移動を行わず、前記仮想カメラの高さを低くさせる回避処理を行う情報処理装置。 a collision determination unit that determines a collision between a virtual camera in a virtual space and a collision determination target object among objects in the virtual space;
a camera control unit that causes a virtual camera to follow the movement of a target object among the objects ;
an image data generating unit that generates image data captured by the virtual camera;
the camera control unit, when making contact with the collision determination target object having a height equal to or less than a threshold, does not perform tracking movement of the virtual camera but increases the height of the virtual camera;
When the virtual camera comes into contact with the object subject to collision detection whose height exceeds the threshold, the information processing device performs avoidance processing by lowering the height of the virtual camera instead of moving the virtual camera to follow the object .
カメラ制御部が、前記オブジェクトのうち追従対象オブジェクトの動きに仮想カメラを追従させるステップと、
画像データ生成部が、前記仮想カメラが撮影した画像データを生成するステップと、
前記カメラ制御部は、閾値以下の高さの前記接触判定対象オブジェクトと接触した場合、前記仮想カメラの追従移動を行わず、前記仮想カメラの高さを高くさせるステップと、前記閾値を超える高さの前記接触判定対象オブジェクトと接触した場合、前記仮想カメラの追従移動を行わず、前記仮想カメラの高さを低くさせる回避処理を行うステップと、
を有するカメラ制御方法。 a step of a contact determination unit determining contact between a virtual camera in a virtual space and a contact determination target object among objects in the virtual space;
a step of causing a virtual camera to follow the movement of a target object among the objects by a camera control unit;
An image data generating unit generates image data captured by the virtual camera;
the camera control unit performs a step of increasing the height of the virtual camera without performing a tracking movement of the virtual camera when the virtual camera comes into contact with the collision determination target object having a height equal to or less than a threshold; and a step of performing an avoidance process of decreasing the height of the virtual camera without performing a tracking movement of the virtual camera when the virtual camera comes into contact with the collision determination target object having a height exceeding the threshold .
The camera control method includes:
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP2021095263A JP7672888B2 (en) | 2021-06-07 | 2021-06-07 | Game program, information processing device, and camera control method |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP2021095263A JP7672888B2 (en) | 2021-06-07 | 2021-06-07 | Game program, information processing device, and camera control method |
Publications (2)
| Publication Number | Publication Date |
|---|---|
| JP2022187297A JP2022187297A (en) | 2022-12-19 |
| JP7672888B2 true JP7672888B2 (en) | 2025-05-08 |
Family
ID=84525594
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| JP2021095263A Active JP7672888B2 (en) | 2021-06-07 | 2021-06-07 | Game program, information processing device, and camera control method |
Country Status (1)
| Country | Link |
|---|---|
| JP (1) | JP7672888B2 (en) |
Families Citing this family (3)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| JP7849798B2 (en) * | 2023-06-29 | 2026-04-22 | グリーホールディングス株式会社 | Information processing device, information processing method, and program |
| CN116764208A (en) * | 2023-06-29 | 2023-09-19 | 不鸣科技(杭州)有限公司 | Control method and device for virtual camera in virtual scene and electronic equipment |
| JP7835988B2 (en) * | 2023-12-07 | 2026-03-26 | 株式会社カプコン | Program and video/audio control device |
Citations (6)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| JP2005319220A (en) | 2004-05-11 | 2005-11-17 | Sega Corp | Image processing program, game processing program, and game information processing apparatus |
| JP2012063958A (en) | 2010-09-15 | 2012-03-29 | Copcom Co Ltd | Game program and game device |
| JP2014184300A (en) | 2014-04-28 | 2014-10-02 | Copcom Co Ltd | Game program and game device |
| JP2014235596A (en) | 2013-06-03 | 2014-12-15 | 任天堂株式会社 | Information processing program, information processing system, information processing device, and information processing method |
| JP2019000138A (en) | 2017-06-09 | 2019-01-10 | 株式会社カプコン | Game program, game device, and server device |
| JP2020514920A (en) | 2017-03-17 | 2020-05-21 | ユニティ アイピーアール エイピーエスUnity Ipr Aps | Method and system for automated camera collision and composition storage |
Family Cites Families (2)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| JP3882287B2 (en) * | 1997-03-07 | 2007-02-14 | 株式会社セガ | Fishing equipment |
| JPH11137842A (en) * | 1997-09-04 | 1999-05-25 | Sega Enterp Ltd | Image processing device |
-
2021
- 2021-06-07 JP JP2021095263A patent/JP7672888B2/en active Active
Patent Citations (6)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| JP2005319220A (en) | 2004-05-11 | 2005-11-17 | Sega Corp | Image processing program, game processing program, and game information processing apparatus |
| JP2012063958A (en) | 2010-09-15 | 2012-03-29 | Copcom Co Ltd | Game program and game device |
| JP2014235596A (en) | 2013-06-03 | 2014-12-15 | 任天堂株式会社 | Information processing program, information processing system, information processing device, and information processing method |
| JP2014184300A (en) | 2014-04-28 | 2014-10-02 | Copcom Co Ltd | Game program and game device |
| JP2020514920A (en) | 2017-03-17 | 2020-05-21 | ユニティ アイピーアール エイピーエスUnity Ipr Aps | Method and system for automated camera collision and composition storage |
| JP2019000138A (en) | 2017-06-09 | 2019-01-10 | 株式会社カプコン | Game program, game device, and server device |
Also Published As
| Publication number | Publication date |
|---|---|
| JP2022187297A (en) | 2022-12-19 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| JP7672888B2 (en) | Game program, information processing device, and camera control method | |
| US10967250B2 (en) | Information processing method and apparatus, electronic device, and storage medium | |
| US10909758B2 (en) | Selecting two-dimensional imagery data for display within a three-dimensional model | |
| US8259112B2 (en) | Image generating apparatus, method of generating image, program, and recording medium | |
| JP5148660B2 (en) | Program, information storage medium, and image generation system | |
| US6259431B1 (en) | Image processor, game machine, image display method, and recording medium | |
| US7327361B2 (en) | Three-dimensional image generating apparatus, storage medium storing a three-dimensional image generating program, and three-dimensional image generating method | |
| US11117052B2 (en) | Game device, control method of game device, and storage medium that can be read by computer | |
| US20130225289A1 (en) | Image processing apparatus and computer-readable storage medium | |
| US20080180438A1 (en) | Image generation method, information storage medium, and image generation device | |
| US11151804B2 (en) | Information processing device, information processing method, and program | |
| JP2024509064A (en) | Location mark display method, device, equipment and computer program | |
| JP2012256371A (en) | Method and system for controlling input device, generating collision data and controlling camera angle | |
| JP5539133B2 (en) | GAME PROGRAM AND GAME DEVICE | |
| WO2023246313A1 (en) | Game screen control method and apparatus, and electronic device | |
| JP2014184300A (en) | Game program and game device | |
| CN112076470B (en) | Display method, device and device for virtual object | |
| JP2955989B2 (en) | Game equipment | |
| JP7715056B2 (en) | Remote control system and remote control program | |
| JP6955132B1 (en) | Video display method, video display system, video display control device, and program | |
| JP7118383B1 (en) | Display system, display method, and display program | |
| CN109976533B (en) | Display control method and device | |
| CN114225398A (en) | Virtual lens control method, device, equipment and storage medium of game | |
| JP3951246B2 (en) | Game device | |
| US20250315146A1 (en) | Information processing device and information processing method |
Legal Events
| Date | Code | Title | Description |
|---|---|---|---|
| RD01 | Notification of change of attorney |
Free format text: JAPANESE INTERMEDIATE CODE: A7421 Effective date: 20231011 |
|
| A621 | Written request for application examination |
Free format text: JAPANESE INTERMEDIATE CODE: A621 Effective date: 20231225 |
|
| A977 | Report on retrieval |
Free format text: JAPANESE INTERMEDIATE CODE: A971007 Effective date: 20241016 |
|
| A131 | Notification of reasons for refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A131 Effective date: 20241105 |
|
| A601 | Written request for extension of time |
Free format text: JAPANESE INTERMEDIATE CODE: A601 Effective date: 20241227 |
|
| A521 | Request for written amendment filed |
Free format text: JAPANESE INTERMEDIATE CODE: A523 Effective date: 20250131 |
|
| TRDD | Decision of grant or rejection written | ||
| A01 | Written decision to grant a patent or to grant a registration (utility model) |
Free format text: JAPANESE INTERMEDIATE CODE: A01 Effective date: 20250408 |
|
| A61 | First payment of annual fees (during grant procedure) |
Free format text: JAPANESE INTERMEDIATE CODE: A61 Effective date: 20250423 |
|
| R150 | Certificate of patent or registration of utility model |
Ref document number: 7672888 Country of ref document: JP Free format text: JAPANESE INTERMEDIATE CODE: R150 |