JP6280390B2 - Information processing program, information processing apparatus, information processing system, and information processing method - Google Patents

Information processing program, information processing apparatus, information processing system, and information processing method Download PDF

Info

Publication number
JP6280390B2
JP6280390B2 JP2014031820A JP2014031820A JP6280390B2 JP 6280390 B2 JP6280390 B2 JP 6280390B2 JP 2014031820 A JP2014031820 A JP 2014031820A JP 2014031820 A JP2014031820 A JP 2014031820A JP 6280390 B2 JP6280390 B2 JP 6280390B2
Authority
JP
Japan
Prior art keywords
information processing
controller
predetermined area
pointing
coordinate
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
JP2014031820A
Other languages
Japanese (ja)
Other versions
JP2015158706A (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.)
Nintendo Co Ltd
Original Assignee
Nintendo 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 Nintendo Co Ltd filed Critical Nintendo Co Ltd
Priority to JP2014031820A priority Critical patent/JP6280390B2/en
Publication of JP2015158706A publication Critical patent/JP2015158706A/en
Application granted granted Critical
Publication of JP6280390B2 publication Critical patent/JP6280390B2/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Position Input By Displaying (AREA)
  • User Interface Of Digital Computer (AREA)

Description

本発明は、操作装置の姿勢に応じた情報処理を実行するための情報処理プログラム、情報処理装置、情報処理システム、および、情報処理方法に関する。   The present invention relates to an information processing program, an information processing apparatus, an information processing system, and an information processing method for executing information processing according to the attitude of an operating device.

従来、操作装置を動かすことによって、表示画面上の位置を指定したり、表示されているオブジェクトを制御したりする操作をユーザに行わせる技術がある。例えば特許文献1に記載の情報処理装置は、操作装置によってポインティングされた位置を表す座標(ポインティング座標)として、操作装置の姿勢に応じた座標を算出することが可能である。   2. Description of the Related Art Conventionally, there is a technique for causing a user to perform an operation of specifying a position on a display screen or controlling a displayed object by moving an operation device. For example, the information processing apparatus described in Patent Literature 1 can calculate coordinates according to the attitude of the operating device as coordinates (pointing coordinates) representing a position pointed by the operating device.

特開2013−29921号公報JP 2013-29921 A

上記のような、操作装置の姿勢を変化させることによって入力操作を行わせる技術において、より操作性を向上することができることが好ましい。   In the above-described technique for performing an input operation by changing the attitude of the operating device, it is preferable that operability can be further improved.

それ故、本発明の目的は、操作装置の姿勢を変化させる操作に関する操作性を向上することができる情報処理プログラム、情報処理装置、情報処理システム、および、情報処理方法を提供することである。   Therefore, an object of the present invention is to provide an information processing program, an information processing apparatus, an information processing system, and an information processing method that can improve operability related to an operation that changes the attitude of the operating device.

上記の課題を解決すべく、本発明は、以下の(1)〜(10)の構成を採用した。   In order to solve the above problems, the present invention employs the following configurations (1) to (10).

(1)
本発明の一例は、操作装置の姿勢に応じた情報処理を実行する情報処理装置のコンピュータにおいて実行される情報処理プログラムである。情報処理プログラムは、処理実行手段と、移動手段としてコンピュータを機能させる。処理実行手段は、仮想空間において設定される所定領域のうちで、操作装置の姿勢に応じた指示方向が指し示す位置に応じた情報処理を実行する。移動手段は、指示方向が所定領域外を指し示す場合、指示方向が所定領域内の位置を指し示すように仮想空間において所定領域を移動する。
(1)
An example of the present invention is an information processing program that is executed in a computer of an information processing apparatus that performs information processing according to the attitude of the controller device. The information processing program causes the computer to function as processing execution means and movement means. The process execution means executes information processing according to a position indicated by an instruction direction corresponding to the attitude of the controller device in a predetermined area set in the virtual space. When the pointing direction points outside the predetermined area, the moving means moves the predetermined area in the virtual space so that the pointing direction points to a position in the predetermined area.

上記「指示方向が指し示す位置に応じた情報処理」とは、当該位置によって処理結果が変わる(位置と処理結果が一対一に対応する必要は無い)任意の情報処理であってよい。つまり、上記情報処理は、当該位置を入力として用いる任意の情報処理であってもよいし、指示方向を入力として用いる任意の情報処理であってもよい。したがって、「指示方向が指し示す位置」自体は算出されなくてもよい。   The “information processing according to the position indicated by the pointing direction” may be any information processing in which the processing result changes depending on the position (the position and the processing result do not need to correspond one-to-one). That is, the information processing may be arbitrary information processing using the position as an input, or may be arbitrary information processing using the instruction direction as an input. Therefore, the “position indicated by the pointing direction” itself may not be calculated.

上記(1)の構成によれば、操作装置の姿勢が変化したことに応じて指示方向が所定領域から外れた場合、指示方向が領域内の位置を指し示すように所定領域が移動される。したがって、指示方向が所定領域から外れた場合であっても、ユーザが指定する位置として、所定領域内の位置を算出することができ、所定領域内の位置に応じた情報処理が実行される。これによって、操作装置の操作性を向上することができる。   With configuration (1) above, when the pointing direction deviates from the predetermined region in response to the change in the attitude of the controller device, the predetermined region is moved so that the pointing direction points to a position in the region. Therefore, even when the pointing direction deviates from the predetermined area, the position in the predetermined area can be calculated as the position designated by the user, and information processing according to the position in the predetermined area is executed. Thereby, the operability of the operating device can be improved.

(2)
移動手段は、指示方向が所定領域外を指し示す場合、所定領域の外周付近の位置を指示方向が指し示すように、所定領域を移動してもよい。
(2)
The moving means may move the predetermined area so that the pointing direction points to a position near the outer periphery of the predetermined area when the pointing direction points outside the predetermined area.

上記(2)の構成によれば、指示方向が所定領域から外れる前後において、情報処理に用いられる値(指示方向および/または指示方向が指し示す位置に応じた値)が大きく変化する可能性を低減することができる。これによって、指示方向が所定領域から外れる前後において情報処理の処理結果が大きく変化する可能性を低減することができ、操作に対するユーザの違和感を軽減または抑止することができる。   According to the configuration of (2) above, the possibility that the value used for information processing (the value according to the indication direction and / or the position indicated by the indication direction) greatly changes before and after the indication direction deviates from the predetermined area is reduced. can do. Thereby, the possibility that the processing result of the information processing changes greatly before and after the designated direction deviates from the predetermined area can be reduced, and the user's discomfort with respect to the operation can be reduced or suppressed.

(3)
移動手段は、指示方向が所定領域内を指し示す場合には、所定領域を移動しなくてもよい。
(3)
The moving means does not have to move in the predetermined area when the indicated direction points within the predetermined area.

上記(3)の構成によれば、ユーザが意図しない場合に所定領域が移動することによって、情報処理に用いられる値が変化するおそれを低減することができるので、ユーザに違和感を与える可能性を低減することができる。   According to the configuration of (3) above, it is possible to reduce the possibility that the value used for information processing will change due to the movement of the predetermined area when the user does not intend, so there is a possibility of giving the user a sense of incongruity. Can be reduced.

(4)
移動手段は、指示方向が指し示す位置が所定領域の一辺を超えて所定領域外へ移動する場合、当該一辺の付近の位置を指示方向が指し示すように、所定領域を移動してもよい。
(4)
When the position indicated by the pointing direction moves beyond one side of the predetermined region and moves outside the predetermined region, the moving unit may move the predetermined region so that the pointing direction points to a position near the one side.

上記(4)の構成によれば、上記(2)の構成と同様、指示方向が所定領域から外れる前後において、情報処理に用いられる値が大きく変化する可能性を低減することができる。そのため、操作に対するユーザの違和感を軽減または抑止することができる。   According to the configuration of (4), as in the configuration of (2), it is possible to reduce the possibility that the value used for information processing changes greatly before and after the pointing direction deviates from the predetermined area. Therefore, the user's uncomfortable feeling with respect to the operation can be reduced or suppressed.

(5)
所定領域は仮想空間における矩形形状の平面領域であってもよい。移動手段は、指示方向が指し示す位置が、所定領域の一辺を超えて所定領域外へ移動する場合、当該一辺に垂直な方向へ所定領域を移動してもよい。
(5)
The predetermined area may be a rectangular planar area in the virtual space. The moving means may move the predetermined area in a direction perpendicular to the one side when the position indicated by the pointing direction moves outside the predetermined area beyond one side of the predetermined area.

上記(5)の構成によれば、指示方向が指し示す位置が所定領域の一辺からはみ出した場合、指示方向が指し示す位置と所定領域との位置関係は、当該一辺に垂直な方向成分についてのみ変化し、当該一辺に平行な方向成分については変化しない。これによれば、上記一辺に平行な方向成分について姿勢を変化させる(指示方向が指し示す位置を変化させる)ユーザの操作は、所定領域が移動されても有効となる。したがって、上記(5)の構成によれば、ユーザの操作をより正確に反映することができ、操作性を向上することができる。   According to the configuration of (5) above, when the position indicated by the pointing direction protrudes from one side of the predetermined area, the positional relationship between the position indicated by the pointing direction and the predetermined area changes only for the direction component perpendicular to the one side. The direction component parallel to the one side does not change. According to this, the user's operation to change the posture with respect to the direction component parallel to the one side (change the position indicated by the pointing direction) is effective even if the predetermined area is moved. Therefore, according to the configuration of (5) above, the user's operation can be reflected more accurately, and the operability can be improved.

(6)
移動手段は、所定領域上の位置を表すための座標系を移動してもよい。情報処理プログラムは、指示方向が指し示す所定領域上の位置座標を算出する位置算出手段としてコンピュータをさらに機能させてもよい。処理実行手段は、算出された位置座標に基づいて情報処理を実行してもよい。
(6)
The moving means may move a coordinate system for representing a position on the predetermined area. The information processing program may cause the computer to further function as position calculation means for calculating position coordinates on a predetermined area indicated by the pointing direction. The process execution means may execute information processing based on the calculated position coordinates.

上記(6)の構成によれば、指示方向が指し示す位置の位置座標を用いて情報処理を実行することができる。   With configuration (6) above, it is possible to execute information processing using the position coordinates of the position indicated by the pointing direction.

(7)
指示方向は、仮想空間における所定位置を起点として決定されてもよい。移動手段は、起点から所定領域の基準点までの距離が一定となるように、所定領域を移動してもよい。
(7)
The designated direction may be determined starting from a predetermined position in the virtual space. The moving means may move the predetermined area so that the distance from the starting point to the reference point of the predetermined area is constant.

上記(7)の構成によれば、仮想空間における操作装置の基準姿勢からの変化と、指示方向が指し示す位置との関係は、所定領域の位置によらず一定となる。その結果、どの方向を基準としたときでも(所定領域がどの位置に配置されたときでも)操作感覚が同じになるので、コントローラ5の操作性を向上することができる。   According to the configuration of (7) above, the relationship between the change from the reference posture of the controller device in the virtual space and the position indicated by the pointing direction is constant regardless of the position of the predetermined area. As a result, the operability of the controller 5 can be improved because the operational feeling is the same regardless of which direction is used as a reference (when the predetermined area is arranged at any position).

(8)
所定領域は仮想空間における平面であってもよい。移動手段は、起点から基準点までのベクトルに対して、指示方向が領域内の位置を指し示すように所定領域を平面に沿って移動させるベクトルを加算し、起点から加算後のベクトルの方向への位置に移動後の基準点が位置するように所定領域を移動してもよい。
(8)
The predetermined area may be a plane in the virtual space. The moving means adds to the vector from the starting point to the reference point a vector that moves the predetermined region along the plane so that the indicated direction points to a position in the region, and moves from the starting point to the vector direction after the addition. The predetermined area may be moved so that the reference point after moving to the position is located.

上記(8)の構成によれば、ベクトルの演算によって所定領域を移動させることができるので、簡易な計算処理によって移動処理を実行することができ、処理を高速化することができる。   According to the configuration of (8) above, since the predetermined area can be moved by vector calculation, the moving process can be executed by a simple calculation process, and the process can be speeded up.

(9)
所定領域は仮想空間における平面の領域であってもよい。
(9)
The predetermined area may be a planar area in the virtual space.

上記(9)の構成によれば、所定領域として平面の領域を用いることによって、指示方向が指し示す位置を容易に算出することができる。   According to the configuration of (9) above, by using a planar area as the predetermined area, the position indicated by the pointing direction can be easily calculated.

(10)
平面は矩形形状を有してもよい。
(10)
The plane may have a rectangular shape.

上記(10)の構成によれば、所定領域として矩形形状の領域を用いることによって、指示方向が指し示す位置を、例えば矩形の表示画面上の位置に容易に対応付けることができる。   According to the configuration of (10) above, by using a rectangular area as the predetermined area, the position indicated by the pointing direction can be easily associated with a position on a rectangular display screen, for example.

なお、本発明の別の一例は、上記(1)〜(10)における各手段を備える情報処理装置または情報処理システムであってもよい。また、本発明の別の一例は、上記(1)〜(10)において実行される、操作装置の姿勢に応じた情報処理を実行する情報処理方法であってもよい。   In addition, another example of the present invention may be an information processing apparatus or an information processing system including each means in the above (1) to (10). Another example of the present invention may be an information processing method for executing information processing according to the attitude of the controller device, which is executed in the above (1) to (10).

本発明によれば、指示方向が所定領域から外れた場合に所定領域を移動させることによって、操作装置の操作性を向上することができる。   According to the present invention, the operability of the controller device can be improved by moving the predetermined area when the pointing direction deviates from the predetermined area.

ゲームシステム1の外観図External view of game system 1 ゲーム装置3の機能ブロック図Functional block diagram of game device 3 コントローラ5の上側後方から見た斜視図The perspective view seen from the upper back of controller 5 コントローラ5を下側前方から見た斜視図The perspective view which looked at the controller 5 from the lower front side コントローラ5の内部構造を示す図The figure which shows the internal structure of the controller 5 コントローラ5の内部構造を示す図The figure which shows the internal structure of the controller 5 コントローラ5の構成を示すブロック図Block diagram showing the configuration of the controller 5 ポインティング座標を算出するために設定される所定空間を示す図The figure which shows the predetermined space set in order to calculate a pointing coordinate 座標面Qの設定時におけるコントローラ5と座標面Qとを示す図The figure which shows the controller 5 and the coordinate plane Q at the time of the setting of the coordinate plane Q 指示方向が鉛直方向に近い場合における、設定時におけるコントローラ5と座標面Qとを示す図The figure which shows the controller 5 and the coordinate surface Q at the time of a setting in case an indication direction is near a perpendicular direction ゲーム装置3のメインメモリに記憶される主なデータを示す図The figure which shows the main data memorize | stored in the main memory of the game device 3 ゲーム装置3において実行されるゲーム処理の流れを示すメインフローチャートMain flowchart showing a flow of game processing executed in the game apparatus 3 図12に示す座標系設定処理(ステップS5)の詳細な流れを示すフローチャート12 is a flowchart showing a detailed flow of the coordinate system setting process (step S5) shown in FIG. コントローラ5の姿勢と傾斜度Aとの関係を示す図The figure which shows the relationship between the attitude | position of the controller 5, and the inclination A ベクトルP、ベクトルY、およびベクトルU’の関係を示す図The figure which shows the relationship between the vector P, the vector Y, and the vector U ' コントローラ5の姿勢を表す各ベクトルZおよびU’と、座標面Qの姿勢を表す各ベクトルU,V,Wとを示す図The figure which shows each vector Z and U 'showing the attitude | position of the controller 5, and each vector U, V, W showing the attitude | position of the coordinate plane Q コントローラ5の指示方向を表すベクトルZと、座標面Q上におけるポインティング位置Rとの関係を示す図The figure which shows the relationship between the vector Z showing the instruction | indication direction of the controller 5, and the pointing position R on the coordinate surface Q 上記実施形態の変形例を示す図The figure which shows the modification of the said embodiment 指示方向が座標面Qから外れる場合の一例を示す図The figure which shows an example in case an instruction | indication direction remove | deviates from the coordinate plane Q 移動前後の座標面Qの一例を示す図The figure which shows an example of the coordinate surface Q before and behind a movement 図20に示す移動前後の座標面Qの一例を、座標面Qに垂直な方向から見た図FIG. 20 is a diagram illustrating an example of the coordinate plane Q before and after the movement illustrated in FIG. 20 as viewed from a direction perpendicular to the coordinate plane Q. 座標面移動処理の詳細な流れを示すフローチャートFlow chart showing detailed flow of coordinate plane movement processing 座標面Qを移動する処理の一例を示す図The figure which shows an example of the process which moves the coordinate plane Q

<第1の実施形態>
[1.ゲームシステムの全体構成]
図1を参照して、本発明の第1の実施形態に係るゲームシステムについて説明する。図1は、ゲームシステムの外観図である。以下、据置型のゲーム装置を一例にして、本実施形態のゲーム装置およびゲームプログラムについて説明する。図1において、ゲームシステム1は、テレビジョン受像器(以下、単に「テレビ」と記載する)2、ゲーム装置3、光ディスク4、コントローラ5、およびマーカ装置6を含む。本システムは、コントローラ5を用いたゲーム操作に基づいてゲーム装置3でゲーム処理を実行するものである。
<First Embodiment>
[1. Overall configuration of game system]
A game system according to a first embodiment of the present invention will be described with reference to FIG. FIG. 1 is an external view of the game system. Hereinafter, the game apparatus and the game program of the present embodiment will be described using a stationary game apparatus as an example. In FIG. 1, the game system 1 includes a television receiver (hereinafter simply referred to as “TV”) 2, a game device 3, an optical disk 4, a controller 5, and a marker device 6. In this system, game processing is executed by the game apparatus 3 based on a game operation using the controller 5.

なお、ゲームシステム1は、操作装置(コントローラ5)の姿勢に基づいてポインティングを行うためのポインティングシステムの一例である。本実施形態においては、図1に示す各装置を含む構成であるゲームシステム1を例として説明するが、ゲームシステム1は、操作装置の姿勢を算出し、ポインティング位置(ポインティング操作によって指示される位置)を表すポインティング座標を当該姿勢に基づいて算出することができる構成を有していればよい。例えば、ゲームシステム1はゲーム装置3とコントローラ5のみを含む構成であってもよい。また、他の実施形態においては、姿勢算出処理と、ポインティング座標の算出処理とを実行可能な携帯型(可搬型)の情報処理装置によって、本実施形態における情報処理が実行されてもよい。   The game system 1 is an example of a pointing system for performing pointing based on the attitude of the operating device (controller 5). In the present embodiment, the game system 1 having the configuration including each device shown in FIG. 1 will be described as an example. However, the game system 1 calculates the attitude of the operation device and points to the pointing position (the position indicated by the pointing operation). It suffices to have a configuration capable of calculating the pointing coordinates representing) based on the posture. For example, the game system 1 may include only the game device 3 and the controller 5. In another embodiment, the information processing in this embodiment may be executed by a portable (portable) information processing apparatus that can execute the posture calculation processing and the pointing coordinate calculation processing.

ゲーム装置3には、当該ゲーム装置3に対して交換可能に用いられる情報記憶媒体の一例である光ディスク4が脱着可能に挿入される。光ディスク4には、ゲーム装置3において実行されるための情報処理プログラム(典型的にはゲームプログラム)が記憶されている。ゲーム装置3の前面には光ディスク4の挿入口が設けられている。ゲーム装置3は、挿入口に挿入された光ディスク4に記憶されている情報処理プログラムを読み出して実行することによってゲーム処理を実行する。   An optical disk 4 that is an example of an information storage medium that can be used interchangeably with the game apparatus 3 is detachably inserted into the game apparatus 3. The optical disc 4 stores an information processing program (typically a game program) to be executed in the game apparatus 3. An insertion slot for the optical disk 4 is provided on the front surface of the game apparatus 3. The game apparatus 3 executes the game process by reading and executing the information processing program stored in the optical disc 4 inserted into the insertion slot.

ゲーム装置3には、表示装置の一例であるテレビ2が接続コードを介して接続される。テレビ2は、ゲーム装置3において実行されるゲーム処理によって得られるゲーム画像を表示する。テレビ2はスピーカ2a(図2)を有しており、スピーカ2aは、上記ゲーム処理の結果得られるゲーム音声を出力する。なお、他の実施形態においては、ゲーム装置3と据置型の表示装置とは一体となっていてもよい。また、ゲーム装置3とテレビ2との通信は無線通信であってもよい。   A television 2 which is an example of a display device is connected to the game apparatus 3 via a connection cord. The television 2 displays a game image obtained by a game process executed in the game device 3. The television 2 has a speaker 2a (FIG. 2), and the speaker 2a outputs game sound obtained as a result of the game processing. In other embodiments, the game apparatus 3 and the stationary display apparatus may be integrated. The communication between the game apparatus 3 and the television 2 may be wireless communication.

テレビ2の画面の周辺(図1では画面の上側)には、マーカ装置6が設置される。詳細は後述するが、ユーザ(プレイヤ)はコントローラ5を動かすゲーム操作を行うことができ、マーカ装置6は、コントローラ5の動きや位置や姿勢等をゲーム装置3が算出するために用いられる。マーカ装置6は、その両端に2つのマーカ6Rおよび6Lを備えている。マーカ6R(マーカ6Lも同様)は、具体的には1以上の赤外LED(Light Emitting Diode)であり、テレビ2の前方に向かって赤外光を出力する。マーカ装置6は有線で(無線であってもよい)ゲーム装置3に接続されており、ゲーム装置3はマーカ装置6が備える各赤外LEDの点灯を制御することが可能である。なお、マーカ装置6は可搬型であり、ユーザはマーカ装置6を自由な位置に設置することができる。図1ではマーカ装置6がテレビ2の上に設置された態様を表しているが、マーカ装置6を設置する位置および向きは任意である。   A marker device 6 is installed around the screen of the television 2 (upper side of the screen in FIG. 1). Although details will be described later, the user (player) can perform a game operation to move the controller 5, and the marker device 6 is used for the game device 3 to calculate the movement, position, posture, and the like of the controller 5. The marker device 6 includes two markers 6R and 6L at both ends thereof. The marker 6 </ b> R (same for the marker 6 </ b> L) is specifically one or more infrared LEDs (Light Emitting Diodes), and outputs infrared light toward the front of the television 2. The marker device 6 is connected to the game device 3 by wire (may be wireless), and the game device 3 can control lighting of each infrared LED provided in the marker device 6. The marker device 6 is portable, and the user can install the marker device 6 at a free position. Although FIG. 1 shows a mode in which the marker device 6 is installed on the television 2, the position and orientation in which the marker device 6 is installed are arbitrary.

コントローラ5は、自機に対して行われた操作の内容を表す操作データをゲーム装置3に与えるものである。コントローラ5とゲーム装置3とは無線通信によって通信可能である。本実施形態では、コントローラ5とゲーム装置3との間の無線通信には例えばBluetooth(ブルートゥース)(登録商標)の技術が用いられる。なお、他の実施形態においてはコントローラ5とゲーム装置3とは有線で接続されてもよい。また、図1では、ゲームシステム1に含まれるコントローラ5は1つとするが、ゲームシステム1は複数のコントローラ5を含んでいてもよい。つまり、ゲーム装置3は複数のコントローラと通信可能であり、所定台数のコントローラを同時に使用することによって複数人でゲームをプレイすることが可能である。コントローラ5の詳細な構成については後述する。   The controller 5 gives operation data representing the content of the operation performed on the own device to the game apparatus 3. The controller 5 and the game apparatus 3 can communicate with each other by wireless communication. In the present embodiment, for example, Bluetooth (registered trademark) technology is used for wireless communication between the controller 5 and the game apparatus 3. In other embodiments, the controller 5 and the game apparatus 3 may be connected by wire. In FIG. 1, the game system 1 includes one controller 5, but the game system 1 may include a plurality of controllers 5. That is, the game apparatus 3 can communicate with a plurality of controllers, and a plurality of people can play a game by using a predetermined number of controllers simultaneously. A detailed configuration of the controller 5 will be described later.

[2.ゲーム装置3の内部構成]
次に、図2を参照して、ゲーム装置3の内部構成について説明する。図2は、ゲーム装置3の構成を示すブロック図である。ゲーム装置3は、CPU10、システムLSI11、外部メインメモリ12、ROM/RTC13、ディスクドライブ14、およびAV−IC15等を有する。
[2. Internal configuration of game device 3]
Next, the internal configuration of the game apparatus 3 will be described with reference to FIG. FIG. 2 is a block diagram showing a configuration of the game apparatus 3. The game apparatus 3 includes a CPU 10, a system LSI 11, an external main memory 12, a ROM / RTC 13, a disk drive 14, an AV-IC 15 and the like.

CPU10は、光ディスク4に記憶されたゲームプログラムを実行することによってゲーム処理を実行するものであり、ゲームプロセッサとして機能する。CPU10は、システムLSI11に接続される。システムLSI11には、CPU10の他、外部メインメモリ12、ROM/RTC13、ディスクドライブ14およびAV−IC15が接続される。システムLSI11は、それに接続される各構成要素間のデータ転送の制御、表示すべき画像の生成、外部装置からのデータの取得等の処理を行う。システムLSI11の内部構成について後述する。揮発性の外部メインメモリ12は、光ディスク4から読み出されたゲームプログラムや、フラッシュメモリ17から読み出されたゲームプログラム等のプログラムを記憶したり、各種データを記憶したりするものであり、CPU10のワーク領域やバッファ領域として用いられる。ROM/RTC13は、ゲーム装置3の起動用のプログラムが組み込まれるROM(いわゆるブートROM)と、時間をカウントするクロック回路(RTC:Real Time Clock)とを有する。ディスクドライブ14は、光ディスク4からプログラムデータやテクスチャデータ等を読み出し、後述する内部メインメモリ11eまたは外部メインメモリ12に読み出したデータを書き込む。   The CPU 10 executes a game process by executing a game program stored on the optical disc 4, and functions as a game processor. The CPU 10 is connected to the system LSI 11. In addition to the CPU 10, an external main memory 12, a ROM / RTC 13, a disk drive 14, and an AV-IC 15 are connected to the system LSI 11. The system LSI 11 performs processing such as control of data transfer between components connected thereto, generation of an image to be displayed, and acquisition of data from an external device. The internal configuration of the system LSI 11 will be described later. The volatile external main memory 12 stores a program such as a game program read from the optical disc 4 or a game program read from the flash memory 17, or stores various data. Used as a work area and buffer area. The ROM / RTC 13 includes a ROM (so-called boot ROM) in which a program for starting the game apparatus 3 is incorporated, and a clock circuit (RTC: Real Time Clock) that counts time. The disk drive 14 reads program data, texture data, and the like from the optical disk 4 and writes the read data to an internal main memory 11e or an external main memory 12 described later.

また、システムLSI11には、入出力プロセッサ(I/Oプロセッサ)11a、GPU(Graphics Processor Unit)11b、DSP(Digital Signal Processor)11c、VRAM11d、および内部メインメモリ11eが設けられる。図示は省略するが、これらの構成要素11a〜11eは内部バスによって互いに接続される。   Further, the system LSI 11 is provided with an input / output processor (I / O processor) 11a, a GPU (Graphics Processor Unit) 11b, a DSP (Digital Signal Processor) 11c, a VRAM 11d, and an internal main memory 11e. Although not shown, these components 11a to 11e are connected to each other by an internal bus.

GPU11bは、描画手段の一部を形成し、CPU10からのグラフィクスコマンド(作画命令)に従って画像を生成する。VRAM11dは、GPU11bがグラフィクスコマンドを実行するために必要なデータ(ポリゴンデータやテクスチャデータ等のデータ)を記憶する。画像が生成される際には、GPU11bは、VRAM11dに記憶されたデータを用いて画像データを作成する。   The GPU 11b forms part of a drawing unit and generates an image according to a graphics command (drawing command) from the CPU 10. The VRAM 11d stores data (data such as polygon data and texture data) necessary for the GPU 11b to execute the graphics command. When an image is generated, the GPU 11b creates image data using data stored in the VRAM 11d.

DSP11cは、オーディオプロセッサとして機能し、内部メインメモリ11eや外部メインメモリ12に記憶されるサウンドデータや音波形(音色)データを用いて、音声データを生成する。   The DSP 11c functions as an audio processor, and generates sound data using sound data and sound waveform (tone color) data stored in the internal main memory 11e and the external main memory 12.

上述のように生成された画像データおよび音声データは、AV−IC15によって読み出される。AV−IC15は、読み出した画像データをAVコネクタ16を介してテレビ2に出力するとともに、読み出した音声データを、テレビ2に内蔵されるスピーカ2aに出力する。これによって、画像がテレビ2に表示されるとともに音がスピーカ2aから出力される。   The image data and audio data generated as described above are read out by the AV-IC 15. The AV-IC 15 outputs the read image data to the television 2 via the AV connector 16, and outputs the read audio data to the speaker 2 a built in the television 2. As a result, an image is displayed on the television 2 and a sound is output from the speaker 2a.

入出力プロセッサ11aは、それに接続される構成要素との間でデータの送受信を実行したり、外部装置からのデータのダウンロードを実行したりする。入出力プロセッサ11aは、フラッシュメモリ17、無線通信モジュール18、無線コントローラモジュール19、拡張コネクタ20、およびメモリカード用コネクタ21に接続される。無線通信モジュール18にはアンテナ22が接続され、無線コントローラモジュール19にはアンテナ23が接続される。   The input / output processor 11a performs transmission / reception of data to / from components connected to the input / output processor 11a and downloads data from an external device. The input / output processor 11a is connected to the flash memory 17, the wireless communication module 18, the wireless controller module 19, the expansion connector 20, and the memory card connector 21. An antenna 22 is connected to the wireless communication module 18, and an antenna 23 is connected to the wireless controller module 19.

ゲーム装置3は、インターネット等のネットワークに接続して外部の情報処理装置(例えば他のゲーム装置や、各種サーバ等)と通信を行うことが可能である。すなわち、入出力プロセッサ11aは、無線通信モジュール18およびアンテナ22を介してネットワークに接続し、ネットワークに接続される他のゲーム装置や各種サーバと通信することができる。入出力プロセッサ11aは、定期的にフラッシュメモリ17にアクセスし、ネットワークへ送信する必要があるデータの有無を検出し、当該データが有る場合には、無線通信モジュール18およびアンテナ22を介してネットワークに送信する。また、入出力プロセッサ11aは、他のゲーム装置から送信されてくるデータやダウンロードサーバからダウンロードしたデータを、ネットワーク、アンテナ22および無線通信モジュール18を介して受信し、受信したデータをフラッシュメモリ17に記憶する。CPU10はゲームプログラムを実行することにより、フラッシュメモリ17に記憶されたデータを読み出してゲームプログラムで利用する。フラッシュメモリ17には、ゲーム装置3と他のゲーム装置や各種サーバとの間で送受信されるデータの他、ゲーム装置3を利用してプレイしたゲームのセーブデータ(ゲームの結果データまたは途中データ)が記憶されてもよい。   The game device 3 can connect to a network such as the Internet and communicate with an external information processing device (for example, another game device or various servers). In other words, the input / output processor 11a is connected to the network via the wireless communication module 18 and the antenna 22, and can communicate with other game devices and various servers connected to the network. The input / output processor 11a periodically accesses the flash memory 17 to detect the presence / absence of data that needs to be transmitted to the network. If there is such data, the input / output processor 11a communicates with the network via the wireless communication module 18 and the antenna 22. Send. Further, the input / output processor 11a receives data transmitted from other game devices and data downloaded from the download server via the network, the antenna 22 and the wireless communication module 18, and receives the received data in the flash memory 17. Remember. By executing the game program, the CPU 10 reads out the data stored in the flash memory 17 and uses it in the game program. In the flash memory 17, in addition to data transmitted and received between the game apparatus 3 and other game apparatuses and various servers, save data (game result data or intermediate data) of the game played using the game apparatus 3 May be stored.

また、ゲーム装置3は、コントローラ5からの操作データを受信することが可能である。すなわち、入出力プロセッサ11aは、コントローラ5から送信される操作データをアンテナ23および無線コントローラモジュール19を介して受信し、内部メインメモリ11eまたは外部メインメモリ12のバッファ領域に記憶(一時記憶)する。   The game apparatus 3 can receive operation data from the controller 5. That is, the input / output processor 11a receives the operation data transmitted from the controller 5 via the antenna 23 and the wireless controller module 19, and stores (temporarily stores) it in the buffer area of the internal main memory 11e or the external main memory 12.

また、ゲーム装置3は、他の機器や外部記憶媒体に接続することが可能である。すなわち、入出力プロセッサ11aには、拡張コネクタ20およびメモリカード用コネクタ21が接続される。拡張コネクタ20は、USBやSCSIのようなインターフェースのためのコネクタであり、外部記憶媒体のようなメディアを接続したり、他のコントローラのような周辺機器を接続したり、有線の通信用コネクタを接続することによって無線通信モジュール18に替えてネットワークとの通信を行ったりすることができる。メモリカード用コネクタ21は、メモリカードのような外部記憶媒体を接続するためのコネクタである。例えば、入出力プロセッサ11aは、拡張コネクタ20やメモリカード用コネクタ21を介して外部記憶媒体にアクセスし、外部記憶媒体にデータを保存したり、外部記憶媒体からデータを読み出したりすることができる。   Further, the game apparatus 3 can be connected to another device or an external storage medium. That is, the expansion connector 20 and the memory card connector 21 are connected to the input / output processor 11a. The expansion connector 20 is a connector for an interface such as USB or SCSI, and connects a medium such as an external storage medium, a peripheral device such as another controller, or a wired communication connector. By connecting, communication with the network can be performed instead of the wireless communication module 18. The memory card connector 21 is a connector for connecting an external storage medium such as a memory card. For example, the input / output processor 11a can access an external storage medium via the expansion connector 20 or the memory card connector 21 to store data in the external storage medium or read data from the external storage medium.

ゲーム装置3には、電源ボタン24、リセットボタン25、およびイジェクトボタン26が設けられる。電源ボタン24およびリセットボタン25は、システムLSI11に接続される。電源ボタン24がオンされると、図示しないACアダプタによって外部の電源からゲーム装置3の各構成要素に対して電力が供給される。リセットボタン25が押されると、システムLSI11は、ゲーム装置3の起動プログラムを再起動する。イジェクトボタン26は、ディスクドライブ14に接続される。イジェクトボタン26が押されると、ディスクドライブ14から光ディスク4が排出される。   The game apparatus 3 is provided with a power button 24, a reset button 25, and an eject button 26. The power button 24 and the reset button 25 are connected to the system LSI 11. When the power button 24 is turned on, power is supplied to each component of the game apparatus 3 from an external power source by an AC adapter (not shown). When the reset button 25 is pressed, the system LSI 11 restarts the boot program for the game apparatus 3. The eject button 26 is connected to the disk drive 14. When the eject button 26 is pressed, the optical disk 4 is ejected from the disk drive 14.

[3.コントローラ5の構成]
次に、図3〜図7を参照して、コントローラ5について説明する。図3は、コントローラ5の外観構成を示す斜視図である。図4は、コントローラ5の外観構成を示す斜視図である。図3は、コントローラ5の上側後方から見た斜視図であり、図4は、コントローラ5を下側前方から見た斜視図である。
[3. Configuration of controller 5]
Next, the controller 5 will be described with reference to FIGS. FIG. 3 is a perspective view showing an external configuration of the controller 5. FIG. 4 is a perspective view showing an external configuration of the controller 5. 3 is a perspective view of the controller 5 as seen from the upper rear side, and FIG. 4 is a perspective view of the controller 5 as seen from the lower front side.

図3および図4において、コントローラ5は、例えばプラスチック成型によって形成されたハウジング31を有している。ハウジング31は、その前後方向(図3に示すZ軸方向)を長手方向とした略直方体形状を有しており、全体として大人や子供の片手で把持可能な大きさである。ユーザは、コントローラ5に設けられたボタンを押下すること、および、コントローラ5自体を動かしてその位置や姿勢(傾き)を変えることによってゲーム操作を行うことができる。   3 and 4, the controller 5 includes a housing 31 formed by plastic molding, for example. The housing 31 has a substantially rectangular parallelepiped shape whose longitudinal direction is the front-rear direction (the Z-axis direction shown in FIG. 3), and is a size that can be gripped with one hand of an adult or a child as a whole. The user can perform a game operation by pressing a button provided on the controller 5 and moving the controller 5 itself to change its position and posture (tilt).

ハウジング31には、複数の操作ボタンが設けられる。図3に示すように、ハウジング31の上面には、十字ボタン32a、1番ボタン32b、2番ボタン32c、Aボタン32d、マイナスボタン32e、ホームボタン32f、プラスボタン32g、および電源ボタン32hが設けられる。本明細書では、これらのボタン32a〜32hが設けられるハウジング31の上面を「ボタン面」と呼ぶことがある。一方、図4に示すように、ハウジング31の下面には凹部が形成されており、当該凹部の後面側傾斜面にはBボタン32iが設けられる。これらの各操作ボタン32a〜32iには、ゲーム装置3が実行する情報処理プログラムに応じた機能が適宜割り当てられる。また、電源ボタン32hは遠隔からゲーム装置3本体の電源をオン/オフするためのものである。ホームボタン32fおよび電源ボタン32hは、その上面がハウジング31の上面に埋没している。これによって、ユーザがホームボタン32fまたは電源ボタン32hを誤って押下することを防止することができる。   The housing 31 is provided with a plurality of operation buttons. As shown in FIG. 3, a cross button 32a, a first button 32b, a second button 32c, an A button 32d, a minus button 32e, a home button 32f, a plus button 32g, and a power button 32h are provided on the upper surface of the housing 31. It is done. In the present specification, the upper surface of the housing 31 on which these buttons 32a to 32h are provided may be referred to as a “button surface”. On the other hand, as shown in FIG. 4, a recess is formed on the lower surface of the housing 31, and a B button 32i is provided on the rear inclined surface of the recess. A function corresponding to the information processing program executed by the game apparatus 3 is appropriately assigned to each of the operation buttons 32a to 32i. The power button 32h is for remotely turning on / off the main body of the game apparatus 3. The home button 32 f and the power button 32 h are embedded in the upper surface of the housing 31. Thereby, it is possible to prevent the user from pressing the home button 32f or the power button 32h by mistake.

ハウジング31の後面にはコネクタ33が設けられている。コネクタ33は、コントローラ5に他の機器(例えば、他のセンサユニットやコントローラ)を接続するために利用される。また、ハウジング31の後面におけるコネクタ33の両側には、上記他の機器が容易に離脱することを防止するために係止穴33aが設けられている。   A connector 33 is provided on the rear surface of the housing 31. The connector 33 is used to connect another device (for example, another sensor unit or controller) to the controller 5. Further, locking holes 33a are provided on both sides of the connector 33 on the rear surface of the housing 31 in order to prevent the other devices from being easily detached.

ハウジング31上面の後方には複数(図3では4つ)のLED34a〜34dが設けられる。ここで、コントローラ5には、他のコントローラと区別するためにコントローラ種別(番号)が付与される。各LED34a〜34dは、コントローラ5に現在設定されている上記コントローラ種別をユーザに通知したり、コントローラ5の電池残量をユーザに通知したりする等の目的で用いられる。具体的には、コントローラ5を用いてゲーム操作が行われる際、上記コントローラ種別に応じて複数のLED34a〜34dのいずれか1つが点灯する。   A plurality (four in FIG. 3) of LEDs 34 a to 34 d are provided behind the upper surface of the housing 31. Here, the controller type (number) is assigned to the controller 5 to distinguish it from other controllers. The LEDs 34a to 34d are used for the purpose of notifying the user of the controller type currently set in the controller 5 and notifying the user of the remaining battery level of the controller 5. Specifically, when a game operation is performed using the controller 5, any one of the plurality of LEDs 34a to 34d is turned on according to the controller type.

また、コントローラ5は撮像情報演算部35(図6)を有しており、図4に示すように、ハウジング31前面には撮像情報演算部35の光入射面35aが設けられる。光入射面35aは、マーカ6Rおよび6Lからの赤外光を少なくとも透過する材質で構成される。   Further, the controller 5 has an imaging information calculation unit 35 (FIG. 6), and a light incident surface 35a of the imaging information calculation unit 35 is provided on the front surface of the housing 31, as shown in FIG. The light incident surface 35a is made of a material that transmits at least infrared light from the markers 6R and 6L.

ハウジング31上面における1番ボタン32bとホームボタン32fとの間には、コントローラ5に内蔵されるスピーカ47(図5)からの音を外部に放出するための音抜き孔31aが形成されている。   A sound release hole 31a is formed between the first button 32b and the home button 32f on the upper surface of the housing 31 for emitting sound from the speaker 47 (FIG. 5) built in the controller 5 to the outside.

次に、図5および図6を参照して、コントローラ5の内部構造について説明する。図5および図6は、コントローラ5の内部構造を示す図である。なお、図5は、コントローラ5の上筐体(ハウジング31の一部)を外した状態を示す斜視図である。図6は、コントローラ5の下筐体(ハウジング31の一部)を外した状態を示す斜視図である。図6に示す斜視図は、図5に示す基板30を裏面から見た斜視図となっている。   Next, the internal structure of the controller 5 will be described with reference to FIGS. 5 and 6 are diagrams showing the internal structure of the controller 5. FIG. FIG. 5 is a perspective view showing a state in which the upper housing (a part of the housing 31) of the controller 5 is removed. FIG. 6 is a perspective view showing a state in which the lower casing (a part of the housing 31) of the controller 5 is removed. The perspective view shown in FIG. 6 is a perspective view of the substrate 30 shown in FIG.

図5において、ハウジング31の内部には基板30が固設されており、当該基板30の上主面上に各操作ボタン32a〜32h、各LED34a〜34d、加速度センサ37、アンテナ45、およびスピーカ47等が設けられる。これらは、基板30等に形成された配線(図示せず)によってマイクロコンピュータ(Micro Computer:マイコン)42(図6参照)に接続される。本実施形態では、加速度センサ37は、X軸方向に関してコントローラ5の中心からずれた位置に配置されている。これによって、コントローラ5をZ軸回りに回転させたときのコントローラ5の動きが算出しやすくなる。また、加速度センサ37は、長手方向(Z軸方向)に関してコントローラ5の中心よりも前方に配置されている。また、無線モジュール44(図6)およびアンテナ45によって、コントローラ5がワイヤレスコントローラとして機能する。   In FIG. 5, a substrate 30 is fixed inside the housing 31, and operation buttons 32 a to 32 h, LEDs 34 a to 34 d, an acceleration sensor 37, an antenna 45, and a speaker 47 are provided on the upper main surface of the substrate 30. Etc. are provided. These are connected to a microcomputer (microcomputer) 42 (see FIG. 6) by wiring (not shown) formed on the substrate 30 and the like. In the present embodiment, the acceleration sensor 37 is disposed at a position shifted from the center of the controller 5 with respect to the X-axis direction. This makes it easier to calculate the movement of the controller 5 when the controller 5 is rotated about the Z axis. The acceleration sensor 37 is disposed in front of the center of the controller 5 in the longitudinal direction (Z-axis direction). Further, the controller 5 functions as a wireless controller by the wireless module 44 (FIG. 6) and the antenna 45.

一方、図6において、基板30の下主面上の前端縁に撮像情報演算部35が設けられる。撮像情報演算部35は、コントローラ5の前方から順に赤外線フィルタ38、レンズ39、撮像素子40、および画像処理回路41を備えている。これらの部材38〜41はそれぞれ基板30の下主面に取り付けられる。   On the other hand, in FIG. 6, an imaging information calculation unit 35 is provided at the front edge on the lower main surface of the substrate 30. The imaging information calculation unit 35 includes an infrared filter 38, a lens 39, an imaging element 40, and an image processing circuit 41 in order from the front of the controller 5. These members 38 to 41 are respectively attached to the lower main surface of the substrate 30.

さらに、基板30の下主面上には、上記マイコン42およびバイブレータ46が設けられている。バイブレータ46は、例えば振動モータやソレノイドであり、基板30等に形成された配線によってマイコン42と接続される。マイコン42の指示によりバイブレータ46が作動することによってコントローラ5に振動が発生する。これによって、コントローラ5を把持しているユーザの手にその振動が伝達される、いわゆる振動対応ゲームを実現することができる。本実施形態では、バイブレータ46は、ハウジング31のやや前方寄りに配置される。つまり、バイブレータ46がコントローラ5の中心よりも端側に配置することによって、バイブレータ46の振動によりコントローラ5全体を大きく振動させることができる。また、コネクタ33は、基板30の下主面上の後端縁に取り付けられる。なお、図5および図6に示す他、コントローラ5は、マイコン42の基本クロックを生成する水晶振動子、スピーカ47に音声信号を出力するアンプ等を備えている。   Further, the microcomputer 42 and the vibrator 46 are provided on the lower main surface of the substrate 30. The vibrator 46 is, for example, a vibration motor or a solenoid, and is connected to the microcomputer 42 by wiring formed on the substrate 30 or the like. When the vibrator 46 is actuated by an instruction from the microcomputer 42, vibration is generated in the controller 5. As a result, a so-called vibration-compatible game in which the vibration is transmitted to the user's hand holding the controller 5 can be realized. In the present embodiment, the vibrator 46 is disposed slightly forward of the housing 31. That is, by arranging the vibrator 46 on the end side of the center of the controller 5, the entire controller 5 can be vibrated greatly by the vibration of the vibrator 46. The connector 33 is attached to the rear edge on the lower main surface of the substrate 30. 5 and 6, the controller 5 includes a crystal resonator that generates a basic clock of the microcomputer 42, an amplifier that outputs an audio signal to the speaker 47, and the like.

なお、図3〜図6に示したコントローラ5の形状や、各操作ボタンの形状、加速度センサやバイブレータの数および設置位置等は単なる一例に過ぎず、他の形状、数、および設置位置であってもよい。また、本実施形態では、撮像手段による撮像方向はZ軸正方向であるが、撮像方向はいずれの方向であってもよい。すなわち、コントローラ5における撮像情報演算部35の位置(撮像情報演算部35の光入射面35a)は、ハウジング31の前面でなくてもよく、ハウジング31の外部から光を取り入れることができれば他の面に設けられてもかまわない。   The shape of the controller 5, the shape of each operation button, the number of acceleration sensors and vibrators, and the installation positions shown in FIGS. 3 to 6 are merely examples, and other shapes, numbers, and installation positions may be used. May be. In the present embodiment, the imaging direction by the imaging unit is the positive Z-axis direction, but the imaging direction may be any direction. That is, the position of the imaging information calculation unit 35 in the controller 5 (the light incident surface 35a of the imaging information calculation unit 35) does not have to be the front surface of the housing 31, and other surfaces can be used as long as light can be taken from the outside of the housing 31. May be provided.

図7は、コントローラ5の構成を示すブロック図である。コントローラ5は、操作部32(各操作ボタン32a〜32i)、撮像情報演算部35、通信部36、加速度センサ37、およびジャイロセンサ48を備えている。コントローラ5は、自機に対して行われた操作内容を表すデータを操作データとしてゲーム装置3へ送信するものである。   FIG. 7 is a block diagram showing the configuration of the controller 5. The controller 5 includes an operation unit 32 (operation buttons 32a to 32i), an imaging information calculation unit 35, a communication unit 36, an acceleration sensor 37, and a gyro sensor 48. The controller 5 transmits data representing the content of the operation performed on the own device to the game apparatus 3 as operation data.

操作部32は、上述した各操作ボタン32a〜32iを含み、各操作ボタン32a〜32iに対する入力状態(各操作ボタン32a〜32iが押下されたか否か)を表す操作ボタンデータを通信部36のマイコン42へ出力する。   The operation unit 32 includes the operation buttons 32a to 32i described above, and the operation button data indicating the input state (whether or not each operation button 32a to 32i is pressed) to each operation button 32a to 32i is transmitted to the microcomputer of the communication unit 36. Output to 42.

撮像情報演算部35は、撮像手段が撮像した画像データを解析してその中で輝度が高い領域を判別してその領域の重心位置やサイズなどを算出するためのシステムである。撮像情報演算部35は、例えば最大200フレーム/秒程度のサンプリング周期を有するので、比較的高速なコントローラ5の動きでも追跡して解析することができる。   The imaging information calculation unit 35 is a system for analyzing the image data captured by the imaging unit, discriminating a region having a high luminance in the image data, and calculating a center of gravity position, a size, and the like of the region. Since the imaging information calculation unit 35 has a sampling period of, for example, about 200 frames / second at the maximum, it can track and analyze even a relatively fast movement of the controller 5.

撮像情報演算部35は、赤外線フィルタ38、レンズ39、撮像素子40、および画像処理回路41を含んでいる。赤外線フィルタ38は、コントローラ5の前方から入射する光から赤外線のみを通過させる。レンズ39は、赤外線フィルタ38を透過した赤外線を集光して撮像素子40へ入射させる。撮像素子40は、例えばCMOSセンサやあるいはCCDセンサのような固体撮像素子であり、レンズ39が集光した赤外線を受光して画像信号を出力する。ここで、撮像対象となるマーカ装置6は、赤外光を出力するマーカで構成される。したがって、赤外線フィルタ38を設けることによって、撮像素子40は、赤外線フィルタ38を通過した赤外線だけを受光して画像データを生成するので、撮像対象(マーカ装置6)の画像をより正確に撮像することができる。以下では、撮像素子40によって撮像された画像を撮像画像と呼ぶ。撮像素子40によって生成された画像データは、画像処理回路41で処理される。画像処理回路41は、撮像画像内における撮像対象の位置を算出する。画像処理回路41は、算出された位置を示す座標を通信部36のマイコン42へ出力する。この座標のデータは、マイコン42によって操作データとしてゲーム装置3に送信される。以下では、上記座標を「マーカ座標」と呼ぶ。マーカ座標はコントローラ5自体の向き(傾斜角度)や位置に対応して変化するので、ゲーム装置3はこのマーカ座標を用いてコントローラ5の向きや位置を算出することができる。   The imaging information calculation unit 35 includes an infrared filter 38, a lens 39, an imaging element 40, and an image processing circuit 41. The infrared filter 38 passes only infrared rays from the light incident from the front of the controller 5. The lens 39 collects the infrared light transmitted through the infrared filter 38 and makes it incident on the image sensor 40. The image sensor 40 is a solid-state image sensor such as a CMOS sensor or a CCD sensor, for example, and receives the infrared light collected by the lens 39 and outputs an image signal. Here, the marker device 6 to be imaged is composed of a marker that outputs infrared light. Accordingly, by providing the infrared filter 38, the image sensor 40 receives only the infrared light that has passed through the infrared filter 38 and generates image data, so that the image of the imaging target (marker device 6) can be captured more accurately. Can do. Hereinafter, an image captured by the image sensor 40 is referred to as a captured image. Image data generated by the image sensor 40 is processed by the image processing circuit 41. The image processing circuit 41 calculates the position of the imaging target in the captured image. The image processing circuit 41 outputs coordinates indicating the calculated position to the microcomputer 42 of the communication unit 36. The coordinate data is transmitted to the game apparatus 3 as operation data by the microcomputer 42. Hereinafter, the coordinates are referred to as “marker coordinates”. Since the marker coordinates change corresponding to the direction (tilt angle) and position of the controller 5 itself, the game apparatus 3 can calculate the direction and position of the controller 5 using the marker coordinates.

なお、他の実施形態においては、コントローラ5は画像処理回路41を備えていない構成であってもよく、撮像画像自体がコントローラ5からゲーム装置3へ送信されてもよい。このとき、ゲーム装置3は、画像処理回路41と同様の機能を有する回路あるいはプログラムを有しており、上記マーカ座標を算出するようにしてもよい。   In other embodiments, the controller 5 may not include the image processing circuit 41, and the captured image itself may be transmitted from the controller 5 to the game apparatus 3. At this time, the game apparatus 3 may have a circuit or a program having the same function as the image processing circuit 41, and may calculate the marker coordinates.

加速度センサ37は、コントローラ5の加速度(重力加速度を含む)を検出する、すなわち、コントローラ5に加わる力(重力を含む)を検出する。加速度センサ37は、当該加速度センサ37の検出部に加わっている加速度のうち、センシング軸方向に沿った直線方向の加速度(直線加速度)の値を検出する。例えば、2軸以上の多軸加速度センサの場合には、加速度センサの検出部に加わっている加速度として、各軸に沿った成分の加速度をそれぞれ検出する。なお、加速度センサ37は、例えば静電容量式のMEMS(Micro Electro Mechanical System)型加速度センサであるとするが、他の方式の加速度センサを用いるようにしてもよい。   The acceleration sensor 37 detects the acceleration (including gravity acceleration) of the controller 5, that is, detects the force (including gravity) applied to the controller 5. The acceleration sensor 37 detects the value of the acceleration (linear acceleration) in the linear direction along the sensing axis direction among the accelerations applied to the detection unit of the acceleration sensor 37. For example, in the case of a multi-axis acceleration sensor having two or more axes, the component acceleration along each axis is detected as the acceleration applied to the detection unit of the acceleration sensor. The acceleration sensor 37 is, for example, a capacitive MEMS (Micro Electro Mechanical System) type acceleration sensor, but other types of acceleration sensors may be used.

本実施形態では、加速度センサ37は、コントローラ5を基準とした上下方向(図3に示すY軸方向)、左右方向(図3に示すX軸方向)および前後方向(図3に示すZ軸方向)の3軸方向に関してそれぞれ直線加速度を検出する。加速度センサ37は、各軸に沿った直線方向に関する加速度を検出するものであるため、加速度センサ37からの出力は3軸それぞれの直線加速度の値を表すものとなる。すなわち、検出された加速度は、コントローラ5を基準に設定されるXYZ座標系(コントローラ座標系)における3次元のベクトルとして表される。   In the present embodiment, the acceleration sensor 37 has a vertical direction (Y-axis direction shown in FIG. 3), a horizontal direction (X-axis direction shown in FIG. 3), and a front-back direction (Z-axis direction shown in FIG. 3) with reference to the controller 5. ) Linear acceleration is detected in each of the three axis directions. Since the acceleration sensor 37 detects acceleration in the linear direction along each axis, the output from the acceleration sensor 37 represents the linear acceleration value of each of the three axes. That is, the detected acceleration is represented as a three-dimensional vector in an XYZ coordinate system (controller coordinate system) set with the controller 5 as a reference.

加速度センサ37が検出した加速度を表すデータ(加速度データ)は、通信部36へ出力される。なお、加速度センサ37が検出した加速度は、コントローラ5自体の向き(傾斜角度)や移動に対応して変化するので、ゲーム装置3は取得された加速度データを用いてコントローラ5の向きや移動を算出することができる。本実施形態では、ゲーム装置3は、取得された加速度データに基づいてコントローラ5の姿勢や傾斜角度等を算出する。   Data representing the acceleration detected by the acceleration sensor 37 (acceleration data) is output to the communication unit 36. Note that the acceleration detected by the acceleration sensor 37 changes corresponding to the direction (inclination angle) and movement of the controller 5 itself, so the game apparatus 3 calculates the direction and movement of the controller 5 using the acquired acceleration data. can do. In the present embodiment, the game apparatus 3 calculates the attitude, tilt angle, and the like of the controller 5 based on the acquired acceleration data.

なお、加速度センサ37から出力される加速度の信号に基づいて、ゲーム装置3のプロセッサ(例えばCPU10)またはコントローラ5のプロセッサ(例えばマイコン42)等のコンピュータが処理を行うことによって、コントローラ5に関するさらなる情報を推測または算出(判定)することができることは、当業者であれば本明細書の説明から容易に理解できるであろう。例えば、加速度センサ37を搭載するコントローラ5が静止状態であることを前提としてコンピュータ側の処理が実行される場合(すなわち、加速度センサによって検出される加速度が重力加速度のみであるとして処理が実行される場合)、コントローラ5が現実に静止状態であれば、検出された加速度に基づいてコントローラ5の姿勢が重力方向に対して傾いているか否かまたはどの程度傾いているかを知ることができる。具体的には、加速度センサ37の検出軸が鉛直下方向を向いている状態を基準としたとき、1G(重力加速度)がかかっているか否かによって、コントローラ5が基準に対して傾いているか否かを知ることができるし、その大きさによって基準に対してどの程度傾いているかも知ることができる。また、多軸の加速度センサ37の場合には、さらに各軸の加速度の信号に対して処理を施すことによって、重力方向に対してコントローラ5がどの程度傾いているかをより詳細に知ることができる。この場合において、プロセッサは、加速度センサ37からの出力に基づいてコントローラ5の傾斜角度を算出してもよいし、当該傾斜角度を算出せずに、コントローラ5の傾斜方向を算出するようにしてもよい。このように、加速度センサ37をプロセッサと組み合わせて用いることによって、コントローラ5の傾斜角度または姿勢を判定することができる。   In addition, based on the acceleration signal output from the acceleration sensor 37, a computer such as a processor (for example, the CPU 10) of the game apparatus 3 or a processor (for example, the microcomputer 42) of the controller 5 performs processing, whereby further information regarding the controller 5 is obtained. Those skilled in the art will be able to easily understand from the description of the present specification that can be estimated or calculated (determined). For example, when processing on the computer side is executed on the assumption that the controller 5 on which the acceleration sensor 37 is mounted is stationary (that is, the processing is executed assuming that the acceleration detected by the acceleration sensor is only gravitational acceleration). When the controller 5 is actually stationary, it can be determined whether or not the attitude of the controller 5 is inclined with respect to the direction of gravity based on the detected acceleration. Specifically, whether or not the controller 5 is inclined with respect to the reference depending on whether or not 1G (gravity acceleration) is applied, based on the state in which the detection axis of the acceleration sensor 37 is directed vertically downward. It is possible to know how much it is inclined with respect to the reference according to its size. Further, in the case of the multi-axis acceleration sensor 37, it is possible to know in detail how much the controller 5 is inclined with respect to the direction of gravity by further processing the acceleration signal of each axis. . In this case, the processor may calculate the tilt angle of the controller 5 based on the output from the acceleration sensor 37, or may calculate the tilt direction of the controller 5 without calculating the tilt angle. Good. Thus, by using the acceleration sensor 37 in combination with the processor, the tilt angle or posture of the controller 5 can be determined.

一方、コントローラ5が動的な状態(コントローラ5が動かされている状態)であることを前提とする場合には、加速度センサ37は重力加速度に加えてコントローラ5の移動に応じた加速度を検出するので、検出された加速度から重力加速度の成分を所定の処理により除去することによってコントローラ5の移動方向を知ることができる。また、コントローラ5が動的な状態であることを前提とする場合であっても、検出された加速度から、加速度センサの移動に応じた加速度の成分を所定の処理により除去することによって、重力方向に対するコントローラ5の傾きを知ることが可能である。なお、他の実施例では、加速度センサ37は、内蔵の加速度検出手段で検出された加速度信号をマイコン42へ出力する前に当該加速度信号に対して所定の処理を行うための、組込み式の処理装置または他の種類の専用の処理装置を備えていてもよい。組込み式または専用の処理装置は、例えば、加速度センサ37が静的な加速度(例えば、重力加速度)を検出するために用いられる場合、加速度信号を傾斜角(あるいは、他の好ましいパラメータ)に変換するものであってもよい。   On the other hand, when it is assumed that the controller 5 is in a dynamic state (a state where the controller 5 is moved), the acceleration sensor 37 detects an acceleration corresponding to the movement of the controller 5 in addition to the gravitational acceleration. Therefore, the moving direction of the controller 5 can be known by removing the gravitational acceleration component from the detected acceleration by a predetermined process. Even if it is assumed that the controller 5 is in a dynamic state, the direction of gravity is obtained by removing the acceleration component corresponding to the movement of the acceleration sensor from the detected acceleration by a predetermined process. It is possible to know the inclination of the controller 5 with respect to. In another embodiment, the acceleration sensor 37 is a built-in process for performing a predetermined process on the acceleration signal before outputting the acceleration signal detected by the built-in acceleration detection means to the microcomputer 42. An apparatus or other type of dedicated processing apparatus may be provided. A built-in or dedicated processing device converts the acceleration signal into a tilt angle (or other preferred parameter) if, for example, the acceleration sensor 37 is used to detect static acceleration (eg, gravitational acceleration). It may be a thing.

ジャイロセンサ48は、3軸(本実施形態では、XYZ軸)回りの角速度を検出する。本明細書では、コントローラ5の撮像方向(Z軸正方向)を基準として、X軸回りの回転方向をピッチ方向、Y軸回りの回転方向をヨー方向、Z軸回りの回転方向をロール方向と呼ぶ。ジャイロセンサ48は、3軸回りの角速度を検出することができればよく、用いるジャイロセンサの数および組み合わせはどのようなものであってもよい。例えば、ジャイロセンサ48は、3軸ジャイロセンサであってもよいし、2軸ジャイロセンサと1軸ジャイロセンサとを組み合わせて3軸周りの角速度を検出するものであってもよい。ジャイロセンサ48で検出された角速度を表すデータは、通信部36へ出力される。また、ジャイロセンサ48は1軸または2軸回りの角速度を検出するものであってもよい。   The gyro sensor 48 detects angular velocities about three axes (XYZ axes in the present embodiment). In this specification, with the imaging direction (Z-axis positive direction) of the controller 5 as a reference, the rotation direction around the X axis is the pitch direction, the rotation direction around the Y axis is the yaw direction, and the rotation direction around the Z axis is the roll direction. Call. The gyro sensor 48 only needs to be able to detect angular velocities about three axes, and any number and combination of gyro sensors may be used. For example, the gyro sensor 48 may be a three-axis gyro sensor or a combination of a two-axis gyro sensor and a one-axis gyro sensor to detect an angular velocity around three axes. Data representing the angular velocity detected by the gyro sensor 48 is output to the communication unit 36. Further, the gyro sensor 48 may detect an angular velocity around one axis or two axes.

通信部36は、マイコン42、メモリ43、無線モジュール44、およびアンテナ45を含んでいる。マイコン42は、処理を行う際にメモリ43を記憶領域として用いながら、マイコン42が取得したデータをゲーム装置3へ無線送信する無線モジュール44を制御する。   The communication unit 36 includes a microcomputer 42, a memory 43, a wireless module 44, and an antenna 45. The microcomputer 42 controls the wireless module 44 that wirelessly transmits data acquired by the microcomputer 42 to the game apparatus 3 while using the memory 43 as a storage area when performing processing.

操作部32、撮像情報演算部35、加速度センサ37、およびジャイロセンサ48からマイコン42へ出力されたデータは、一時的にメモリ43に格納される。これらのデータは、操作データ(コントローラ操作データ)としてゲーム装置3へ送信される。すなわち、マイコン42は、ゲーム装置3の無線コントローラモジュール19への送信タイミングが到来すると、メモリ43に格納されている操作データを無線モジュール44へ出力する。無線モジュール44は、例えばBluetooth(ブルートゥース)(登録商標)の技術を用いて、所定周波数の搬送波を操作データで変調し、その微弱電波信号をアンテナ45から放射する。つまり、操作データは、無線モジュール44で微弱電波信号に変調されてコントローラ5から送信される。微弱電波信号はゲーム装置3側の無線コントローラモジュール19で受信される。受信された微弱電波信号について復調や復号を行うことによって、ゲーム装置3は操作データを取得することができる。そして、ゲーム装置3のCPU10は、コントローラ5から取得した操作データを用いてゲーム処理を行う。なお、通信部36から無線コントローラモジュール19への無線送信は所定の周期毎に逐次行われるが、ゲームの処理は1/60秒を単位として(1フレーム時間として)行われることが一般的であるので、この時間以下の周期で送信を行うことが好ましい。コントローラ5の通信部36は、例えば1/200秒に1回の割合で操作データをゲーム装置3の無線コントローラモジュール19へ出力する。   Data output from the operation unit 32, the imaging information calculation unit 35, the acceleration sensor 37, and the gyro sensor 48 to the microcomputer 42 is temporarily stored in the memory 43. These data are transmitted to the game apparatus 3 as operation data (controller operation data). That is, the microcomputer 42 outputs the operation data stored in the memory 43 to the wireless module 44 when the transmission timing to the wireless controller module 19 of the game apparatus 3 arrives. The wireless module 44 modulates a carrier wave of a predetermined frequency with operation data using, for example, Bluetooth (registered trademark) technology, and radiates a weak radio signal from the antenna 45. That is, the operation data is modulated by the wireless module 44 into a weak radio signal and transmitted from the controller 5. The weak radio signal is received by the wireless controller module 19 on the game apparatus 3 side. By demodulating and decoding the received weak radio signal, the game apparatus 3 can acquire operation data. Then, the CPU 10 of the game apparatus 3 performs a game process using the operation data acquired from the controller 5. Note that the wireless transmission from the communication unit 36 to the wireless controller module 19 is sequentially performed at predetermined intervals, but the game processing is generally performed in units of 1/60 seconds (one frame time). Therefore, it is preferable to perform transmission at a period equal to or shorter than this time. The communication unit 36 of the controller 5 outputs the operation data to the wireless controller module 19 of the game apparatus 3 at a rate of once every 1/200 seconds, for example.

以上のように、コントローラ5は、自機に対する操作を表す操作データとして、マーカ座標データ、加速度データ、角速度データ、および操作ボタンデータを送信可能である。また、ゲーム装置3は、上記操作データをゲーム入力として用いてゲーム処理を実行する。したがって、上記コントローラ5を用いることによって、ユーザは、各操作ボタンを押下する従来の一般的なゲーム操作に加えて、コントローラ5自体を動かすゲーム操作を行うことができる。例えば、コントローラ5を任意の姿勢に傾ける操作、コントローラ5によって画面上の任意の位置を指示する操作、および、コントローラ5自体を動かす操作等を行うことが可能となる。   As described above, the controller 5 can transmit the marker coordinate data, the acceleration data, the angular velocity data, and the operation button data as the operation data representing the operation on the own device. Further, the game apparatus 3 executes a game process using the operation data as a game input. Therefore, by using the controller 5, the user can perform a game operation for moving the controller 5 itself in addition to the conventional general game operation for pressing each operation button. For example, an operation of tilting the controller 5 to an arbitrary posture, an operation of instructing an arbitrary position on the screen by the controller 5, an operation of moving the controller 5 itself, and the like can be performed.

なお、コントローラ5は、コントローラ5の動き(位置や姿勢、あるいは、位置や姿勢の変化を含む)を算出するための構成として、ジャイロセンサ48、加速度センサ37、ならびに撮像素子40を有する入力装置8を例として説明する。ただし、他の実施形態においては、コントローラ5は、これらの構成のうち1つまたは2つのみを備える構成であってもよい。また、他の実施形態においては、これらの構成に代えて、または、これらの構成とともに、他のセンサを備えていてもよい。   Note that the controller 5 is an input device 8 having a gyro sensor 48, an acceleration sensor 37, and an image sensor 40 as a configuration for calculating the movement of the controller 5 (including position and orientation, or changes in position and orientation). Will be described as an example. However, in other embodiments, the controller 5 may be configured to include only one or two of these configurations. Moreover, in other embodiment, it may replace with these structures, or may be provided with another sensor with these structures.

[4.ポインティング座標の算出処理の概要]
次に、図8〜図10を参照して、ゲーム装置3において実行されるポインティング座標(コントローラ5によってポインティングされた位置を表す座標)の算出処理の概要を説明する。本実施形態では、ユーザ(プレイヤ)は、コントローラ5を用いて、空間あるいは平面における位置を指定するポインティング操作を行うことが可能である。ユーザは、ポインティング操作を含むコントローラ5に対する操作によってゲーム操作を行う。
[4. Overview of pointing coordinate calculation process]
Next, with reference to FIGS. 8 to 10, an outline of a calculation process of pointing coordinates (coordinates indicating a position pointed by the controller 5) executed in the game apparatus 3 will be described. In the present embodiment, the user (player) can use the controller 5 to perform a pointing operation for designating a position in space or a plane. The user performs a game operation by an operation on the controller 5 including a pointing operation.

まず、ポインティング座標の算出方法の概要を説明する。図8は、ポインティング座標を算出するために設定される所定空間を示す図である。図8において、所定空間(仮想空間)には、コントローラ5と座標面Qとが配置される。所定空間は、現実の空間を表すものであってもよいし、ゲーム空間を表すものであってもよい。つまり、所定空間における位置を表すための空間座標系(X’Y’Z’座標系)は、現実の空間内における位置を表すように設定されてもよいし、所定のゲーム空間等における位置を表すように設定されてもよい。本実施形態においては、Y’軸が所定空間における鉛直方向(Y’軸負方向が重力方向)を向き、X’軸およびZ’軸が所定空間における水平方向を向くように空間座標系が設定される。座標面Qは、ポインティング座標を算出するために設定される平面座標系(ab座標系)によって規定される面である。つまり、空間座標系とは異なる平面座標系が座標面Q上に設定され、座標面Q上の位置がポインティング位置として算出される。本実施形態においては、所定空間においてコントローラ5の位置は固定的に配置され、座標面Qはコントローラ5から所定距離だけ離れた位置に配置される。   First, an outline of a method for calculating pointing coordinates will be described. FIG. 8 is a diagram illustrating a predetermined space set for calculating pointing coordinates. In FIG. 8, a controller 5 and a coordinate plane Q are arranged in a predetermined space (virtual space). The predetermined space may represent a real space or a game space. That is, a space coordinate system (X′Y′Z ′ coordinate system) for representing a position in a predetermined space may be set so as to represent a position in an actual space, or a position in a predetermined game space or the like. It may be set to represent. In the present embodiment, the spatial coordinate system is set so that the Y ′ axis faces the vertical direction in the predetermined space (the Y ′ axis negative direction is the gravity direction), and the X ′ axis and the Z ′ axis face the horizontal direction in the predetermined space. Is done. The coordinate plane Q is a plane defined by a plane coordinate system (ab coordinate system) set for calculating pointing coordinates. That is, a plane coordinate system different from the spatial coordinate system is set on the coordinate plane Q, and the position on the coordinate plane Q is calculated as the pointing position. In the present embodiment, the position of the controller 5 is fixedly arranged in a predetermined space, and the coordinate plane Q is arranged at a position away from the controller 5 by a predetermined distance.

ゲーム装置3は、上記ポインティング座標をコントローラ5の姿勢に基づいて算出する。本実施形態においては、ポインティング座標はコントローラ5の指示方向に基づいて算出される。指示方向とは、コントローラ5の姿勢によって決まる方向である。本実施形態においては、指示方向は、長手形状であるコントローラ5の長手方向(ベクトルZの方向)である。図8に示すように、ゲーム装置3は、平面座標系によって規定される座標面Q上において指示方向が指し示す位置を表すポインティング座標を算出する。ここで、「座標面Q上において指示方向が指し示す位置」とは、理想的には、コントローラ5の位置を通り指示方向に延びる直線と座標面Qとの交点Rの位置である。ただし実際には、ゲーム装置3は、ポインティング座標として上記交点Rの座標を厳密に算出する必要はなく、当該交点Rの付近の位置を表す座標を算出すればよい。以上のように、本実施形態においては、ユーザは、コントローラ5の指示方向を変化させることによってポインティング位置を変更することができるので、コントローラ5を用いてポインティング操作を容易に行うことができる。なお、他の実施形態においては、ポインティング座標は、姿勢に基づいて算出されればよく、姿勢に応じて変化する位置であって、上記交点Rの位置とは異なる他の位置を表す座標であってもよい。   The game apparatus 3 calculates the pointing coordinates based on the attitude of the controller 5. In the present embodiment, the pointing coordinates are calculated based on the direction indicated by the controller 5. The designated direction is a direction determined by the attitude of the controller 5. In the present embodiment, the indication direction is the longitudinal direction of the controller 5 that is a longitudinal shape (the direction of the vector Z). As shown in FIG. 8, the game apparatus 3 calculates pointing coordinates that represent the position indicated by the indicated direction on the coordinate plane Q defined by the plane coordinate system. Here, the “position indicated by the pointing direction on the coordinate plane Q” is ideally the position of the intersection R of the straight line extending in the pointing direction through the position of the controller 5 and the coordinate plane Q. However, in practice, the game apparatus 3 does not have to calculate the coordinates of the intersection R as the pointing coordinates, and may calculate the coordinates representing the position near the intersection R. As described above, in the present embodiment, since the user can change the pointing position by changing the pointing direction of the controller 5, it is possible to easily perform a pointing operation using the controller 5. In other embodiments, the pointing coordinates may be calculated based on the posture, and may be a position that changes according to the posture and represents a position different from the position of the intersection R. May be.

本実施形態においては、ユーザは、座標面Q(平面座標系)を所望の位置に設定することができる。図9は、座標面Qの設定時におけるコントローラ5と座標面Qとを示す図である。コントローラ5に対する所定の設定操作がユーザによって行われた場合、ゲーム装置3は、設定操作時における指示方向の先に座標面Qを配置する。図9に示すように、座標面Qは、コントローラ5の位置から指示方向へ延ばした直線上に原点Oが位置するように配置される。座標面Qは、コントローラ5の位置から所定距離だけ離れた位置に、指示方向と垂直となるように配置される。座標面Qが配置された後、設定操作が再度行われるまでの間は、配置された座標面Q(平面座標系)を用いてポインティング座標が算出される。したがって、ユーザは、コントローラ5を自由な方向に向けて設定操作を行うことによって、設定操作時におけるコントローラ5の方向を基準としてポインティング操作を行うことができる。   In the present embodiment, the user can set the coordinate plane Q (planar coordinate system) to a desired position. FIG. 9 is a diagram illustrating the controller 5 and the coordinate plane Q when the coordinate plane Q is set. When a predetermined setting operation on the controller 5 is performed by the user, the game apparatus 3 places the coordinate plane Q ahead of the instruction direction during the setting operation. As shown in FIG. 9, the coordinate plane Q is arranged such that the origin O is located on a straight line extending from the position of the controller 5 in the indicated direction. The coordinate plane Q is arranged at a position away from the position of the controller 5 by a predetermined distance so as to be perpendicular to the pointing direction. After the coordinate plane Q is arranged, until the setting operation is performed again, pointing coordinates are calculated using the arranged coordinate plane Q (planar coordinate system). Therefore, the user can perform a pointing operation based on the direction of the controller 5 at the time of the setting operation by performing the setting operation with the controller 5 directed in a free direction.

また、ゲーム装置3は、上記所定空間を基準として(所定空間における所定方向を基準として)上記平面座標系の座標軸の向きを設定することが可能であるとともに、コントローラ5を基準として(コントローラ5の向きを基準として)当該座標軸の向きを設定することが可能である。本実施形態においては、コントローラ5の指示方向が水平方向に近い場合、所定空間における所定方向を基準として座標軸の向きが設定される。具体的には、図9に示すように、座標面Qの上方向に対応するb軸が所定空間における鉛直上向き(Y’軸正方向)を向くように平面座標系が設定される。   Further, the game apparatus 3 can set the orientation of the coordinate axes of the plane coordinate system with reference to the predetermined space (with reference to a predetermined direction in the predetermined space), and with the controller 5 as a reference (of the controller 5). It is possible to set the direction of the coordinate axis (based on the direction). In the present embodiment, when the pointing direction of the controller 5 is close to the horizontal direction, the direction of the coordinate axes is set based on the predetermined direction in the predetermined space. Specifically, as shown in FIG. 9, the plane coordinate system is set so that the b-axis corresponding to the upper direction of the coordinate plane Q faces vertically upward (Y′-axis positive direction) in the predetermined space.

また、図10は、指示方向が鉛直方向に近い場合における、設定時におけるコントローラ5と座標面Qとを示す図である。本実施形態においては、コントローラ5の指示方向が鉛直方向に近い場合、コントローラ5の向きを基準として座標軸の向きが設定される。具体的には、図10に示すように、座標面Qの上方向に対応するb軸がコントローラ5における上方向(ベクトルY)を向くように平面座標系が設定される。なお、コントローラ5の指示方向が鉛直方向に近い場合も指示方向が水平方向に近い場合と同様、座標面Qは、コントローラ5の位置から指示方向へ所定距離だけ離れた位置に、指示方向と垂直となるように配置される。   FIG. 10 is a diagram illustrating the controller 5 and the coordinate plane Q at the time of setting when the pointing direction is close to the vertical direction. In the present embodiment, when the pointing direction of the controller 5 is close to the vertical direction, the direction of the coordinate axes is set based on the direction of the controller 5. Specifically, as shown in FIG. 10, the plane coordinate system is set so that the b axis corresponding to the upper direction of the coordinate plane Q faces the upper direction (vector Y) in the controller 5. Note that, when the pointing direction of the controller 5 is close to the vertical direction, the coordinate plane Q is perpendicular to the pointing direction at a position that is a predetermined distance away from the position of the controller 5 in the pointing direction, as in the case where the pointing direction is close to the horizontal direction. It arrange | positions so that it may become.

以上のように、本実施形態においては、座標面Qの座標軸の向きは、設定操作時における指示方向に応じて決定される。すなわち、ゲーム装置3は、指示方向が所定の基準よりも水平方向に近い場合、所定空間における鉛直方向を基準として座標軸の向きを設定し(図9)、指示方向が所定の基準よりも鉛直方向に近い場合、コントローラ5の所定方向を基準として当該座標軸の向きを設定する(図10)。つまり、ゲーム装置3は、異なる2種類の基準を指示方向に応じて使い分けることによって座標軸の向きを設定する。   As described above, in the present embodiment, the orientation of the coordinate axis of the coordinate plane Q is determined according to the instruction direction at the time of the setting operation. That is, when the pointing direction is closer to the horizontal direction than the predetermined reference, the game apparatus 3 sets the direction of the coordinate axis with reference to the vertical direction in the predetermined space (FIG. 9), and the pointing direction is the vertical direction higher than the predetermined reference. When the value is close to, the direction of the coordinate axis is set with reference to a predetermined direction of the controller 5 (FIG. 10). That is, the game apparatus 3 sets the direction of the coordinate axis by using two different types of reference according to the designated direction.

ここで、座標軸の向きを単一の基準で設定する方法では、座標軸の向きを適切に設定することができない場合がある。例えば、所定空間における所定方向を常に基準として座標軸の向きを設定する方法では、コントローラ5の指示方向が鉛直方向に近い場合(図10)において、座標軸の向きを適切に設定することができないおそれがある。すなわち、上記の方法によれば、指示方向が鉛直方向に近い場合、指示方向と鉛直方向との差が小さいために、指示方向が少し変化するだけで座標軸の向きが大きく変化してしまう。そのため、算出されるコントローラ5の姿勢に若干の誤差があったり、ユーザが意図している姿勢と実際に算出される姿勢との間に若干の差があったりするだけで、座標軸の向きがユーザが想定している向きから大きく異なってしまう。そして、座標軸の向きがユーザの意図とは異なる向きに設定される結果、ユーザはポインティング操作に違和感を抱いてしまう。また、指示方向が鉛直方向と一致する場合には、当該鉛直方向を基準にして座標軸の向きを決定することができないので、座標軸の向きを適切に設定することができない。   Here, in the method of setting the direction of the coordinate axis with a single reference, the direction of the coordinate axis may not be set appropriately. For example, in the method of setting the direction of the coordinate axis with the predetermined direction in the predetermined space as a reference at all times, there is a possibility that the direction of the coordinate axis cannot be appropriately set when the indication direction of the controller 5 is close to the vertical direction (FIG. 10). is there. That is, according to the above method, when the pointing direction is close to the vertical direction, the difference between the pointing direction and the vertical direction is small, so that the direction of the coordinate axis changes greatly only by slightly changing the pointing direction. Therefore, there is a slight error in the calculated posture of the controller 5, or there is a slight difference between the posture intended by the user and the actually calculated posture, so that the direction of the coordinate axes is determined by the user. Is greatly different from the direction that is assumed. And as a result of setting the direction of the coordinate axes to be different from the user's intention, the user feels uncomfortable with the pointing operation. In addition, when the pointing direction matches the vertical direction, the direction of the coordinate axis cannot be determined based on the vertical direction, and thus the direction of the coordinate axis cannot be set appropriately.

また例えば、コントローラ5の所定方向を常に基準として座標軸の向きを設定する方法では、コントローラ5の指示方向が水平方向に近い場合(図9)において、座標軸の向きを適切に設定することができないおそれがある。すなわち、上記の方法によれば、コントローラ5の向きによって座標系の向きが変化することになるので、ユーザによるコントローラ5の持ち方によって座標系の向きが異なる。例えば、ユーザがコントローラ5の上方向が所定空間における水平方向を向くようにコントローラ5を持っている場合、上記の方法では、座標系の上方向が所定空間における水平方向となるように座標系が設定される。しかしながら、指示方向が水平方向に近い場合には、コントローラ5の向きあるいは持ち方に関わらず、所定空間における向きと座標系の向きとが一致する(具体的には、所定空間における鉛直上向きが座標系の上方向となる)ことがユーザにとって自然で違和感がないと考えられる。つまり、上記の方法によれば、指示方向が水平方向に近い場合においては、コントローラ5の持ち方によって座標系の上方向が変化してしまう結果、座標軸の向きに関してユーザが違和感を抱く場合がある。   Further, for example, in the method of setting the direction of the coordinate axis with the predetermined direction of the controller 5 as a reference at all times, the direction of the coordinate axis may not be appropriately set when the indicated direction of the controller 5 is close to the horizontal direction (FIG. 9). There is. That is, according to the above method, the orientation of the coordinate system changes depending on the orientation of the controller 5, and therefore the orientation of the coordinate system varies depending on how the controller 5 is held by the user. For example, when the user has the controller 5 so that the upward direction of the controller 5 is directed in the horizontal direction in the predetermined space, in the above method, the coordinate system is set so that the upward direction of the coordinate system becomes the horizontal direction in the predetermined space. Is set. However, when the pointing direction is close to the horizontal direction, the direction in the predetermined space and the direction of the coordinate system coincide with each other regardless of the direction or holding method of the controller 5 (specifically, the vertical upward direction in the predetermined space is the coordinate It is considered natural and uncomfortable for the user. In other words, according to the above method, when the pointing direction is close to the horizontal direction, the upper direction of the coordinate system changes depending on how the controller 5 is held, and as a result, the user may feel uncomfortable with respect to the direction of the coordinate axes. .

以上のように、座標軸の向きを単一の基準で設定する方法では、指示方向がある方向となる場合に座標軸の向きを適切に設定することができない結果、座標系の向きにユーザが違和感を抱き、ポインティング操作の操作性が悪くなるおそれがある。   As described above, in the method of setting the direction of the coordinate axis based on a single reference, the direction of the coordinate axis cannot be appropriately set when the indicated direction is a certain direction. As a result, the user feels uncomfortable with the direction of the coordinate system. There is a risk that the operability of the hugging and pointing operations will deteriorate.

これに対して、本実施形態によれば、ゲーム装置3は、異なる2種類の基準によって座標軸の向きを設定することが可能である。すなわち、指示方向が所定の基準よりも水平方向に近い場合には、所定空間における鉛直方向を基準として上記平面座標系の座標軸の向きが設定され(図9)、指示方向が所定の基準よりも鉛直方向に近い場合には、コントローラ5の所定方向を基準として当該座標軸の向きが設定される(図10)。これによれば、指示方向が所定の基準よりも水平方向に近い場合には、所定空間における向きと座標系の向きとが一致する(具体的には、所定空間における鉛直上向きが座標系の上方向となる)ようにすることによって、ユーザにとって適切な座標系を設定することができる。また、指示方向が所定の基準よりも鉛直方向に近い場合には、コントローラ5の向きに応じた座標軸の向きとすることによって、ユーザにとって適切な座標系を設定することができる。このように、本実施形態によれば、指示方向が水平方向に近い場合であっても鉛直方向に近い場合であっても、座標系を適切に設定することができ、操作性の良いポインティング操作をユーザに提供することができる。   On the other hand, according to the present embodiment, the game apparatus 3 can set the direction of the coordinate axis based on two different types of standards. That is, when the pointing direction is closer to the horizontal direction than the predetermined reference, the direction of the coordinate axis of the planar coordinate system is set with reference to the vertical direction in the predetermined space (FIG. 9), and the pointing direction is set to be higher than the predetermined reference. When it is close to the vertical direction, the direction of the coordinate axis is set with reference to a predetermined direction of the controller 5 (FIG. 10). According to this, when the indicated direction is closer to the horizontal direction than the predetermined reference, the direction in the predetermined space matches the direction of the coordinate system (specifically, the vertical upward direction in the predetermined space is the upper side of the coordinate system). In this case, it is possible to set an appropriate coordinate system for the user. In addition, when the pointing direction is closer to the vertical direction than the predetermined reference, a coordinate system suitable for the user can be set by setting the direction of the coordinate axis according to the direction of the controller 5. Thus, according to the present embodiment, it is possible to appropriately set the coordinate system regardless of whether the pointing direction is close to the horizontal direction or close to the vertical direction, and a pointing operation with good operability. Can be provided to the user.

[5.ゲーム処理の詳細]
次に、本ゲームシステム1において実行されるゲーム処理(情報処理)の詳細を説明する。まず、ゲーム処理において用いられる各種データについて説明する。図11は、ゲーム装置3のメインメモリ(外部メインメモリ12または内部メインメモリ11e)に記憶される主なデータを示す図である。図11に示すように、ゲーム装置3のメインメモリには、ゲームプログラム50、操作データ51、および処理用データ56が記憶される。なお、メインメモリには、図11に示すデータの他、ゲームに登場する各種オブジェクトの画像データやゲームに使用される音声データ等、ゲームに必要なデータが記憶される。また、図11に示す各データが記憶される記憶手段はどのようなものであってもよく、他の実施形態においては、当該各データの一部はフラッシュメモリ17やVRAM11d等に記憶されてもよい。
[5. Details of game processing]
Next, details of game processing (information processing) executed in the game system 1 will be described. First, various data used in the game process will be described. FIG. 11 is a diagram illustrating main data stored in the main memory (the external main memory 12 or the internal main memory 11e) of the game apparatus 3. As shown in FIG. 11, a game program 50, operation data 51, and processing data 56 are stored in the main memory of the game apparatus 3. In addition to the data shown in FIG. 11, the main memory stores data necessary for the game such as image data of various objects appearing in the game and sound data used for the game. Further, any storage means for storing each data shown in FIG. 11 may be used. In other embodiments, a part of each data may be stored in the flash memory 17 or the VRAM 11d. Good.

ゲームプログラム50は、適宜の方法でゲーム装置3に取得され、ゲーム装置3において実行される。本実施形態においては、ゲームプログラム50は、ゲーム装置3に電源が投入された後の適宜のタイミングで光ディスク4からその一部または全部が読み込まれてメインメモリに記憶される。なお、ゲームプログラム50は、光ディスク4に代えて、フラッシュメモリ17やゲーム装置3の外部装置から(例えばインターネットを介して)取得されてもよい。また、ゲームプログラム50に含まれる一部(例えば、コントローラ5の姿勢を算出するためのプログラム)または全部が、ゲーム装置3内に予め記憶されていてもよい。   The game program 50 is acquired by the game apparatus 3 by an appropriate method and executed in the game apparatus 3. In the present embodiment, a part or all of the game program 50 is read from the optical disc 4 and stored in the main memory at an appropriate timing after the game apparatus 3 is powered on. The game program 50 may be obtained from the flash memory 17 or an external device of the game apparatus 3 (for example, via the Internet) instead of the optical disc 4. Further, a part (for example, a program for calculating the attitude of the controller 5) or the whole included in the game program 50 may be stored in the game apparatus 3 in advance.

操作データ51は、コントローラ5に対するユーザ(プレイヤ)の操作を表すデータである。操作データ51は、コントローラ5から送信されてゲーム装置3において受信(取得)され、メインメモリに記憶される。なお、ゲーム装置3は、複数のコントローラと通信可能であり、各コントローラから操作データをそれぞれ取得することが可能である。コントローラが複数である場合、各コントローラからそれぞれ送信されてくる各操作データがメインメモリにそれぞれ記憶される。メインメモリには、コントローラ5毎に最新の(最後に取得された)ものから順に所定個数の操作データが記憶されてもよい。本実施形態においては、操作データ51には、角速度データ52、加速度データ53、マーカ座標データ54、および操作ボタンデータ55が含まれる。   The operation data 51 is data representing a user (player) operation on the controller 5. The operation data 51 is transmitted from the controller 5, received (acquired) by the game apparatus 3, and stored in the main memory. The game apparatus 3 can communicate with a plurality of controllers, and can acquire operation data from each controller. When there are a plurality of controllers, each operation data transmitted from each controller is stored in the main memory. A predetermined number of operation data may be stored in the main memory in order from the latest (last acquired) for each controller 5. In the present embodiment, the operation data 51 includes angular velocity data 52, acceleration data 53, marker coordinate data 54, and operation button data 55.

角速度データ52は、ジャイロセンサ48によって検出された角速度を表すデータである。角速度データ52は、コントローラ5の角速度を表すものであればよく、本実施形態においては、図3に示すXYZの3軸回りのそれぞれの角速度を表す。なお、他の実施形態においては、角速度データ52は、任意の1以上の方向に関する角速度を表すものであってもよい。   The angular velocity data 52 is data representing the angular velocity detected by the gyro sensor 48. The angular velocity data 52 only needs to represent the angular velocity of the controller 5, and in the present embodiment, represents the angular velocities around the three axes XYZ shown in FIG. In other embodiments, the angular velocity data 52 may represent angular velocities related to any one or more directions.

加速度データ53は、加速度センサ37によって検出された加速度(加速度ベクトル)を表すデータである。加速度データ53は、コントローラ5の加速度を表すものであればよく、本実施形態においては、図3に示すXYZの3軸の方向に関する加速度を各成分とする3次元の加速度ベクトルを表す。なお、他の実施形態においては、加速度データ53は、任意の1以上の方向に関する加速度を表すものであってもよい。   The acceleration data 53 is data representing the acceleration (acceleration vector) detected by the acceleration sensor 37. The acceleration data 53 only needs to represent the acceleration of the controller 5, and in the present embodiment, represents the three-dimensional acceleration vector having the respective components in the XYZ three-axis directions shown in FIG. In other embodiments, the acceleration data 53 may represent acceleration in any one or more directions.

マーカ座標データ54は、撮像情報演算部35の画像処理回路41によって算出される座標、すなわち上記マーカ座標を表すデータである。マーカ座標は、撮像画像に対応する平面上の位置を表すための2次元座標系で表現される。なお、撮像素子40の撮像可能な範囲内にマーカ6Rおよび6Lがそれぞれ含まれるかどうかによって、マーカ座標データ54は、2つのマーカ座標を表す場合もあるし、1つのマーカ座標を表す場合もあるし、マーカ座標がないことを表す場合もある。   The marker coordinate data 54 is data representing coordinates calculated by the image processing circuit 41 of the imaging information calculation unit 35, that is, the marker coordinates. The marker coordinates are expressed in a two-dimensional coordinate system for representing a position on a plane corresponding to the captured image. Note that the marker coordinate data 54 may represent two marker coordinates or one marker coordinate depending on whether or not the markers 6R and 6L are included within the imageable range of the image sensor 40, respectively. In some cases, the marker coordinates are not present.

操作ボタンデータ55は、各操作ボタン32a〜32iに対する入力状態を示すデータである。   The operation button data 55 is data indicating an input state for each of the operation buttons 32a to 32i.

なお、操作データ51は、コントローラ5に対するプレイヤの操作を表すものであればよく、本実施形態において操作データ51に含まれる各データの一部のみを含むものであってもよい。また、コントローラ5が他の入力手段(例えば、タッチパネルやアナログスティック等)を有する場合には、操作データ51は、当該他の入力手段に対する操作を表すデータを含んでいてもよい。なお、コントローラ5自体の姿勢をゲーム操作として用いる場合には、操作データ51は、角速度データ52、加速度データ53、またはマーカ座標データ54のように、コントローラ5自体の姿勢に応じて値が変化するデータを含むようにする。   The operation data 51 only needs to represent the player's operation on the controller 5, and may include only a part of each data included in the operation data 51 in the present embodiment. When the controller 5 has other input means (for example, a touch panel, an analog stick, etc.), the operation data 51 may include data representing an operation on the other input means. When the attitude of the controller 5 itself is used as a game operation, the value of the operation data 51 changes according to the attitude of the controller 5 itself, such as angular velocity data 52, acceleration data 53, or marker coordinate data 54. Include data.

処理用データ56は、後述するゲーム処理(図12)において用いられるデータである。処理用データ56は、姿勢データ57、傾斜度データ58、座標面データ59、ポインティング座標データ63を含む。なお、図11に示すデータの他、処理用データ56は、ゲームに登場する各種オブジェクトに設定される各種パラメータを表すデータ等、ゲーム処理において用いられる各種データを含む。   The processing data 56 is data used in a game process (FIG. 12) described later. The processing data 56 includes posture data 57, inclination data 58, coordinate plane data 59, and pointing coordinate data 63. In addition to the data shown in FIG. 11, the processing data 56 includes various data used in the game processing, such as data representing various parameters set for various objects appearing in the game.

姿勢データ57は、コントローラ5の姿勢を表すデータである。コントローラ5の姿勢は、例えば、所定の基準姿勢から現在の姿勢への回転を表す回転行列によって表現されてもよいし、3次のベクトルまたは3つの角度によって表現されてもよい。また、本実施形態においては、コントローラ5の姿勢として3次元空間における姿勢が用いられるが、他の実施形態においては、2次元平面における姿勢が用いられてもよい。本実施形態では、姿勢データ57は、上記操作データ51に含まれる角速度データ52、加速度データ53、およびマーカ座標データ54に基づいて算出される。姿勢データ57の算出方法についてはステップS3で後述する。   The attitude data 57 is data representing the attitude of the controller 5. The posture of the controller 5 may be expressed by, for example, a rotation matrix representing rotation from a predetermined reference posture to the current posture, or may be expressed by a cubic vector or three angles. In the present embodiment, a posture in a three-dimensional space is used as the posture of the controller 5, but in another embodiment, a posture in a two-dimensional plane may be used. In the present embodiment, the posture data 57 is calculated based on the angular velocity data 52, acceleration data 53, and marker coordinate data 54 included in the operation data 51. A method for calculating the attitude data 57 will be described later in step S3.

傾斜度データ58は、コントローラ5の指示方向の傾斜度を表すデータである。傾斜度は、指示方向が所定空間における鉛直方向(または水平方向)からどの程度傾いているかを示す。傾斜度データ58は、姿勢データ57に基づいて算出される。   The inclination data 58 is data representing the inclination in the direction indicated by the controller 5. The degree of inclination indicates how much the indicated direction is inclined from the vertical direction (or horizontal direction) in the predetermined space. The inclination data 58 is calculated based on the attitude data 57.

座標面データ59は、上述の座標面Qの姿勢を表すデータである。座標面データ59は、上方向データ60、右方向データ61、および奥行き方向データ62を含む。上方向データ60は、座標面Q(ab座標系)における上方向を表し、具体的には、b軸正方向を向く単位ベクトルを表す。右方向データ61は、座標面Q(ab座標系)における右方向を表し、具体的には、a軸正方向を向く単位ベクトルを表す。奥行き方向データ62は、座標面Q(ab座標系)における奥行き方向を表し、具体的には、座標面Qに垂直であり、コントローラ5の位置から原点Oの方を向く単位ベクトルを表す。座標面データ59は、姿勢データ57および傾斜度データ58に基づいて算出される。   The coordinate plane data 59 is data representing the attitude of the coordinate plane Q described above. The coordinate plane data 59 includes upward direction data 60, right direction data 61, and depth direction data 62. The upward data 60 represents the upward direction on the coordinate plane Q (ab coordinate system), and specifically represents a unit vector that faces the positive direction of the b-axis. The right direction data 61 represents the right direction in the coordinate plane Q (ab coordinate system), and specifically represents a unit vector that faces the positive direction of the a axis. The depth direction data 62 represents the depth direction in the coordinate plane Q (ab coordinate system), and specifically represents a unit vector that is perpendicular to the coordinate plane Q and faces the origin O from the position of the controller 5. The coordinate plane data 59 is calculated based on the attitude data 57 and the inclination data 58.

ポインティング座標データ63は、上述のポインティング座標を表すデータである。すなわち、ポインティング座標データ63は、ab座標系における2次元座標を表す。ポインティング座標データ63は、上記姿勢データ57および座標面データ59に基づいて算出される。   The pointing coordinate data 63 is data representing the above-described pointing coordinates. That is, the pointing coordinate data 63 represents two-dimensional coordinates in the ab coordinate system. The pointing coordinate data 63 is calculated based on the posture data 57 and the coordinate plane data 59.

次に、ゲーム装置3において実行されるゲーム処理の詳細を、図12〜図17を用いて説明する。図12は、ゲーム装置3において実行されるゲーム処理の流れを示すメインフローチャートである。ゲーム装置3の電源が投入されると、ゲーム装置3のCPU10は、図示しないブートROMに記憶されている起動プログラムを実行し、これによってメインメモリ等の各ユニットが初期化される。そして、光ディスク4に記憶されたゲームプログラムがメインメモリに読み込まれ、CPU10によって当該ゲームプログラムの実行が開始される。図12に示すフローチャートは、以上の処理が完了した後に行われる処理を示すフローチャートである。なお、ゲーム装置3においては、電源投入後にゲームプログラムがすぐに実行される構成であってもよいし、電源投入後にまず所定のメニュー画面を表示する内蔵プログラムが実行され、その後例えばプレイヤによるメニュー画面に対する選択操作によってゲームの開始が指示されたことに応じてゲームプログラムが実行される構成であってもよい。   Next, details of the game process executed in the game apparatus 3 will be described with reference to FIGS. FIG. 12 is a main flowchart showing a flow of game processing executed in the game apparatus 3. When the power of the game apparatus 3 is turned on, the CPU 10 of the game apparatus 3 executes a startup program stored in a boot ROM (not shown), whereby each unit such as the main memory is initialized. Then, the game program stored in the optical disc 4 is read into the main memory, and the CPU 10 starts executing the game program. The flowchart shown in FIG. 12 is a flowchart showing processing performed after the above processing is completed. Note that the game device 3 may be configured such that the game program is executed immediately after the power is turned on, or a built-in program that displays a predetermined menu screen is executed first after the power is turned on. The game program may be executed in response to an instruction to start the game by a selection operation.

なお、以下で説明するフローチャート(図12および図13)における各ステップの処理は、単なる一例に過ぎず、同様の結果が得られるのであれば、各ステップの処理順序を入れ替えてもよい。また、変数の値や、判断ステップで利用される閾値も、単なる一例に過ぎず、必要に応じて他の値を採用してもよい。また、本実施形態では、上記フローチャートの各ステップの処理をCPU10が実行するものとして説明するが、上記フローチャートにおける一部のステップの処理を、CPU10以外のプロセッサや専用回路が実行するようにしてもよい。   Note that the processing of each step in the flowcharts described below (FIGS. 12 and 13) is merely an example, and the processing order of each step may be changed as long as similar results are obtained. Moreover, the value of the variable and the threshold value used in the determination step are merely examples, and other values may be adopted as necessary. In the present embodiment, the processing of each step in the flowchart is described as being executed by the CPU 10. However, the processing of some steps in the flowchart may be executed by a processor or a dedicated circuit other than the CPU 10. Good.

まずステップS1において、CPU10は初期処理を実行する。初期処理は、仮想のゲーム空間を構築し、ゲーム空間に登場する各オブジェクトを初期位置に配置したり、ゲーム処理で用いる各種パラメータの初期値を設定したりする処理である。本実施形態においては、初期処理において座標面は所定の初期位置および初期姿勢に設定される。すなわち、所定の初期位置および初期姿勢を表すデータが座標面データ59としてメインメモリに記憶される。なお、他の実施形態においては、初期処理において座標面は設定されなくてもよい。このとき、後述するステップS2〜S8の処理ループにおいて、設定操作が最初に行われるまでは、ポインティング座標を算出する処理(ステップS6)は実行されなくてもよい。上記ステップS1の次にステップS2の処理が実行される。以降、ステップS2〜S8の一連の処理からなる処理ループが所定時間(1フレーム時間)に1回の割合で繰り返し実行される。   First, in step S1, the CPU 10 executes an initial process. The initial process is a process of constructing a virtual game space, placing each object appearing in the game space at an initial position, and setting initial values of various parameters used in the game process. In the present embodiment, the coordinate plane is set to a predetermined initial position and initial posture in the initial processing. That is, data representing a predetermined initial position and initial posture is stored in the main memory as coordinate plane data 59. In other embodiments, the coordinate plane may not be set in the initial process. At this time, in the processing loop of steps S2 to S8 described later, the processing for calculating the pointing coordinates (step S6) may not be executed until the setting operation is first performed. Following step S1, the process of step S2 is executed. Thereafter, a processing loop composed of a series of steps S2 to S8 is repeatedly executed at a rate of once per predetermined time (one frame time).

ステップS2において、CPU10は、コントローラ5から操作データを取得する。すなわち、コントローラ5は操作データをゲーム装置3へ繰り返し送信するので、ゲーム装置3においては、無線コントローラモジュール19が操作データを逐次受信し、受信された操作データが入出力プロセッサ11aによってメインメモリに逐次記憶される。メインメモリに記憶される操作データ51は、後述するステップS3〜S7の処理における適宜のタイミングで読み出される。ステップS2の次にステップS3の処理が実行される。   In step S <b> 2, the CPU 10 acquires operation data from the controller 5. That is, since the controller 5 repeatedly transmits operation data to the game apparatus 3, in the game apparatus 3, the wireless controller module 19 sequentially receives the operation data, and the received operation data is sequentially received by the input / output processor 11a to the main memory. Remembered. The operation data 51 stored in the main memory is read at an appropriate timing in the processing of steps S3 to S7 described later. Following step S2, the process of step S3 is executed.

ステップS3において、CPU10は、コントローラ5の姿勢を算出する。本実施形態においては、コントローラ5の姿勢は、操作データ51が表す、姿勢を算出するための物理量に基づいて算出される。なお、本実施形態においては、姿勢を算出するための物理量として、角速度データ52が表す角速度と、加速度データ53が表す加速度と、マーカ座標データ54が表すマーカ座標とが用いられる。以下、姿勢算出処理の詳細について説明する。   In step S <b> 3, the CPU 10 calculates the attitude of the controller 5. In the present embodiment, the attitude of the controller 5 is calculated based on a physical quantity for calculating the attitude represented by the operation data 51. In the present embodiment, the angular velocity represented by the angular velocity data 52, the acceleration represented by the acceleration data 53, and the marker coordinates represented by the marker coordinate data 54 are used as physical quantities for calculating the posture. Details of the posture calculation process will be described below.

姿勢算出処理においては、まず、CPU10は、角速度データ52に基づいてコントローラ5の姿勢を算出する。角速度に基づく姿勢を算出する方法はどのような方法であってもよいが、当該姿勢は、前回の姿勢(前回の処理ループにおけるステップS3で算出された姿勢)と、今回の角速度(今回の処理ループにおけるステップS2で取得された角速度)とを用いて算出される。具体的には、CPU10は、前回の姿勢を今回の角速度で単位時間分だけ回転させることによって姿勢を算出する。算出された姿勢を表すデータはメインメモリに記憶される。   In the posture calculation process, first, the CPU 10 calculates the posture of the controller 5 based on the angular velocity data 52. Any method may be used for calculating the posture based on the angular velocity. The posture is calculated based on the previous posture (the posture calculated in step S3 in the previous processing loop) and the current angular velocity (current processing). And the angular velocity obtained in step S2 in the loop). Specifically, the CPU 10 calculates the posture by rotating the previous posture by a unit time at the current angular velocity. Data representing the calculated posture is stored in the main memory.

なお、角速度から姿勢を算出する場合、初期姿勢を定めておくのがよい。つまり、コントローラ5の姿勢を角速度から算出する場合には、CPU10は、最初にコントローラ5の初期姿勢を設定しておく。コントローラ5の初期姿勢は、加速度データ53に基づいて算出されてもよいし、コントローラ5を特定の姿勢にした状態でプレイヤに所定の操作を行わせることで、所定の操作が行われた時点における特定の姿勢を初期姿勢として設定するようにしてもよい。なお、空間における所定方向を基準とした絶対的な姿勢としてコントローラ5の姿勢を算出する場合には上記初期姿勢を算出することが良い。一方、例えばゲーム開始時点におけるコントローラ5の姿勢を基準とした相対的な姿勢としてコントローラ5の姿勢を算出する場合には、上記初期姿勢は算出されなくてもよい。   When calculating the attitude from the angular velocity, it is preferable to determine the initial attitude. That is, when calculating the attitude of the controller 5 from the angular velocity, the CPU 10 first sets the initial attitude of the controller 5. The initial posture of the controller 5 may be calculated based on the acceleration data 53, or when a predetermined operation is performed by causing the player to perform a predetermined operation with the controller 5 in a specific posture. A specific posture may be set as the initial posture. In addition, when calculating the attitude | position of the controller 5 as an absolute attitude | position on the basis of the predetermined direction in space, it is good to calculate the said initial attitude | position. On the other hand, for example, when calculating the attitude of the controller 5 as a relative attitude based on the attitude of the controller 5 at the start of the game, the initial attitude may not be calculated.

角速度に基づいて姿勢を算出すると次に、CPU10は、算出された姿勢を、コントローラ5の加速度に基づいて補正する。ここで、コントローラ5がほぼ静止している状態では、コントローラ5に対して加えられる加速度は重力加速度に相当する。つまり、この状態では、加速度データ53が表す加速度ベクトルは、コントローラ5における重力方向を表す。したがって、CPU10は、角速度に基づいて算出された姿勢の下方向(重力方向)を、加速度ベクトルの表す重力方向へ近づける補正を行う。すなわち、上記下方向が加速度ベクトルの表す重力方向へ所定の割合で近づくように、上記姿勢を回転させる。これによって、角速度に基づく姿勢を、加速度に基づく重力方向を考慮した姿勢となるように補正することができる。なお、上記所定の割合は、予め定められた固定値であってもよいし、検出される加速度等に応じて設定されてもよい。   When the posture is calculated based on the angular velocity, the CPU 10 next corrects the calculated posture based on the acceleration of the controller 5. Here, in a state where the controller 5 is substantially stationary, the acceleration applied to the controller 5 corresponds to the gravitational acceleration. That is, in this state, the acceleration vector represented by the acceleration data 53 represents the direction of gravity in the controller 5. Therefore, the CPU 10 performs correction so that the downward direction (gravity direction) of the posture calculated based on the angular velocity approaches the gravitational direction represented by the acceleration vector. That is, the posture is rotated so that the downward direction approaches the gravitational direction represented by the acceleration vector at a predetermined rate. Accordingly, the posture based on the angular velocity can be corrected so as to be a posture considering the gravity direction based on the acceleration. The predetermined ratio may be a predetermined fixed value or may be set according to detected acceleration or the like.

加速度に基づく補正を行うと次に、CPU10は、マーカ座標に基づいてコントローラ5の姿勢を補正する。まず、CPU10は、マーカ座標に基づくコントローラ5の姿勢を算出する。マーカ座標は、撮像画像内における2つのマーカ(マーカ6Lおよび6R、または、マーカ55Aおよび55B)の位置を示すので、これらの位置からコントローラ5の姿勢を算出することができる。次に、CPU10は、マーカ座標に基づく姿勢を用いて、角速度に基づく姿勢を補正する。具体的には、CPU10は、角速度に基づく姿勢をマーカ座標に基づく姿勢へ所定の割合で近づける補正を行う。この所定の割合は、例えば予め定められた固定値である。以上のようにして得られた補正後の姿勢が、コントローラ5の姿勢として用いられる。すなわち、当該補正後の姿勢を表すデータが姿勢データ57としてメインメモリに記憶される。なお、コントローラ5の姿勢はどのような形式で表現されてもよいが、本実施形態においては、当該姿勢は、所定空間においてコントローラ5の先端方向を表すベクトル(後述するベクトルZ)と、コントローラ5の上方向を表すベクトル(後述するベクトルY)とを含む形式で表される。また、本実施形態においては、ベクトルYおよびベクトルZはそれぞれ、長さが1の単位ベクトルに正規化されるものとする。上記ステップS3の次にステップS4の処理が実行される。   Once the correction based on the acceleration is performed, the CPU 10 corrects the attitude of the controller 5 based on the marker coordinates. First, the CPU 10 calculates the attitude of the controller 5 based on the marker coordinates. Since the marker coordinates indicate the positions of two markers (markers 6L and 6R or markers 55A and 55B) in the captured image, the attitude of the controller 5 can be calculated from these positions. Next, the CPU 10 corrects the posture based on the angular velocity using the posture based on the marker coordinates. Specifically, the CPU 10 corrects the posture based on the angular velocity to approach the posture based on the marker coordinates at a predetermined rate. This predetermined ratio is, for example, a predetermined fixed value. The corrected posture obtained as described above is used as the posture of the controller 5. That is, data representing the corrected posture is stored in the main memory as posture data 57. Although the attitude of the controller 5 may be expressed in any form, in the present embodiment, the attitude is a vector (a vector Z described later) representing the tip direction of the controller 5 in a predetermined space, and the controller 5. And a vector (a vector Y to be described later) representing the upward direction. In the present embodiment, it is assumed that the vector Y and the vector Z are each normalized to a unit vector having a length of 1. Following step S3, the process of step S4 is executed.

以上のように、本実施形態においては、コントローラ5は、ジャイロセンサ48および加速度センサ37を含むセンサ部を備え、ゲーム装置3は、センサ部の検出結果(角速度データ52および加速度データ53)に基づいてコントローラ5の姿勢を算出する。これによって、コントローラ5がどのような向きであってもコントローラ5の姿勢を算出することができる。なお、本実施形態においては、角速度と加速度とマーカ座標という3つの情報に基づいてコントローラ5の姿勢が算出されたが、他の実施形態においては、上記3つの情報のうちの1つまたは2つに基づいて姿勢が算出されてもよい。また、他の実施形態においては、上記3つの情報とは異なる他の情報に基づいて姿勢が算出されてもよい。例えば、ゲームシステム1がコントローラ5を撮像するカメラを備えている場合には、ゲーム装置3は、当該カメラによって撮像された撮像結果を取得し、撮像結果を用いてコントローラ5の姿勢を算出するようにしてもよい。   As described above, in the present embodiment, the controller 5 includes the sensor unit including the gyro sensor 48 and the acceleration sensor 37, and the game apparatus 3 is based on the detection results (angular velocity data 52 and acceleration data 53) of the sensor unit. Then, the attitude of the controller 5 is calculated. As a result, the orientation of the controller 5 can be calculated regardless of the orientation of the controller 5. In this embodiment, the attitude of the controller 5 is calculated based on three pieces of information such as angular velocity, acceleration, and marker coordinates. However, in other embodiments, one or two of the above three pieces of information are used. The posture may be calculated based on In other embodiments, the posture may be calculated based on other information different from the above three pieces of information. For example, when the game system 1 includes a camera that images the controller 5, the game apparatus 3 acquires an imaging result captured by the camera and calculates the attitude of the controller 5 using the imaging result. It may be.

ステップS4において、CPU10は、座標系を設定するための所定の条件が満たされたか否かを判定する。この所定の条件はどのような条件であってもよく、本実施形態においては、所定の設定操作が行われたことである。つまり、ステップS4においてCPU10は、設定操作が行われたか否かを判定する。設定操作は、ポインティング座標を算出するための座標面Qを設定(あるいは再設定)するための操作である。設定操作はどのような操作であってもよく、本実施形態においては、コントローラ5の所定のボタン(例えばBボタン32i)を押下する操作である。CPU10は、操作データ51をメインメモリから読み出し、上記設定操作が行われたか否かを操作データ51に基づいて判定する。ステップS4の判定結果が肯定である場合、ステップS5の処理が実行される。一方、ステップS4の判定結果が否定である場合、ステップS5の処理がスキップされてステップS6の処理が実行される。   In step S4, the CPU 10 determines whether or not a predetermined condition for setting the coordinate system is satisfied. The predetermined condition may be any condition, and in the present embodiment, a predetermined setting operation is performed. That is, in step S4, the CPU 10 determines whether or not a setting operation has been performed. The setting operation is an operation for setting (or resetting) the coordinate plane Q for calculating the pointing coordinates. The setting operation may be any operation. In this embodiment, the setting operation is an operation of pressing a predetermined button (for example, the B button 32i) of the controller 5. The CPU 10 reads the operation data 51 from the main memory and determines whether or not the setting operation has been performed based on the operation data 51. If the determination result of step S4 is affirmative, the process of step S5 is executed. On the other hand, if the determination result of step S4 is negative, the process of step S5 is skipped and the process of step S6 is executed.

なお、他の実施形態においては、上記所定の条件は、例えばゲームに関する条件であってもよい。具体的には、特定のアイテムを使用する際にポインティング操作が可能となるゲームにおいて、ゲーム装置3は、当該アイテムを取得したこと、あるいは、アイテムの使用が開始されることを上記所定の条件として用いてもよい。   In another embodiment, the predetermined condition may be a condition relating to a game, for example. Specifically, in a game in which a pointing operation is possible when a specific item is used, the game apparatus 3 obtains the item or starts using the item as the predetermined condition. It may be used.

ステップS5において、CPU10は座標系設定処理を実行する。座標系設定処理は、ポインティング座標を算出するための平面座標系(座標面Q)を所定空間に設定する処理である。つまり、本実施形態においては、設定操作が行われたことに応じて、平面座標系が設定される。また、すでに平面座標系が設定されている場合には、設定操作が行われたことに応じて、平面座標系が再設定される。   In step S5, the CPU 10 executes a coordinate system setting process. The coordinate system setting process is a process of setting a plane coordinate system (coordinate plane Q) for calculating pointing coordinates in a predetermined space. That is, in this embodiment, the plane coordinate system is set according to the setting operation being performed. If a plane coordinate system has already been set, the plane coordinate system is reset according to the setting operation.

本実施形態においては、座標系設定処理において、CPU10は、コントローラ5の指示方向が所定の基準よりも水平方向に近い場合(後述する傾斜度A=1の場合)、所定空間における鉛直方向を基準として座標軸の向きを設定する。また、指示方向が所定の基準よりも鉛直方向に近い場合(傾斜度A=0の場合)、CPU10は、コントローラ5の所定方向を基準として座標軸の向きを設定する。このような座標系設定処理によって、指示方向が水平方向に近い場合も鉛直方向に近い場合も、座標系を適切な方向に設定することができる。以下、図13を参照して、座標系設定処理の詳細について説明する。   In the present embodiment, in the coordinate system setting process, the CPU 10 uses the vertical direction in the predetermined space as a reference when the indicated direction of the controller 5 is closer to the horizontal direction than the predetermined reference (when the inclination A = 1 described later). Set the orientation of the coordinate axes as When the indicated direction is closer to the vertical direction than the predetermined reference (when the inclination A = 0), the CPU 10 sets the direction of the coordinate axis with reference to the predetermined direction of the controller 5. By such a coordinate system setting process, the coordinate system can be set in an appropriate direction regardless of whether the indicated direction is close to the horizontal direction or close to the vertical direction. Hereinafter, the details of the coordinate system setting process will be described with reference to FIG.

図13は、図12に示す座標系設定処理(ステップS5)の詳細な流れを示すフローチャートである。座標系設定処理においてはまずステップS11において、CPU10はコントローラ5の指示方向の傾斜度Aを算出する。傾斜度Aは、指示方向が所定空間における水平方向(または鉛直方向)からの傾き度合を示す。ここで、本実施形態における座標系算出処理では、CPU10は、コントローラ5の指示方向が所定空間における水平方向に近いほど、座標系の所定軸(b軸)が鉛直方向に近くなり、指示方向が鉛直方向に近いほど、当該所定軸がコントローラ5の所定方向(上方向)に近くなるように座標系を設定する。上記傾斜度Aは、指示方向が所定空間における水平方向(あるいは鉛直方向)に近いかどうかの指標として用いるために算出される。傾斜度Aは、ステップS3で算出されたコントローラ5の姿勢に基づいて算出される。以下、図14を参照して、傾斜度Aの算出方法を説明する。   FIG. 13 is a flowchart showing a detailed flow of the coordinate system setting process (step S5) shown in FIG. In the coordinate system setting process, first, in step S <b> 11, the CPU 10 calculates the inclination A in the direction indicated by the controller 5. The inclination A indicates the degree of inclination from the horizontal direction (or vertical direction) in the predetermined space. Here, in the coordinate system calculation process in the present embodiment, the CPU 10 determines that the predetermined axis (b axis) of the coordinate system is closer to the vertical direction and the indicated direction is closer to the horizontal direction in the predetermined space. The coordinate system is set so that the predetermined axis is closer to a predetermined direction (upward) of the controller 5 as it is closer to the vertical direction. The slope A is calculated for use as an indicator of whether the indicated direction is close to the horizontal direction (or vertical direction) in the predetermined space. The inclination A is calculated based on the attitude of the controller 5 calculated in step S3. Hereinafter, with reference to FIG. 14, a method of calculating the inclination A will be described.

図14は、コントローラ5の姿勢と傾斜度Aとの関係を示す図である。傾斜度Aは、所定空間における鉛直方向(図14に示すY’軸方向)または水平方向に対して指示方向が傾斜している度合を表すように算出されれば、どのような方法で算出されてもよい。本実施形態においては、傾斜度Aは、指示方向(ここではコントローラ5の先端方向)を表すベクトルZを用いて算出される。具体的には、図14に示すように、CPU10は、指示方向(ベクトルZ)が水平方向となる場合に最大値(ここでは“1”)となり、指示方向が鉛直方向に近づくにつれて減少し、指示方向が鉛直方向となる場合に最小値(ここでは“0”)となるように傾斜度Aを算出する。具体的には、傾斜度Aは、以下の式(1)に従って算出される。
A=1−Zy×Zy …(1)
上式(1)における変数Zyは、上記ベクトルZのY’成分の値である。なお、本実施形態においては、上式(1)に示すように、指示方向が水平方向に近い場合の他、指示方向が水平方向と鉛直方向との中間の方向となる場合には、傾斜度Aは“1”に近い値となる。ステップS11の具体的な処理としては、CPU10は、姿勢データ57をメインメモリから読み出し、ベクトルZを用いて上式(1)に従って傾斜度Aを算出する。そして、算出した傾斜度Aを表すデータを傾斜度データ58としてメインメモリに記憶する。ステップS11の次にステップS12の処理が実行される。
FIG. 14 is a diagram showing the relationship between the attitude of the controller 5 and the inclination A. The inclination A can be calculated by any method as long as it is calculated so as to represent the degree of inclination of the indicated direction with respect to the vertical direction (Y′-axis direction shown in FIG. 14) or the horizontal direction in the predetermined space. May be. In the present embodiment, the inclination A is calculated using a vector Z representing the indicated direction (here, the tip direction of the controller 5). Specifically, as shown in FIG. 14, the CPU 10 has a maximum value (here, “1”) when the pointing direction (vector Z) is horizontal, and decreases as the pointing direction approaches the vertical direction. The inclination A is calculated so as to be the minimum value (here, “0”) when the indicated direction is the vertical direction. Specifically, the slope A is calculated according to the following formula (1).
A = 1−Zy × Zy (1)
The variable Zy in the above equation (1) is the value of the Y ′ component of the vector Z. In the present embodiment, as shown in the above equation (1), in addition to the case where the indication direction is close to the horizontal direction, the inclination is determined when the indication direction is an intermediate direction between the horizontal direction and the vertical direction. A is a value close to “1”. As a specific process of step S11, the CPU 10 reads the attitude data 57 from the main memory, and calculates the inclination A according to the above equation (1) using the vector Z. Then, data representing the calculated inclination A is stored in the main memory as inclination data 58. Following step S11, the process of step S12 is executed.

ステップS12において、CPU10は、設定すべき座標面Qの上方向(b軸)に対応するベクトルU’を算出する。ステップS12で算出されるベクトルU’は、上記上方向に対応するベクトルであり、上方向を正確に表す必要はない。ここでは、ベクトルU’は、当該ベクトルU’を座標面Qに投影したベクトルが座標面Qの上方向(b軸)を表すようなベクトルである。本実施形態においては、座標面Qの上方向は、所定空間における鉛直方向および/またはコントローラ5の上方向を基準として設定される。そのため、ベクトルU’は、上記鉛直方向を向くベクトルPと、コントローラ5の上方向を表すベクトルYとに基づいて算出される。以下、図15を参照して、ベクトルU’の算出方法を声明する。   In step S12, the CPU 10 calculates a vector U ′ corresponding to the upward direction (b axis) of the coordinate plane Q to be set. The vector U ′ calculated in step S12 is a vector corresponding to the above upward direction, and does not need to accurately represent the upward direction. Here, the vector U ′ is a vector such that a vector obtained by projecting the vector U ′ onto the coordinate plane Q represents the upward direction (b axis) of the coordinate plane Q. In the present embodiment, the upward direction of the coordinate plane Q is set based on the vertical direction in the predetermined space and / or the upward direction of the controller 5. Therefore, the vector U ′ is calculated based on the vector P pointing in the vertical direction and the vector Y representing the upward direction of the controller 5. Hereinafter, with reference to FIG. 15, a calculation method of the vector U ′ is declared.

図15は、ベクトルP、ベクトルY、およびベクトルU’の関係を示す図である。なお、図15においては、コントローラ5のボタン面の側をコントローラ5における上側とし、ボタン面に垂直なベクトルYの方向がコントローラ5の上方向であるとする。ただし、コントローラ5の上方向は、ベクトルYの方向に限らず、コントローラ5を基準とした所定方向であればよい。例えば他の実施形態において、ユーザがコントローラ5のボタン面(ベクトルY)を水平方向に向けてゲーム操作を行う使用態様が想定される場合には、ゲーム装置3は、コントローラ5の側面方向(図3に示すX軸方向)をコントローラ5の上方向として処理を行ってもよい。また、本実施形態においては、ベクトルPは、Y’軸正方向を向く単位ベクトル(=(0,1,0))である。   FIG. 15 is a diagram illustrating a relationship between the vector P, the vector Y, and the vector U ′. In FIG. 15, it is assumed that the button surface side of the controller 5 is the upper side of the controller 5, and the direction of the vector Y perpendicular to the button surface is the upward direction of the controller 5. However, the upward direction of the controller 5 is not limited to the direction of the vector Y, and may be a predetermined direction based on the controller 5. For example, in another embodiment, when a usage mode in which the user performs a game operation with the button surface (vector Y) of the controller 5 oriented in the horizontal direction is assumed, the game apparatus 3 is configured in the side direction of the controller 5 (see FIG. Processing may be performed with the X axis direction shown in FIG. In the present embodiment, the vector P is a unit vector (= (0, 1, 0)) facing the Y′-axis positive direction.

図15に示すように、ベクトルU’の方向は、所定空間における鉛直方向(ベクトルP)、コントローラ5の上方向(ベクトルY)、あるいはこれら2方向の間の方向を向くように算出される。ベクトルU’は、傾斜度Aが大きいほど鉛直方向に近づき、小さいほどコントローラ5の上方向に近づくように算出される。具体的には、ベクトルU’=(Ux’,Uy’,Uz’)は、以下の式(2)に従って算出される。
Ux’=(0−Yx)×A+Yx
Uy’=(1−Yy)×A+Yy
Uz’=(0−Yz)×A+Yz …(2)
上式(2)において、変数Yx,Yy,およびYzは、それぞれ、ベクトルYのX’成分値、Y’成分値、およびZ’成分値である。上式(2)に示すように、ベクトルU’の終点は、ベクトルYの終点とベクトルPの終点とをA:(1−A)に内分する点となる。
As shown in FIG. 15, the direction of the vector U ′ is calculated to face the vertical direction (vector P) in the predetermined space, the upward direction of the controller 5 (vector Y), or the direction between these two directions. The vector U ′ is calculated so as to approach the vertical direction as the gradient A increases, and to approach the upward direction of the controller 5 as the inclination A decreases. Specifically, the vector U ′ = (Ux ′, Uy ′, Uz ′) is calculated according to the following equation (2).
Ux ′ = (0−Yx) × A + Yx
Uy ′ = (1−Yy) × A + Yy
Uz ′ = (0−Yz) × A + Yz (2)
In the above equation (2), variables Yx, Yy, and Yz are the X ′ component value, Y ′ component value, and Z ′ component value of the vector Y, respectively. As shown in the above equation (2), the end point of the vector U ′ is a point that internally divides the end point of the vector Y and the end point of the vector P into A: (1-A).

ステップS12の具体的な処理としては、CPU10は、姿勢データ57および傾斜度データ58をメインメモリから読み出し、ベクトルYの各成分値と傾斜度Aを用いて上式(2)に従ってベクトルU’を算出する。そして、算出したベクトルU’を表すデータを上方向データ60としてメインメモリに記憶する。ステップS12の次にステップS13の処理が実行される。   As a specific process of step S12, the CPU 10 reads the posture data 57 and the gradient data 58 from the main memory, and uses the component values of the vector Y and the gradient A to calculate the vector U ′ according to the above equation (2). calculate. Then, the data representing the calculated vector U ′ is stored as the upward data 60 in the main memory. Following step S12, the process of step S13 is executed.

上記ステップS12によって、平面座標系(座標面Q)の上方向(b軸)に対応するベクトルU’が算出される。ここで、傾斜度A=1である場合、ベクトルU’はベクトルPと一致する。つまり、平面座標系の上方向は所定空間における鉛直上方向を向き、平面座標系の上方向は所定空間における鉛直下方向(重力方向)を向く。一方、傾斜度A=0である場合、ベクトルU’はベクトルYと一致する。つまり、平面座標系の上方向(下方向)はコントローラ5の上方向(下方向)を向く。   By step S12, a vector U ′ corresponding to the upward direction (b axis) of the plane coordinate system (coordinate plane Q) is calculated. Here, when the slope A = 1, the vector U ′ matches the vector P. That is, the upward direction of the planar coordinate system is directed vertically upward in the predetermined space, and the upward direction of the planar coordinate system is directed vertically downward (gravity direction) in the predetermined space. On the other hand, when the slope A = 0, the vector U ′ matches the vector Y. That is, the upward direction (downward direction) of the planar coordinate system faces the upward direction (downward direction) of the controller 5.

なお、上述のようにベクトルU’の方向は座標面Qの上方向に一致するとは限らず、ベクトルU’は座標面Qと平行になるとは限らない。そのため、本実施形態においては、以下のステップS13〜S15の処理において、CPU10は、座標面Qの上方向を表す上方向ベクトルUをベクトルU’に基づいて算出する(ベクトルU’をベクトルUへと補正する)。   As described above, the direction of the vector U ′ does not necessarily coincide with the upper direction of the coordinate plane Q, and the vector U ′ does not necessarily become parallel to the coordinate plane Q. Therefore, in the present embodiment, in the processing of the following steps S13 to S15, the CPU 10 calculates an upward vector U representing the upward direction of the coordinate plane Q based on the vector U ′ (the vector U ′ is converted into the vector U). And correct).

ステップS13において、CPU10は、設定すべき座標面Qの奥行き方向ベクトルVを算出する。奥行き方向ベクトルVは、座標面Qに垂直であり、コントローラ5の位置から原点Oへの方向を表す。図16は、コントローラ5の姿勢を表す各ベクトルZおよびU’と、座標面Qの姿勢を表す各ベクトルU,V,Wとを示す図である。図16に示すように、奥行き方向ベクトルVは、コントローラ5の指示方向を表すベクトルZと一致する。すなわち、奥行き方向ベクトルV=(Vx,Vy,Vz)は、以下の式(3)に従って算出される。
Vx=Zx
Vy=Zy
Vz=Zz …(3)
上式(3)において、変数Zx,Zy,およびZzは、それぞれ、ベクトルZのX’成分値、Y’成分値、およびZ’成分値である。ステップS13の具体的な処理としては、CPU10は、姿勢データ57をメインメモリから読み出し、ベクトルZの各成分値を用いて上式(3)に従ってベクトルVを算出する。そして、算出したベクトルVを表すデータを奥行き方向データ62としてメインメモリに記憶する。ステップS13の次にステップS14の処理が実行される。
In step S13, the CPU 10 calculates the depth direction vector V of the coordinate plane Q to be set. The depth direction vector V is perpendicular to the coordinate plane Q and represents the direction from the position of the controller 5 to the origin O. FIG. 16 is a diagram showing the vectors Z and U ′ representing the attitude of the controller 5 and the vectors U, V and W representing the attitude of the coordinate plane Q. As shown in FIG. 16, the depth direction vector V coincides with a vector Z representing the instruction direction of the controller 5. That is, the depth direction vector V = (Vx, Vy, Vz) is calculated according to the following equation (3).
Vx = Zx
Vy = Zy
Vz = Zz (3)
In the above equation (3), variables Zx, Zy, and Zz are the X ′ component value, the Y ′ component value, and the Z ′ component value of the vector Z, respectively. As a specific process of step S13, the CPU 10 reads the attitude data 57 from the main memory, and calculates the vector V according to the above equation (3) using each component value of the vector Z. Data representing the calculated vector V is stored in the main memory as depth direction data 62. Following step S13, the process of step S14 is executed.

ステップS14において、CPU10は、設定すべき座標面Qの右方向ベクトルWを算出する。右方向ベクトルWは、座標面Qの右方向(a軸正方向)を表す。右方向ベクトルWは、上記ベクトルU’に垂直で、かつ、上記奥行き方向ベクトルVに垂直となるように算出される(図16参照)。具体的には、右方向ベクトルW=(Wx,Wy,Wz)は、以下の式(4)に基づいて算出される。
Wx=Uz’×Vy−Uy’×Vz
Wy=Ux’×Vz−Uz’×Vx
Wz=Uy’×Vx−Ux’×Vy …(4)
上式(4)に示すように、右方向ベクトルWは奥行き方向ベクトルVとベクトルU’との外積として算出される。ステップS14の具体的な処理としては、CPU10は、上方向データ60および奥行き方向データ62をメインメモリから読み出し、ベクトルU’および奥行き方向ベクトルVを用いて上式(4)に従って右方向ベクトルWを算出する。そして、算出された右方向ベクトルを正規化し(長さを1にする)。正規化された右方向ベクトルWを表すデータを右方向データ61としてメインメモリに記憶する。ステップS14の次にステップS15の処理が実行される。
In step S14, the CPU 10 calculates the right direction vector W of the coordinate plane Q to be set. The right direction vector W represents the right direction (a-axis positive direction) of the coordinate plane Q. The right direction vector W is calculated so as to be perpendicular to the vector U ′ and perpendicular to the depth direction vector V (see FIG. 16). Specifically, the right direction vector W = (Wx, Wy, Wz) is calculated based on the following equation (4).
Wx = Uz ′ × Vy−Uy ′ × Vz
Wy = Ux ′ × Vz−Uz ′ × Vx
Wz = Uy ′ × Vx−Ux ′ × Vy (4)
As shown in the above equation (4), the right direction vector W is calculated as an outer product of the depth direction vector V and the vector U ′. As a specific process of step S14, the CPU 10 reads the upward direction data 60 and the depth direction data 62 from the main memory, and uses the vector U ′ and the depth direction vector V to calculate the right direction vector W according to the above equation (4). calculate. Then, the calculated right direction vector is normalized (the length is set to 1). Data representing the normalized right direction vector W is stored in the main memory as right direction data 61. Following step S14, the process of step S15 is executed.

なお、上記ステップS14において、ベクトルU’と奥行き方向ベクトルVとが同方向となる場合には、奥行き方向ベクトルVとベクトルU’との外積が“0”になり、右方向ベクトルWを算出することができない。そのため、上記の場合には、CPU10は、1つ前に算出された姿勢(前回の処理ループにおけるステップS3で算出された姿勢)に基づいて座標系設定処理をやり直すようにしてもよい。あるいは、1つ後に算出された姿勢(次回の処理ループにおけるステップS3で算出された姿勢)に基づいて座標系設定処理をやり直すようにしてもよい。また、上記の場合には、設定操作が無効とされてもよい。すなわち、CPU10は、上記の場合には座標系設定処理を中止し、座標系を設定しないようにしてもよい。   In step S14, when the vector U ′ and the depth direction vector V are in the same direction, the outer product of the depth direction vector V and the vector U ′ is “0”, and the right direction vector W is calculated. I can't. Therefore, in the above case, the CPU 10 may redo the coordinate system setting process based on the previous calculated posture (the posture calculated in step S3 in the previous processing loop). Or you may make it redo a coordinate system setting process based on the attitude | position calculated after one (attitude calculated by step S3 in the next process loop). In the above case, the setting operation may be invalidated. That is, the CPU 10 may cancel the coordinate system setting process in the above case and not set the coordinate system.

ステップS15において、CPU10は、設定すべき座標面Qの上方向ベクトルUを算出する。上方向ベクトルUは、座標面Qの上方向(b軸正方向)を表す。図16に示すように、上方向ベクトルUは、奥行き方向ベクトルVに垂直で、かつ、右方向ベクトルWに垂直となるように算出される。具体的には、上方向ベクトルU=(Ux,Uy,Uz)は、以下の式(5)に基づいて算出される。
Ux=Vz×Wy−Vy×Wz
Uy=Vx×Wz−Vz×Wx
Uz=Vy×Wx−Vx×Wy …(5)
上式(5)に示すように、上方向ベクトルUは右方向ベクトルWと奥行き方向ベクトルVとの外積として算出される。ステップS15の具体的な処理としては、CPU10は、右方向データ61および奥行き方向データ62をメインメモリから読み出し、右方向ベクトルWおよび奥行き方向ベクトルVを用いて上式(5)に従って上方向ベクトルUを算出する。そして、算出された上方向ベクトルUを表すデータを上方向データ60としてメインメモリに記憶する。ステップS15の後、CPU10は座標系設定処理を終了する。
In step S15, the CPU 10 calculates an upward vector U of the coordinate plane Q to be set. The upward vector U represents the upward direction (b-axis positive direction) of the coordinate plane Q. As shown in FIG. 16, the upward vector U is calculated so as to be perpendicular to the depth direction vector V and perpendicular to the right direction vector W. Specifically, the upward vector U = (Ux, Uy, Uz) is calculated based on the following equation (5).
Ux = Vz × Wy−Vy × Wz
Uy = Vx × Wz−Vz × Wx
Uz = Vy × Wx−Vx × Wy (5)
As shown in the above equation (5), the upward vector U is calculated as an outer product of the right direction vector W and the depth direction vector V. As a specific process of step S15, the CPU 10 reads the right direction data 61 and the depth direction data 62 from the main memory, and uses the right direction vector W and the depth direction vector V according to the above equation (5). Is calculated. Then, the data representing the calculated upward vector U is stored as the upward data 60 in the main memory. After step S15, the CPU 10 ends the coordinate system setting process.

以上のように、座標系設定処理においては、傾斜度Aは、コントローラ5の指示方向が所定空間における水平方向となる場合に最大値となり、指示方向が所定空間における鉛直方向に近づくにつれて減少し、指示方向が鉛直方向となる場合に最小値となるように算出される(ステップS11)。そして、ベクトルU’は、傾斜度Aが大きいほど鉛直方向に近づき、小さいほどコントローラ5の上方向に近づくように算出される(ステップS12)。その結果、座標面Qの上方向を表すb軸は、指示方向が水平方向に近いほど鉛直方向に近くなり、指示方向が鉛直方向に近いほどコントローラ5の上方向に近くなるように設定される(ステップS15)。   As described above, in the coordinate system setting process, the inclination A becomes the maximum value when the indication direction of the controller 5 is the horizontal direction in the predetermined space, and decreases as the indication direction approaches the vertical direction in the predetermined space. When the indicated direction is the vertical direction, it is calculated to be the minimum value (step S11). Then, the vector U ′ is calculated so as to approach the vertical direction as the gradient A increases, and to approach the upward direction of the controller 5 as it decreases (step S12). As a result, the b-axis representing the upper direction of the coordinate plane Q is set so as to be closer to the vertical direction as the indicated direction is closer to the horizontal direction, and closer to the upper direction of the controller 5 as the indicated direction is closer to the vertical direction. (Step S15).

なお、本実施形態においては、指示方向が水平方向となる場合、CPU10は、平面座標系における下方向が所定空間における重力方向を向くように平面座標系を設定する。また、指示方向が鉛直方向となる場合、平面座標系における下方向がコントローラ5の下方向を向くように平面座標系を設定する。したがって、本実施形態においては、指示方向が水平方向となる場合も鉛直方向となる場合も、ユーザにとって違和感なく上方向が設定される。これによって、ポインティング操作の操作性を向上することができる。   In the present embodiment, when the pointing direction is the horizontal direction, the CPU 10 sets the planar coordinate system so that the downward direction in the planar coordinate system faces the direction of gravity in the predetermined space. Further, when the pointing direction is the vertical direction, the planar coordinate system is set so that the downward direction in the planar coordinate system faces the downward direction of the controller 5. Therefore, in the present embodiment, the upward direction is set without any sense of incongruity for the user whether the pointing direction is the horizontal direction or the vertical direction. Thereby, the operability of the pointing operation can be improved.

また、本実施形態においては、設定操作時における平面座標系の向きは、設定操作時におけるコントローラ5の指示方向に応じて連続的に変化するように設定される。すなわち、平面座標系は、指示方向が水平方向に近いほど所定軸(b軸)が鉛直方向に近くなり、指示方向が鉛直方向に近いほど、当該所定軸がコントローラ5の所定方向(上方向)に近くなるように設定される。換言すれば、指示方向が水平方向に近い場合には、平面座標系の上方向は概ね鉛直方向を向き、指示方向が鉛直方向に近い場合には、平面座標系の上方向は概ねコントローラ5の上方向を向く。したがって、本実施形態においては、指示方向が任意の方向となる場合において、ユーザにとって違和感のない向きに平面座標系が設定される。   In the present embodiment, the orientation of the planar coordinate system at the time of the setting operation is set so as to continuously change according to the instruction direction of the controller 5 at the time of the setting operation. That is, in the plane coordinate system, the predetermined axis (b axis) is closer to the vertical direction as the pointing direction is closer to the horizontal direction, and the predetermined axis is closer to the predetermined direction (upward direction) of the controller 5 as the pointing direction is closer to the vertical direction. It is set to be close to. In other words, when the pointing direction is close to the horizontal direction, the upward direction of the planar coordinate system is substantially vertical, and when the pointing direction is close to the vertical direction, the upward direction of the planar coordinate system is approximately the Look up. Therefore, in the present embodiment, when the designated direction is an arbitrary direction, the plane coordinate system is set in a direction that does not give the user a sense of incongruity.

なお、他の実施形態においては、設定操作時における平面座標系の向きは、指示方向に応じて連続的に変化するものに限らない。例えば、他の実施形態においては、CPU10は、指示方向が所定の基準より水平方向に近いか、あるいは、鉛直方向に近いかに応じて、平面座標系の所定軸が鉛直方向を向くか、あるいは、当該所定軸がコントローラ5の所定方向を向くかを決定するようにしてもよい。具体的には、上記傾斜度Aが所定の閾値よりも大きい場合、所定軸(b軸)が所定空間における鉛直方向を向き、上記傾斜度Aが当該閾値以下である場合、所定軸(b軸)がコントローラ5の所定方向を向くように、平面座標系が設定されてもよい。これによっても本実施形態と同様、指示方向が任意の方向となる場合において、ユーザにとって違和感のない向きに平面座標系を設定することができる。   In other embodiments, the orientation of the planar coordinate system at the time of the setting operation is not limited to that continuously changing according to the instruction direction. For example, in another embodiment, the CPU 10 determines that the predetermined axis of the plane coordinate system is oriented in the vertical direction depending on whether the indicated direction is closer to the horizontal direction than the predetermined reference, or closer to the vertical direction, or It may be determined whether the predetermined axis faces a predetermined direction of the controller 5. Specifically, when the slope A is larger than a predetermined threshold, the predetermined axis (b-axis) faces the vertical direction in the predetermined space, and when the slope A is equal to or lower than the threshold, the predetermined axis (b-axis) The planar coordinate system may be set so that) faces a predetermined direction of the controller 5. Also in this manner, as in the present embodiment, when the designated direction is an arbitrary direction, it is possible to set the plane coordinate system in a direction that does not feel uncomfortable for the user.

なお、本実施形態において、平面座標系の上方向あるいは下方向といった、「平面座標系における方向」は、典型的には、ポインティング操作によってユーザが指示する方向に対応する。例えば、平面座標系の下方向に関するポインティング操作(例えばポインティング座標が下方向に移動される操作)が行われた場合、ゲーム装置3は、ユーザによって下方向の指示が行われたと判断し、カーソルを画面の下方向へ移動させる等の処理を実行する。ただし、座標系における方向は、ポインティング操作によってユーザが指示する方向と必ずしも対応していなくてもよい。   In the present embodiment, the “direction in the planar coordinate system” such as the upward direction or the downward direction of the planar coordinate system typically corresponds to the direction designated by the user by a pointing operation. For example, when a pointing operation related to the downward direction in the planar coordinate system (for example, an operation in which the pointing coordinates are moved downward) is performed, the game apparatus 3 determines that the user has instructed the downward direction, and moves the cursor Processing such as moving the screen downward is executed. However, the direction in the coordinate system does not necessarily correspond to the direction designated by the user by the pointing operation.

また、上記座標系設定処理においては、上方向ベクトルU、右方向ベクトルW、および奥行き方向ベクトルVが算出されることによって、座標面Q(ab座標系)が設定されたことになる。ここで、本実施形態においては、後述するポインティング座標の算出処理(ステップS6)において原点Oの位置を用いない方法でポインティング座標を算出しているので、座標系設定処理においては原点Oの位置を算出していない。ただし、本実施形態においては、コントローラ5の位置と、コントローラ5から座標面Qまでの距離との情報が予め定められているので、原点Oの位置は、コントローラ5の位置と、当該距離と、ベクトルZとから一意に決まる。つまり、本実施形態では、座標系設定処理において座標面Qの位置は明示的に算出されていないが、実質的には座標面Qの位置が決定されていると言える。なお、他の実施形態においては、座標系設定処理においてCPU10は座標面Qの位置(例えば原点Oの位置)を算出する処理を実行するようにしてもよい。   In the coordinate system setting process, the coordinate plane Q (ab coordinate system) is set by calculating the upward vector U, the right direction vector W, and the depth direction vector V. Here, in the present embodiment, since the pointing coordinate is calculated by a method that does not use the position of the origin O in the later-described pointing coordinate calculation process (step S6), the position of the origin O is set in the coordinate system setting process. Not calculated. However, in this embodiment, since the information on the position of the controller 5 and the distance from the controller 5 to the coordinate plane Q is determined in advance, the position of the origin O is the position of the controller 5, the distance, It is uniquely determined from the vector Z. That is, in the present embodiment, the position of the coordinate plane Q is not explicitly calculated in the coordinate system setting process, but it can be said that the position of the coordinate plane Q is substantially determined. In other embodiments, in the coordinate system setting process, the CPU 10 may execute a process of calculating the position of the coordinate plane Q (for example, the position of the origin O).

図12の説明に戻り、ステップS6において、CPU10は、コントローラ5の姿勢に基づいてポインティング座標を算出する。ポインティング座標は、ステップS4で設定された平面座標系(座標面Q)に対するコントローラ5の姿勢の関係に基づいて算出される。ポインティング座標の具体的な算出方法はどのような方法であってもよいが、本実施形態においては、ポインティング座標は、コントローラ5の姿勢によって決まる上記指示方向に基づいて算出される。具体的には、CPU10は、座標面Q上においてコントローラ5の指示方向が指し示す位置、より具体的には、座標面Qと指示方向の延長線との交点の位置を表す座標をポインティング座標として算出する(図8参照)。以下、図17を参照して、ポインティング座標の算出方法を説明する。   Returning to the description of FIG. 12, in step S <b> 6, the CPU 10 calculates pointing coordinates based on the attitude of the controller 5. The pointing coordinates are calculated based on the attitude relationship of the controller 5 with respect to the plane coordinate system (coordinate plane Q) set in step S4. A specific method for calculating the pointing coordinates may be any method. In the present embodiment, the pointing coordinates are calculated based on the indicated direction determined by the attitude of the controller 5. Specifically, the CPU 10 calculates, as pointing coordinates, a position on the coordinate plane Q indicated by the pointing direction of the controller 5, more specifically, a coordinate representing the position of the intersection of the coordinate plane Q and the extension line of the pointing direction. (See FIG. 8). Hereinafter, a method for calculating the pointing coordinates will be described with reference to FIG.

図17は、コントローラ5の指示方向を表すベクトルZと、座標面Q上におけるポインティング位置Rとの関係を示す図である。図17において、ベクトルZaはa軸方向に関するベクトルZの成分であり、ベクトルZbはb軸方向に関するベクトルZの成分であり、ベクトルZcは座標面Qに垂直な方向に関するベクトルZの成分である。図17から明らかなように、位置Rのa軸成分の座標値RaとベクトルZaの大きさとの比は、コントローラ5から座標面Qまでの距離LとベクトルZcの大きさとの比に等しい。したがって、座標値Raは、以下の式(6)に従って算出することができる。
Ra=L×|Za|/|Zc| …(6)
また、b軸成分についてもa軸成分と同様、位置Rのb軸成分の座標値RbとベクトルZbの大きさとの比は、コントローラ5から座標面Qまでの距離LとベクトルZcの大きさとの比に等しい。したがって、座標値Rbは、以下の式(7)に従って算出することができる。
Rb=L×|Zb|/|Zc| …(7)
上式(6)および(7)において、ベクトルZaの大きさ|Za|は、ベクトルZと上記右方向ベクトルWとの内積として算出することができる。つまり、“|Za|”は、符号付きの大きさであり、ベクトルZaがa軸負方向を向く場合には座標値Raは負の値となる(“|Zb|”および“|Zc|”についても同様である)。ベクトルZbの大きさ|Zb|は、ベクトルZと上記上方向ベクトルUとの内積として算出することができる。ベクトルZcの大きさ|Zc|は、ベクトルZと上記奥行き方向ベクトルVとの内積として算出することができる。したがって、ポインティング座標(Ra,Rb)は、座標面Qの姿勢(3つのベクトルU,V,W)と、指示方向(ベクトルZ)と、距離Lとに基づいて算出することができる。
FIG. 17 is a diagram showing the relationship between the vector Z representing the pointing direction of the controller 5 and the pointing position R on the coordinate plane Q. In FIG. 17, a vector Za is a component of the vector Z in the a-axis direction, a vector Zb is a component of the vector Z in the b-axis direction, and a vector Zc is a component of the vector Z in the direction perpendicular to the coordinate plane Q. As apparent from FIG. 17, the ratio between the coordinate value Ra of the a-axis component at the position R and the magnitude of the vector Za is equal to the ratio between the distance L from the controller 5 to the coordinate plane Q and the magnitude of the vector Zc. Therefore, the coordinate value Ra can be calculated according to the following equation (6).
Ra = L × | Za | / | Zc | (6)
Similarly to the a-axis component for the b-axis component, the ratio between the coordinate value Rb of the b-axis component at the position R and the magnitude of the vector Zb is the distance L from the controller 5 to the coordinate plane Q and the magnitude of the vector Zc. Equal to the ratio. Therefore, the coordinate value Rb can be calculated according to the following equation (7).
Rb = L × | Zb | / | Zc | (7)
In the above equations (6) and (7), the magnitude | Za | of the vector Za can be calculated as the inner product of the vector Z and the right vector W. That is, “| Za |” is a signed magnitude, and when the vector Za is in the negative direction of the a-axis, the coordinate value Ra becomes a negative value (“| Zb |” and “| Zc |”). The same applies to. The magnitude | Zb | of the vector Zb can be calculated as an inner product of the vector Z and the upward vector U. The magnitude | Zc | of the vector Zc can be calculated as an inner product of the vector Z and the depth direction vector V. Therefore, the pointing coordinates (Ra, Rb) can be calculated based on the orientation of the coordinate plane Q (three vectors U, V, W), the pointing direction (vector Z), and the distance L.

なお、ポインティング座標の算出方法はどのような方法であってもよい。例えば、上述の交点Rの位置を表す座標をポインティング座標として算出する場合には、CPU10は、原点Oの空間座標系での座標と交点Rの空間座標系での座標とを算出し、これら2つの座標の位置関係から平面座標系での交点Rの座標を算出してもよい。また、上記交点Rの位置を表す座標とは異なる他の位置を表す座標がポインティング座標として算出されてもよい。例えば、CPU10は、設定操作時における指示方向を基準として、指示方向の変化方向に応じた方向へ、変化量に応じた移動量だけ原点Oから移動した位置を表す座標をポインティング座標として算出してもよい。   Any method may be used for calculating the pointing coordinates. For example, when the coordinates representing the position of the intersection point R are calculated as pointing coordinates, the CPU 10 calculates the coordinates of the origin O in the spatial coordinate system and the coordinates of the intersection R in the spatial coordinate system, and these 2 The coordinates of the intersection R in the plane coordinate system may be calculated from the positional relationship between the two coordinates. In addition, a coordinate representing another position different from the coordinate representing the position of the intersection R may be calculated as the pointing coordinate. For example, the CPU 10 calculates, as pointing coordinates, a coordinate that represents a position moved from the origin O by a movement amount corresponding to the change amount in a direction corresponding to the change direction of the instruction direction with reference to the instruction direction at the time of the setting operation. Also good.

ステップS6の具体的な処理としては、CPU10は、姿勢データ57および座標面データ59をメインメモリから読み出し、上式(6)および(7)に従ってポインティング座標を算出する。そして、算出されたポインティング座標を表すデータをポインティング座標データ63としてメインメモリに記憶する。ステップS6の次にステップS7の処理が実行される。   As a specific process of step S6, the CPU 10 reads the posture data 57 and the coordinate plane data 59 from the main memory, and calculates the pointing coordinates according to the above equations (6) and (7). Data representing the calculated pointing coordinates is stored in the main memory as pointing coordinate data 63. Following step S6, the process of step S7 is executed.

ステップS7において、CPU10は、ポインティング座標を用いた情報処理(ゲーム処理)を実行する。この情報処理は、ステップS6で算出されたポインティング座標を入力として用いる処理であればどのような処理であってもよい。本実施形態においては、CPU10は、ポインティング座標データ63をメインメモリから読み出し、ポインティング座標を用いた情報処理を実行し、当該情報処理の実行結果を表す画像(ゲーム画像)を生成して表示装置(テレビ2)に出力する。例えば、CPU10は、ゲーム操作を行うためのカーソルがポインティング座標に応じた位置に配置されたゲーム画像を生成してテレビ2に表示してもよい。またCPU10は、ゲーム空間に登場するオブジェクトをポインティング座標に応じて動作させ、当該オブジェクトを含むゲーム空間の画像を生成してテレビ2に表示してもよい。ステップS7の次にステップS8の処理が実行される。   In step S7, the CPU 10 executes information processing (game processing) using the pointing coordinates. This information processing may be any process as long as it uses the pointing coordinates calculated in step S6 as an input. In the present embodiment, the CPU 10 reads the pointing coordinate data 63 from the main memory, executes information processing using the pointing coordinates, generates an image (game image) representing the execution result of the information processing, and displays the display device ( Output to TV 2). For example, the CPU 10 may generate a game image in which a cursor for performing a game operation is arranged at a position corresponding to the pointing coordinates and display the game image on the television 2. Further, the CPU 10 may operate an object appearing in the game space according to the pointing coordinates, generate an image of the game space including the object, and display the generated image on the television 2. Following step S7, the process of step S8 is executed.

ステップS8において、CPU10は、ゲームを終了するか否かを判定する。ステップS8の判定は、例えば、プレイヤがゲームを中止する指示を行ったか否か等によって行われる。ステップS8の判定結果が否定の場合、ステップS2の処理が再度実行される。一方、ステップS8の判定結果が肯定の場合、CPU10は図12に示すゲーム処理を終了する。なお、ゲーム処理を終了する際には、ゲームデータをメモリカード等にセーブする等の処理が実行されてもよい。以降、ステップS2〜S8の一連の処理は、ステップS8でゲームを終了すると判定されるまで繰り返し実行される。   In step S8, the CPU 10 determines whether or not to end the game. The determination in step S8 is made based on, for example, whether or not the player has given an instruction to stop the game. If the determination result of step S8 is negative, the process of step S2 is executed again. On the other hand, if the determination result of step S8 is affirmative, the CPU 10 ends the game process shown in FIG. When ending the game process, a process such as saving game data in a memory card or the like may be executed. Thereafter, a series of processes in steps S2 to S8 are repeatedly executed until it is determined in step S8 that the game is to be ended.

以上のように、本実施形態においては、設定操作が行われた場合(ステップS4でYes)に、コントローラ5の指示方向の先に平面座標系が設定され(ステップS5)、設定された平面座標系を用いてポインティング座標が算出される(ステップS6)。したがって、ユーザは、所望の向きにコントローラ5を向けて設定操作を行うことで設定操作を行った時点でのコントローラ5の向きを基準(正面)としてポインティング操作を行うことができる。このとき、本実施形態においては、平面座標系の座標軸の向きが指示方向の向きに応じて適切に設定されるので、コントローラ5をどの向きに向けてユーザが設定操作を行っても、ゲームシステム1は、ポインティング操作が行いやすい座標系を設定することができる。本実施形態によれば、ユーザは、任意の方向に向けてポインティング操作を容易に行うことができる。例えば寝ころんだ状態で上方向に向けてポインティング操作を行ったり、地面に向かってポインティング操作を行ったりする場合でも違和感なくポインティング操作を行うことができる。   As described above, in the present embodiment, when a setting operation is performed (Yes in step S4), the plane coordinate system is set ahead of the instruction direction of the controller 5 (step S5), and the set plane coordinates are set. Pointing coordinates are calculated using the system (step S6). Therefore, the user can perform the pointing operation with the orientation of the controller 5 at the time of performing the setting operation as a reference (front) by performing the setting operation by directing the controller 5 in a desired direction. At this time, in this embodiment, since the direction of the coordinate axis of the plane coordinate system is appropriately set according to the direction of the designated direction, the game system can be operated regardless of the direction in which the controller 5 is set by the user. 1 can set a coordinate system in which a pointing operation can be easily performed. According to this embodiment, the user can easily perform a pointing operation in an arbitrary direction. For example, even when the pointing operation is performed upward while the user is lying down, or the pointing operation is performed toward the ground, the pointing operation can be performed without a sense of incongruity.

[6.変形例]
上記実施形態は本発明を実施する一例であり、他の実施形態においては例えば以下に説明する構成で第1の実施形態を実施することも可能である。
[6. Modified example]
The above embodiment is an example for carrying out the present invention. In other embodiments, for example, the first embodiment can be implemented with the configuration described below.

図18は、上記実施形態の変形例を示す図である。上記実施形態においては、操作装置の一例としてコントローラ5を用いるシステムについて説明した。ここで、操作装置は、ユーザが動かして操作することができる任意の装置であってもよい。本変形例においては、コントローラ5に代えて、表示装置を有する携帯型(可搬型)の端末装置70が操作装置として用いられる。ゲームシステム1は、コントローラ5に代えて(またはコントローラ5とともに)端末装置70を含んでいる。なお、端末装置70は、ゲームプログラムを実行することによってゲーム処理を実行可能な携帯型のゲーム装置であってもよい。   FIG. 18 is a diagram showing a modification of the above embodiment. In the above-described embodiment, the system using the controller 5 as an example of the operation device has been described. Here, the operating device may be any device that can be operated by the user. In this modification, instead of the controller 5, a portable (portable) terminal device 70 having a display device is used as the operation device. The game system 1 includes a terminal device 70 instead of the controller 5 (or together with the controller 5). The terminal device 70 may be a portable game device that can execute a game process by executing a game program.

まず、端末装置70の構成について説明する。図18に示すように、端末装置70は、板状の形状である。したがって、ユーザは、板状の端末装置70の左右の両辺または一方の辺を把持して操作を行うことが可能である。   First, the configuration of the terminal device 70 will be described. As shown in FIG. 18, the terminal device 70 has a plate shape. Therefore, the user can operate by gripping both the left and right sides or one side of the plate-like terminal device 70.

端末装置70は、ゲーム装置3と通信可能な通信部を備えている。ゲーム装置3との間で送受信されるデータはどのようなデータであってもよい。本変形例では、通信部は、端末装置70に対するユーザの操作を表す操作データをゲーム装置3へ送信する。また、通信部は、ゲーム装置3で生成された画像のデータをゲーム装置3から受信する。   The terminal device 70 includes a communication unit that can communicate with the game apparatus 3. The data transmitted / received to / from the game apparatus 3 may be any data. In the present modification, the communication unit transmits operation data representing a user operation on the terminal device 70 to the game apparatus 3. Further, the communication unit receives image data generated by the game apparatus 3 from the game apparatus 3.

端末装置70は、自機の姿勢を算出するための物理量を検出するセンサ部を備えている。本変形例においては、端末装置70は、センサ部として、コントローラ5と同様のジャイロセンサおよび/または加速度センサを備える。なお、他の実施形態においては、センサ部は上記物理量を検出可能なものであってもよく、例えば磁気センサを備えていてもよい。また、他の実施形態においては、ゲームシステム1が端末装置70を撮像するカメラを備え、ゲーム装置3は、当該カメラによって撮像された撮像結果を取得し、撮像結果を用いて端末装置70の姿勢を算出するようにしてもよい。   The terminal device 70 includes a sensor unit that detects a physical quantity for calculating the attitude of the terminal device 70. In the present modification, the terminal device 70 includes a gyro sensor and / or an acceleration sensor similar to the controller 5 as a sensor unit. In other embodiments, the sensor unit may be capable of detecting the physical quantity, and may include a magnetic sensor, for example. In another embodiment, the game system 1 includes a camera that images the terminal device 70, and the game device 3 acquires an imaging result captured by the camera, and uses the imaging result to position the terminal device 70. May be calculated.

端末装置70は、LCD等の表示部を備えている。端末装置70は、ゲーム装置3によって生成された画像のデータを受信し、表示部に表示する。なお、他の実施形態においては、端末装置70は、ゲーム装置3から受信されるデータに基づいて画像を生成することが可能であってもよい。   The terminal device 70 includes a display unit such as an LCD. The terminal device 70 receives the image data generated by the game apparatus 3 and displays it on the display unit. In other embodiments, the terminal device 70 may be capable of generating an image based on data received from the game device 3.

端末装置70は、端末装置70を動かす操作とは別の他の操作を行うための操作部を備える。操作部はどのようなものであってもよいが、本変形例においては、端末装置70は、操作部として、1以上のボタンと、方向入力が可能なスティックと、表示部の画面上に設けられるタッチパネルとを備えている。   The terminal device 70 includes an operation unit for performing another operation different from the operation of moving the terminal device 70. Although any operation unit may be used, in the present modification, the terminal device 70 is provided on the screen of the display unit as one or more buttons, a stick capable of inputting a direction, and the operation unit. Touch panel.

次に、仮想空間に設定される対象(設定対象)について説明する。上記実施形態においては、設定対象は座標系(座標面Q)であったが、設定対象はどのようなものであってもよい。本変形例においては、図18に示すように、設定対象は画像(画像を表すオブジェクト)72である。画像72は、どのような内容であってもよいが、例えばWebページの画像である。すなわち、本変形例におけるゲームシステム(情報処理システム)1は、端末装置70によってWebページを閲覧するためのシステムである。端末装置70における表示部の画面71には、Webページの一部の領域(図18では領域73)の画像が表示される。詳細は後述するが、ユーザは、端末装置70を動かす(姿勢を変化させる)ことで画像72上における領域73を移動させることができ、Webページのうちの所望の部分を見ることができる。なお、他の実施形態においては、仮想空間に設定される対象は、平面的な形状に限らず、立体的な形状のものであってもよい。   Next, the target (setting target) set in the virtual space will be described. In the above embodiment, the setting object is the coordinate system (coordinate plane Q), but the setting object may be any object. In the present modification, the setting target is an image (an object representing an image) 72 as shown in FIG. The image 72 may have any content, but is, for example, an image of a web page. That is, the game system (information processing system) 1 in this modification is a system for browsing a web page by the terminal device 70. On the screen 71 of the display unit in the terminal device 70, an image of a partial area of the Web page (area 73 in FIG. 18) is displayed. Although details will be described later, the user can move the region 73 on the image 72 by moving the terminal device 70 (changing the posture), and can view a desired portion of the Web page. In other embodiments, the target set in the virtual space is not limited to a planar shape but may be a three-dimensional shape.

本変形例において仮想空間に画像72を配置(設定)する処理は、上記実施形態において座標面Qを設定する処理と同様である。すなわち、ゲーム装置3は、仮想空間内における端末装置70の姿勢を算出する。本変形例における端末装置70の姿勢の算出方法は、どのような方法であってもよく、例えば上記実施形態におけるコントローラ5の姿勢の算出方法と同じであってもよい。   In the present modification, the process of arranging (setting) the image 72 in the virtual space is the same as the process of setting the coordinate plane Q in the above embodiment. That is, the game apparatus 3 calculates the attitude of the terminal device 70 in the virtual space. The method for calculating the attitude of the terminal device 70 in the present modification may be any method, for example, the same as the method for calculating the attitude of the controller 5 in the above embodiment.

また、本変形例において、ユーザによって設定操作(ここでは、端末装置70に対する所定の操作)が行われた場合、上記実施形態と同様のステップS11〜S15の処理によって画像72が仮想空間に設定される。すなわち、ゲーム装置3は、設定捜査時における端末装置70の姿勢によって決まる指示方向が所定の基準よりも仮想空間における水平方向に近い場合、仮想空間における鉛直方向(Y’軸方向)を基準として設定対象の向きを設定する。つまり、指示方向が水平方向に近い場合は、仮想空間における鉛直方向が上方向となるように画像72が配置される。なお、本変形例では、端末装置70の指示方向(ベクトルZ)は、端末装置70の板状の面に垂直な方向(より具体的には、画面71の手前から奥へ向かう方向)として決められる。一方、ゲーム装置3は、指示方向が所定の基準よりも鉛直方向に近い場合、端末装置70の所定方向を基準として設定対象の向きを設定する。なお、本変形例では、端末装置70の上方向は、表示部の画面71の上方向である。つまり、鉛直方向に近い場合は、端末装置70における上方向が上方向となるように画像72が配置される。以上によって、本変形例においては、指示方向が水平方向に近い場合にも鉛直方向に近い場合にも、画像72が適切な向きに配置される。これによって、ユーザにとって画像72が見やすく端末装置70に表示されるとともに、後述する領域73を移動させる操作の操作性も向上する。   In this modification, when a setting operation (here, a predetermined operation on the terminal device 70) is performed by the user, the image 72 is set in the virtual space by the processing in steps S11 to S15 similar to the above embodiment. The In other words, the game apparatus 3 sets the vertical direction (Y′-axis direction) in the virtual space as a reference when the pointing direction determined by the attitude of the terminal device 70 at the time of the setting investigation is closer to the horizontal direction in the virtual space than a predetermined reference. Set the target orientation. That is, when the pointing direction is close to the horizontal direction, the image 72 is arranged so that the vertical direction in the virtual space is the upward direction. In this modification, the indication direction (vector Z) of the terminal device 70 is determined as a direction perpendicular to the plate-like surface of the terminal device 70 (more specifically, a direction from the front of the screen 71 to the back). It is done. On the other hand, when the pointing direction is closer to the vertical direction than the predetermined reference, the game apparatus 3 sets the direction of the setting target based on the predetermined direction of the terminal device 70. In the present modification, the upward direction of the terminal device 70 is the upward direction of the screen 71 of the display unit. That is, when close to the vertical direction, the image 72 is arranged so that the upward direction in the terminal device 70 is the upward direction. As described above, in this modification, the image 72 is arranged in an appropriate direction regardless of whether the pointing direction is close to the horizontal direction or the vertical direction. As a result, the image 72 is easily displayed for the user to be displayed on the terminal device 70, and the operability of the operation of moving the area 73 described later is improved.

本変形例においては、ゲーム装置3は、仮想空間内に仮想カメラを設定し、仮想カメラから見た画像72の一部の画像を端末装置70に表示させる。仮想カメラは、端末装置70の姿勢に応じて視野範囲(画像72上における領域73)が変化するように設定される。具体的には、ゲーム装置3は、端末装置70の位置に仮想カメラを配置し、端末装置70の指示方向が視線方向となるように仮想カメラの姿勢を制御する。これによって、仮想カメラの視野範囲は画像72上の領域73となり、ユーザは、端末装置70の姿勢を変化させる操作によって画像72上の領域73を移動させることができる。このように、本変形例においては、上記実施形態のようなポインティング操作は行われない。上記実施形態における設定対象に対する設定方法は、ポインティング座標を算出する場合の座標系に限らず、任意のオブジェクトを設定する処理に適用することができる。   In the present modification, the game apparatus 3 sets a virtual camera in the virtual space, and causes the terminal device 70 to display a partial image of the image 72 viewed from the virtual camera. The virtual camera is set such that the visual field range (region 73 on the image 72) changes according to the attitude of the terminal device 70. Specifically, the game apparatus 3 arranges a virtual camera at the position of the terminal device 70 and controls the attitude of the virtual camera so that the instruction direction of the terminal device 70 becomes the line-of-sight direction. Thereby, the visual field range of the virtual camera becomes an area 73 on the image 72, and the user can move the area 73 on the image 72 by an operation of changing the attitude of the terminal device 70. Thus, in the present modification, the pointing operation as in the above embodiment is not performed. The setting method for the setting target in the above embodiment is not limited to the coordinate system in the case of calculating pointing coordinates, and can be applied to processing for setting an arbitrary object.

<第2の実施形態>
次に、本発明の第2の実施形態に係るゲームシステムについて説明する。上述の第1の実施形態においては、ゲームシステム1は、所定の設定操作が行われた場合に座標面Qを移動(再配置)した。これに対して、第2の実施形態においては、コントローラ5の指示方向が座標面Qから外れた(指示方向が座標面Q内の位置を指し示さない)場合、ゲームシステム1は、指示方向が座標面Qから外れないように座標面Qを移動する。
<Second Embodiment>
Next, a game system according to the second embodiment of the present invention will be described. In the first embodiment described above, the game system 1 moves (rearranges) the coordinate plane Q when a predetermined setting operation is performed. On the other hand, in the second embodiment, when the pointing direction of the controller 5 deviates from the coordinate plane Q (the pointing direction does not indicate a position in the coordinate plane Q), the game system 1 indicates that the pointing direction is The coordinate plane Q is moved so as not to deviate from the coordinate plane Q.

ここで、ユーザは現実空間においてコントローラ5を自由に動かすことができるので、意図せずにコントローラ5の指示方向を座標面Qから外れた方向にしてしまう場合がある。例えば、座標面Qの外周付近を指定しようとしたもののコントローラ5を動かしすぎて指示方向が座標面Qから外れてしまったり、気づかないうちにコントローラ5の向きを次第に変化させてしまう結果、指示方向が座標面Qから外れてしまったりする場合がある。本実施形態によれば、このような場合であっても、ユーザが指定する位置として、座標面Q内の位置(ポインティング座標)を算出することができるので、操作性を向上することができる。以下、第2の実施形態の詳細について説明する。   Here, since the user can freely move the controller 5 in the real space, there is a case where the indication direction of the controller 5 is unintentionally changed from the coordinate plane Q. For example, although an attempt is made to designate the vicinity of the outer periphery of the coordinate plane Q, the indicated direction is deviated from the coordinate plane Q by moving the controller 5 too much, or the direction of the controller 5 is gradually changed without being noticed. May deviate from the coordinate plane Q. According to the present embodiment, even in such a case, since the position (pointing coordinates) in the coordinate plane Q can be calculated as the position designated by the user, the operability can be improved. Details of the second embodiment will be described below.

なお、第2の実施形態におけるゲームシステム1のハードウェア構成は第1の実施形態と同じであるので、説明を省略する。   Note that the hardware configuration of the game system 1 in the second embodiment is the same as that in the first embodiment, and thus the description thereof is omitted.

[1.座標面の移動処理の概要]
図19は、指示方向が座標面Qから外れる場合の一例を示す図である。図19に示すように、第2の実施形態においては、座標面Qは、所定の大きさの矩形領域であるとする。例えば、座標面Qの形状は、表示装置(テレビ2)の画面の形状に応じた形状に決定される。また、図19において、位置Rは、座標面Qから外れる直前における指示方向が指し示す位置(ポインティング座標)であり、位置R’は、座標面Qから外れた直後における指示方向が指し示す位置である。
[1. Overview of coordinate plane movement processing]
FIG. 19 is a diagram illustrating an example where the pointing direction deviates from the coordinate plane Q. As shown in FIG. 19, in the second embodiment, the coordinate plane Q is a rectangular area having a predetermined size. For example, the shape of the coordinate plane Q is determined to be a shape corresponding to the shape of the screen of the display device (television 2). Further, in FIG. 19, a position R is a position (pointing coordinate) indicated by the pointing direction immediately before deviating from the coordinate plane Q, and a position R ′ is a position indicating the pointing direction immediately after deviating from the coordinate plane Q.

図19においては、仮想空間において、コントローラ5の指示方向が座標面Qから外れている。つまり、指示方向が指し示す位置R’は座標面Q外の位置となっている。なお、図19において、位置R’は、座標面Qを含む平面と、コントローラ5の位置を通り指示方向に延びる直線(図19に示す点線)との交点の位置である。上述した第1の実施形態におけるステップS6の処理によれば、座標面Q内の位置であっても座標面Q外の位置であっても、上記交点の位置座標をポインティング座標として算出することが可能である。つまり、ゲームシステム1は、座標面Q外であっても位置R’を(ポインティング座標として)算出することが可能である。   In FIG. 19, the pointing direction of the controller 5 is deviated from the coordinate plane Q in the virtual space. That is, the position R ′ pointed to by the pointing direction is a position outside the coordinate plane Q. In FIG. 19, the position R ′ is the position of the intersection of the plane including the coordinate plane Q and a straight line (dotted line shown in FIG. 19) that passes through the position of the controller 5 and extends in the indicated direction. According to the process of step S6 in the first embodiment described above, the position coordinate of the intersection point can be calculated as the pointing coordinate regardless of the position within the coordinate plane Q or the position outside the coordinate plane Q. Is possible. That is, the game system 1 can calculate the position R ′ (as a pointing coordinate) even outside the coordinate plane Q.

上記のように、コントローラ5の指示方向が座標面Qから外れている場合には、ポインティング座標が座標面Q内の位置ではなくなる。そのため、このようなポインティング座標を用いて情報処理(ステップS7)が実行されると、当該情報処理がユーザの意図した通りの結果にならなかったり、正しく実行されなかったりするおそれがある。そこで、第2の実施形態においては、ゲームシステム1は、コントローラ5の指示方向が座標面Qから外れている場合、座標面Qを移動する処理を実行する。なお、この移動処理は、ユーザの操作(上記の設定操作)が無くても実行される。換言すれば、移動処理は、ユーザの操作とは独立して実行される。   As described above, when the pointing direction of the controller 5 deviates from the coordinate plane Q, the pointing coordinate is not a position in the coordinate plane Q. Therefore, when information processing (step S7) is performed using such pointing coordinates, there is a risk that the information processing may not be as intended by the user or may not be performed correctly. Therefore, in the second embodiment, the game system 1 executes a process of moving the coordinate plane Q when the pointing direction of the controller 5 deviates from the coordinate plane Q. This movement process is executed even when there is no user operation (the above setting operation). In other words, the movement process is executed independently of the user operation.

図20は、移動前後の座標面Qの一例を示す図である。図20においては、移動前の座標面Qを点線で示し、移動後の座標面Qを実線で示している。図20に示すように、上記移動処理において、ゲームシステム1は、指示方向が(移動後における)座標面Q内の位置を指し示すように座標面Qを移動する。これによって、指示方向が指し示す位置R’は座標面Q内の位置となる。したがって、指示方向が座標面Qから外れてしまった場合に、ユーザは、コントローラ5の姿勢を元に戻したり、上述の設定操作を行ったりする等、特別な操作を行わなくても、座標面Q内の位置を指定することができる。このように、第2の実施形態によれば、ユーザは座標面Q内の位置を指定しやすくなるので、コントローラ5を用いた操作の操作性を向上することができる。   FIG. 20 is a diagram illustrating an example of the coordinate plane Q before and after movement. In FIG. 20, the coordinate plane Q before movement is indicated by a dotted line, and the coordinate plane Q after movement is indicated by a solid line. As shown in FIG. 20, in the movement process, the game system 1 moves the coordinate plane Q so that the pointing direction points to a position in the coordinate plane Q (after movement). As a result, the position R ′ indicated by the pointing direction becomes a position in the coordinate plane Q. Accordingly, when the pointing direction deviates from the coordinate plane Q, the user can return to the coordinate plane without performing a special operation such as returning the attitude of the controller 5 or performing the setting operation described above. A position in Q can be specified. As described above, according to the second embodiment, the user can easily specify the position in the coordinate plane Q, so that the operability of the operation using the controller 5 can be improved.

また、第2の実施形態では、位置R’が座標面Qの外周付近の位置(かつ、座標面Q内の位置)となるように、座標面Qが移動される。すなわち、ゲームシステム1は、指示方向が座標面Q外を指し示す場合、座標面Qの外周付近の位置を指示方向が指し示すように、座標面Qを移動する(図20参照)。換言すれば、指示方向が指し示す位置が座標面Qのある一辺から(その一辺を超えて)外へ移動した場合、移動後における座標面Q上における位置R’は、当該ある一辺の付近の位置となる(図20参照)。   In the second embodiment, the coordinate plane Q is moved so that the position R ′ is a position near the outer periphery of the coordinate plane Q (and a position in the coordinate plane Q). That is, when the pointing direction points outside the coordinate plane Q, the game system 1 moves the coordinate plane Q so that the pointing direction points to a position near the outer periphery of the coordinate plane Q (see FIG. 20). In other words, when the position indicated by the pointing direction moves from one side of the coordinate plane Q to the outside (beyond that side), the position R ′ on the coordinate plane Q after the movement is a position near the one side. (See FIG. 20).

ここで、上記位置R’が座標面Qの中央付近の位置となるように座標面Qを移動するとすれば、情報処理に用いられるポインティング座標の値は、指示方向が座標面Q外となる前後において大きく変化してしまう。その結果、ユーザが操作に違和感を抱くおそれがある。これに対して、第2の実施形態によれば、情報処理に用いられる値の変化を抑制することができ、ユーザの違和感を軽減または抑止することができる。   Here, if the coordinate plane Q is moved so that the position R ′ is near the center of the coordinate plane Q, the pointing coordinate value used for information processing is before and after the pointing direction is outside the coordinate plane Q. Will change greatly. As a result, the user may feel uncomfortable with the operation. On the other hand, according to the second embodiment, a change in values used for information processing can be suppressed, and a user's uncomfortable feeling can be reduced or suppressed.

なお、詳細は後述するが、本実施形態においては、ゲームシステム1は、移動後における座標面Qの外周に位置R’が厳密に位置するのではなく、座標面Qの外周付近に位置R’が位置するように座標系Qを移動する(図23)。このように、ゲームシステム1は、位置R’が座標面Qの外周に厳密に位置するように座標面Qを移動させなくてもよい。つまり、位置R’は、移動後における座標面Qの外周の位置であってもよいし、外周から所定範囲内の位置であってもよい。   Although details will be described later, in the present embodiment, the game system 1 does not position the position R ′ strictly on the outer periphery of the coordinate plane Q after movement, but positions the position R ′ near the outer periphery of the coordinate plane Q. The coordinate system Q is moved so that is positioned (FIG. 23). Thus, the game system 1 does not have to move the coordinate plane Q so that the position R ′ is strictly positioned on the outer periphery of the coordinate plane Q. That is, the position R ′ may be a position on the outer periphery of the coordinate plane Q after the movement, or may be a position within a predetermined range from the outer periphery.

図21は、図20に示す移動前後の座標面Qの一例を、座標面Qに垂直な方向から見た図である。図21に示すように、本実施形態においては、ゲームシステム1は、矩形形状である座標面Qの所定の一辺から外へポインティング座標が外れた場合、当該一辺に垂直な方向へ座標面Qを移動する。このように、ポインティング座標の移動方向と座標面Qの移動方向とは、必ずしも完全に一致するわけではない。ここで、ポインティング座標と座標面Qとの位置関係は座標面Qの移動によって変化するが、上記によれば、ポインティング座標がはみ出した上記一辺に垂直な方向成分についてのみ位置関係が変化し、上記一辺に平行な方向成分については位置関係が変化しない。これによれば、上記一辺に平行な方向についてポインティング座標を移動するユーザの操作は、座標面Qが移動されても有効であるので、ユーザの操作をより正確に反映することができる。   FIG. 21 is a diagram of an example of the coordinate plane Q before and after the movement illustrated in FIG. 20 as viewed from a direction perpendicular to the coordinate plane Q. As shown in FIG. 21, in the present embodiment, when the pointing coordinate deviates from a predetermined one side of the rectangular coordinate surface Q, the game system 1 moves the coordinate surface Q in a direction perpendicular to the one side. Moving. As described above, the moving direction of the pointing coordinates and the moving direction of the coordinate plane Q do not always coincide completely. Here, the positional relationship between the pointing coordinate and the coordinate plane Q changes depending on the movement of the coordinate plane Q. According to the above, the positional relationship changes only for the direction component perpendicular to the one side where the pointing coordinate protrudes. The positional relationship does not change for the direction component parallel to one side. According to this, since the user's operation of moving the pointing coordinates in the direction parallel to the one side is effective even if the coordinate plane Q is moved, the user's operation can be reflected more accurately.

なお、他の実施形態においては、ポインティング座標の移動方向と座標面Qの移動方向とが一致するように座標面Qが移動されてもよい。換言すれば、移動後における座標面Qと位置R’との位置関係は、移動前における座標面Qと位置Rとの関係と略同じになるように、座標面Qが移動されてもよい。つまり、指示方向が座標面Qから外れた場合、ゲームシステム1は、外れる直前における指示方向が指し示す位置またはその近傍の位置が、外れた後の指示方向によって指し示されるように、座標面Qを移動してもよい。   In other embodiments, the coordinate plane Q may be moved so that the movement direction of the pointing coordinates coincides with the movement direction of the coordinate plane Q. In other words, the coordinate plane Q may be moved so that the positional relationship between the coordinate plane Q and the position R ′ after the movement is substantially the same as the relationship between the coordinate plane Q and the position R before the movement. That is, when the pointing direction deviates from the coordinate plane Q, the game system 1 displays the coordinate plane Q so that the position indicated by the pointing direction immediately before deviating or the position in the vicinity thereof is pointed by the pointing direction after deviating. You may move.

なお、指示方向が座標面Q内を指し示す場合には、座標面Qの移動処理は実行されない。これによれば、ユーザが意図しない場合に座標面Qが移動することによって、情報処理に用いられるポインティング座標の値が変化する結果、ユーザに違和感を与える可能性を低減することができる。   Note that when the pointing direction points within the coordinate plane Q, the movement process of the coordinate plane Q is not executed. According to this, when the coordinate plane Q moves when the user does not intend, the value of the pointing coordinate used for information processing changes, and as a result, the possibility that the user feels uncomfortable can be reduced.

第2の実施形態において、座標面Qの移動は、上述の第1の実施形態と同様に行われる。すなわち、ゲームシステム1は、仮想空間におけるコントローラ5の位置(起点)から座標面Qの基準点(原点O)までの距離が一定となるように、座標面Qを移動(配置)する。これによれば、仮想空間におけるコントローラ5から座標面Qまでの距離は一定に維持される。そのため、コントローラ5の基準姿勢(指示方向が原点Oを向く姿勢)からの変化とポインティング座標との関係は、座標面Qの位置によらず一定となる。その結果、どの方向を基準としたときでも(座標面Qがどの位置に配置されたときでも)操作感覚が同じになるので、コントローラ5の操作性を向上することができる。   In the second embodiment, the movement of the coordinate plane Q is performed in the same manner as in the first embodiment described above. That is, the game system 1 moves (places) the coordinate plane Q so that the distance from the position (starting point) of the controller 5 in the virtual space to the reference point (origin O) of the coordinate plane Q is constant. According to this, the distance from the controller 5 to the coordinate plane Q in the virtual space is kept constant. For this reason, the relationship between the change from the reference posture of the controller 5 (the posture in which the pointing direction faces the origin O) and the pointing coordinates is constant regardless of the position of the coordinate plane Q. As a result, the operability of the controller 5 can be improved because the operation feeling is the same regardless of which direction is used as a reference (when the coordinate plane Q is arranged at any position).

なお、第2の実施形態においても第1の実施形態と同様、ゲームシステム1は、座標面Qの基準点(原点O)における法線方向にコントローラ5の位置(起点)が位置するように、座標面Qを移動(配置)する。これによれば、コントローラ5を基準姿勢からどちらの方向へ回転させてもポインティング座標の変化の仕方は同じになるので、コントローラ5の操作性を向上することができる。   In the second embodiment as well, as in the first embodiment, the game system 1 is such that the position (starting point) of the controller 5 is positioned in the normal direction at the reference point (origin O) of the coordinate plane Q. The coordinate plane Q is moved (arranged). According to this, since the way of changing the pointing coordinates is the same regardless of which direction the controller 5 is rotated from the reference posture, the operability of the controller 5 can be improved.

[2.ゲーム処理の具体例]
次に、第2の実施形態において実行されるゲーム処理(情報処理)の詳細を説明する。第2の実施形態においても第1の実施形態と同様、図11に示す各種のデータがゲーム処理において用いられる。また、第2の実施形態においては、処理用データ56には領域サイズデータが含まれる。領域サイズデータは、座標面Qの大きさを示し、例えば、a軸方向の長さMaと、b軸方向の長さMbとを示す。なお、座標面Qの大きさは、予め定められた値に設定されていてもよいし、ポインティング座標を用いて実行される情報処理の内容、および、ユーザによる指示、ゲーム状況等に応じて設定されてもよい。
[2. Specific example of game processing]
Next, details of game processing (information processing) executed in the second embodiment will be described. In the second embodiment, as in the first embodiment, various data shown in FIG. 11 are used in the game process. In the second embodiment, the processing data 56 includes area size data. The area size data indicates the size of the coordinate plane Q, and indicates, for example, a length Ma in the a-axis direction and a length Mb in the b-axis direction. The size of the coordinate plane Q may be set to a predetermined value, or set according to the content of information processing executed using the pointing coordinates, the instruction by the user, the game situation, etc. May be.

第2の実施形態においては、図12に示す一連の処理が実行される際に、ステップS6の処理の次に座標面移動処理が実行される。座標面移動処理以外の処理については、図12に示す処理と同様であるので、詳細な説明を省略する。以下、座標面移動処理について説明する。   In the second embodiment, when the series of processes shown in FIG. 12 is executed, the coordinate plane moving process is executed after the process of step S6. Since the processes other than the coordinate plane moving process are the same as the processes shown in FIG. 12, detailed description thereof is omitted. Hereinafter, the coordinate plane moving process will be described.

図22は、座標面移動処理の詳細な流れを示すフローチャートである。座標面移動処理においては、まずステップS21において、CPU10は、ポインティング座標が座標面Qからはみ出た距離(Ha,Hb)を算出する。変数Haは、座標面Qのa軸方向についてのはみ出た距離を示し、変数Hbは、座標面Qのb軸方向についてのはみ出た距離を示す。この距離(Ha,Hb)は、ステップS6で算出されるポインティング座標(Ra,Rb)と、座標面Qの大きさ(Ma,Mb)とに基づいて算出することができる。すなわち、CPU10は、ポインティング座標データ63と領域サイズデータとをメインメモリから読み出し、読み出したデータに基づいて上記距離を算出する。なお、ポインティング座標が座標面Q内の位置となる場合には、CPU10は、上記距離を0(Ha=Hb=0)とする。ステップS21の次にステップS22の処理が実行される。   FIG. 22 is a flowchart showing a detailed flow of the coordinate plane movement process. In the coordinate plane movement process, first, in step S21, the CPU 10 calculates the distance (Ha, Hb) where the pointing coordinates protrude from the coordinate plane Q. The variable Ha indicates the protruding distance in the a-axis direction of the coordinate plane Q, and the variable Hb indicates the protruding distance in the b-axis direction of the coordinate plane Q. This distance (Ha, Hb) can be calculated based on the pointing coordinates (Ra, Rb) calculated in step S6 and the size (Ma, Mb) of the coordinate plane Q. That is, the CPU 10 reads the pointing coordinate data 63 and the region size data from the main memory, and calculates the distance based on the read data. If the pointing coordinate is a position in the coordinate plane Q, the CPU 10 sets the distance to 0 (Ha = Hb = 0). Following step S21, the process of step S22 is executed.

ステップS22において、CPU10は、指示方向が座標面Q内の位置を指し示すように、はみ出し距離(Ha,Hb)に応じて座標面Qを移動する。図23は、座標面Qを移動する処理の一例を示す図である。なお、図23は、座標面Qのb軸方向から仮想空間を見た図であり、ポインティング座標がa軸(負)方向に関して座標面Qからはみ出したことに応じて、a軸(負)方向に座標面Qが移動される様子を示している。   In step S <b> 22, the CPU 10 moves the coordinate plane Q according to the protrusion distance (Ha, Hb) so that the designated direction points to a position in the coordinate plane Q. FIG. 23 is a diagram illustrating an example of a process of moving the coordinate plane Q. FIG. 23 is a diagram of the virtual space viewed from the b-axis direction of the coordinate plane Q, and the a-axis (negative) direction in response to the pointing coordinates protruding from the coordinate plane Q with respect to the a-axis (negative) direction Fig. 8 shows how the coordinate plane Q is moved.

上記ステップS22において、CPU10は、座標方向ベクトルの向きを変更することによって、座標面Qの移動後の位置および姿勢を算出する。ここで、座標方向ベクトルとは、仮想空間におけるコントローラ5の位置(起点S)から座標面Qへの方向を示す。具体的には、図23に示すように、座標方向ベクトルは、コントローラ5の位置(起点S)から座標面Qの基準点(原点O)へのベクトルである。   In step S22, the CPU 10 calculates the position and orientation after the movement of the coordinate plane Q by changing the direction of the coordinate direction vector. Here, the coordinate direction vector indicates a direction from the position (starting point S) of the controller 5 in the virtual space to the coordinate plane Q. Specifically, as shown in FIG. 23, the coordinate direction vector is a vector from the position of the controller 5 (starting point S) to the reference point (origin O) of the coordinate plane Q.

具体的には、CPU10は、まず、座標面Qが移動する前の座標方向ベクトルNに対して、はみ出し距離に応じた移動ベクトルH(=(Ha,Hb))を加算することによって、法線方向ベクトルの向きを変化させる。加算後のベクトルは、図23に示す起点Sから点Tへのベクトルとなる。次に、CPU10は、向きが変化した法線方向ベクトルを正規化することで、移動後の座標面Qに関する法線方向ベクトルN’を算出する(図23参照)。これによって、移動後の座標面Qの原点Oの位置と、法線方向ベクトルの方向を軸とした回転に関する姿勢成分以外の姿勢とが決定されたことになる。   Specifically, the CPU 10 first adds the movement vector H (= (Ha, Hb)) corresponding to the protruding distance to the coordinate direction vector N before the coordinate plane Q moves, thereby normal lines. Change the direction of the direction vector. The vector after the addition is a vector from the starting point S to the point T shown in FIG. Next, the CPU 10 normalizes the normal direction vector whose direction has changed, thereby calculating a normal direction vector N ′ related to the coordinate plane Q after the movement (see FIG. 23). As a result, the position of the origin O of the coordinate plane Q after the movement and the posture other than the posture component relating to the rotation about the direction of the normal vector are determined.

なお、上述した座標面Qの奥行き方向ベクトルVの大きさを、起点Sから原点Oまでの距離と一致するように設定する場合には、奥行き方向ベクトルと座標方向ベクトルとは同じものになる。したがって、この場合、処理上は、奥行き方向ベクトルを座標方向ベクトルとして用いることができる。つまり、奥行き方向ベクトルを変更することによって、座標面Qの移動後の位置を算出することができる。したがって、ステップS22の具体的な処理としては、CPU10は、奥行き方向データ62をメインメモリから読み出し、奥行き方向データ62が示す奥行き方向ベクトルに対して上記の計算処理(移動ベクトルHの加算および正規化の処理)を実行する。そして、実行によって得られたベクトルを示すデータを新たな奥行き方向データ62としてメインメモリに記憶する。ステップS22の次にステップS23の処理が実行される。   When the size of the depth direction vector V on the coordinate plane Q described above is set to coincide with the distance from the starting point S to the origin O, the depth direction vector and the coordinate direction vector are the same. Therefore, in this case, the depth direction vector can be used as the coordinate direction vector in processing. That is, the position after the movement of the coordinate plane Q can be calculated by changing the depth direction vector. Therefore, as a specific process of step S22, the CPU 10 reads the depth direction data 62 from the main memory, and performs the above calculation process (addition and normalization of the movement vector H) to the depth direction vector indicated by the depth direction data 62. Process). Then, data indicating the vector obtained by execution is stored in the main memory as new depth direction data 62. Following step S22, the process of step S23 is executed.

ステップS23において、CPU10は座標系設定処理を実行する。この座標系設定処理は、上述のステップS13の処理が実行されない点以外は、第1の実施形態における座標系設定処理(S5)と同様の処理である。つまり、上記ステップS22において奥行き方向ベクトルが決定されているので、ステップS23においては、CPU10は、上述のステップS11,S12,S14,およびS15の処理を実行することによって、右方向ベクトルおよび上方向ベクトルを算出する。この処理によって、移動後の座標面Qについて、法線方向ベクトルの方向を軸とした回転に関する姿勢が決定されることになる。したがって、ステップS22およびS23によって、座標面Qの位置および姿勢が決定されることになる。ステップS23の後、CPU10は、座標面移動処理を終了する。   In step S23, the CPU 10 executes a coordinate system setting process. This coordinate system setting process is the same as the coordinate system setting process (S5) in the first embodiment, except that the process of step S13 described above is not executed. That is, since the depth direction vector is determined in step S22, in step S23, the CPU 10 executes the processes of steps S11, S12, S14, and S15 described above, thereby executing the right direction vector and the upward direction vector. Is calculated. With this process, the posture related to the rotation about the direction of the normal vector is determined for the coordinate plane Q after the movement. Therefore, the position and orientation of the coordinate plane Q are determined by steps S22 and S23. After step S23, the CPU 10 ends the coordinate plane movement process.

以上のように、本実施形態においては、CPU10は、起点Sから座標面Qの基準点Oまでのベクトル(座標方向ベクトルN)に対して、指示方向が座標面Q内の位置を指し示すように座標面Qを座標面Qの平面に沿って移動させるベクトル(移動ベクトルH)を加算する。そして、起点から加算後のベクトルの方向への位置に移動後の基準点O’が位置するように座標面Qを移動する(図23)。ここで、座標面Qを移動させるための具体的な処理方法は任意である。他の実施形態においては、例えば、ゲームシステム1は、指示方向が座標面Qを指し示さなくなる直前から直後までの間のコントローラ5の回転方向および回転角度を算出し、回転方向および回転角度に応じて座標面Qを移動させてもよい。なお、第2の実施形態における方法によれば、ベクトルの演算(加算および正規化)によって座標面Qを移動させることができるので、回転方向および回転角度を算出する方法に比べて、簡易な計算処理によって移動処理を実行することができ、処理を高速化することができる。   As described above, in the present embodiment, the CPU 10 causes the indicated direction to indicate the position in the coordinate plane Q with respect to the vector (coordinate direction vector N) from the starting point S to the reference point O of the coordinate plane Q. A vector (movement vector H) for moving the coordinate plane Q along the plane of the coordinate plane Q is added. Then, the coordinate plane Q is moved so that the moved reference point O 'is located in the direction of the vector after addition from the starting point (FIG. 23). Here, a specific processing method for moving the coordinate plane Q is arbitrary. In another embodiment, for example, the game system 1 calculates the rotation direction and rotation angle of the controller 5 between immediately before and immediately after the pointing direction no longer points to the coordinate plane Q, and according to the rotation direction and rotation angle. Then, the coordinate plane Q may be moved. In addition, according to the method in the second embodiment, the coordinate plane Q can be moved by vector calculation (addition and normalization). Therefore, the calculation is simpler than the method of calculating the rotation direction and the rotation angle. The movement process can be executed by the process, and the process can be speeded up.

なお、第2の実施形態における方法では、移動後の座標面Qを用いた場合のポインティング座標は、厳密に座標面Qの端(外周)となるのではなく、外周よりもやや内側の位置を示す。ただし、ステップS2〜S6の処理がある程度短い時間間隔で繰り返し実行される場合には、ポインティング座標が座標面Qからはみ出す距離は微小であり、そのため、移動後の座標面Qを用いた場合のポインティング座標が示す位置も、外周から大きく離れることにはならない。したがって、第2の実施形態における方法によれば、ポインティング座標の精度を大きく悪化させることなく、処理を高速化することができる。   In the method according to the second embodiment, the pointing coordinate when the coordinate plane Q after movement is used is not strictly the end (outer periphery) of the coordinate plane Q, but is positioned slightly inside the outer periphery. Show. However, when the processes of steps S2 to S6 are repeatedly executed at a relatively short time interval, the distance that the pointing coordinate protrudes from the coordinate plane Q is very small. Therefore, the pointing when the coordinate plane Q after movement is used is used. The position indicated by the coordinates does not greatly deviate from the outer periphery. Therefore, according to the method in the second embodiment, it is possible to speed up the processing without greatly deteriorating the accuracy of the pointing coordinates.

第2の実施形態においては、上記座標面移動処理の次に、上述したステップS7の処理が実行される。なお、ステップS7の時点でポインティング座標データとしてメインメモリに記憶されている値は、ステップS6で算出されたものである。そのため、上記座標面移動処理によって座標面Qが移動された(直後の)場合には、ポインティング座標は座標面Q内の位置を示さないものとなっている。したがって、上記の場合、CPU10は、移動後の座標面Qを用いてポインティング座標を再度算出し、算出されたポインティング座標を用いてステップS7における処理を実行してもよい。また、CPU10は、上記の場合、ポインティング座標を座標面Q内の位置に補正し、補正したポインティング座標を用いてステップS7における処理を実行してもよい。また、上記の場合にポインティング座標が座標面Q外の位置を示すのは一時的なものである(次のステップS2〜S8の処理ループでは、移動後の座標面Qを用いてポインティング座標が算出されるので、ポインティング座標は座標面Q内の位置を示すものになっている)。そのため、CPU10は、上記の場合であっても、座標面Q外の位置を示すポインティング座標をそのまま用いてステップS7における処理を実行してもよい。   In the second embodiment, after the coordinate plane movement process, the process of step S7 described above is executed. Note that the values stored in the main memory as the pointing coordinate data at the time of step S7 are those calculated in step S6. Therefore, when the coordinate plane Q is moved (immediately after) by the coordinate plane movement process, the pointing coordinates do not indicate a position in the coordinate plane Q. Therefore, in the above case, the CPU 10 may calculate the pointing coordinates again using the coordinate plane Q after movement, and execute the processing in step S7 using the calculated pointing coordinates. In the above case, the CPU 10 may correct the pointing coordinates to a position in the coordinate plane Q, and execute the process in step S7 using the corrected pointing coordinates. In the above case, the pointing coordinate indicates a position outside the coordinate plane Q is temporary (in the processing loop of the next steps S2 to S8, the pointing coordinate is calculated using the coordinate plane Q after the movement. Therefore, the pointing coordinates indicate the position in the coordinate plane Q). Therefore, even in the above case, the CPU 10 may execute the processing in step S7 using the pointing coordinates indicating the position outside the coordinate plane Q as they are.

以上のように、第2の実施形態においては、ゲームシステム1は、仮想空間において設定される所定領域(座標面Qの領域)のうちで、コントローラ5の姿勢に応じて決定される指示方向が指し示す位置(ポインティング座標)に応じた情報処理を実行する(ステップS7)。ここで、ゲームシステム1は、指示方向が所定領域外を指し示す場合、指示方向が領域内の位置を指し示すように仮想空間において所定領域を移動する(S21〜S23)。これによって、コントローラ5の操作性を向上することができる。   As described above, in the second embodiment, the game system 1 has an instruction direction determined according to the posture of the controller 5 in a predetermined area (area of the coordinate plane Q) set in the virtual space. Information processing corresponding to the pointed position (pointing coordinates) is executed (step S7). Here, when the pointing direction points outside the predetermined area, the game system 1 moves the predetermined area in the virtual space so that the pointing direction points to a position in the area (S21 to S23). Thereby, the operability of the controller 5 can be improved.

なお、第2の実施形態においても第1の実施形態と同様、コントローラ5の姿勢を算出する方法は任意である。例えば、第2の実施形態においては、ユーザがコントローラ5をテレビ2(マーカ6)の方へ向けて使用する態様だけでなく、コントローラ5を自由な方向に向けて使用する態様も想定される。コントローラ5を自由な方向に向けて使用する態様が想定される場合、コントローラ5がマーカ6を撮像できない(コントローラ5がマーカ6の方を向いていない)ことが考えられる。そのため、第2の実施形態において、ゲームシステム1は、マーカ座標を用いずにコントローラ5の姿勢を算出してもよい。   Note that in the second embodiment as well, the method for calculating the attitude of the controller 5 is arbitrary as in the first embodiment. For example, in the second embodiment, not only a mode in which the user uses the controller 5 toward the television 2 (marker 6) but also a mode in which the controller 5 is used in a free direction is assumed. When a mode in which the controller 5 is used in a free direction is assumed, it is conceivable that the controller 5 cannot image the marker 6 (the controller 5 does not face the marker 6). Therefore, in the second embodiment, the game system 1 may calculate the attitude of the controller 5 without using the marker coordinates.

なお、第2の実施形態においては、第1の実施形態における座標系設定処理(ステップS5)は実行されてなくてもよい。第2の実施形態においては、座標面Qにおける座標軸の向きは任意の方法で設定されてもよい。また、上記ステップS23における座標系設定処理においても座標軸の向きは任意の方法で設定されてもよい。   In the second embodiment, the coordinate system setting process (step S5) in the first embodiment may not be executed. In the second embodiment, the direction of the coordinate axis on the coordinate plane Q may be set by an arbitrary method. In the coordinate system setting process in step S23, the orientation of the coordinate axes may be set by an arbitrary method.

また、第2の実施形態においても第1の実施形態と同様、仮想空間に設定される所定領域は、座標面の領域に限らず、どのようなものであってもよい。上記所定領域は、例えば、図18に示したような画像(画像を表すオブジェクト)の領域であってもよい。   Also in the second embodiment, as in the first embodiment, the predetermined area set in the virtual space is not limited to the area of the coordinate plane, and may be any object. The predetermined area may be, for example, an area of an image (an object representing an image) as shown in FIG.

また、第2の実施形態においては、上記所定領域として、平面であって矩形形状の領域を用いた。平面の領域を用いることによって、(例えばステップS6の方法で)ポインティング座標を容易に算出することができる。また、矩形形状の領域を用いることによって、ポインティング座標を、矩形の表示画面上の位置に容易に対応付けることができる。なお、他の実施形態においては、所定領域は平面の領域に限らず、曲面の領域であってもよい。さらに、所定領域の形状は、上記実施形態のような矩形形状に限らず、任意である。所定領域の形状は、ポインティング座標を用いた情報処理の内容に応じた形状に設定されてもよく、例えば円形や楕円形の形状であってもよい。   In the second embodiment, a planar and rectangular area is used as the predetermined area. By using the planar area, the pointing coordinates can be easily calculated (for example, by the method of step S6). Further, by using the rectangular area, the pointing coordinates can be easily associated with the position on the rectangular display screen. In other embodiments, the predetermined region is not limited to a planar region, and may be a curved region. Furthermore, the shape of the predetermined region is not limited to the rectangular shape as in the above embodiment, but is arbitrary. The shape of the predetermined region may be set to a shape according to the content of information processing using pointing coordinates, and may be, for example, a circular shape or an elliptical shape.

<変形例>
上記各実施形態においては、操作装置の姿勢に基づいて仮想空間において所定の設定対象を設定する情報処理システムをゲームシステムに適用した場合を例として説明したが、上記情報処理システムはゲーム用途以外にも適用することが可能である。すなわち、上記各実施形態は、操作装置による指示方向が指し示す位置に基づいて任意の情報処理を実行する情報処理プログラム、情報処理システム、情報処理装置、情報処理方法に適用することができる。
<Modification>
In each of the above embodiments, the case where the information processing system that sets a predetermined setting target in the virtual space based on the attitude of the operation device is applied to the game system has been described as an example. Can also be applied. In other words, each of the above embodiments can be applied to an information processing program, an information processing system, an information processing apparatus, and an information processing method for executing arbitrary information processing based on a position indicated by a direction indicated by an operation device.

上記各実施形態においては、ゲーム装置3とコントローラ5とを含む情報処理システムを例として説明したが、情報処理システムは、互いに通信可能な複数の装置によって構成されるものに限らず、一体の(1つの)装置で実現されてもよい。また、他の実施形態では、互いに通信可能な複数の情報処理装置を有する情報処理システムにおいて、当該複数の情報処理装置が情報処理を分担して実行するようにしてもよい。   In each of the above-described embodiments, the information processing system including the game apparatus 3 and the controller 5 has been described as an example. However, the information processing system is not limited to being configured by a plurality of devices that can communicate with each other. It may be realized by a single device. In another embodiment, in an information processing system having a plurality of information processing apparatuses that can communicate with each other, the plurality of information processing apparatuses may share and execute information processing.

上記各実施形態においては、操作装置の一例としてコントローラ5を用いる場合を説明したが、操作装置は、ユーザが動かして操作することが可能な任意の装置でよい。例えば、他の実施形態においては、上述の端末装置70や携帯型のゲーム装置が操作装置として用いられてもよい。   In each of the above embodiments, the case where the controller 5 is used as an example of the operation device has been described. However, the operation device may be any device that can be operated by the user. For example, in another embodiment, the above-described terminal device 70 or a portable game device may be used as the operation device.

以上のように、本発明は、操作装置の姿勢を変化させる操作に関する操作性を向上すること等を目的として、例えば、ポインティング操作を行うためのポインティングシステムやゲームシステム等に利用することが可能である。   As described above, the present invention can be used for, for example, a pointing system or a game system for performing a pointing operation for the purpose of improving the operability related to the operation for changing the attitude of the operating device. is there.

1 ゲームシステム
2 テレビ
3 ゲーム装置
4 光ディスク
5 コントローラ
6 マーカ装置
10 CPU
11e 内部メインメモリ
12 外部メインメモリ
37 加速度センサ
48 ジャイロセンサ
50 ゲームプログラム
51 操作データ
57 姿勢データ
59 座標面データ
63 ポインティング座標データ
DESCRIPTION OF SYMBOLS 1 Game system 2 Television 3 Game apparatus 4 Optical disk 5 Controller 6 Marker apparatus 10 CPU
11e Internal main memory 12 External main memory 37 Acceleration sensor 48 Gyro sensor 50 Game program 51 Operation data 57 Attitude data 59 Coordinate plane data 63 Pointing coordinate data

Claims (12)

操作装置の姿勢に応じた情報処理を実行する情報処理装置のコンピュータにおいて実行される情報処理プログラムであって、
仮想空間において設定される所定領域のうちで、前記操作装置の姿勢に応じた指示方向が指し示す位置に応じた情報処理を実行する処理実行手段と、
前記指示方向が前記所定領域外を指し示す場合、前記指示方向が前記所定領域内の位置を指し示すように前記仮想空間において前記所定領域を移動する移動手段として前記コンピュータを機能させ
前記指示方向は、前記仮想空間における所定位置を起点として決定され、
前記移動手段は、前記起点から前記所定領域の基準点までの距離が一定となるように、前記所定領域を移動する、情報処理プログラム。
An information processing program that is executed in a computer of an information processing device that performs information processing according to the attitude of the operating device,
Processing execution means for executing information processing in accordance with a position indicated by an instruction direction in accordance with the attitude of the operating device in a predetermined area set in the virtual space;
When the pointing direction points outside the predetermined area, the computer functions as a moving unit that moves the predetermined area in the virtual space so that the pointing direction points to a position in the predetermined area .
The indicated direction is determined starting from a predetermined position in the virtual space,
The information processing program for moving the predetermined area so that a distance from the starting point to a reference point of the predetermined area is constant .
前記移動手段は、前記指示方向が前記所定領域外を指し示す場合、前記所定領域の外周付近の位置を前記指示方向が指し示すように、前記所定領域を移動する、請求項1に記載の情報処理プログラム。   2. The information processing program according to claim 1, wherein, when the pointing direction points outside the predetermined area, the moving unit moves the predetermined area so that the pointing direction points to a position near the outer periphery of the predetermined area. . 前記移動手段は、前記指示方向が前記所定領域内を指し示す場合には、前記所定領域を移動しない、請求項1または請求項2に記載の情報処理プログラム。   The information processing program according to claim 1, wherein the moving unit does not move the predetermined area when the pointing direction points within the predetermined area. 前記移動手段は、前記指示方向が指し示す位置が前記所定領域の一辺を超えて前記所定領域外へ移動する場合、当該一辺の付近の位置を前記指示方向が指し示すように、前記所定領域を移動する、請求項1から請求項3のいずれか1項に記載の情報処理プログラム。   The moving means moves the predetermined area so that the pointing direction indicates a position near the one side when the position indicated by the pointing direction moves outside the predetermined area beyond one side of the predetermined area. The information processing program according to any one of claims 1 to 3. 前記所定領域は前記仮想空間における矩形形状の平面領域であり、
前記移動手段は、前記指示方向が指し示す位置が、前記所定領域の一辺を超えて前記所定領域外へ移動する場合、当該一辺に垂直な方向へ前記所定領域を移動する、請求項4に記載の情報処理プログラム。
The predetermined area is a rectangular planar area in the virtual space;
5. The moving unit according to claim 4, wherein the moving unit moves the predetermined region in a direction perpendicular to the one side when the position indicated by the pointing direction moves outside the predetermined region beyond one side of the predetermined region. Information processing program.
前記移動手段は、前記所定領域上の位置を表すための座標系を移動し、
前記情報処理プログラムは、前記指示方向が指し示す前記所定領域上の位置座標を算出する位置算出手段として前記コンピュータをさらに機能させ、
前記処理実行手段は、算出された位置座標に基づいて前記情報処理を実行する、請求項1から請求項5のいずれか1項に記載の情報処理プログラム。
The moving means moves a coordinate system for representing a position on the predetermined area,
The information processing program causes the computer to further function as position calculation means for calculating position coordinates on the predetermined area indicated by the instruction direction,
The information processing program according to any one of claims 1 to 5, wherein the processing execution unit executes the information processing based on the calculated position coordinates.
前記所定領域は前記仮想空間における平面であり、
前記移動手段は、前記起点から前記基準点までのベクトルに対して、前記指示方向が領域内の位置を指し示すように前記所定領域を前記平面に沿って移動させるベクトルを加算し、前記起点から加算後のベクトルの方向への位置に移動後の基準点が位置するように前記所定領域を移動する、請求項1から請求項6のいずれか1項に記載の情報処理プログラム。
The predetermined area is a plane in the virtual space;
The moving means adds a vector for moving the predetermined area along the plane so that the indicated direction points to a position in the area to the vector from the starting point to the reference point, and adds from the starting point. The information processing program according to any one of claims 1 to 6 , wherein the predetermined area is moved so that the moved reference point is located at a position in the direction of a later vector.
前記所定領域は前記仮想空間における平面の領域である、請求項1から請求項のいずれか1項に記載の情報処理プログラム。 The information processing program according to any one of claims 1 to 7 , wherein the predetermined area is a planar area in the virtual space. 前記平面は矩形形状を有する、請求項に記載の情報処理プログラム。 The information processing program according to claim 8 , wherein the plane has a rectangular shape. 操作装置の姿勢に応じた情報処理を実行する情報処理装置であって、
仮想空間において設定される所定領域のうちで、前記操作装置の姿勢に応じた指示方向が指し示す位置に応じた情報処理を実行する処理実行手段と、
前記指示方向が前記所定領域外を指し示す場合、前記指示方向が領域内の位置を指し示すように前記仮想空間において前記所定領域を移動する移動手段とを備え
前記指示方向は、前記仮想空間における所定位置を起点として決定され、
前記移動手段は、前記起点から前記所定領域の基準点までの距離が一定となるように、前記所定領域を移動する、情報処理装置。
An information processing apparatus that performs information processing according to the attitude of the operating device,
Processing execution means for executing information processing in accordance with a position indicated by an instruction direction in accordance with the attitude of the operating device in a predetermined area set in the virtual space ;
Moving means for moving the predetermined area in the virtual space so that the pointing direction points to a position in the area when the pointing direction points outside the predetermined area ;
The indicated direction is determined starting from a predetermined position in the virtual space,
The information processing apparatus, wherein the moving means moves the predetermined area so that a distance from the starting point to a reference point of the predetermined area is constant .
操作装置の姿勢に応じた情報処理を実行する情報処理システムであって、
仮想空間において設定される所定領域のうちで、前記操作装置の姿勢に応じた指示方向が指し示す位置に応じた情報処理を実行する処理実行手段と、
前記指示方向が前記所定領域外を指し示す場合、前記指示方向が領域内の位置を指し示すように前記仮想空間において前記所定領域を移動する移動手段とを備え
前記指示方向は、前記仮想空間における所定位置を起点として決定され、
前記移動手段は、前記起点から前記所定領域の基準点までの距離が一定となるように、前記所定領域を移動する、情報処理システム。
An information processing system that executes information processing according to the attitude of an operating device,
Processing execution means for executing information processing in accordance with a position indicated by an instruction direction in accordance with the attitude of the operating device in a predetermined area set in the virtual space;
Moving means for moving the predetermined area in the virtual space so that the pointing direction points to a position in the area when the pointing direction points outside the predetermined area ;
The indicated direction is determined starting from a predetermined position in the virtual space,
The information processing system, wherein the moving means moves the predetermined area so that a distance from the starting point to a reference point of the predetermined area is constant .
操作装置の姿勢に応じた情報処理の方法であって、
仮想空間において設定される所定領域のうちで、前記操作装置の姿勢に応じた指示方向が指し示す位置に応じた情報処理を実行する処理実行ステップと、
前記指示方向が前記所定領域外を指し示す場合、前記指示方向が領域内の位置を指し示すように前記仮想空間において前記所定領域を移動する移動ステップとを備え
前記指示方向は、前記仮想空間における所定位置を起点として決定され、
前記移動ステップにおいては、前記起点から前記所定領域の基準点までの距離が一定となるように、前記所定領域を移動する、情報処理方法。
An information processing method according to the attitude of the operating device,
A process execution step of executing information processing according to a position indicated by an instruction direction according to an attitude of the controller device in a predetermined area set in a virtual space;
A moving step of moving the predetermined region in the virtual space so that the pointing direction points to a position in the region when the pointing direction points outside the predetermined region ;
The indicated direction is determined starting from a predetermined position in the virtual space,
In the moving step, an information processing method of moving the predetermined area so that a distance from the starting point to a reference point of the predetermined area is constant .
JP2014031820A 2014-02-21 2014-02-21 Information processing program, information processing apparatus, information processing system, and information processing method Active JP6280390B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2014031820A JP6280390B2 (en) 2014-02-21 2014-02-21 Information processing program, information processing apparatus, information processing system, and information processing method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2014031820A JP6280390B2 (en) 2014-02-21 2014-02-21 Information processing program, information processing apparatus, information processing system, and information processing method

Publications (2)

Publication Number Publication Date
JP2015158706A JP2015158706A (en) 2015-09-03
JP6280390B2 true JP6280390B2 (en) 2018-02-14

Family

ID=54182684

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2014031820A Active JP6280390B2 (en) 2014-02-21 2014-02-21 Information processing program, information processing apparatus, information processing system, and information processing method

Country Status (1)

Country Link
JP (1) JP6280390B2 (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2017134630A (en) * 2016-01-28 2017-08-03 セイコーエプソン株式会社 Display device, control method of display device, and program

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2006323454A (en) * 2005-05-17 2006-11-30 Fuji Xerox Co Ltd Three-dimensional instruction input system, three-dimensional instruction input device, three-dimensional instruction input method, and program
JP2010282408A (en) * 2009-06-04 2010-12-16 Sony Corp Control device, input device, control system, hand-held device, and control method
KR101646953B1 (en) * 2010-01-12 2016-08-09 엘지전자 주식회사 Display device and control method thereof
JP5959047B2 (en) * 2012-04-04 2016-08-02 任天堂株式会社 Display control system, display control method, display control program, and display control apparatus

Also Published As

Publication number Publication date
JP2015158706A (en) 2015-09-03

Similar Documents

Publication Publication Date Title
JP5692904B2 (en) Input system, information processing apparatus, information processing program, and pointing position calculation method
JP5700758B2 (en) GAME DEVICE, GAME PROGRAM, GAME SYSTEM, AND GAME PROCESSING METHOD
JP5060798B2 (en) Information processing program and information processing apparatus
JP5448073B2 (en) Information processing apparatus, information processing program, information processing system, and selection target selection method
JP4918376B2 (en) Information processing program and information processing apparatus
JP5038465B2 (en) Information processing program, information processing apparatus, information processing method, and information processing system
JP5035972B2 (en) Information processing program, information processing apparatus, information processing system, and information processing method
JP5869236B2 (en) Information processing program, information processing apparatus, information processing system, and information processing method
JP4265814B1 (en) Posture calculation device, posture calculation program, game device, and game program
JP5797046B2 (en) Pointing system, information processing system, coordinate system setting method, information processing apparatus, and information processing program
JP5620719B2 (en) Information processing program, information processing apparatus, information processing system, and map display method
JP2010020554A (en) Information processing program and information processor
JP5525177B2 (en) Information processing program and information processing apparatus
JP2010259642A (en) Posture calculation device and posture calculation program
JP5576721B2 (en) GAME PROGRAM, GAME DEVICE, GAME SYSTEM, AND GAME METHOD
JP2010207329A (en) Coordinate calculation device and coordinate calculation program
JP5541851B2 (en) Posture calculation device, posture calculation program, game device, and game program
JP5350612B2 (en) GAME PROGRAM, GAME DEVICE, GAME SYSTEM, AND GAME PROCESSING METHOD
JP6280390B2 (en) Information processing program, information processing apparatus, information processing system, and information processing method
JP6262563B2 (en) Information processing program, information processing apparatus, information processing system, and information processing method
JP2010207331A (en) Orientation calculation apparatus, orientation calculation program, game apparatus, and game program
JP6042394B2 (en) Coordinate calculation apparatus and coordinate calculation program
JP2014000438A (en) Game program, game device, game system and game processing method
JP2010207330A (en) Device and program for calculating posture, game device and game program

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20170126

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20171031

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20171114

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20171227

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: 20180112

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20180119

R150 Certificate of patent or registration of utility model

Ref document number: 6280390

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250