Deprecated: The each() function is deprecated. This message will be suppressed on further calls in /home/zhenxiangba/zhenxiangba.com/public_html/phproxy-improved-master/index.php on line 456
JP7672888B2 - Game program, information processing device, and camera control method - Google Patents
[go: Go Back, main page]

JP7672888B2 - Game program, information processing device, and camera control method - Google Patents

Game program, information processing device, and camera control method Download PDF

Info

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
Application number
JP2021095263A
Other languages
Japanese (ja)
Other versions
JP2022187297A (en
Inventor
公樹 青柳
祐弥 石谷
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Koei Tecmo Games Co Ltd
Original Assignee
Koei Tecmo Games Co Ltd
Priority date (The priority date 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 date listed.)
Filing date
Publication date
Application filed by Koei Tecmo Games Co Ltd filed Critical Koei Tecmo Games Co Ltd
Priority to JP2021095263A priority Critical patent/JP7672888B2/en
Publication of JP2022187297A publication Critical patent/JP2022187297A/en
Application granted granted Critical
Publication of JP7672888B2 publication Critical patent/JP7672888B2/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

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). Patent Document 1 discloses a technique for moving the virtual camera up and changing the virtual camera's point of view when the player character moves close to an obstacle such as a wall.

特開2009-087277号公報JP 2009-087277 A

上記技術のように障害物の近くで適切に画像を写す方法が色々と考案されているが、なお、改善の余地がある。 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.

ゲームシステムの構成例を示す図である。FIG. 1 is a diagram illustrating an example of the configuration of a game system. 情報処理装置のハードウェア構成図の一例である。FIG. 2 is a diagram illustrating an example of a hardware configuration of an information processing device. 情報処理装置の機能をブロック状に分けて説明する機能ブロック図の一例である。FIG. 2 is an example of a functional block diagram illustrating functions of an information processing device divided into blocks. カメラ設定情報について説明する図の一例である(実施例1)。FIG. 1 is a diagram illustrating an example of camera setting information (first embodiment); 仮想カメラの姿勢を説明する図の一例である。1 is a diagram illustrating an example of a posture of a virtual camera; プレイヤーによる仮想カメラの姿勢の操作を説明する図である。11A and 11B are diagrams illustrating operations of the attitude of the virtual camera by a player. 高さが閾値以下の壁際における仮想カメラの姿勢の制御方法を説明する図である(実施例1)。11A to 11C are diagrams illustrating a method for controlling the attitude of a virtual camera near a wall whose height is equal to or less than a threshold (Example 1). プレイヤーがカメラ操作スティックで仮想カメラの姿勢を操作した場合の不都合を説明する図である。11A and 11B are diagrams illustrating inconveniences that may occur when a player operates the attitude of a virtual camera using a camera control stick. 仮想カメラとプレイヤーキャラクターとの間の限界距離を説明する図である。11 is a diagram illustrating the limit distance between the virtual camera and the player character. FIG. ロックオン時の不都合を説明する図である。11A and 11B are diagrams illustrating inconveniences that may occur during lock-on. カメラ制御部が仮想カメラの姿勢を制御する手順を示すフローチャート図の一例である。11 is a flowchart illustrating an example of a procedure in which a camera control unit controls the attitude of a virtual camera. カメラ設定情報の一例を示す図である(実施例2)。FIG. 11 is a diagram illustrating an example of camera setting information (Example 2). 高さが閾値超の壁際における仮想カメラの姿勢の制御方法を説明する図である(実施例2)。13A to 13C are diagrams illustrating a method for controlling the attitude of a virtual camera near a wall whose height exceeds a threshold (Example 2). 壁際で仮想カメラが敵キャラクターをロックオンした場合の仮想カメラの姿勢の制御方法を説明する図である。13A to 13C are diagrams illustrating a method for controlling the attitude of a virtual camera when the virtual camera locks onto an enemy character near a wall. カメラ制御部が仮想カメラの姿勢を制御する手順を示すフローチャート図の一例である。11 is a flowchart illustrating an example of a procedure in which a camera control unit controls the attitude of a virtual camera. 壁際の場合にプレイヤーがカメラ操作スティックを操作した場合の仮想カメラの姿勢の制御方法の一例の説明図である。FIG. 13 is an explanatory diagram of an example of a method for controlling the attitude of the virtual camera when the player operates the camera control stick when the camera is close to a wall. プレイヤーが壁際で仮想カメラの姿勢を操作した場合の仮想カメラの姿勢の制御方法を説明するフローチャート図の一例である。FIG. 13 is an example of a flowchart illustrating a method for controlling the attitude of the virtual camera when the player operates the attitude of the virtual camera when the virtual camera is close to a wall.

以下、本開示のゲームプログラムを実施するための形態について図面を参照して説明する。なお、本明細書及び図面において、実質的に同一の構成については、同一の符号を付することにより重複した説明を省く。 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 game system 1 according to this embodiment. The game system 1 includes an information processing device 3, a game controller 5, and a display device 7. Each of the game controller 5 and the display device 7 is connected to the information processing device 3 so as to be able to communicate with each other via wire or wirelessly.

情報処理装置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 game controller 5 to perform various operation inputs. In the example shown in FIG. 1, the game controller 5 has, for example, a cross key 9, a plurality of buttons 8, and a camera operation stick 6. Note that the game controller 5 may have, for example, a joystick or a touchpad instead of or in addition to the above. The game controller 5 may also have a microphone, allowing voice operation. The game controller 5 may also have a gyro sensor, an acceleration sensor, etc., allowing operation by the player changing the attitude of the game controller 5.

また、情報処理装置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 game system 1 may also be of the so-called P2P (Peer To Peer) type, in which an information processing device 3 communicates with another information processing device 3.

また、ゲームシステム1はいわゆるクラウドゲームでもよい。以下では、主に図1の構成を用いて本実施形態のゲームシステム1について説明する。 The game system 1 may also be a so-called cloud game. Below, the game system 1 of this embodiment will be described mainly using the configuration of FIG. 1.

<情報処理装置のハードウェア構成例>
図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 CPU 501, a ROM 502, a RAM 503, a GPU 504, a dedicated integrated circuit 505 constructed for a specific purpose such as an ASIC or an FPGA, an input device 506, an output device 507, a recording device 508, a drive 509, a connection port 510, and a communication device 511. These components are connected to each other via a bus 513, an input/output interface 514, etc. so as to be able to transmit signals to each other.

ゲームプログラムは、例えば、ROM502やRAM503、記録装置508等に記録しておくことができる。 The game program can be recorded, for example, in ROM 502, RAM 503, recording device 508, etc.

CPU501は、例えば、上記記録装置508からゲームプログラムを、直接読み出して実行してもよく、RAM503に一旦ロードした上で実行してもよい。更にCPU501は、例えば、ゲームプログラムを通信装置511やドライブ509、接続ポート510を介し受信する場合、受信したゲームプログラムを記録装置508に記録せずに直接実行してもよい。 The CPU 501 may, for example, directly read and execute the game program from the recording device 508, or may first load the game program into the RAM 503 and then execute it. Furthermore, when the CPU 501 receives the game program via the communication device 511, the drive 509, or the connection port 510, for example, the CPU 501 may directly execute the received game program without recording it in the recording device 508.

また、CPU501は、必要に応じて、前述のゲームコントローラ5を含む、例えばマウス、キーボード、マイク等(図示せず)の入力装置506から入力する信号や情報に基づいて各種の処理を行ってもよい。 The CPU 501 may also perform various processes based on signals and information input from an input device 506, such as a mouse, keyboard, microphone, etc. (not shown), including the aforementioned game controller 5, as necessary.

GPU504は、CPU501からの指示に応じて例えばレンダリング処理などの画像表示のための処理を行う。 The GPU 504 performs image display processing, such as rendering processing, in response to instructions from the CPU 501.

そして、CPU501及びGPU504は、上記の処理を実行した結果を、例えば前述の表示装置7や音声出力部を含む、出力装置507から出力する。CPU501及びGPU504は、必要に応じてこの処理結果を通信装置511や接続ポート510を介し送信してもよく、上記記録装置508や記録媒体512に記録させてもよい。 The CPU 501 and GPU 504 then output the results of the above processing from an output device 507, which may include, for example, the display device 7 and audio output unit described above. If necessary, the CPU 501 and GPU 504 may transmit the results of this processing via a communication device 511 or a connection port 510, or may record the results in the recording device 508 or recording medium 512.

なお、サーバー又は汎用的な情報処理装置のハードウェア構成は、情報処理装置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 object control unit 31, an image data generation unit 32, a display control unit 33, a contact determination unit 34, a camera control unit 35, and an operation reception unit 36. Each of these functional units of the information processing device 3 is a function or means realized by the CPU 501 shown in Fig. 2 executing a game program expanded in the RAM 503.

まず、本実施形態では、仮想空間(例えば仮想的な三次元空間)に配置された仮想カメラがオブジェクトを撮影した画像が得られる。オブジェクトも三次元の立体物である。コンピュータグラフィックでは、三次元のオブジェクトはポリゴン(又は三次元点の集まり)で構成される。ポリゴンとは、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 data storage unit 38 stores information about the objects, such as the polygons that form each object, the attributes of each object, and position information.

オブジェクト制御部31は、プレイヤーキャラクター(対象オブジェクトの一例。以下、PCという)を除くキャラクターの位置や挙動を制御する。例えば、位置は、キャラクターに応じて決められた範囲においてキャラクターの性質(敵、味方、役割など)に応じてフレームごとに更新される。また、キャラクターの位置は、ナビゲーションメッシュと呼ばれるメッシュ上をキャラクターの性質に応じて移動するように決定される。また、挙動は、例えば、攻撃する、話しかける、又は単に移動するなどであり、これもキャラクターの性質に応じてオブジェクト制御部31が決定する。 The object control unit 31 controls the positions and behavior of characters other than the player character (an example of a target object; hereafter referred to as the PC). For example, the position is updated every frame according to the character's nature (enemy, ally, role, etc.) within a range determined for each character. Furthermore, the character's position is determined so that the character moves on a mesh called a navigation mesh according to the character's nature. Furthermore, behavior, which may be, for example, attacking, talking, or simply moving, is also determined by the object control unit 31 according to the character's nature.

接触判定部34は、オブジェクト同士の接触を検出する。接触が判定されるオブジェクト同士には、PCと他のキャラクター、PCと地面に固定された地物(壁、岩、建物、植木など)、移動可能な物(家具、家電、ドアなど)、銃弾や魔法力などの飛翔体とPC(又は敵キャラクター)、仮想カメラと地物又は移動可能な物、など様々である。PCから所定範囲(PC4に影響しないほど遠いキャラクターはそもそも停止している)にある、オブジェクトは他のオブジェクトとの接触判定が行われる場合がある。本実施形態では、主に、仮想カメラと地物の接触判定について説明する。以下、地物を単に「障害物」という。 The contact determination unit 34 detects contact between objects. The objects between which contact is determined include a PC and another character, a PC and a feature fixed to the ground (walls, rocks, buildings, plants, etc.), movable objects (furniture, home appliances, doors, etc.), a flying object such as a bullet or magic and a PC (or an enemy character), a virtual camera and a feature or a movable object, and so on. Objects within a specified range of the PC (characters that are far enough away that they do not affect the PC4 are stopped in the first place) may be subjected to contact determination with other objects. In this embodiment, contact determination between the virtual camera and a feature will mainly be explained. Hereinafter, a feature will be simply referred to as an "obstacle".

接触判定部34による接触の判定結果はオブジェクト制御部31に通知される。オブジェクト制御部31は、どのオブジェクトが何のオブジェクトに接触したかに応じて、オブジェクトを制御する。例えば、障害物のオブジェクトと仮想カメラが接触した場合、仮想カメラは、オブジェクトと接触した分だけオブジェクトとは反対方向に押し出される。「押し出し」に代えて、仮想カメラをオブジェクトの「表面で停止させる」でも良い。 The result of the contact determination by the contact determination unit 34 is notified to the object control unit 31. The object control unit 31 controls the object depending on which object has come into contact with which object. For example, when the virtual camera comes into contact with an obstacle object, the virtual camera is pushed in the opposite direction to the object by the amount of contact with the object. Instead of "pushing", the virtual camera may be "stopped on the surface" of the object.

カメラ制御部35は、カメラ設定情報記憶部39に記憶されているカメラ設定情報に基づいて、仮想カメラの姿勢を制御する。詳細は図4にて説明する。 The camera control unit 35 controls the attitude of the virtual camera based on the camera setting information stored in the camera setting information storage unit 39. Details are described in FIG. 4.

操作受付部36は、ゲームコントローラ5に対するプレイヤーからの操作を受け付ける。操作受付部36は、ゲームプログラム内で可能な操作であれば受け付けられるが、本実施形態では、主にPCの移動や仮想カメラの姿勢に関する操作を受け付ける。 The operation reception unit 36 receives operations from the player using the game controller 5. The operation reception unit 36 can receive any operation that is possible within the game program, but in this embodiment it mainly receives operations related to the movement of the PC and the attitude of the virtual camera.

画像データ生成部32は、仮想カメラを視点としたゲーム空間のオブジェクトを画像データに変換する。表示制御部33は、画像データ生成部32が生成した画像データを表示装置7に表示する。 The image data generation unit 32 converts objects in the game space viewed from the virtual camera into image data. The display control unit 33 displays the image data generated by the image data generation unit 32 on the display device 7.

図4は、カメラ設定情報について説明する図の一例である。カメラ設定情報は、「状況」と「カメラの手動操作」に応じて、カメラ制御部35がカメラの姿勢をどのように制御するかを定義する。 Figure 4 is an example diagram explaining the camera setting information. The camera setting information defines how the camera control unit 35 controls the camera attitude according to the "situation" and "manual camera operation."

・「状況」は、仮想カメラの姿勢を制御する具体的な状況である。図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 camera control stick 6 has been operated. If the camera control stick 6 has been operated, the player's manual operation takes priority as a general rule. As an exception, in situations where it is necessary to show the player the entire view, automatic camera control takes priority over the player's manual operation.

・「ロックオン」は、プレイヤーがロックオンしたか否かを示す。ロックオンとは、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 camera control stick 6, but it can also be initiated automatically.

・「仮想カメラの姿勢」は、当該状況で仮想カメラの姿勢がどのように制御されるかを定義する。図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 virtual camera 10 comes into contact with the slope 13 as the "situation", the virtual camera 10 is moved in the X- and Y-axis coordinate directions along an arc trajectory in response to the operation, and a limit distance L is set for the distance between the virtual camera 10 and the PC.

なお、本実施形態では、仮想カメラ10に2種類の高さ移動がある。
(i)円弧軌道に沿ったXおよびY軸座標方向の移動処理(X、Y、Zの各方向については図5参照)。プレイヤーがカメラ操作スティック6を操作してピッチングの変更を行う際はこの移動処理を用いる。
(ii) Y軸方向の単純な上下移動。本実施形態では、「高さ」と表現される。
In this embodiment, the virtual camera 10 has two types of height movement.
(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 camera control stick 6 to change the pitching.
(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 camera control unit 35 takes to control the attitude of the virtual camera 10. For example, the N frames in the third line of FIG. 4 is the typical number of frames the camera control unit 35 takes to go from a non-locked-on state to a locked-on state. N frames is, for example, several frames to several tens of frames.

<仮想カメラの姿勢>
図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 virtual camera 10. The attitude of the virtual camera 10 is determined by, for example, the position, the gaze point, and the upward direction of the camera. The position is represented by X, Y, and Z coordinates in the virtual space. The gaze point 41 is a point where the optical axis 42 of the virtual camera 10 contacts an object (PC4 in FIG. 5). The presence of an object contacting the optical axis 42 is not essential, and any point on the optical axis 42 can be the gaze point. The upward direction of the camera is an axis perpendicular to the bottom and top surfaces when the virtual camera 10 is considered as a rectangular parallelepiped, and is a direction from the bottom surface to the top surface.

仮想カメラ10は、中立状態の仮想カメラ10に直交する3つの軸を中心に回転できる。各軸に対応した角度をヨー角β、ロール角α、及び、ピッチング角γという。本実施形態では、注視点41の制御について説明するが、この時、ピッチング角も変化する。したがって、注視点41を制御することでピッチング角が変わる場合があり、ピッチング角を制御することで注視点41が変わる場合がある。 The virtual camera 10 can rotate around three axes perpendicular to the virtual camera 10 in a neutral state. The angles corresponding to each axis are called the yaw angle β, the roll angle α, and the pitching angle γ. In this embodiment, the control of the gaze point 41 is described, but at this time, the pitching angle also changes. Therefore, controlling the gaze point 41 may change the pitching angle, and controlling the pitching angle may change the gaze point 41.

PC4が単に移動するなどの状態では、カメラ制御部35は、PC4からの決まった距離だけ後方の決まった高さA[m]からPC4上の点を注視点41とするように仮想カメラ10を制御する(追従移動)。これに対し、スロープのある壁際など、予め定められている条件の下では、カメラ制御部35はカメラ設定情報記憶部39に記憶されているカメラ設定情報に基づいて仮想カメラ10の姿勢を制御する。 When PC4 is simply moving, the camera control unit 35 controls the virtual camera 10 so that a point on PC4 at a fixed height A [m] a fixed distance behind PC4 becomes the gaze point 41 (tracking movement). In contrast, under predetermined conditions, such as near a wall with a slope, the camera control unit 35 controls the attitude of the virtual camera 10 based on the camera setting information stored in the camera setting information storage unit 39.

また、カメラ制御部35は、ゲームコントローラ5に配置されたカメラ操作スティック6の操作に応じて、仮想カメラ10の姿勢を制御する。 The camera control unit 35 also controls the attitude of the virtual camera 10 in response to the operation of the camera control stick 6 arranged on the game controller 5.

図6は、プレイヤーによる仮想カメラ10の姿勢の操作を説明する図である。図6(a)はPC4を上面から見た上面図である。プレイヤーの操作に応じて、仮想カメラ10がPC4を中心に水平に360°回転する。回転しても、注視点はPC4に維持されるため、仮想カメラ10の画角には常にPC4が含まれる。 Figure 6 is a diagram explaining the operation of the attitude of the virtual camera 10 by the player. Figure 6(a) is a top view of the PC4. In response to the player's operation, the virtual camera 10 rotates 360° horizontally around the PC4. Even with the rotation, the focus point is maintained on the PC4, so the angle of view of the virtual camera 10 always includes the PC4.

図6(b)はPC4を側面から見た側面図である。仮想カメラ10は仮想空間に配置されているため、プレイヤーの操作に応じて、PC4を中心に垂直方向に一定角度回転する。一定角度とは、地面からPC4の天頂方向(又はその手前)などである。実施形態では、仮想カメラ10の姿勢が操作された場合、仮想カメラ10の注視点は、円弧の中心(PC4)に制御される。 Figure 6(b) is a side view of PC4. Since the virtual camera 10 is placed in the virtual space, it rotates a fixed angle vertically around PC4 in response to the player's operation. The fixed angle may be from the ground toward the zenith of PC4 (or just before that). In the embodiment, when the attitude of the virtual camera 10 is manipulated, the gaze point of the virtual camera 10 is controlled to the center of the arc (PC4).

しかしながら、このように仮想カメラ10が仮想空間で移動できることは、周囲のオブジェクトと仮想カメラ10の接触を生じさせる場合がある。 However, being able to move the virtual camera 10 in virtual space in this way may result in the virtual camera 10 coming into contact with surrounding objects.

<壁際における仮想カメラの姿勢の制御方法>
追従状態では、仮想カメラ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 virtual camera 10 sets the gaze point at, for example, the waist of the PC4 from a height A [m] a certain distance behind the PC4. When the player moves the PC4 in the game space, the virtual camera 10 also moves in response to the movement of the PC4. This manner of movement of the virtual camera 10 is called following movement. The distance and height A [m] between the virtual camera 10 and the PC are determined so that the angle of view of the virtual camera 10 preferably includes the entire PC4, and further has a margin that allows the player to confirm the situation around the PC4.

なお、画角を大きくすれば、仮想カメラ10とPC4の相対的な位置関係に関わらず、画角に常にPC4や周囲の状況を含められる。しかし、画角が大きいと、画角に含まれるオブジェクトの数も多くなる。このため、画像生成(透視投影変換)の処理負荷が増大し、fps(flame per second)の低下の原因となる。 In addition, if the angle of view is increased, the PC 4 and the surrounding situation can always be included in the angle of view regardless of the relative positions of the virtual camera 10 and the PC 4. However, if the angle of view is large, the number of objects included in the angle of view also increases. This increases the processing load of image generation (perspective projection transformation), causing a decrease in fps (flames per second).

図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 virtual camera 10 near a wall whose height is equal to or less than a threshold. A wall 12 whose height H [m] is equal to or less than the threshold becomes an obstacle that allows the virtual camera 10 to move up the wall 12. In this embodiment, a slope is provided on the wall 12 whose height is equal to or less than the threshold. Note that, for example, a slope may not be required for an obstacle that is lower than the height A [m] of the virtual camera 10 in the following state (where there is no risk of contact with the virtual camera 10).

また、閾値は、スロープのふもとの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 virtual camera 10 looks down at PC4 at the foot of the slope from above wall 12 at an appropriate pitching angle. If there is room to move virtual camera 10 above wall 12, camera control unit 35 can move virtual camera 10 above wall 12 even if virtual camera 10 touches wall 12.

しかし、カメラ制御部35が壁際で短時間に仮想カメラ10の高さを高くすると、プレイヤーが視認する画像が急に変化するため、酔いが生じるなどして興趣性等が低下するおそれがある。そこで、本実施例では、オブジェクト制御部31が壁12の上端からカメラ用のスロープ13(これは可視化されず透明である)を配置し、カメラ制御部35がスロープ13の面に沿って仮想カメラ10を移動させる。これにより、徐々にカメラの高さを高くすることができ、なめらかに画像が変化するため酔いが生じにくくなる。このスロープ13より内側に仮想カメラ10は移動できないが、PC4はスロープ13の内側に移動できる。すなわち、仮想カメラ10とスロープ13は衝突判定されるが、PC4とスロープ13は衝突判定されない。 However, if the camera control unit 35 increases the height of the virtual camera 10 in a short time next to a wall, the image viewed by the player changes suddenly, which may cause motion sickness and reduce interest. Therefore, in this embodiment, the object control unit 31 places a slope 13 for the camera (this is not visualized but is transparent) from the top end of the wall 12, and the camera control unit 35 moves the virtual camera 10 along the surface of the slope 13. This allows the camera height to be gradually increased, and the image changes smoothly, making it less likely that motion sickness will occur. The virtual camera 10 cannot move inside this slope 13, but the PC4 can move inside the slope 13. In other words, a collision is determined between the virtual camera 10 and the slope 13, but a collision is not determined between the PC4 and the slope 13.

図7(a)はPC4が壁12に近づいたため、仮想カメラ10がスロープ13に接した状態を示す。スロープ13と仮想カメラ10が接触する状況は、例えばプレイヤーが壁12を背にしたPC4を後ずさりさせたり、プレイヤーが敵からの攻撃で強制的に移動したりした場合、又は、カメラ操作スティック6の操作により、仮想カメラ10が水平に回転しスロープ13と接触するような場合である。 Figure 7(a) shows a state in which the virtual camera 10 comes into contact with the slope 13 as the PC 4 approaches the wall 12. The slope 13 and virtual camera 10 come into contact when, for example, the player makes the PC 4 step back with its back to the wall 12, the player is forced to move due to an attack from an enemy, or the virtual camera 10 rotates horizontally by operating the camera control stick 6 and comes into contact with the slope 13.

接触判定部34がスロープ13と仮想カメラ10が接触したと判定すると、カメラ制御部35はスロープ13の内側に仮想カメラ10を移動させることができないので、仮想カメラ10をスロープ13の面に沿って移動させる。なお、スロープ13の面に沿って移動させる場合、仮想カメラ10の注視点は常にPC4に調整される。 When the contact determination unit 34 determines that the virtual camera 10 has come into contact with the slope 13, the camera control unit 35 cannot move the virtual camera 10 to the inside of the slope 13, and so moves the virtual camera 10 along the surface of the slope 13. Note that when moving along the surface of the slope 13, the gaze point of the virtual camera 10 is always adjusted to PC4.

図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 virtual camera 10 has moved from a low position on slope 13 to a higher position. As PC4 has moved closer to wall 12, virtual camera 10 has also moved closer to wall 12. However, since virtual camera 10 cannot enter the inside of slope 13, the horizontal distance between PC4 and virtual camera 10 is the same as in Figure 7(a), but the height of virtual camera 10 has increased.

図7(c)は、PC4がスロープ13のふもとに達した状態の仮想カメラ10を示す。仮想カメラ10はスロープ13の面に沿って移動し、高さが壁12の上に達している。 Figure 7(c) shows the virtual camera 10 when PC4 has reached the bottom of the slope 13. The virtual camera 10 moves along the surface of the slope 13 and reaches a height above the wall 12.

図7のスロープを用いた仮想カメラ10の姿勢の制御は障害物回避処理の一例である。 Controlling the attitude of the virtual camera 10 using the slope in Figure 7 is an example of obstacle avoidance processing.

なお、図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 slope 13 is determined by the height H [m] of the wall 12 and the horizontal distance between the virtual camera 10 and the PC 4 (a fixed distance behind the PC). This is just one example, and the angle of the slope 13 may be constant regardless of the height H [m] of the wall 12, or the angle D may be changed while keeping the length K [m] of the base of the slope constant even if the height H [m] of the wall 12 differs.

<プレイヤーが仮想カメラの姿勢を操作した場合>
次に、プレイヤーが仮想カメラ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 virtual camera 10 will be described. As described in FIG. 6, the player can rotate the virtual camera 10 vertically in the virtual space by operating the camera operation stick 6. However, the virtual camera 10 cannot move inside the wall 12 and the slope 13. Therefore, even if the player operates to move the virtual camera 10 in the X-axis and Y-axis coordinate directions along the arc trajectory in the state of FIG. 7(a) to (c), the virtual camera 10 moves on the slope 13. However, when the camera operation stick 6 is operated, the virtual camera 10 has the center of the arc as its gaze point, so that the further the virtual camera 10 is operated downward, the more the virtual camera 10 looks up, and the PC 4 is no longer included in the angle of view.

図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 virtual camera 10 with the camera control stick 6. The virtual camera 10 on the wall 12 in Figure 8 would normally move on the dotted trajectory 43 by manipulating the camera control stick 6. However, since the virtual camera 10 is pushed toward the PC by the slope 13, it exists on the slope 13 with the center of the trajectory 43 (arc) as the gaze point (virtual cameras 10a, 10b). As can be seen from the pitching angle of virtual camera 10b, the more the virtual camera 10 moves (mainly downward) along the arc trajectory in the X and Y coordinate directions, the more the virtual camera 10 is angled upward, making it difficult for the PC 4 to be included in the field of view.

そこで、本実施例では図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 virtual camera 10 along an arc trajectory in the X- and Y-axis coordinate directions, the camera control unit 35 does not allow the virtual camera 10 to approach closer than the limit distance L from the PC 4. The limit distance L is set in the camera setting information.

図9は、仮想カメラ10とPC4との間の限界距離Lを説明する図である。限界距離Lを設けると、プレイヤーはカメラ操作をPC4が画角に入る範囲でのみ行えるようになるため、PC4が画角から外れることを防止できる。 Figure 9 is a diagram explaining the limit distance L between the virtual camera 10 and the PC 4. By setting the limit distance L, the player can only operate the camera within the range where the PC 4 is within the field of view, preventing the PC 4 from going outside the field of view.

なお、図9では、仮想カメラ10とPC4との間に限界距離Lが設定されているが、仮想カメラ10の高さに下限Cを設けてもよい。この場合も、同様の効果が得られる。 In FIG. 9, a limit distance L is set between the virtual camera 10 and the PC 4, but a lower limit C may be set for the height of the virtual camera 10. In this case, the same effect can be obtained.

<ロックオン時における仮想カメラの姿勢の制御>
次に、仮想カメラ10を上に移動させる余地がある壁における仮想カメラ10の姿勢の制御にスロープ13が使用された場合であって、敵キャラクター15がロックオンされた場合の仮想カメラ10の姿勢の制御方法を説明する。なお、ロックオン時の処理の詳細については図13,図14にて説明する。
<Controlling the virtual camera attitude when locked on>
Next, a method for controlling the attitude of the virtual camera 10 when the slope 13 is used to control the attitude of the virtual camera 10 at a wall where there is room for the virtual camera 10 to move upward and an enemy character 15 is locked on will be described. Details of the process at the time of locking on will be described with reference to Figs. 13 and 14.

図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 enemy character 15 is present to the right (not shown) of PC4 in the situation shown in Figure 7(c). The virtual camera adjusts the pitching angle γ to include the enemy character in the field of view at the current position. In this case, the pitching angle γ will naturally be at a different angle (upward) than when it was adjusted to capture PC4 from the top of slope 13 (above the wall), making it difficult to capture PC4. In situations such as those shown in Figures 7(a) to (c), PC4 may still be included in the field of view even if the pitching angle γ is adjusted to a slightly upward angle, but if PC4 is inside slope 13 as shown in Figure 10, it will definitely be out of the field of view.

そこで、ロックオン時、オブジェクト制御部31がスロープ13を削除する。スロープ13を削除したうえで、カメラ制御部35は、閾値以下の壁であっても閾値超の壁とみなし、実施例2と同様の処理を行う。 Therefore, when locking on, the object control unit 31 deletes the slope 13. After deleting the slope 13, the camera control unit 35 regards a wall that is below the threshold as a wall that exceeds the threshold, and performs the same processing as in Example 2.

<動作手順>
図11は、カメラ制御部35が仮想カメラ10の姿勢を制御する手順を示すフローチャート図の一例である。図11の処理は、例えば、毎フレーム実行される。
<Operation procedure>
Fig. 11 is an example of a flowchart showing a procedure in which the camera control unit 35 controls the attitude of the virtual camera 10. The process in Fig. 11 is executed, for example, for each frame.

接触判定部34は仮想カメラ10とスロープ13が接触したか否かを判定する(S1)。この判定は(所定の条件下の一例)、PC4が障害物から所定距離内に存在する場合にだけ行ってもよい。スロープ13は透明なので、ロックオン時以外は、常に配置されているが、PCが障害物から所定距離内に存在する場合だけスロープが配置されてもよい。接触判定部34は例えば、仮想カメラ10の中心からスロープ13(面)に垂線(レイキャスト)を照射し、仮想カメラ10と交点までの距離が閾値以内であるかどうかにより接触したか否かを判定する。 The contact determination unit 34 determines whether or not the virtual camera 10 and the slope 13 have come into contact (S1). This determination (one example of a predetermined condition) may be made only when the PC 4 is within a predetermined distance from an obstacle. Because the slope 13 is transparent, it is always placed except during lock-on, but the slope may be placed only when the PC is within a predetermined distance from an obstacle. For example, the contact determination unit 34 projects a perpendicular line (raycast) from the center of the virtual camera 10 to the slope 13 (surface), and determines whether or not contact has occurred depending on whether the distance from the virtual camera 10 to the intersection point is within a threshold.

ステップS1の判定がYesの場合、カメラ制御部35は仮想カメラ10のスロープ13より内側への移動を制限する(S2)。つまり、カメラ制御部35は、仮想カメラ10の壁への接近は許可するが、スロープの内側への仮想カメラ10の移動を禁止する。 If the determination in step S1 is Yes, the camera control unit 35 restricts the movement of the virtual camera 10 inward from the slope 13 (S2). In other words, the camera control unit 35 permits the virtual camera 10 to approach the wall, but prohibits the virtual camera 10 from moving inward from the slope.

そして、カメラ制御部35はロックオンされたか否かを判定する(S3)。 Then, the camera control unit 35 determines whether or not the camera has been locked on (S3).

ステップS3の判定がNoの場合、カメラ制御部35は、操作受付部36がカメラの手動操作を受け付けたか否かを判定する(S4)。 If the determination in step S3 is No, the camera control unit 35 determines whether the operation reception unit 36 has received a manual operation of the camera (S4).

ステップS4の判定がYesの場合、カメラ制御部35はプレイヤーの操作に応じて、仮想カメラ10を円弧軌道に沿ってXおよびY軸座標方向に移動するが、仮想カメラ10とPC4との距離が限界距離L以内にならないように制限する(S5)。 If the determination in step S4 is Yes, the camera control unit 35 moves the virtual camera 10 along an arc trajectory in the X- and Y-axis coordinate directions in response to the player's operation, but restricts the distance between the virtual camera 10 and the PC 4 so that it does not fall within the limit distance L (S5).

ステップS3の判定がYesの場合、オブジェクト制御部31は、仮想カメラ10と接触したスロープ13を削除する(S6)。すなわち、オブジェクト制御部31は、スロープ13を仮想空間に存在しないようにする。あるいは、接触判定部34が仮想カメラ10とスロープ13の接触判定を行わないようにしてもよい。 If the determination in step S3 is Yes, the object control unit 31 deletes the slope 13 that has come into contact with the virtual camera 10 (S6). That is, the object control unit 31 prevents the slope 13 from existing in the virtual space. Alternatively, the contact determination unit 34 may not perform contact determination between the virtual camera 10 and the slope 13.

そして、カメラ制御部35は、壁が閾値以下でも閾値超の壁として処理する(S7)。すなわち、この後の処理は実施例2のフローに移る。 Then, the camera control unit 35 processes the wall as exceeding the threshold even if the wall is below the threshold (S7). In other words, the process thereafter proceeds to the flow of Example 2.

<主な効果>
本実施例によれば、仮想カメラ10を障害物の上に移動させる余地がある障害物の近くにおいて、スロープ13の面に沿って仮想カメラ10が移動するので、プレイヤーから見た画像が急に変化することを抑制し、興趣性等を向上できる。また、プレイヤーが仮想カメラ10の高さを操作した場合、仮想カメラ10がPC4に近づかないようにするので、PC4が画角に入るようになる。また、ロックオン時にはスロープ13が削除され、仮想カメラ10の高さが低くなるので、PC4と敵キャラクター15が画角に入るようになる。
<Major Effects>
According to this embodiment, the virtual camera 10 moves along the surface of the slope 13 near an obstacle where there is room to move the virtual camera 10 over the obstacle, so that sudden changes in the image seen by the player are suppressed, improving interest, etc. Also, when the player operates the height of the virtual camera 10, the virtual camera 10 is prevented from approaching the PC 4, so that the PC 4 comes into the angle of view. Also, when locked on, the slope 13 is deleted and the height of the virtual camera 10 is lowered, so that the PC 4 and the enemy character 15 come into the angle of view.

本実施例では、仮想カメラ10を壁12の上に移動させる余地がない障害物の近くにおける仮想カメラ10の姿勢の制御方法について説明する。 In this embodiment, we explain how to control the attitude of the virtual camera 10 near an obstacle where there is no room to move the virtual camera 10 above the wall 12.

なお、本実施例においては、上記の実施例にて説明した図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 virtual camera 10 comes into contact with a wall object.

図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 camera control unit 35 momentarily changes the height of the virtual camera (simple up and down movement), the screen may suddenly change, causing the player to feel uncomfortable. 30 frames is just an example, and several tens of frames may be used, for example. Also, different values may be adopted depending on the fps.

同様の状況でロックオンされた場合、仮想カメラ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 virtual camera 10 is moved in the X and Y coordinate directions along an arc trajectory by the player. The gaze point is determined from the height of the virtual camera 10, the distance from the wall, the distance to the enemy, and the height of the enemy.

<仮想カメラを壁の上に移動させる余地がない障害物の近くにおける仮想カメラの姿勢の制御>
図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 virtual camera 10 near a wall whose height exceeds a threshold in this embodiment. Fig. 13A shows a state in which the virtual camera 10 has entered inside the wall 11. It is determined that the virtual camera 10 has come into contact with the wall 11, and the camera control unit 35 pushes the virtual camera 10 toward the PC 4.

図13(b)は、押し出された状態の仮想カメラ10を示す。仮想カメラ10が押し出されることで、壁11のPC4側の表面に仮想カメラ10が存在する。なお、図13(b)のような状態が生じる理由は図7(a)で説明した。 Figure 13(b) shows the virtual camera 10 in an extruded state. By extruding the virtual camera 10, the virtual camera 10 is present on the surface of the wall 11 facing the PC 4. The reason why the state shown in Figure 13(b) occurs has been explained in Figure 7(a).

壁11の存在に関わらず、仮想カメラ10がPC4と一定の距離を維持すると、仮想カメラ10が壁11の内部に入る。仮想カメラ10が壁11の内部に入ると仮想カメラ10の画角に壁11が入り込んでしまい、画像データ生成部32が生成する画像データにPC4が反映されなくなる。そこで、本実施形態では、接触判定部34が仮想カメラ10と壁11の接触判定を行い、接触した場合、カメラ制御部35が仮想カメラ10の壁方向への移動を制限する。したがって、PC4が壁11に接近しても仮想カメラ10は壁の内部に入り込むことなく、押し出される。 Regardless of the presence of wall 11, when virtual camera 10 maintains a constant distance from PC4, virtual camera 10 enters inside wall 11. When virtual camera 10 enters inside wall 11, wall 11 enters the angle of view of virtual camera 10, and PC4 is no longer reflected in the image data generated by image data generation unit 32. Therefore, in this embodiment, contact determination unit 34 determines whether virtual camera 10 has come into contact with wall 11, and if contact occurs, camera control unit 35 restricts movement of virtual camera 10 toward the wall. Therefore, even if PC4 approaches wall 11, virtual camera 10 is pushed out without entering the wall.

しかし、仮想カメラ10が壁11から押し出され、PC4が壁11の方向に移動すると、PC4と仮想カメラ10との間の距離が短くなり、画角にPC4が入らなくなる。 However, when the virtual camera 10 is pushed away from the wall 11 and the PC4 moves toward the wall 11, the distance between the PC4 and the virtual camera 10 becomes shorter, and the PC4 is no longer included in the angle of view.

そこで、カメラ制御部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 camera control unit 35 refers to the camera setting information and lowers the height of the virtual camera 10. That is, the camera control unit 35 controls the height of the virtual camera 10 from A [m] to B [m] as a simple up-down movement over, for example, 30 frames (A (an example of the first height)>B (an example of the second height)). FIG. 13(c) shows the virtual camera 10 with a lowered height. The height of the virtual camera 10 in FIG. 13(c) is B [m]. B [m] is adjusted, for example, based on the height of the PC 4, so that the PC 4 is within the angle of view of the virtual camera. In addition, after preparing a virtual camera at an ideal position that can enter the inside of a wall, a raycast may be cast from the PC 4 to the virtual camera, and the height of the virtual camera may be lowered in proportion to the distance from the PC 4 to the virtual camera and the distance from the PC 4 to the position where the raycast hits the wall. In addition, the gaze point of the virtual camera 10 may be the waist of the PC 4. Controlling the height of the virtual camera 10 from A [m] to B [m] is an example of obstacle avoidance processing.

以上により、PC4が壁際に接近しても、カメラ制御部35はPC4が画角に入るように仮想カメラ10の姿勢を制御できる。 As a result, even if PC4 approaches a wall, the camera control unit 35 can control the attitude of the virtual camera 10 so that PC4 is within the field of view.

<壁際でロックオンされた場合における仮想カメラの姿勢の制御方法>
次に、図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 virtual camera 10 when the virtual camera 10 is locked on will be described. FIG. 14 is a diagram for explaining a method for controlling the attitude of the virtual camera when the virtual camera 10 locks on to an enemy character at the wall. Since the gaze point of the virtual camera 10 (shown by a dotted line) in FIG. 13(c) before locking on is PC4, there is a risk that the locked-on enemy character will not be included in the angle of view. For this reason, when locking on, the camera control unit 35 refers to the camera setting information and controls the attitude of the virtual camera 10 to be suitable for locking on. That is, the camera control unit 35 adjusts the pitching angle based on the height of the enemy character so that the enemy character is included in the angle of view. In this way, both PC4 and the locked-on enemy character 15 are included in the angle of view of the virtual camera 10.

<動作手順>
図15は、カメラ制御部35が仮想カメラ10の姿勢を制御する手順を示すフローチャート図の一例である。図15の処理は、例えば、毎フレーム実行される。
<Operation procedure>
Fig. 15 is an example of a flowchart showing a procedure in which the camera control unit 35 controls the attitude of the virtual camera 10. The process in Fig. 15 is executed, for example, for each frame.

オブジェクト制御部31はPC4が壁11から閾値内かどうかを判定する(S11)。例えば、ナビゲーションメッシュの壁際のメッシュにPC4が存在する場合、オブジェクト制御部31はPC4が壁11から閾値内と判定する。 The object control unit 31 determines whether PC4 is within the threshold from wall 11 (S11). For example, if PC4 is present in a mesh at the wall edge of the navigation mesh, the object control unit 31 determines that PC4 is within the threshold from wall 11.

ステップ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 contact determination unit 34 determines whether or not the virtual camera 10 has come into contact with the wall 11 (S12). For example, the contact determination unit 34 projects a perpendicular line (raycast) from the center of the virtual camera 10 to the wall 11, and determines whether or not the virtual camera 10 has come into contact with the wall 11 based on whether or not the distance from the virtual camera 10 to the intersection point is within a threshold. Note that the contact determination unit 34 may perform only step S12 without performing the determination in step S11 (S11 or S12 is an example of a predetermined condition).

ステップS12の判定がYesの場合、オブジェクト制御部31は、壁11の高さが閾値超か否かを判定する(S13)。つまり、仮想カメラ10を壁11の上に移動させる余地があるかどうかを判定する。この判定は、例えば、仮想カメラ10が接触したオブジェクトの属性が有する高さに基づいて判定されてもよいし、スロープの有無に基づいて判定されてもよい。 If the determination in step S12 is Yes, the object control unit 31 determines whether or not the height of the wall 11 exceeds the threshold (S13). In other words, it determines whether or not there is room to move the virtual camera 10 above the wall 11. This determination may be made, for example, based on the height of the attribute of the object that the virtual camera 10 has come into contact with, or based on the presence or absence of a slope.

ステップS13の判定がYesの場合、カメラ制御部35は仮想カメラ10の壁方向への移動を制限する(S14)。つまり、カメラ制御部35は、壁に仮想カメラ10が接触しても、壁の内側への仮想カメラ10の移動を禁止する(接触した分だけ押し出す)。 If the determination in step S13 is Yes, the camera control unit 35 restricts the movement of the virtual camera 10 toward the wall (S14). In other words, even if the virtual camera 10 comes into contact with the wall, the camera control unit 35 prohibits the virtual camera 10 from moving toward the inside of the wall (pushing it out by the amount of contact).

カメラ制御部35は、例えば30フレームをかけて、単純な上下移動として、仮想カメラ10の高さをA[m]からB[m]に変更する(S15)。 The camera control unit 35 changes the height of the virtual camera 10 from A [m] to B [m] by simple up and down movement, for example, over 30 frames (S15).

そして、カメラ制御部35はロックオンされたか否かを判定する(S16)。ステップS16の判定がYesの場合、カメラ制御部35は、ステップS15で決定したB〔m〕の高さにおいて、敵キャラクター15とPC4が画角に入るようにピッチング角を調整する(S17)。 Then, the camera control unit 35 determines whether or not a lock-on has been established (S16). If the determination in step S16 is Yes, the camera control unit 35 adjusts the pitching angle so that the enemy character 15 and PC4 are within the field of view at the height B [m] determined in step S15 (S17).

<プレイヤーが仮想カメラの姿勢を操作した場合>
図6にて説明したように、壁際でない場合にプレイヤーがカメラ操作スティック6を操作した場合、仮想カメラ10は、垂直方向の円弧上を移動する。注視点は、円弧の中心方向(PC4)とする。
<When the player manipulates the virtual camera's position>
6, when the player operates the camera control stick 6 when not next to a wall, the virtual camera 10 moves along a vertical arc. The gaze point is set to the center direction of the arc (PC4).

しかし、壁際でプレイヤーが同様の操作を行うと、仮想カメラ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 virtual camera 10 will come into contact with the wall 11. In this case, the camera control unit 35 will only push out the camera when the trajectory comes into contact with the wall 11 (the camera is stuck in the wall), and will not be able to move the camera along an arc. Therefore, the camera control unit 35 distorts the trajectory near the wall and controls the attitude of the virtual camera 10 so that the virtual camera 10 is more likely to pitch upward (so that the enemy character enters the field of view sooner). The camera control unit 35 determines the point of gaze from the height of the virtual camera 10, the distance of the virtual camera 10 from the wall 11, the distance from the enemy character 15, and the height of the enemy character 15. Simply put, the center of gravity of the enemy character 15 and the PC4 may be set as the point of gaze.

図16は、壁際の場合にプレイヤーがカメラ操作スティック6を操作した場合の仮想カメラ10の姿勢の制御方法の一例の説明図である。 Figure 16 is an explanatory diagram of an example of a method for controlling the attitude of the virtual camera 10 when the player operates the camera control stick 6 when the camera is close to a wall.

まず、カメラ制御部35は、仮想カメラ10の最大高さHmaxを決定する。最大高さHmaxは、PC4と敵キャラクター15のうち大きい方の高さ+m(マージン)である。 First, the camera control unit 35 determines the maximum height Hmax of the virtual camera 10. The maximum height Hmax is the greater of the heights of the PC 4 and the enemy character 15 + m (margin).

この最大高さ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 camera control stick 6 to determine the position of the virtual camera 10 on the arc trajectory within the range of this maximum height Hmax. As shown in FIG. 16, if the distance between the PC 4 and enemy character 15 and the wall 11 is relatively large, the virtual camera 10 will not be able to include the PC 4 and enemy character 15 in its angle of view unless the height of the virtual camera 10 is low. Therefore, the player operates the virtual camera 10 to move it in the X and Y coordinate directions (mainly downward) along the arc trajectory. On the premise that the player operates in this way, the camera control unit 35 changes the trajectory so that when the virtual camera 10 is lower than the center P in the height direction of the maximum height Hmax, the distance of the virtual camera 10 from the wall 11 is longer than when the virtual camera 10 is above the center P.

仮想カメラ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 virtual camera 10 from the wall 11 when the virtual camera 10 is at its lowest is a predetermined fixed value, for example, 50% to 100% of the maximum height Hmax. The distance N of the virtual camera 10 from the wall 11 when the virtual camera 10 is at its highest is, for example, about half the distance M. The distance of the virtual camera 10 from the wall 11 increases downward from the center P, with the maximum being M. The distance of the virtual camera 10 from the wall 11 increases upward from the center P, with the maximum being N. The center P may be shifted up or down, or may be set to, for example, 3/4 of the maximum height Hmax.

また、カメラ制御部35はPC4及び敵キャラクター15の重心21を注視点に制御する。重心とは、PC4及び敵キャラクター15が有するポリゴンの頂点の座標の平均をX軸、Y軸、Z軸ごとに算出した仮想空間の位置である。 The camera control unit 35 also controls the center of gravity 21 of the PC 4 and enemy character 15 to be the gaze point. The center of gravity is a position in virtual space calculated by averaging the coordinates of the vertices of the polygons of the PC 4 and enemy character 15 for each of the X-axis, Y-axis, and Z-axis.

壁際において軌跡を変形させることにより、ピッチング角を上に向けやすくすることができるので、プレイヤーが円弧上でカメラを下に移動させた場合よりも敵キャラクターが早く画角に入るようになる。 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 virtual camera 10 when the player operates the attitude of the virtual camera 10 near a wall.

カメラ制御部35は、操作受付部36が仮想カメラ10の姿勢を制御するカメラ操作スティック6の操作を受け付けたか否かを判定する(S21)。 The camera control unit 35 determines whether the operation reception unit 36 has received an operation of the camera operation stick 6 that controls the attitude of the virtual camera 10 (S21).

ステップS21の判定がYesの場合、接触判定部34は仮想カメラ10が壁11と接触したか否かを判定する(S22)。仮想カメラ10が壁11と接触する場合、仮想カメラ10の軌道をゆがめるためである。 If the determination in step S21 is Yes, the contact determination unit 34 determines whether or not the virtual camera 10 has come into contact with the wall 11 (S22). This is because if the virtual camera 10 comes into contact with the wall 11, the trajectory of the virtual camera 10 is distorted.

ステップS22の判定がYesの場合、カメラ制御部35は、最大高さHmaxの中心から高さが高いほど又は低いほど仮想カメラ10を押し出し、低い側の押し出し量を大きくする仮想カメラ10の軌道を設定する(S23)。 If the determination in step S22 is Yes, the camera control unit 35 sets a trajectory of the virtual camera 10 such that the higher or lower the height from the center of the maximum height Hmax, the greater the amount of push on the lower side (S23).

カメラ制御部35は、プレイヤーが操作する円弧軌道に沿った仮想カメラ10のXおよびY軸座標に応じて、PC4と敵キャラクター15の重心21を注視点に制御する(S24)。 The camera control unit 35 controls the center of gravity 21 of the PC 4 and the enemy character 15 to be the gaze point according to the X and Y axis coordinates of the virtual camera 10 along the arc trajectory operated by the player (S24).

<主な効果>
以上説明したように、本実施形態のゲームシステムによれば、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 PC 4 approaches the wall 11, the virtual camera 10 is lowered by simple vertical movement, so that the attitude of the virtual camera 10 can be controlled so that the PC 4 is included in the angle of view. Furthermore, when locking on, the attitude of the virtual camera 10 can be controlled so that the PC 4 and the enemy character 15 are included in the angle of view by determining the point of gaze so that the PC 4 and the enemy character 15 are included in the angle of view. Furthermore, when the player operates the camera control stick 6 near a wall, if the height of the virtual camera 10 is low, the point of gaze becomes one that looks up at the PC 4 and the enemy character 15 early, making it easier for the player to visually recognize the enemy character 15.

<その他の適用例等>
なお、本発明は、上記の実施形態に限られるものではなく、その趣旨及び技術的思想を逸脱しない範囲内で種々の変形が可能である。
<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, walls 11 and 12 are used as examples of obstacles, but the obstacles may be any object. Obstacles may be man-made objects such as walls, or natural objects such as rocks and trees. Furthermore, the virtual space in which the objects move may be on the ground, in the air, underwater, or underground, or inside a car, ship, or airplane.

また、仮想カメラ10がPC4に対し追従移動すると説明したが、仮想カメラ10は敵キャラクターに追従移動してもよい。 In addition, although it has been described that the virtual camera 10 moves to follow the PC 4, the virtual camera 10 may also move to follow an enemy character.

また、図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 Information processing device 5 Game controller 7 Display device

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 ;
前記閾値以下の高さの前記接触判定対象オブジェクトは、前記オブジェクトのうち障害物となる障害物オブジェクトの周囲に配置された、可視化されず透明なスロープオブジェクトである請求項1に記載のゲームプログラム。 2 . The computer-readable storage medium according to claim 1 , wherein the object to be detected as a collision target having a height equal to or less than the threshold is a non-visualized, transparent slope object disposed around an obstacle object that serves as an obstacle among the objects. 前記仮想カメラは前記スロープオブジェクトの内側への移動を制限され、
プレイヤーの操作に応じて前記追従対象オブジェクトが前記障害物オブジェクトに近づいた場合、前記カメラ制御部は、前記回避処理として、前記スロープオブジェクト上を低い方から高い方に前記仮想カメラを移動させる請求項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.
前記仮想カメラが前記接触判定対象オブジェクトと接触した場合であって、プレイヤーが前記仮想カメラを円弧軌道に沿ってXおよびY軸座標方向の下に移動する操作を行った場合、前記カメラ制御部は予め定められている距離までしか前記仮想カメラを前記追従対象オブジェクトに接近させない請求項2~4のいずれか1項に記載のゲームプログラム。 5. The game program according to claim 2, wherein, when the virtual camera comes into contact with the object subject to collision detection and a player performs an operation of moving the virtual camera downward in X and Y axis coordinate directions along an arc trajectory, the camera control unit causes the virtual camera to approach the object to be followed only up to a predetermined distance. 前記仮想カメラが前記仮想空間に配置された敵キャラクターをロックオンした場合、
前記スロープオブジェクトを削除し、
前記カメラ制御部は、前記仮想カメラの高さを前記追従対象オブジェクトの高さに応じて調整し、前記敵キャラクターと前記追従対象オブジェクトが画角に入るようにピッチング角を決定する請求項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.
前記仮想カメラが前記仮想空間に配置された敵キャラクターをロックオンした場合、前記カメラ制御部は、前記第2の高さの前記仮想カメラの画角に、前記敵キャラクターと前記追従対象オブジェクトが入るようにピッチング角を調整する請求項7に記載のゲームプログラム。 8. The game program according to claim 7, wherein when the virtual camera locks on to an enemy character placed in the virtual space, the camera control unit adjusts a pitching angle so that the enemy character and the object to be tracked are included in the angle of view of the virtual camera at the second height. 前記仮想カメラが前記障害物オブジェクトと接触しない場合、前記カメラ制御部は、プレイヤーの操作に応じて、前記仮想空間の垂直方向に円弧を軌跡として前記仮想カメラを移動させ、
前記軌跡が前記障害物オブジェクトと接触する場合、前記カメラ制御部は、前記障害物オブジェクトに接近した前記追従対象オブジェクトと前記敵キャラクターを前記仮想カメラが円弧を軌跡として移動する場合よりも早くピッチング角を上向きにする軌跡に変形する請求項に記載のゲームプログラム。
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:
JP2021095263A 2021-06-07 2021-06-07 Game program, information processing device, and camera control method Active JP7672888B2 (en)

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)

* Cited by examiner, † Cited by third party
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)

* Cited by examiner, † Cited by third party
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)

* Cited by examiner, † Cited by third party
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

Patent Citations (6)

* Cited by examiner, † Cited by third party
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