JP7250451B2 - Programs, electronic devices, and methods - Google Patents
Programs, electronic devices, and methods Download PDFInfo
- Publication number
- JP7250451B2 JP7250451B2 JP2018133541A JP2018133541A JP7250451B2 JP 7250451 B2 JP7250451 B2 JP 7250451B2 JP 2018133541 A JP2018133541 A JP 2018133541A JP 2018133541 A JP2018133541 A JP 2018133541A JP 7250451 B2 JP7250451 B2 JP 7250451B2
- Authority
- JP
- Japan
- Prior art keywords
- axis
- angle
- determined
- data points
- determining
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Active
Links
Images
Landscapes
- User Interface Of Digital Computer (AREA)
Description
本発明は、プログラム等に関するものであり、特にタッチパネルを備える電子装置において実行されるプログラム等に関する。 The present invention relates to a program and the like, and more particularly to a program and the like executed in an electronic device having a touch panel.
近年のタッチパネル技術の向上に伴い、タッチパネル上のユーザインタフェースを介してユーザ入力を行う電子装置が広く普及してきた。そして、電子装置において実行されるゲームにおいては、従来型の物理的なコントローラによるユーザ入力に代えて、電子装置に備えられたタッチパネルを介してユーザ入力を行う形態が広く普及してきている。 With recent improvements in touch panel technology, electronic devices that perform user input via a user interface on a touch panel have become widespread. In games executed on electronic devices, a form in which user input is performed via a touch panel provided in the electronic device instead of user input using a conventional physical controller has become widespread.
特にスマートフォン等に代表される小型の携帯型電子装置の普及が急速に進み、このような携帯型電子装置上で実行されるゲームも数多くリリースされている。このような状況において、タッチパネルに表示されたプレイヤキャラクタなどの仮想オブジェクトの操作方法については、例えば非特許文献1に示すバーチャルパッドに関する技術を含め、様々な技術が提案されている。 In particular, small portable electronic devices such as smart phones have rapidly spread, and many games have been released to be executed on such portable electronic devices. Under such circumstances, various techniques have been proposed for operating a virtual object such as a player character displayed on a touch panel, including a technique relating to a virtual pad disclosed in Non-Patent Document 1, for example.
例えば特許文献1には、タッチパネルを備えるゲーム装置であって、ユーザのタッチ操作に応じて原点を設定してジョイスティックを模した操作を行うことができるゲーム装置やプログラムが開示されている。当該ゲーム装置は、タッチパネルがタッチを検出していない状態から検出した状態に変化した場合に検出を開始したときの座標に基づき基準座標を設定し、その後タッチ検出を継続する場合、その後に検出した座標に基づき指示座標を設定する。そして当該ゲーム装置は、基準座標から指示座標へのベクトルの方向がジョイスティックを倒している方向、ベクトルの大きさがジョイスティックの倒し具合と認識することで、仮想ジョイスティックを実現し、仮想オブジェクトの操作を実現している。 For example, Patent Literature 1 discloses a game apparatus having a touch panel, and a game apparatus and a program capable of setting an origin according to a user's touch operation and performing an operation simulating a joystick. The game device sets the reference coordinates based on the coordinates at the start of detection when the touch panel changes from a state in which the touch panel does not detect a touch to a state in which the touch panel detects a touch. Set the indicated coordinates based on the coordinates. The game device realizes a virtual joystick by recognizing that the direction of the vector from the reference coordinates to the designated coordinates is the direction in which the joystick is tilted, and the magnitude of the vector is the extent to which the joystick is tilted, thereby operating the virtual object. Realized.
特許文献1に示す従来技術において、ユーザは、タッチパネル上の1箇所を指で接触してゲーム装置に基準座標を認識させ、接触したままその指をスライドさせ、スライド後の指の接触位置によりゲーム装置に指示座標を認識させる。このように構成される従来技術は、ユーザが方向を入力するとき、基準座標から指示座標まで有意な距離を生成する必要があるため、高い応答性を実現することは難しかった。例えばユーザが仮想ジョイスティックを大きく倒した操作を行いたい場合、大きく倒したジョイスティックの倒し具合に対応する基準座標から指示座標へのベクトルの大きさを生成する必要があった。 In the prior art disclosed in Patent Document 1, a user touches a point on a touch panel with a finger to cause the game device to recognize reference coordinates, slides the finger while in contact, and starts a game based on the contact position of the finger after sliding. Make the device recognize the indicated coordinates. With the conventional technology configured in this way, it is difficult to achieve high responsiveness because it is necessary to generate a significant distance from the reference coordinate to the indicated coordinate when the user inputs the direction. For example, when the user wants to perform an operation in which the virtual joystick is greatly tilted, it is necessary to generate the magnitude of the vector from the reference coordinates to the designated coordinates corresponding to the tilting degree of the joystick that has been tilted greatly.
したがって、タッチパネルに表示された、仮想空間上に配置された仮想オブジェクトを制御する操作方法として、例えばより高速で直感的な操作方法の実現が求められている。更に一般化すると、仮想空間内に配置され、ユーザの操作対象となりうるオブジェクトである操作対象オブジェクトを制御する操作方法として、より操作性の高い操作方法の実現が求められている。 Therefore, as an operation method for controlling a virtual object placed in a virtual space and displayed on a touch panel, there is a demand for realizing a faster and more intuitive operation method, for example. More generalized, there is a demand for an operation method with higher operability as an operation method for controlling an operation target object, which is an object that is placed in a virtual space and can be a user's operation target.
本発明は、このような課題を解決するためになされたものであり、仮想空間における操作対象オブジェクトを制御するにあたって、より操作性を高くすることが可能なプログラム等を提供することを主目的とする。 SUMMARY OF THE INVENTION The present invention has been made to solve such problems, and the main object thereof is to provide a program or the like that can improve operability when controlling an object to be manipulated in a virtual space. do.
上記の目的を達成するために、本発明の一態様としてのプログラムは、タッチパネルを備える電子装置において実行されるプログラムであって、該電子装置に、前記タッチパネルへのユーザの操作により発生したタッチイベントに基づいて取得される第1の軸の値及び第2の軸の値により示されるデータポイントを保持するステップと、前記保持されているデータポイントのうち既定の保持時間を超えたデータポイントの保持を終了するステップと、前記保持されているデータポイントに基づいて回帰直線の傾きを決定するステップと、前記保持されているデータポイントの集合としての変位方向に基づいて前記決定された回帰直線の傾きを回転させる回転量を決定するステップと、前記決定された回帰直線の傾き及び前記決定された回転量に基づいて、前記ユーザが仮想空間内の操作対象オブジェクトを制御するための角度を決定するステップと、を実行させることを特徴とする。 In order to achieve the above object, a program as one aspect of the present invention is a program executed in an electronic device having a touch panel, wherein the electronic device receives a touch event generated by a user's operation on the touch panel. holding data points indicated by a first axis value and a second axis value obtained based on and holding data points of said held data points that have exceeded a predetermined holding time determining the slope of a regression line based on the retained data points; and determining the slope of the determined regression line based on the displacement direction as a set of the retained data points. and determining an angle for the user to control the operation target object in the virtual space based on the determined slope of the regression line and the determined rotation amount. and is characterized by executing
また、本発明において好ましくは、前記回転量を決定するステップは、前記保持されているデータポイントにおける時系列的に前後するデータポイントの変位方向に基づいて、前記操作対象オブジェクトを制御するための角度を決定するにあたって、前記決定された傾きに対して180度回転させるか否かを示す回転量を決定する。 Further, in the present invention, preferably, the step of determining the amount of rotation includes determining an angle for controlling the operation target object based on displacement directions of data points that chronologically precede and follow in the held data points. is determined, a rotation amount indicating whether or not to rotate 180 degrees with respect to the determined inclination is determined.
また、本発明において好ましくは、記プログラムは、前記電子装置に、前記保持されているデータポイントにおける前記第1の軸の値の変位量及び前記第2の軸の値の変位量に基づいて、独立変数の軸として該第1の軸及び該第2の軸のいずれか一方の軸を決定するステップと、他方の軸を従属変数の軸として決定するステップと、を更に実行させ、前記回帰直線の傾きを決定するステップは、前記決定された独立変数の軸及び従属変数の軸に更に基づいて、回帰直線の傾きを決定する。 Also, preferably in the present invention, the program causes the electronic device to perform determining one of the first axis and the second axis as an axis of an independent variable; and determining the other axis as an axis of a dependent variable; The step of determining the slope of determines the slope of the regression line further based on the determined independent variable axis and dependent variable axis.
また、本発明において好ましくは、前記いずれか一方の軸を決定するステップは、前記保持されているデータポイントにおける、前記第1の軸の最大値と最小値の差分値及び前記第2の軸の最大値と最小値の差分値に基づいて、独立変数の軸として前記いずれか一方の軸を決定する。 In addition, preferably in the present invention, the step of determining one of the axes includes the difference value between the maximum value and the minimum value of the first axis and the difference value of the second axis in the retained data points. Based on the difference value between the maximum value and the minimum value, one of the axes is determined as the axis of the independent variable.
また、本発明において好ましくは、前記いずれか一方の軸を決定するステップは、前記保持されているデータポイントにおける、前記第1の軸の最大値と最小値の差分値に対して重み付けを行った値及び前記第2の軸の最大値と最小値の差分値の大きさを比較することにより、独立変数の軸として前記いずれか一方の軸を決定する。 Further, preferably in the present invention, the step of determining one of the axes weights the difference between the maximum value and the minimum value of the first axis in the retained data points. One of the axes is determined as the axis of the independent variable by comparing the values and the magnitude of the difference between the maximum and minimum values of the second axis.
また、本発明において好ましくは、前記回転量を決定するステップは、前記保持されているデータポイントにおける時系列的に前後する、前記決定された独立変数の軸の値の差分値の正負の数量を比較することにより、前記操作対象オブジェクトを制御するための角度を決定するにあたって、前記決定された回帰直線の傾きに対して180度回転させるか否かを示す回転量を決定する。 In addition, preferably in the present invention, the step of determining the amount of rotation includes determining the positive and negative quantities of the difference values of the determined axis values of the independent variables that chronologically change in the held data points. By the comparison, a rotation amount indicating whether or not to rotate the determined regression line by 180 degrees is determined in determining the angle for controlling the operation target object.
また、本発明において好ましくは、前記回帰直線の傾きを決定するステップは、前記保持されているデータポイントにおける、独立変数の平均及び従属変数の平均を決定するステップと、前記決定された平均を用いて、前記保持されているデータポイントにおける、独立変数の偏差及び従属変数の偏差を決定するステップと、前記決定された独立変数の偏差を用いて、前記保持されているデータポイントにおける独立変数の分散を決定するステップと、前記決定された独立変数の偏差及び従属変数の偏差を用いて、前記保持されているデータポイントにおける共分散を決定するステップと、前記決定された共分散を前記決定された独立変数の分散で割ることにより回帰直線の傾きを決定するステップと、を含む。 Also preferably in the present invention, the step of determining the slope of the regression line comprises determining the mean of the independent variable and the mean of the dependent variable in the retained data points; determining an independent variable deviation and a dependent variable deviation at the retained data points; using the determined independent variable deviations to determine the independent variable variance at the retained data points; using the determined independent variable deviations and dependent variable deviations to determine covariances at the retained data points; determining the slope of the regression line by dividing by the variance of the independent variable.
また、本発明において好ましくは、前記第1の軸は、前記タッチパネルのセンサが配列される方向の短手方向を示すX軸であり、前記第2の軸は、前記タッチパネルのセンサが配列される方向の長手方向を示し、前記第1の軸に直交するY軸であり、前記回帰直線の傾きを決定するステップは、前記決定された独立変数の軸が前記第2の軸である場合、前記決定された共分散を前記決定された独立変数の分散で割ることにより決定された回帰直線の傾きに対応する角度を、90度から引くことにより回帰直線の傾きを決定する。 Further, in the present invention, preferably, the first axis is an X-axis indicating a lateral direction of a direction in which the sensors of the touch panel are arranged, and the second axis is an X-axis along which the sensors of the touch panel are arranged. The Y-axis indicates the longitudinal direction and is orthogonal to the first axis, and the step of determining the slope of the regression line includes, if the determined axis of the independent variable is the second axis, the Determine the slope of the regression line by subtracting from 90 degrees the angle corresponding to the slope of the regression line determined by dividing the determined covariance by the determined variance of the independent variable.
また、本発明において好ましくは、前記第1の軸は、前記タッチパネルのセンサが配列される方向の短手方向を示すX軸であり、前記第2の軸は、前記タッチパネルのセンサが配列される方向の長手方向を示し、前記第1の軸に直交するY軸である。 Further, in the present invention, preferably, the first axis is an X-axis indicating a lateral direction of a direction in which the sensors of the touch panel are arranged, and the second axis is an X-axis along which the sensors of the touch panel are arranged. The Y-axis indicates the longitudinal direction of the direction and is orthogonal to the first axis.
また、本発明において好ましくは、前記角度を決定するステップは、既定の処理時間ごとに角度を決定する。 Also, in the present invention, preferably, the step of determining the angle determines the angle for each predetermined processing time.
また、上記の目的を達成するために、本発明の一態様としての一組のプログラムは、上記のプログラムを含む、前記タッチパネルを備える前記電子装置において実行されるゲームのための一組のプログラムであって、前記既定の処理時間は、ゲームを実行するためのフレームレートに対応する時間であり、前記既定の処理時間ごとに決定される角度に基づいて、前記既定の処理時間ごとに角度及び大きさを決定するステップと、前記既定の処理時間ごとに決定される角度及び大きさに基づいて、前記タッチパネルに表示される前記操作対象オブジェクトを制御するステップと、を実行させることを特徴とする。 Further, in order to achieve the above object, a set of programs as one aspect of the present invention is a set of programs for a game executed on the electronic device provided with the touch panel, including the above program. wherein the predetermined processing time is a time corresponding to a frame rate for executing the game, and based on an angle determined for each predetermined processing time, an angle and a size are determined for each predetermined processing time. and controlling the operation target object displayed on the touch panel based on the angle and size determined for each predetermined processing time.
また、上記の目的を達成するために、本発明の一態様としての一組のプログラムは、上記のプログラムを含む、前記タッチパネルを備える前記電子装置において実行されるゲームのための一組のプログラムであって、前記既定の処理時間は、ゲームを実行するためのフレームレートに対応する時間であり、前記既定の処理時間ごとに決定される角度に基づいて、前記既定の処理時間ごとに角度及び大きさを決定するステップと、前記既定の処理時間ごとに決定される角度及び大きさに基づいて、前記タッチパネルに表示されるゲーム画像を撮影するための前記操作対象オブジェクトである仮想カメラを制御するステップと、を実行させることを特徴とする。 Further, in order to achieve the above object, a set of programs as one aspect of the present invention is a set of programs for a game executed on the electronic device provided with the touch panel, including the above program. wherein the predetermined processing time is a time corresponding to a frame rate for executing the game, and based on an angle determined for each predetermined processing time, an angle and a size are determined for each predetermined processing time. and controlling a virtual camera, which is the operation target object for capturing a game image displayed on the touch panel, based on the angle and size determined for each predetermined processing time. and is characterized by executing
また、上記の目的を達成するために、本発明の一態様としての電子装置は、タッチパネルを備える電子装置であって、前記タッチパネルへのユーザの操作により発生したタッチイベントに基づいて取得される第1の軸の値及び第2の軸の値により示されるデータポイントを保持し、前記保持されているデータポイントのうち既定の保持時間を超えたデータポイントの保持を終了し、前記保持されているデータポイントに基づいて回帰直線の傾きを決定し、前記保持されているデータポイントの集合としての変位方向に基づいて前記決定された回帰直線の傾きを回転させる回転量を決定し、前記決定された回帰直線の傾き及び前記決定された回転量に基づいて、前記ユーザが仮想空間内の操作対象オブジェクトを制御するための角度を決定する、ことを特徴とする。 Further, in order to achieve the above object, an electronic device according to one aspect of the present invention is an electronic device including a touch panel, wherein a touch event is acquired based on a touch event generated by a user's operation on the touch panel. Retaining data points indicated by a value of one axis and a value of a second axis, terminating retention of data points exceeding a predetermined retention time among the retained data points, and determining a slope of a regression line based on the data points; determining an amount of rotation to rotate the determined slope of the regression line based on a displacement direction for the set of retained data points; An angle for the user to control the operation target object in the virtual space is determined based on the inclination of the regression line and the determined amount of rotation.
また、上記の目的を達成するために、本発明の一態様としての方法は、タッチパネルを備える電子装置において実行される方法であって、前記タッチパネルへのユーザの操作により発生したタッチイベントに基づいて取得される第1の軸の値及び第2の軸の値により示されるデータポイントを保持するステップと、前記保持されているデータポイントのうち既定の保持時間を超えたデータポイントの保持を終了するステップと、前記保持されているデータポイントに基づいて回帰直線の傾きを決定するステップと、前記保持されているデータポイントの集合としての変位方向に基づいて前記決定された回帰直線の傾きを回転させる回転量を決定するステップと、前記決定された回帰直線の傾き及び前記決定された回転量に基づいて、前記ユーザが仮想空間内の操作対象オブジェクトを制御するための角度を決定するステップと、を有することを特徴とする。 Further, in order to achieve the above object, a method according to one aspect of the present invention is a method executed in an electronic device having a touch panel, the method comprising: retaining data points indicated by the obtained first axis value and second axis value; and terminating retention of data points of said retained data points that have exceeded a predetermined retention time. determining a slope of a regression line based on the retained data points; and rotating the determined slope of the regression line based on a displacement direction as a set of the retained data points. determining an amount of rotation; and determining an angle for the user to control the operation target object in the virtual space based on the determined slope of the regression line and the determined amount of rotation. characterized by having
本発明によれば、仮想空間における操作対象オブジェクトを制御するにあたって、より操作性を高くすることができる。 According to the present invention, operability can be enhanced when controlling an operation target object in a virtual space.
以下、図面を参照して、本発明の実施形態を説明する。各図において同一の符号は、特に言及が無い限り同一又は相当部分を示すものとし、説明の便宜上、図面の縦横の縮尺を実際のものとは異なるように表す場合がある。また、説明の便宜上、必要以上に詳細な説明は省略する場合がある。例えば、既によく知られた事項の詳細説明や実質的に同一の構成についての重複説明を省略する場合がある。 Hereinafter, embodiments of the present invention will be described with reference to the drawings. The same reference numerals in each drawing indicate the same or corresponding parts unless otherwise specified, and for convenience of explanation, the vertical and horizontal scales of the drawings may be different from the actual ones. Further, for convenience of explanation, more detailed explanation than necessary may be omitted. For example, detailed descriptions of already well-known matters and redundant descriptions of substantially the same configurations may be omitted.
本発明の一実施形態による電子装置10は、仮想空間に配置された仮想的なオブジェクトをユーザに提示し、ゲームを進行するゲームアプリケーションがインストールされている。本実施形態の電子装置10は、当該ゲームアプリケーションが実行されると、ユーザの操作に応じて、仮想空間内のユーザの操作対象の仮想的なオブジェクトである操作対象オブジェクトを制御するための仮想的なコントローラ(仮想コントローラ)を提供する。仮想空間は、当該ゲームアプリケーションにより定められるものであり、2次元空間であることもできるし、3次元空間であることもできる。例えば、仮想的なオブジェクトは、仮想空間に配置されたキャラクタ又はアイテムである。例えば、操作対象オブジェクトの制御とは、仮想空間に配置されたキャラクタ又はアイテムの動作の制御である。
The
説明の便宜上、本実施形態においては、電子装置10には上記のようなゲームアプリケーションがインストールされているものとするが、これに限定されない。電子装置10は、ユーザの操作に応じて、操作対象オブジェクトを制御することが可能なアプリケーションを実装していればよい。例えば、電子装置10には、ゲームアプリケーションの代わりに又はこれに追加して、ユーザの操作に応じて操作対象オブジェクトを動作させる入力支援アプリケーション又はシミュレーションアプリケーションが実装されてもよい。本実施形態の電子装置10が提供する仮想コントローラは、ユーザの入力として方向と大きさが必要な入力に用いることができる。以下の説明において、アプリケーションは、アプリケーションプログラム全般を意味するものであり、スマートフォンやタブレット端末にインストールされるアプリを意味することができる。
For convenience of explanation, in the present embodiment, it is assumed that the game application as described above is installed in the
図1は本発明の一実施形態による電子装置10のハードウェア構成を示すブロック図である。電子装置10は、プロセッサ11、入力装置12、表示装置13、記憶装置14、及び通信装置15を備える。これらの各構成装置はバス16によって接続される。なお、バス16と各構成装置との間には必要に応じてインタフェースが介在しているものとする。本実施形態において、電子装置10はスマートフォンである。ただし、電子装置10は、上記の構成を備えるものであれば、タブレット型コンピュータ、タッチパッド等の接触型入力装置を備えるコンピュータなどの端末とすることができる。
FIG. 1 is a block diagram showing the hardware configuration of an
プロセッサ11は、電子装置10全体の動作を制御する。例えばプロセッサ11は、CPUである。なお、プロセッサ11としては、MPU等の電子回路が用いられてもよい。プロセッサ11は、記憶装置14に格納されているプログラムやデータを読み込んで実行することにより、様々な処理を実行する。1つの例では、プロセッサ11は、複数のプロセッサから構成される。
入力装置12は、電子装置10に対するユーザからの入力を受け付けるユーザインタフェースであり、例えば、タッチパネル、タッチパッド、キーボード、又はマウスである。表示装置(ディスプレイ)13は、プロセッサ11の制御に従って、アプリケーション画面などを電子装置10のユーザに表示する。本実施形態においては、スマートフォンである電子装置10は入力装置12としてタッチパネル17を備え、タッチパネル17は表示装置13としても機能し、入力装置12と表示装置13は一体となった構造である。本実施形態のタッチパネル17は、投影型静電容量方式タッチパネルであるが、同等の機能を有するデバイスがあれば、それを用いてもよい。
The
記憶装置14は、揮発性メモリであるRAM及び不揮発性メモリであるROMを含む、一般的なスマートフォンが備える記憶装置である。記憶装置14は、外部メモリを含むこともできる。記憶装置14は、ゲームアプリケーションを含む各種プログラムを記憶する。例えば、記憶装置14は、オペレーティングシステム(OS)、ミドルウェア、アプリケーションプログラム、これらのプログラムの実行に伴って参照され得る各種データなどを格納する。
The
1つの例では、記憶装置14は、主記憶装置及び補助記憶装置を含む。主記憶装置は、情報の高速な読み書きが可能な揮発性の記憶媒体であり、プロセッサ11が情報を処理する際の記憶領域及び作業領域として用いられる。補助記憶装置は、様々なプログラムや、各プログラムの実行に際してプロセッサ11が使用するデータを格納する。補助記憶装置は、例えばハードディスク装置であるが、情報を格納できるものであればいかなる不揮発性ストレージ又は不揮発性メモリであってもよく、着脱可能なものであっても構わない。
In one example,
通信装置15は、ネットワークを介してサーバなどの他のコンピュータとの間でデータの授受を行う。例えば通信装置15は、移動体通信や無線LAN等の無線通信を行い、ネットワークへ接続する。1つの例では、電子装置10は、通信装置15によってプログラムをサーバからダウンロードして、記憶装置14に格納する。ただし、通信装置15は既知の有線通信を行ってもよい。他のコンピュータとの間でデータの送受信を行わない場合、電子装置10は通信装置15を備えなくてもよい。
The
図2は本発明の一実施形態による電子装置10の機能ブロック図である。電子装置10は、入力部21、表示部22、及び制御部23を備える。制御部23は、角度決定部24、状態決定部25、及びアプリケーション部26を備える。本実施形態においては、プログラムがプロセッサ11により実行されることによりこれらの機能が実現される。例えば実行されるプログラムは、記憶装置14に記憶されている又は通信装置15を介して受信したプログラムである。このように、各種機能がプログラム読み込みにより実現されるため、1つのパート(機能)の一部又は全部を他のパートが有していてもよい。ただし、各機能の一部又は全部を実現するための電子回路等を構成することによりハードウェアによってもこれらの機能は実現してもよい。
FIG. 2 is a functional block diagram of
入力部21は、入力装置12を用いて構成されるものであり、電子装置10に対するユーザからの入力を受け付ける。本実施形態では、入力部21は、タッチパネル17へのユーザのタッチ操作を受け付けてタッチイベントを発生するものであり、タッチパネル17を備えるスマートフォンが一般的に有しているタッチ検出機能を用いることができる。
The
表示部22は、ゲームアプリケーション画面を表示装置13に表示し、ユーザ操作に応じた画面を表示する。
The
制御部23は、仮想コントローラを実現するものである。本実施形態では、制御部23は3層構造のアーキテクチャを採用し、角度決定部24、状態決定部25、及びアプリケーション部26が各層に対応する。例えば制御部23は、各層に対応する各プログラムにより構成される一組のプログラムがプロセッサ11により実行されることにより実現される。
The
制御部23が実現する仮想コントローラにおける角度決定部24の役割は、物理的なコントローラにおけるコントローラ内部のセンサICチップに対応する。角度決定部24は、主として、タッチパネル17へのユーザのタッチ操作により発生したタッチイベントを用いてユーザが仮想空間内の操作対象オブジェクトを制御するための角度を決定し、状態決定部25へ送出する。
The role of the
状態決定部25の役割は、物理的なコントローラにおける操作するコントローラ全体に対応する。状態決定部25は、主として、角度決定部24から送出された角度を用いて、タッチパネル17上のユーザのタッチ操作に対応するベクトル(角度及び大きさ)を決定し、アプリケーション部26へ送出する。
The role of the
アプリケーション部26は、ゲーム内の動作等を実装する、具体的なゲームアプリケーションに対応する。ゲームアプリケーションは、一般的なゲームアプリケーションと同様にして、フレームレートが定められ、例えばフレームレートに対応する時間ごとに、メインプログラムのメインループを処理する。フレームレートは、一般的に30fps(フレーム毎秒)又は60fpsである。
The
角度決定部24は、ユーザが仮想空間内の操作対象オブジェクトを制御するために必要な角度を決定する。1つの好適な例では、角度決定部24は、リアルタイムに角度を計算する数学関数ライブラリであり、かつ短時間のタッチイベントの列からの角度計算を行う、統計処理アルゴリズムを実装する、ソフトウェアモジュールである。タッチイベントの列は、タッチパネル17上の指の動きに対応するものである。
The
記憶装置14は、データポイントバッファを含む。データポイントバッファは、角度決定部24がタッチイベントに基づいて取得される第1の軸の値及び第2の軸の値により示されるデータポイントを保持するためのバッファである。
角度決定部24は、タッチパネル17へのユーザの操作により発生したタッチイベントに基づいて取得される第1の軸の値及び第2の軸の値により示されるデータポイントをデータポイントバッファに保持する。ここで、タッチイベントは、ユーザがタッチパネル17へ指を接触したとき(touchstart)、ユーザがタッチパネル17に指を接触させたまま動かしたとき(touchmove)、ユーザがタッチパネル17から指を離したとき(touchend)などに発生する。角度決定部24は、タッチイベントが発生するときに、タッチイベントを取得する。角度決定部24は、タッチイベントを取得するとき、タッチパネル17上の静電容量が変化した位置に対応する、2つの変数からなる数値の組(x、y)を取得するとともに、(x、y)を取得した時間tを取得し、3つの変数からなる数値の組(x、y、t)をデータポイントバッファに格納する。当該2つの変数からなる数値の組のデータは、タッチイベントに付随して角度決定部24が取得するものであり、第1の軸の値及び第2の軸の値により示されるデータポイントに対応するものである。tは(x、y)を取得した時間であるデータポイント取得時間を表す値であり、上記のように(x、y)と対応付けられてデータポイントバッファに格納される。1つの例では、tは、OSから取得可能な、いわゆるUNIX(登録商標)時間と呼ばれる整数値であるか、又は”2017/07/14 15:48:43.444”のような文字列である。以下、特に言及が無い限り、角度決定部24がデータポイントを保持する(又は保持を終了する)ことは、該データポイントに対応付けられたデータポイント取得時間tを保持する(又は保持を終了する)ことを含む。
The
本実施形態では、説明の便宜上、第1の軸及び第2の軸を以下のとおり定める。図3は、本実施形態の第1の軸及び第2の軸からなる座標軸を示す図である。第1の軸は、タッチパネル17のセンサが配列される方向に実質的に平行な方向のうちの短手方向を示す軸であり、タッチパネル17の短辺と実質的に平行な横軸(x軸)である。第2の軸は、第1の軸に直交し、タッチパネル17のセンサが配列される方向に実質的に平行な方向のうちの長手方向を示す軸であり、タッチパネル17の長辺と実質的に平行な縦軸(y軸)である。このように、第1の軸及び第2の軸は、タッチパネル17のセンサが配列される方向に実質的に平行であり、タッチパネル17上の位置は、2つの軸により座標(x、y)として表される。したがって、本実施形態では、データポイントの座標(x、y)は、タッチパネル17上の位置に対応する。本実施形態では、角度決定部24は、当該座標(x、y)を、データポイントとしてデータポイントバッファに保持する。図3に示す座標設定は、一例であり、タッチパネル17のセンサ配列や電子装置10が実装するプログラムにより、上記例示と異なるように設定することができる。なお、センサは、例えば電極である。
In this embodiment, for convenience of explanation, the first axis and the second axis are defined as follows. FIG. 3 is a diagram showing coordinate axes consisting of the first axis and the second axis of this embodiment. The first axis is an axis that indicates the short side of the directions substantially parallel to the direction in which the sensors of the
図4は、図3に示すように座標軸が定められた場合の、角度決定部24が決定する角度と角度に対応する方向の一例を説明する図である。第一象限の角度31は方向32に対応し、第二象限の角度33は方向34に対応し、第四象限の角度35は方向36に対応する。ここで、方向34と方向36の傾きは同じであるが、方向の向きが逆であるため、角度33と角度35は180度異なることが確認できる。
FIG. 4 is a diagram illustrating an example of the angle determined by the
角度決定部24は、データポイントバッファに保持されているデータポイントのうち既定の保持時間を超えたデータポイントの保持を終了する。例えば、角度決定部24は、データポイントのデータの保持を終了する場合、該データを削除してもよいし、該データを無効化してもよいし、又は該データに保持を終了したことを示すフラグを関連付けて適宜削除するようにしてもよい。角度決定部24は、データポイントバッファに格納するデータポイントの寿命をミリ秒で指定する変数Dを定める。変数Dにより指定される時間が既定の保持時間に対応する。ただし、変数Dの値はミリ秒に限定されない。
The
例えば、角度決定部24は、1つのデータポイントをデータポイントバッファに格納すると、該データポイントの格納されてからの経過時間を監視し、継続的に変数Dと比較する。角度決定部24は、監視したデータポイントの経過時間が変数Dを超えたとき、該データポイントをデータポイントバッファの保持を終了する。このようにして、角度決定部24は、データポイントバッファが保持するすべてのデータポイントの各々の寿命を管理する。このとき、角度決定部24は、データポイント取得時間tを用いて、経過時間を算出することができる。なお、変数Dを超えたと判断したときは、変数D以上と判断したときを意味することができるものとする。また、角度決定部24が管理するデータポイントの経過時間の単位は、変数Dと同じであることが好ましい。
For example, when the
例えば、変数Dに165が設定されたとき、角度決定部24は、データポイントバッファに格納したデータポイントを165ミリ秒だけ保持し、165ミリ秒が経過すると、該データポイントをデータポイントバッファの保持を終了する。
For example, when the variable D is set to 165, the
角度決定部24は、定期的に角度を算出できるか否かを判定する。角度決定部24は、角度を算出可能な場合、データポイントバッファが保持するデータポイントを用いて、該データポイントの集合が示す角度を算出し、ユーザが仮想空間内の操作対象オブジェクトを制御するための角度として決定する。このように、角度決定部24は、データポイントの集合が示す角度を求めることにより、タッチパネル17に対してタッチ操作を行ったユーザが意図する方向の角度を求めることが可能となる。
The
角度決定部24は、決定した角度を状態決定部25へ出力する。角度決定部24は、決定した角度を状態決定部25へ出力するとき、例えばangleイベントを示す情報とともに出力する。角度決定部24は、状態決定部25へ直接出力せずに、状態決定部25が参照する記憶装置14内のメモリ領域に決定した角度やangleイベントを示す情報を格納してもよい。
角度決定部24は、取得したタッチイベントがtouchstartのとき、startイベントを状態決定部25へ出力し、角度を算出しない。角度決定部24は、取得したタッチイベントがtouchendのとき、stopイベントを状態決定部25へ出力し、角度を算出しない。
When the acquired touch event is touchstart, the
角度決定部24は、変数Bを定め、データポイントバッファが保持するデータポイントの個数が変数Bの数以上であった場合、該データポイントを用いて角度を算出し、決定する。角度決定部24は、データポイントバッファが保持するデータポイントの個数が変数Bの数未満であった場合、データポイントの集合が示す角度を一定の精度以上で算出することが不可能であるため、keepイベントを状態決定部25へ出力し、角度を算出しない。一般的には、回帰直線の傾きを求めるにあたっては3個以上のデータポイントが有ること好ましいため、変数Bは3以上に設定されるのが好ましい。本実施形態では、変数Bは3に設定される。
The
角度決定部24は、角度決定部24が角度を算出できるか否かを判定する時間の間隔をミリ秒で指定する変数Iを定める。タッチイベントが発生し続ける場合など、角度決定部24が角度を算出可能な場合が継続する場合、当該間隔は、角度決定部24が角度を算出する時間の間隔となる。ただし、変数Iの値はミリ秒に限定されない。
The
角度決定部24は、上記のように既定の処理時間ごとに角度算出可否について判定し、既定の処理時間ごとに角度を決定する。1つの好適な例では、既定の処理時間は、ゲームを実行するためのフレームレートに対応する時間である。フレームレートが30fps(30Hz)の場合、変数Iは33に設定される。変数Iに33が設定されたとき、角度決定部24は、33ミリ秒に1回角度を算出できるか判定し、角度を算出可能な場合は算出した角度を決定し、決定した角度をangleイベントとともに状態決定部25へ出力する。算出不可能な場合、角度決定部24は、startイベント、stopイベント、又はkeepイベントのいずれか1つを状態決定部25へ出力する。なお、angleイベントは角度を示す情報を含むことができ、この場合、角度決定部24は、角度を算出可能な場合、angleイベントを状態決定部25へ出力する。
As described above, the
データポイントバッファが保持するデータポイントの集合が示す角度を算出するにあたって、角度決定部24は、データポイントバッファに保持されているデータポイントに基づいて回帰直線の傾きを決定する。ここで、角度決定部24が参照するデータポイントの個数は、3以上である。角度決定部24は、回帰直線の傾きを決定するにあたって、データポイントバッファに保持されているデータポイントにおけるx軸の値の変位量及びy軸の値の変位量に基づいて、独立変数の軸としてx軸及びy軸のいずれか一方の軸を決定する。同時に、角度決定部24は、他方の軸を従属変数の軸として決定する。
In calculating the angle indicated by the set of data points held in the data point buffer, the
本実施形態では、角度決定部24は、最小二乗法を用いて回帰直線の傾きを算出する。最小二乗法を用いて回帰直線の傾きを求める方法は既知であるが、当該方法は独立変数と従属変数の関係の強さを傾きとして求めるものである。最小二乗法は、x軸を独立変数の軸とし、y軸を従属変数の軸として適用するのが一般的であるが、x軸の値が固定されてy軸の値のみが変化する場合、従属変数が独立変数に一切の従属性を持たないことになる。また、y軸に沿った傾きを決定する場合、決定される傾きは、例えばy軸をまたいで大きなマイナスの値から大きなプラスの値となることがあり、安定して傾きを出すことが難しい。そのため、角度決定部24は、x軸の値とy軸の値のどちらが独立変数として適切であるかを判定し、決定された独立変数の軸及び従属変数の軸に基づいて最小二乗法を用いて回帰直線の傾きを決定する。
In this embodiment, the
角度決定部24は、独立変数の軸をx軸とするとき、y=ax+bの回帰直線の傾きaを決定し、独立変数の軸をy軸とするとき、x=cy+dの回帰直線の傾きcを決定する。具体的には、角度決定部24は、以下の(a)~(e)により回帰直線の傾きを求める。
(a)角度決定部24は、データポイントバッファに保持されているデータポイントにおける、独立変数の平均及び従属変数の平均を算出(決定)する。
(b)角度決定部24は、(a)で決定された平均を用いて、データポイントバッファに保持されているデータポイントにおける、独立変数の偏差及び従属変数の偏差を算出(決定)する。
(c)角度決定部24は、(b)で決定された独立変数の偏差を用いて、データポイントバッファに保持されているデータポイントにおける独立変数の分散を算出(決定)する。
(d)角度決定部24は、(b)で決定された独立変数の偏差及び従属変数の偏差を用いて、データポイントバッファに保持されているデータポイントにおける共分散を算出(決定)する。
(e)角度決定部24は、(d)で決定された共分散を(c)で決定された独立変数の分散で割ることにより回帰直線の傾きを算出(決定)する。
The
(a) The
(b) The
(c) The
(d) The
(e) The
1つの例では、角度決定部24は、データポイントバッファに保持されているデータポイントにおけるx軸の値の最大値と最小値の差分値及びy軸の値の最大値と最小値の差分値に基づいて、独立変数の軸としてx軸及びy軸のいずれか一方の軸を決定し、他方の軸を従属変数の軸として決定する。好ましくは、角度決定部24は、データポイントバッファに保持されているデータポイントにおけるx軸の値の最大値と最小値の差分値に対して重み係数を用いて重み付けを行った値及びy軸の値の最大値と最小値の差分値に基づいて、独立変数の軸としてx軸及びy軸のいずれか一方の軸を決定し、他方の軸を従属変数の軸として決定する。
In one example, the
角度決定部24は、上記のように最小二乗法を用いて回帰直線の傾きを算出(決定)する。好ましくは、角度決定部24が回帰直線の傾きを算出することは、角度決定部24が回帰直線の傾きの角度を算出することを意味する。ここで、算出される回帰直線の傾きは正負の方向を持たないため、角度決定部24は、最小二乗法を用いて回帰直線の傾きを算出する際、例えば0度~90度及び270度~360度の範囲内で算出する。したがって、例えばデータポイントの集合が示す角度が、45度の場合であっても225度の場合であっても、回帰直線の傾きとして45度が算出される。そのため、角度決定部24は、回帰直線の傾きを決定した後、データポイントバッファに保持されているデータポイントの集合としての変位方向に基づいて、決定された回帰直線の傾きを回転させる回転量を決定する。具体的には、角度決定部24は、回帰直線の傾きを決定した後、ユーザが操作対象オブジェクトを制御するための角度を決定するにあたって、決定された回帰直線の傾き(の角度)に対して180度回転させるか否かを示す回転量を決定する。ここで、データポイントの集合としての変位方向は、データポイントが時間とともに変位する方向を示すものであり、例えばユーザがタッチパネル17上で指を動かす大まかな方向に対応するものである。
The
1つの例では、角度決定部24は、データポイントバッファに保持されているデータポイントにおいて時系列的に前後するデータポイントの変位方向に基づいて、回転量を決定する。好ましくは、角度決定部24は、データポイントバッファに保持されているデータポイントにおける時系列的に前後する、決定された独立変数の軸の値の差分値の正負の数量を比較することにより、回転量を決定する。決定される回転量は、決定された回帰直線の傾きに対して180度回転させるか否かを示す回転量である。
In one example, the
角度決定部24は、データポイントバッファが先に格納されたデータポイントから順番にデータポイントを保持するように、各データポイントを格納する。或いは、角度決定部24は、データポイントバッファにデータポイントを格納するとき、格納された順番が識別可能な識別情報を関連付けて格納する。このように、角度決定部24は、格納された順番が識別できるように、すなわち格納されたデータポイントの時系列順が識別できるように、データポイントバッファにデータポイントを保持している。このとき、角度決定部24は、データポイント取得時間tの値を用いることができる。
The
角度決定部24は、決定された回帰直線の傾き及び決定された回転量に基づいて、データポイントの集合が示す角度を算出し、ユーザが仮想空間内の操作対象オブジェクトを制御するための角度として決定する。
The
本実施形態では、上記の角度決定部24が行う、回帰直線の傾きの決定、回転量の決定、及び角度の決定について、式(1)に示す関数aop(x,y)を用いて実現する。関数aop(x,y)は、0~360度の実数で角度を算出する。関数aop(x,y)が角度を算出するとき、データポイントバッファはn個のデータポイントP(x,y)を保持しているものとする。また、n個の各データポイントPk(k=1~n)のx座標の値及びy座標の値は、Pk(xk,yk)で表され、P1(x1,y1)、P2(x2,y2)、…、Pn(xn,yn)の順番に格納された時間が早いものとする。
(1)
関数aop(x,y)は、場合分けをするため、関数rotate(x,y)、関数left(x)、関数down(y)を使用する。最初に、関数aop(x,y)は、関数rotate(x,y)を用いて、xとyのいずれか一つを独立変数として決定する。
In this embodiment, the determination of the inclination of the regression line, the determination of the amount of rotation, and the determination of the angle performed by the
(1)
The function aop(x, y) uses the function rotate(x, y), the function left(x), and the function down(y) to separate cases. First, the function aop(x, y) uses the function rotate(x, y) to determine one of x and y as an independent variable.
関数rotate(x,y)は、式(2)により定められる。
(2)
関数rotate(x,y)は、n個のデータポイントP(x,y)が主にy軸方向に変位しているか否かを判定し、例えば真偽値を返す。n個のデータポイントP(x,y)が主にy軸方向に変位している場合とは、例えばタッチパネル17上でユーザの指が主として上下方向に動いた場合である。このようにして、関数rotate(x,y)は、n個のデータポイントP(x,y)が主にx軸(左右)方向に変位しているか又は主にy軸(上下)方向に変位しているかを判定し、x軸の値とy軸の値のどちらが独立変数として適切であるかを判定する。
The function rotate(x,y) is defined by equation (2).
(2)
The function rotate(x, y) determines whether the n data points P(x, y) are displaced mainly in the y-axis direction, and returns a true/false value, for example. The case where the n data points P(x, y) are displaced mainly in the y-axis direction is, for example, the case where the user's finger moves mainly in the vertical direction on the
式(2)において、(max(x)―min(x))は、n個のデータポイントPのxの値(x1,x2,…xn)における最大値と最小値の差分の絶対値であり、n個のデータポイントPのx軸方向の変位量を示す。同様にして、(max(y)―min(y))は、n個のデータポイントPのyの値(y1,y2,…yn)における最大値と最小値の差分の絶対値であり、n個のデータポイントPのy軸方向の変位量を示す。変数wは、(max(x)―min(x))に対して重み付けを行う重み係数である。 In equation (2), (max(x)−min(x)) is the absolute difference between the maximum and minimum values of x values (x 1 , x 2 , . . . x n ) of n data points P. , which indicates the amount of displacement of n data points P in the x-axis direction. Similarly, (max(y)−min(y)) is the absolute value of the difference between the maximum and minimum y values (y 1 , y 2 , . . . y n ) of n data points P. , indicating the amount of displacement of n data points P in the y-axis direction. The variable w is a weighting factor that weights (max(x)-min(x)).
関数rotate(x,y)は、(max(y)―min(y))が(max(x)―min(x))と変数wとの積の値よりも大きいときに不等号を満たし、関数aop(x,y)は、座標変換を行う。この場合、関数aop(x,y)は、y軸を独立変数の軸とし、x軸を従属変数の軸とし、更に関数down(y)を用いて、回転量を決定する。一方、関数rotate(x,y)は、(max(y)―min(y))が(max(x)―min(x))と変数wとの積の値以下のときに不等号を満たさず、関数aop(x,y)は、座標変換を行わない。この場合、関数aop(x,y)は、x軸を独立変数の軸とし、y軸を従属変数の軸とすし、更に関数left(x)を用いて、回転量を決定する。 The function rotate(x, y) satisfies the inequality when (max(y)-min(y)) is greater than the product of (max(x)-min(x)) and the variable w, and the function aop(x,y) performs a coordinate transformation. In this case, the function aop(x,y) uses the y-axis as the axis of the independent variable, the x-axis as the axis of the dependent variable, and the function down(y) to determine the amount of rotation. On the other hand, the function rotate(x, y) does not satisfy the inequality when (max(y)-min(y)) is less than or equal to the product of (max(x)-min(x)) and the variable w. , the function aop(x,y) does not perform a coordinate transformation. In this case, the function aop(x,y) uses the x-axis as the independent variable axis and the y-axis as the dependent variable axis, and further uses the function left(x) to determine the amount of rotation.
関数rotate(x,y)が変数wにより重み付けされない場合、y軸方向の変位量がx軸方向の変位量よりもわずかに大きいと、関数aop(x,y)は座標変換を行うこととなる。変数wを用いて重み付けすることにより、関数aop(x,y)は、n個のデータポイントP(x,y)がよりy軸に沿った傾きの場合に座標変換を行うようにすることが可能となる。 If the function rotate(x,y) is not weighted by the variable w, the function aop(x,y) will perform a coordinate transformation if the displacement along the y-axis is slightly greater than the displacement along the x-axis. . By weighting with the variable w, the function aop(x,y) can cause the n data points P(x,y) to undergo a coordinate transformation if they are more tilted along the y-axis. It becomes possible.
例えばスマートフォンは縦持ちで使用されることが多いため、図3に示すタッチパネル17のy軸は重力方向と実質的に平行となることが多い。タッチパネル17のy軸方向の寸法はx軸方向の寸法より大きいことを考慮すると、変数wは1より大きい値とすることが好ましい。例えば、変数wは2とすることが好ましい。他の例では、スマートフォンが横持ちされ、かつゲームアプリが備えるゲームエンジンが縦横の座標の変換をしない場合、角度決定部24はwを0.5などの1より小さい値に決定する。
For example, since smartphones are often held vertically and used, the y-axis of the
関数left(x)は、式(3)により表される。
(3)
関数left(x)は、関数rotate(x,y)が不等号を満たさない場合、n個のデータポイントP(x,y)の変位方向が-x軸方向(左方向)か否かを判定し、例えば真偽値を返す。具体的には、関数left(x)は、n個のデータポイントPのxの値(x1,x2,…xn)における時系列的に前後する値の差分値(x2-x1,x3-x2,…xn-xn-1)を算出する。関数left(x)は、差分値がマイナスとなる個数が、差分値がプラスとなる個数より多いか否かを判定することにより、n個のデータポイントP(x,y)の変位方向が-x軸方向(左方向)か否かを判定する。このようにして、関数left(x)は、n個のデータポイントP(x,y)の変位方向が-x軸方向(左方向)か+x軸方向(右方向)であるかを判定し、決定された回帰直線の傾きに対して180度回転させるか否かを示す回転量を決定する。例えば、関数left(x)が真である場合、関数aop(x,y)は回転量を180度と決定し、関数left(x)が偽である場合、関数aop(x,y)は回転量を0度と決定する。
The function left(x) is represented by Equation (3).
(3)
The function left(x) determines whether or not the displacement direction of the n data points P(x, y) is in the −x-axis direction (to the left) if the function rotate(x, y) does not satisfy the inequality. , for example returning a boolean value. Specifically, the function left(x ) is the difference value (x 2 −x 1 , x 3 −x 2 , . . . x n −x n-1 ). The function left(x) determines whether the number of negative difference values is greater than the number of positive difference values, so that the displacement direction of the n data points P(x, y) is − It is determined whether or not it is in the x-axis direction (leftward direction). Thus, the function left(x) determines whether the direction of displacement of the n data points P(x,y) is in the direction of the −x axis (to the left) or the direction of the +x axis (to the right), A rotation amount indicating whether to rotate the determined regression line by 180 degrees is determined. For example, if the function left(x) is true, the function aop(x,y) determines the amount of rotation to be 180 degrees, and if the function left(x) is false, the function aop(x,y) rotates Determine the volume as 0 degrees.
関数down(y)は、式(4)により表される。
(4)
関数down(y)は、関数rotate(x,y)が不等号を満たす場合、n個のデータポイントP(x,y)の変位方向が-y軸方向(下方向)か否かを判定し、例えば真偽値を返す。具体的には、関数down(y)は、n個のデータポイントPのyの値(y1,y2,…yn)における時系列的に前後する値の差分値(y2-y1,y3-y2,…yn-yn-1)を算出する。関数down(y)は、差分値がマイナスとなる個数が、差分値がプラスとなる個数より多いか否かを判定することにより、n個のデータポイントP(x,y)の変位方向が-y軸方向(下方向)か否かを判定する。このようにして、関数down(y)は、n個のデータポイントP(x,y)の変位方向が-y軸方向(下方向)か+y軸方向(上方向)であるかを判定し、決定された回帰直線の傾きに対して180度回転させるか否かを示す回転量を決定する。例えば、関数down(y)が真である場合、関数aop(x,y)は回転量を180度と決定し、関数down(y)が偽である場合、関数aop(x,y)は回転量を0度と決定する。
Function down(y) is represented by equation (4).
(4)
The function down (y) determines whether the displacement direction of the n data points P (x, y) is the -y axis direction (downward) when the function rotate (x, y) satisfies the inequality, For example, return a boolean value. Specifically , the function down(y) is the difference value (y 2 −y 1 , y 3 −y 2 , . . . y n −y n-1 ). The function down(y) determines whether the number of negative difference values is greater than the number of positive difference values, so that the displacement direction of the n data points P(x, y) is − It is determined whether it is in the y-axis direction (downward). Thus, the function down(y) determines whether the direction of displacement of the n data points P(x,y) is in the direction of the −y axis (downward) or in the direction of the +y axis (upward), A rotation amount indicating whether to rotate the determined regression line by 180 degrees is determined. For example, if the function down(y) is true, the function aop(x,y) determines the amount of rotation to be 180 degrees, and if the function down(y) is false, the function aop(x,y) rotates Determine the volume as 0 degrees.
関数aop(x,y)は、上記のように、独立変数(独立変数の軸)及び回転量を決定した後、最小二乗法を用いて傾きを算出する。関数aop(x,y)は、xを独立変数とし、yを従属変数とする場合、y=ax+bの回帰直線の傾きaは、式(5)により算出している。
(5)
ここで、
は、x(独立変数)の平均であり、
は、y(従属変数)の平均であり、
は、x(独立変数)とy(従属変数)の共分散であり、
は、x(独立変数)の分散である。
The function aop(x, y) calculates the slope using the least squares method after determining the independent variable (axis of the independent variable) and the amount of rotation as described above. In the function aop(x, y), where x is the independent variable and y is the dependent variable, the slope a of the regression line of y=ax+b is calculated by Equation (5).
(5)
here,
is the mean of x (the independent variable),
is the mean of y (the dependent variable) and
is the covariance of x (independent variable) and y (dependent variable),
is the variance of x (the independent variable).
なお、関数aop(x,y)は、yを独立変数とし、xを従属変数とする場合、x=cx+dの回帰直線の傾きcは、式(6)により算出している。
(6)
ここで、
は、x(従属変数)の平均であり、
は、y(独立変数)の平均であり、
は、x(従属変数)とy(独立変数)の共分散であり、
は、y(独立変数)の分散である。
In the function aop(x, y), where y is the independent variable and x is the dependent variable, the slope c of the regression line of x=cx+d is calculated by Equation (6).
(6)
here,
is the mean of x (the dependent variable) and
is the mean of y (independent variable),
is the covariance of x (dependent variable) and y (independent variable),
is the variance of y (the independent variable).
角度決定部24は、変数Vを定め、独立変数の分散がV以上であった場合、関数aop(x,y)を用いて角度を算出し、決定する。角度決定部24は、独立変数の分散がV未満である場合、keepイベントを状態決定部25へ出力し、角度を算出しない。独立変数の分散がV未満である場合とは、n個のデータポイントP(x,y)が、局所的に集中していることを意味する。したがって、角度決定部24が変数Vを定めることにより、微細すぎる指の動きを無視し、安定した角度の算出を行うことが可能となる。変数Vは、好ましくは0.7に設定される。
The
関数aop(x,y)は、関数rotate(x,y)が偽であり、関数left(x)が偽である場合、回帰直線の傾きから得られる角度をそのまま算出する。関数aop(x,y)は、関数rotate(x,y)が偽であり、関数left(x)が真である場合、回帰直線の傾きから得られる角度に180度プラスした角度を算出する。関数aop(x,y)は、関数rotate(x,y)が真であり、関数down(y)が偽である場合、回帰直線の傾きから得られる角度を90度から引くことにより角度を算出する。関数aop(x,y)は、関数rotate(x,y)が真であり、関数down(y)が真である場合、回帰直線の傾きから得られる角度を90度から引くことにより算出した角度に180度プラスした角度を算出する。 The function aop(x, y) directly calculates the angle obtained from the slope of the regression line when the function rotate(x, y) is false and the function left(x) is false. The function aop(x, y) calculates the angle obtained by adding 180 degrees to the angle obtained from the slope of the regression line when the function rotate(x, y) is false and the function left(x) is true. The function aop(x, y) calculates the angle by subtracting the angle obtained from the slope of the regression line from 90 degrees when the function rotate(x, y) is true and the function down(y) is false. do. The function aop(x, y) is the angle plus 180 degrees to calculate the angle.
状態決定部25は、角度決定部24により既定の処理時間ごとに決定される角度に基づいて、既定の処理時間ごとに角度及び大きさを決定する。状態決定部25は、決定した角度及び大きさをアプリケーション部26へ出力する。状態決定部25は、アプリケーション部26へ直接出力せずに、アプリケーション部26が参照するメモリ領域に決定した角度及び大きさを示す情報を格納してもよい。1つの好適な例では、状態決定部25は、連続的に算出される角度の列をコントローラの機能に変換するソフトウェアモジュールである。本モジュールは、タッチ座標は一切用いず、角度と時間を使った状態管理モデル(ステートマシン)として実装される。
The
状態決定部25は、既定の処理時間ごとに角度決定部24が出力する情報を受け取ると、受け取ったイベントに応じて、既定の処理時間ごとに仮想コントローラの傾きの状態を出力する。仮想コントローラは、物理的なアナログコントローラをソフトウェアで実現するものであるが、仮想コントローラの傾きとは、物理的なコントローラのジョイスティックやレバーの傾きに対応するものである。状態決定部25は、仮想コントローラの傾きの状態を、ベクトルすなわち方向(角度)及び大きさとして出力する。大きさは、加速度情報とすることもできるし、速度情報とすることもできる。仮想コントローラの傾きの状態は、物理的なアナログコントローラの入力量に対応するものである。
When the
このように、状態決定部25は、発生したタッチイベントの意味を解釈するための状態遷移モデルを提供するものと考えることができる。状態決定部25は、仮想のコントローラの傾きを状態として管理し、既定の処理時間ごとに角度決定部24が出力する情報を受け取ると、既定の処理時間ごとに状態遷移させるものである。
In this way, the
1つの例では、状態決定部25は、角度決定部24から出力される角度の情報を蓄積し、時間に応じて、アプリケーション部26への出力を算出する。例えば、角度決定部24が165ms継続して33msごとに45度を出力する場合、状態決定部25は、45度の方向に165ms分の加速度情報を決定する。例えば、角度決定部24が同じ角度の出力が連続した場合、状態決定部25は該角度の方向へ加速する情報を出力し、続けて角度決定部24が該角度と180度反対の角度を入力した場合、状態決定部25は、減速する情報を出力する。このような構成とすることにより、実際のタッチ座標をそのまま用いずに、コントローラの入力量を、状態遷移回数に対応する時間として求めることが可能となる。
In one example, the
1つの例では、状態決定部25は、角度決定部24が出力する情報を受け取ると、受け取ったイベントに応じて、仮想コントローラの傾きの状態を設定し、ゲームアプリケーションへ移動イベント又は加速イベントを角度及び大きさを示す情報とともに出力する。具体的には、状態決定部25は、所定のプログラム言語を用いて、物理的なアナログコントローラを模した加速度処理を実装することができる。
In one example, when the
1つの好適な例では、状態決定部25は、仮想コントローラの傾きの状態をベクトルとして保持し、既定の処理時間ごとに、保持したベクトルを出力する。状態決定部25は、角度決定部24からstartイベントを受け取ると、状態管理を開始する。状態決定部25は、最初に角度決定部24からangleイベントを受け取ると、受け取った角度及び状態遷移1回分の大きさのベクトルの保持を開始し、該ベクトルを出力する。状態決定部25は、更に角度決定部24からangleイベントを受け取ると、内部で保持するベクトルに、受け取った角度及び状態遷移1回分の大きさのベクトルを加算して、該ベクトルを保持するとともに出力する。状態決定部25は、出力するベクトルの長さが1.0を超えた場合、1.0に正規化する。
In one preferred example, the
例えば、状態決定部25は、角度決定部24から45度の角度情報を1回受け取ると、45度の角度及び0.2の大きさのベクトルを出力するとともに、該ベクトルを保持する。状態決定部25は、角度決定部24から45度の角度情報を更に4回受け取ると、45度の角度及び1.0の大きさのベクトルを保持するとともに出力する。状態決定部25は、更に角度決定部24から45度の角度情報を受け取った場合も、45度の角度及び1.0の大きさのベクトルを保持するとともに出力する。状態決定部25は、30度の角度情報を受け取った場合、30度の角度及び0.2の大きさのベクトルと、45度の角度及び1.0の大きさのベクトルとを加算したベクトルの角度及び1.0の大きさのベクトルを保持するとともに出力する。この場合も、ベクトルの大きさが1.0を超えるため、状態決定部25は、1.0に正規化して出力する。
For example, when the
状態決定部25は、角度決定部24からkeepイベントを受け取ると、内部で保持するベクトルの保持を継続し、該ベクトルを出力する。状態決定部25は、角度決定部24からstopイベントを受け取ると、内部で保持するベクトルの保持を解除し、ゼロベクトルを出力するか、又はstopイベントを出力する。
Upon receiving the keep event from the
このような構成とすることにより、物理的なアナログコントローラと同様の操作をスマートフォン上で実現することが可能となる。 With such a configuration, it is possible to realize the same operation on the smartphone as a physical analog controller.
アプリケーション部26は、電子装置10上で起動されたアプリの機能を有し、当該アプリによるサービスの提供を行う。1つの好適な例では、アプリケーション部26は、状態決定部25から出力されたベクトルを、具体的な仮想キャラクタのモーションなどに変換するものであり、一般的なゲームアプリに実装されている機能である。アプリがWebアプリである場合、電子装置10と通信するサーバがアプリケーション部26の一部又は全部を有し、アプリは、当該サーバとデータの送受信を行う。
The
角度決定部24による、式(1)に示す関数aop(x,y)を用いた角度算出の実施例を以下に説明する。以下の例示において、変数wは2であり、独立変数の分散はV以上であるものとし、時間t1~t4は、角度決定部24が角度を算出する任意の1つの時間を示すものとする。
An example of angle calculation using the function aop(x, y) shown in Equation (1) by the
図5は、時間t1におけるデータポイントバッファが保持するデータポイントの一例を示す図である。データポイントバッファが保持するデータポイントの集合40は、6個のデータポイントP41~46からなる。また、P41~46のx座標の値及びy座標の値(x,y)は、各々P41(x41,y41)、P42(x42,y42)…P46(x46,y46)であり、データポイントバッファは、P41、P42、…、P46の順番でデータポイントを格納したものとする。 FIG. 5 is a diagram showing an example of data points held by the data point buffer at time t1. A set 40 of data points held by the data point buffer consists of six data points P41-46. The x-coordinate values and y-coordinate values (x, y) of P41 to 46 are respectively P41 (x 41 , y 41 ), P42 (x 42 , y 42 ) . . . P46 (x 46 , y 46 ). , and the data point buffer stores the data points in the order of P41, P42, . . . , P46.
最初に、関数aop(x,y)は、関数rotate(x,y)を用いて、abs(max(x)―min(x))とabs(max(y)―min(y))を比較する。図6より、P46とP41のx座標の値の差分値x46-x41(=Δx)がabs(max(x)―min(x))に対応し、P45とP41のy座標の値の差分値y45-y41(=Δy)がabs(max(y)―min(y))に対応することが確認できる。図5より、Δx>Δyである。したがって、関数rotate(x,y)は、不等号を満たさないため、偽の値を返す。 First, the function aop(x, y) compares abs(max(x)-min(x)) and abs(max(y)-min(y)) using the function rotate(x, y) do. From FIG. 6, the difference value x 46 −x 41 (=Δx) of the x-coordinate values of P46 and P41 corresponds to abs(max(x)−min(x)), and the y-coordinate values of P45 and P41 It can be confirmed that the difference value y 45 −y 41 (=Δy) corresponds to abs(max(y)−min(y)). From FIG. 5, Δx>Δy. Therefore, the function rotate(x,y) returns a false value because it does not satisfy the inequality.
続いて、関数aop(x,y)は、関数left(x)を用いて、時系列的に前後する値の差分値(x42-x41,x43-x42,…x46-x45)を算出する。図5より、差分値はすべてプラスとなる。したがって、関数left(x)は不等号を満たさないため、偽の値を返す。 Subsequently, the function aop(x, y) uses the function left(x) to obtain the difference values (x 42 −x 41 , x 43 −x 42 , . . . x 46 −x 45 ) is calculated. From FIG. 5, the difference values are all positive. Therefore, the function left(x) does not satisfy the inequality and returns a false value.
上記実施例においては、関数rotate(x,y)が偽であり、関数left(x)が偽である。したがって関数aop(x,y)は、データポイントの集合40から図7に示す回帰直線81を求め、図8に示すように回帰直線81の傾きから角度91を算出する。
In the above example, the function rotate(x,y) is false and the function left(x) is false. The function aop(x,y) thus determines the
図9は、時間t2におけるデータポイントバッファが保持するデータポイントの一例を示す図である。データポイントバッファが保持するデータポイントの集合60は、6個のデータポイントP61~66からなる。P61、P62、…P66のx座標の値及びy座標の値は、各々P46、P45、…、P41のx座標の値及びy座標の値と同じであり、P61、P62、…、P66の順番でデータポイントを格納したものとする。 FIG. 9 is a diagram showing an example of data points held by the data point buffer at time t2. A set 60 of data points held by the data point buffer consists of six data points P61-66. The x-coordinate value and y-coordinate value of P61, P62, . . . P66 are the same as the x-coordinate value and y-coordinate value of P46, P45, . store the data points in .
関数rotate(x,y)は、図5の実施例の場合と同様にして、不等号を満たさないため、偽の値を返す。続いて、関数aop(x,y)は、関数left(x)を用いて、時系列的に前後する値の差分値を算出する。図9より、差分値はすべてマイナスとなる。したがって、関数left(x)は不等号を満たし、真の値を返す。 The function rotate(x,y) returns a value of false because the inequality is not satisfied, as in the embodiment of FIG. Subsequently, the function aop(x, y) uses the function left(x) to calculate the difference value between the values preceding and succeeding in time series. From FIG. 9, all the difference values are negative. Therefore, the function left(x) satisfies the inequality and returns a true value.
上記実施例においては、関数rotate(x,y)が偽であり、関数left(x)が真である。したがって関数aop(x,y)は、データポイントの集合60から図9に示す回帰直線82を求め、図10に示すように回帰直線82の傾きから算出される角度92aに180度プラスした角度92bを算出する。ここで、回帰直線82の傾きは回帰直線81と同じであり、角度91は角度92aと同じであるが、データポイントバッファがデータポイントを格納した順番が逆であるため、関数aop(x,y)が算出する角度は180度異なることが確認できる。
In the above example, the function rotate(x,y) is false and the function left(x) is true. The function aop(x,y) thus determines from the set of data points 60 the
図11は、時間t3におけるデータポイントバッファが保持するデータポイントの一例を示す図である。データポイントバッファが保持するデータポイントの集合70は、6個のデータポイントP71~76からなる。また、P71~76のx座標の値及びy座標の値は、各々P71(x71,y71)、P72(x72,y72)…P46(x76,y76)であり、データポイントバッファは、P71、P72、…、P76の順番でデータポイントを格納したものとする。 FIG. 11 is a diagram showing an example of data points held by the data point buffer at time t3. A data point set 70 held by the data point buffer consists of six data points P71-76. The x-coordinate values and y - coordinate values of P71 to P76 are respectively P71 ( x71 , y71 ), P72 ( x72 , y72 ) . stores the data points in the order of P71, P72, . . . , P76.
図12より、P75とP71のx座標の値の差分値x75-x71(=Δx)がabs(max(x)―min(x))に対応し、P76とP71のy座標の値の差分値y76-y71(=Δy)がabs(max(y)―min(y))に対応することが確認できる。図11より、2×Δx<Δyである。したがって、関数rotate(x,y)は、不等号を満たすため、真の値を返す。 From FIG. 12, the difference value x 75 −x 71 (=Δx) of the x-coordinate values of P75 and P71 corresponds to abs(max(x)−min(x)), and the y-coordinate values of P76 and P71 It can be confirmed that the difference value y 76 −y 71 (=Δy) corresponds to abs(max(y)−min(y)). From FIG. 11, 2×Δx<Δy. Therefore, the function rotate(x,y) returns a true value because it satisfies the inequality.
続いて、関数aop(x,y)は、関数down(y)を用いて、時系列的に前後する値の差分値(y72-y71,y73-y72,…y76-y75)を算出する。図11より、差分値はすべてプラスとなる。したがって、関数down(y)は不等号を満たさないため、偽の値を返す。 Subsequently, the function aop(x, y) uses the function down(y) to obtain the difference values (y 72 −y 71 , y 73 −y 72 , . . . y 76 −y 75 ). From FIG. 11, the difference values are all positive. Therefore, the function down(y) does not satisfy the inequality and returns a false value.
上記実施例においては、関数rotate(x,y)が真であり、関数down(y)が偽である。したがって関数aop(x,y)は、データポイントの集合70から図13に示す回帰直線83を求め、図13に示すように回帰直線83の傾きから算出される角度93aを、90度から引くことにより角度93bを算出する。ここで、図13に示す角度93aは、yを独立変数としてxを従属変数とした場合の回帰直線83の傾きから算出される角度を、xを独立変数としてyを従属変数とした座標に戻した場合の位置に対応させて示している。
In the above example, the function rotate(x,y) is true and the function down(y) is false. The function aop(x,y) thus determines from the set of data points 70 the
図14は、時間t4におけるデータポイントバッファが保持するデータポイントの一例を示す図である。時間t4は、時間t1から時間Δtが経過した時間である。データポイントバッファが保持するデータポイントの集合40’は、8個のデータポイントP45~52からなる。また、P45~52のx座標の値及びy座標の値は、各々P45(x45,y46)、P46(x46,y46)…P52(x52,y52)であり、データポイントバッファは、P45、P46、…、P52の順番でデータポイントを格納したものとする。 FIG. 14 is a diagram showing an example of data points held by the data point buffer at time t4. Time t4 is the time when time Δt has elapsed from time t1. A set 40' of data points held by the data point buffer consists of eight data points P45-52. The x-coordinate values and y-coordinate values of P45-52 are respectively P45 (x 45 , y 46 ), P46 (x 46 , y 46 ) . stores the data points in the order of P45, P46, . . . , P52.
図15より、P52とP45のx座標の値の差分値x52-x45(=Δx)がabs(max(x)―min(x))に対応し、P46とP52のy座標の値の差分値y46-y52(=Δy)がabs(max(y)―min(y))に対応することが確認できる。図14より、2×Δx<Δyである。したがって、関数rotate(x,y)は、不等号を満たすため、真の値を返す。 From FIG. 15, the difference value x 52 −x 45 (=Δx) of the x-coordinate values of P52 and P45 corresponds to abs(max(x)−min(x)), and the y-coordinate values of P46 and P52 It can be confirmed that the difference value y 46 −y 52 (=Δy) corresponds to abs(max(y)−min(y)). From FIG. 14, 2×Δx<Δy. Therefore, the function rotate(x,y) returns a true value because it satisfies the inequality.
続いて、関数aop(x,y)は、関数down(y)を用いて、時系列的に前後する値の差分値(y46-y45,y47-y46,…y52-y51)を算出する。図11より、y46-y45以外の差分値はマイナスとなる。したがって、関数down(y)は不等号を満たすため、真の値を返す。 Subsequently, the function aop(x, y) uses the function down(y) to obtain the difference values (y 46 −y 45 , y 47 −y 46 , . . . y 52 −y 51 ) is calculated. From FIG. 11, difference values other than y 46 -y 45 are negative. Therefore, the function down(y) satisfies the inequality and returns a true value.
上記実施例においては、関数rotate(x,y)が真であり、関数down(y)が真である。したがって関数aop(x,y)は、データポイントの集合40’から図16に示す回帰直線84を求め、図17に示すように回帰直線83の傾きから算出される角度94aを、90度から引くことにより算出した角度94bに180度プラスした角度94cを算出する。
In the above example, the function rotate(x,y) is true and the function down(y) is true. The function aop(x,y) thus determines from the set of data points 40' the
図18は、本発明の一実施形態による電子装置10がデータポイントの集合120から仮想キャラクタ121を制御する様子を示す図である。図18は、タッチパネル17へのユーザの操作により発生したタッチイベントに対応するデータポイントを可視化したデータポイントの集合120を示す。電子装置10は、データポイントの集合120が示す角度122に基づいて、操作対象オブジェクトである仮想キャラクタ121のモーション、例えば歩く、走る、方向転換などを制御する。
FIG. 18 is a diagram illustrating
図19は、本発明の一実施形態による角度決定部24の情報処理のフローチャートを示す図である。本フローチャートは、タッチイベントが発生し、角度決定部24が該タッチイベントからデータポイントを取得したときに開始する。
FIG. 19 is a diagram showing a flowchart of information processing of the
ステップ101で、角度決定部24は、取得したデータポイントをデータポイントバッファに格納する。このとき、角度決定部24は、格納するデータポイントに、格納後の経過時間をミリ秒で示すTと、データポイントバッファに格納できる時間(保持寿命)をミリ秒で示す変数Dを関連付ける。
At step 101, the
続いてステップ102で、角度決定部24は、startイベントを状態決定部25へ出力する。
Subsequently, at step 102 , the
続いてステップ103で、角度決定部24は、タッチイベントが発生したか否かを判定する。ステップ103は、本フローチャート開始時からIms後に実行される。タッチイベントが発生した場合、本フローチャートはステップ104へ進み、タッチイベントが発生しなかった場合、本フローチャートはステップ106へ進む。
Subsequently, at step 103, the
ステップ104で、角度決定部24は、発生したタッチイベントがtouchendであるか否かを判定する。取得したタッチイベントがtouchendであった場合、本フローチャートは終了する。取得したタッチイベントがtouchendでなかった場合、本フローチャートはステップ105へ進む。
At step 104, the
ステップ105で、角度決定部24は、発生したタッチイベントからデータポイントを取得し、データポイントバッファに格納する。このとき、角度決定部24は、格納するデータポイントに、格納後の経過時間をミリ秒で示すTと、データポイントバッファに格納できる時間をミリ秒で示す変数Dを関連付ける。
At step 105, the
続いてステップ106で、角度決定部24は、データポイントバッファに保持されているデータポイントのうち、経過時間Tが変数D以上であるデータポイントの保持を終了する。角度決定部24は、データポイントバッファに格納する各データポイントについて、経過時間Tと変数Dを比較し、経過時間Tが変数D以上である場合、当該データポイントの保持を終了する。
Subsequently, at step 106, the
続いてステップ107で、角度決定部24は、データポイントバッファが保持するデータポイントの個数nが変数Bの数以上であるか否かを判定する。個数nが変数B以上である場合、本フローチャートはステップ108へ進み、個数nが変数B未満であった場合、本フローチャートはステップ113へ進む。
Subsequently, at step 107, the
ステップ108で、角度決定部24は、データポイントバッファに保持されているデータポイントにおけるx軸の値の変位量及びy軸の値の変位量に基づいて、独立変数の軸としてx軸及びy軸のいずれか一方の軸を決定する。角度決定部24は、同時に他方の軸を従属変数の軸として決定する。
In step 108, the
続いてステップ109で、角度決定部24は、ステップ108でx軸が独立変数の軸として決定された場合、式(5)を用いて傾きの角度を算出することにより、回帰直線の傾きの角度を決定する。1つの例では、角度決定部24は、式(5)を用いて傾きの角度を算出する際、0度~90度及び270度~360度の範囲内で算出する。角度決定部24は、ステップ108でy軸が独立変数の軸として決定された場合、式(6)を用いて傾きの角度を算出し、算出した角度を90度から引くことにより、回帰直線の傾きの角度を決定する。1つの例では、角度決定部24は、式(6)を用いて傾きの角度を算出する際、0度~90度及び270度~360度の範囲内で算出する。
Subsequently, in step 109, when the x-axis is determined as the axis of the independent variable in step 108, the
続いて、ステップ110で、角度決定部24は、データポイントバッファに保持されているデータポイントの集合としての変位方向に基づいて、決定された回帰直線の傾きに対して180度回転させるか否かを示す回転量を決定する。1つの例では、角度決定部24は、ステップ108でx軸が独立変数の軸として決定された場合、時系列的に前後するx軸の値の差分値を各々算出する。角度決定部24は、算出した差分値がマイナスとなる個数がプラスとなる個数よりも多いとき、回転量を180度に決定し、少ないとき、回転量を0度に決定する。1つの例では、角度決定部24は、ステップ108でy軸が独立変数の軸として決定された場合、時系列的に前後するy軸の値の差分値を各々算出する。角度決定部24は、算出した差分値がマイナスとなる個数がプラスとなる個数よりも多いとき、回転量を180度に決定し、少ないとき、回転量を0度に決定する。
Subsequently, at step 110, the
続いて、ステップ111で、角度決定部24は、決定された回帰直線の傾き及び決定された回転量に基づいて、角度を決定する。具体的には、角度決定部24は、決定された回帰直線の傾きに対応する角度に決定された回転量を加算することにより、角度を決定する。例えば回転量が0度の場合、角度決定部24が決定する角度は、決定された回帰直線の傾きに対応する角度となる。角度決定部24は、angleイベントを決定された角度とともに状態決定部25へ出力し、ステップ112へ進む。
Subsequently, in step 111, the
ステップ107で個数nが変数B未満であった場合、ステップ113で、角度決定部24は、keepイベントを状態決定部25へ出力し、ステップ112へ進む。
If the number n is less than the variable B in step 107 , the
ステップ112で、本フローチャートは、例えばゲームアプリケーションが終了するなどにより終了しない限り、ステップ103へ戻る。角度決定部24は、ステップ103~ステップ112の処理を、Imsごとに実行する。
At step 112, the flow chart returns to step 103 unless terminated, for example, by termination of the game application. The
本フローチャートが終了すると、角度決定部24は、データポイントバッファに保持するデータポイントをすべて削除する。
When this flowchart ends, the
次に、本発明の実施形態による電子装置10の主な作用効果について説明する。本実施形態では、タッチパネル17上で指をスワイプさせたとき、例えば100msなどの極めて短い時間に6回以上のタッチイベントが発生するという投影型静電容量方式タッチパネルの特徴を利用している。電子装置10が実装するソフトウェアのシステムアーキテクチャは、角度決定部24、状態決定部25、アプリケーション部26が第1層、第2層、第3層に各々対応する3層構造をとり、第3層は、ゲームアプリケーションに対応する。第1層は、発生する複数のタッチイベントの集合(データポイントの集合)を対象として、スワイプ方向を360度のリニアな角度で算出する。第1層は、極めて短い時間に発生するタッチイベントを用いることができるため、高速に角度を算出し続けることが可能となる。また第1層は、データポイントバッファが極めて短い既定の保持時間(例えば165ms)だけ保持するデータポイントの集合が示す角度を求めることにより、基準点を用いずにタッチパネル17に対してタッチ操作を行ったユーザが意図する方向の角度を求めることが可能となる。
Next, main functions and effects of the
なお、本実施形態の電子装置10は、スワイプ等のユーザの操作が複雑であっても、100msなどの極めて短い時間では、等速直線運動としてモデル化できるため、等速度運動の角度を連続的に算出することにより、任意の非線形関数(≒人間の操作)を予測・近似させることができるというコンセプトに基づいて設計されたものである。
Note that the
第1層は、変数Iの値が比較的大きく設定された場合、比較的低い頻度で角度を算出する。この場合、第1層は、タッチイベントが発生し始めた直後においても、例えばユーザが操作を開始した直後においても、データポイントバッファに比較的多くのデータポイントが保持されている状態で、角度を算出することになる。このように、変数Iの値を比較的大きく設定することにより、ユーザの操作を比較的緩やかに反映した角度を算出することが可能となる。一方、第1層は、変数Iの値が比較的小さく設定された場合、比較的高い頻度で角度を算出する。この場合、第1層は、タッチイベントが発生し始めた直後では、例えばユーザが操作を開始した直後では、データポイントバッファに比較的少数のデータポイントが保持されている状態で、角度を算出することになる。このように、変数Iの値を比較的小さく設定することにより、ユーザの操作を比較的即座に反映した角度を算出することが可能となる。 The first layer calculates angles relatively infrequently when the value of variable I is set relatively large. In this case, the first layer can be used to measure the angle with a relatively large number of data points held in the data point buffer even immediately after a touch event begins to occur, e.g. will be calculated. By setting the value of the variable I to a relatively large value in this way, it is possible to calculate an angle that relatively gently reflects the user's operation. On the other hand, in the first layer, when the value of the variable I is set relatively small, the angle is calculated relatively frequently. In this case, the first layer computes the angle with a relatively small number of data points held in the data point buffer just after a touch event begins to occur, e.g. It will be. By setting the value of the variable I to a relatively small value in this way, it is possible to calculate an angle that reflects the user's operation relatively immediately.
第1層は、データポイントの集合が示す角度を算出するにあたって、最小二乗法を用いて回帰直線の傾きを算出する。xを独立変数及びyを従属変数として固定した場合、y軸に沿った傾きの場合等は傾きを算出することが難しいため、第1層は、データポイントの変位量から独立変数及び従属変数を決定した後で、回帰直線の傾きを算出する。このような構成とすることにより、第1層は、安定的に回帰直線の傾きを算出することが可能となる。 The first layer uses the least squares method to calculate the slope of the regression line in calculating the angle indicated by the set of data points. When x is the independent variable and y is the dependent variable, it is difficult to calculate the slope along the y-axis. Once determined, the slope of the regression line is calculated. With such a configuration, the first layer can stably calculate the slope of the regression line.
第1層は、データポイントの集合が示す角度を算出するにあたって、ユーザがタッチパネル17上で指を動かす大まかな方向に対応するデータポイントの集合としての変位方向に基づいて、決定された回帰直線の傾きに対して180度回転させるか否かを示す回転量を決定する。このように、最小二乗法を用いて算出された回帰直線の傾きからは把握できない回転量を決定することにより、タッチパネル17に対してタッチ操作を行ったユーザが意図する方向の角度を求めることが可能となる。
In the first layer, when calculating the angle indicated by the set of data points, the regression line determined based on the displacement direction as a set of data points corresponding to the rough direction in which the user moves the finger on the
第1層は、既定の処理時間ごとに、例えば既定の処理時間としてゲームアプリケーションにおけるフレームレートに対応する時間ごとに、データポイントの集合を対象として、スワイプ方向に対応する角度を算出する。第2層は、継続的に出力される角度情報を用いて、既定の処理時間ごとに、仮想コントローラの傾きの状態を示すベクトル量(角度及び大きさ)を決定し、ゲームアプリケーションへ出力する。このような構成とすることにより、本実施形態では、ゲームアプリケーションに対して、既定の処理時間ごとに算出された角度に基づいた入力を行うことが可能となる。また、このような構成とすることにより、いずれの層も、過去のタッチ座標を基準点として用いずに、第1層が算出するフレームレートごとの高頻度で正確な移動角度に基づいた入力を行うことが可能となる。このように、本実施形態では、電子装置10は、従来技術における仮想コントローラで使用されていた、開始点(開始座標)や終了点(終了座標)といった点という空間的な概念を使用せずに角度を算出する。
The first layer calculates the angle corresponding to the swipe direction for a set of data points every predetermined processing time, such as the predetermined processing time corresponding to the frame rate in the game application. The second layer uses the continuously output angle information to determine the vector quantity (angle and magnitude) indicating the tilt state of the virtual controller for each predetermined processing time, and outputs it to the game application. By adopting such a configuration, in the present embodiment, it is possible to perform an input based on the angle calculated for each predetermined processing time to the game application. Further, with such a configuration, none of the layers uses the past touch coordinates as a reference point, and inputs based on the high frequency and accurate movement angle for each frame rate calculated by the first layer are performed. can be done. Thus, in the present embodiment, the
また本実施形態では、従来技術における仮想コントローラ、すなわち基準座標と現在の指示座標との間の位置関係によって得られるベクトルを用いた仮想コントローラとは異なり、基準座標の概念がないため、基準座標を定める仮想コントローラよりも高い応答性を提供することが可能である。特に仮想キャラクタ等の方向転換操作においては、方向転換前とは大きく異なる方向にユーザがタッチパネル上の操作を行ったとしても、現在の指示座標が基準座標に近づくという概念そのものがないため、ユーザの意図した操作内容に素早く応答して方向転換することができ、優位性が顕著である。また上記のように構成されることにより、スマートフォンで操作するユーザに対して片手での操作を可能とすることができる。これにより、ユーザが従来技術における仮想ジョイスティックの操作を行うにあたって、常に基準座標を意識する必要があり、片手での操作が難しい場合があるという問題点を解消することができる。このように、本実施形態では、より高速で直感的な操作を可能とする仮想コントローラを実現している。 Further, in this embodiment, unlike the virtual controller in the prior art, that is, the virtual controller using the vector obtained by the positional relationship between the reference coordinates and the currently indicated coordinates, there is no concept of the reference coordinates. It is possible to provide higher responsiveness than the defined virtual controller. In particular, in a direction change operation of a virtual character or the like, even if the user performs an operation on the touch panel in a direction significantly different from that before the direction change, there is no concept that the current indicated coordinates approach the reference coordinates. It can quickly respond to the intended operation content and change direction, which is a remarkable advantage. Moreover, by being configured as described above, it is possible to allow a user operating with a smartphone to operate with one hand. As a result, it is possible to solve the problem that the user always needs to be aware of the reference coordinates when operating the virtual joystick in the conventional technology, and it is sometimes difficult to operate with one hand. In this manner, the present embodiment realizes a virtual controller that enables faster and more intuitive operations.
また本実施形態では、電子装置10は、従来技術における仮想コントローラと異なり、基準座標からの指の移動距離に応じた入力ではないため、指の移動量がより少ない操作により、ユーザが意図する操作を実現することが可能となる。したがって、従来技術と比較して、より小さい実装面積で実現することが可能となる。例えば、タッチパネル17の大きさに関わらず、同一の操作性を実現することが可能となる。
Further, in the present embodiment, unlike the virtual controller in the conventional technology, the
また、本実施形態の電子装置10が提供する仮想コントローラの技術は、スワイプ操作からの角度の認識を数理的にモデル化しているため、360度の方向移動、加速・減速、格闘ゲームのようなコマンド入力等の幅広いジャンルに適用可能である。
In addition, the virtual controller technology provided by the
上記の作用効果は、特に言及が無い限り、他の実施形態や他の実施例においても同様である。 The above effects are the same in other embodiments and examples unless otherwise specified.
本発明の他の実施形態では、上記で説明した本発明の実施形態の機能やフローチャートに示す情報処理を実現するプログラムや該プログラムを格納したコンピュータ読み取り可能な記憶媒体とすることもできる。また他の実施形態では、上記で説明した本発明の実施形態の機能やフローチャートに示す情報処理を実現する方法とすることもできる。また他の実施形態では、上記で説明した本発明の実施形態の機能やフローチャートに示す情報処理を実現するプログラムをコンピュータに供給することができるサーバとすることもできる。また他の実施形態では、上記で説明した本発明の実施形態の機能やフローチャートに示す情報処理を実現する仮想マシンとすることもできる。 In another embodiment of the present invention, a computer-readable storage medium storing a program for realizing the functions of the above-described embodiments of the present invention and the information processing shown in the flow charts and the program can be used. In other embodiments, the functions of the embodiments of the present invention described above and methods for realizing the information processing shown in the flowcharts can also be used. In another embodiment, a server can supply a computer with a program for realizing the functions of the embodiments of the present invention described above and the information processing shown in the flowcharts. In another embodiment, it can be a virtual machine that realizes the functions of the embodiment of the present invention described above and the information processing shown in the flowchart.
以下に本発明の実施形態の変形例について説明する。以下で述べる変形例は、矛盾が生じない限りにおいて、適宜組み合わせて本発明の任意の実施形態に適用することができる。 Modifications of the embodiments of the present invention will be described below. Modifications described below can be appropriately combined and applied to any embodiment of the present invention as long as there is no contradiction.
1つの変形例では、電子装置10は、仮想空間上に仮想的なオブジェクトを配置し、該仮想空間内に配置される仮想カメラによって撮影したゲーム画像をユーザに提示し、ゲームを進行するゲームアプリケーションがインストールされている。電子装置10は、当該ゲームアプリケーションが実行されると、仮想空間内に配置される仮想的なオブジェクトなどを、仮想空間内に配置される仮想カメラによって撮影したゲーム画像をタッチパネル17に表示し、ユーザの操作に応じて仮想カメラを制御する。このように、電子装置10は、当該ゲームアプリケーションが実行されると、ユーザの操作に応じて、操作対象オブジェクトである仮想カメラを制御するための仮想コントローラを提供する。仮想カメラの制御とは、仮想空間に配置された仮想カメラの動き又は視野領域の制御である。
In one modification, the
図20は、本発明の一実施形態による電子装置10が表示する画像を撮影する仮想空間内に配置された仮想カメラ131を示す図である。図20は、仮想カメラ131の位置と、仮想カメラ131の視線方向132を示す。視線方向132は仮想カメラ131の位置を視点とする3次元ベクトルで定められる。仮想カメラ131から視線方向132に一定の視野角において視野領域が定められ、当該視野領域に視線方向132と垂直な面である2次元スクリーン133が定められる。2次元スクリーン133に対して、仮想空間内の仮想的なオブジェクトが投影され、2次元画像が形成される。
FIG. 20 is a diagram showing a
1つの変形例では、入力装置12と表示装置13は、別の位置に配置される別個の形態である。この場合、入力装置12は、タッチパネル又は投影型静電容量方式タッチパネルと同等の機能を有するデバイスである。表示装置13は、プロセッサ11の制御に従って、アプリケーション画面などを電子装置10のユーザに表示するものであればよく、例えば液晶ディスプレイ、有機ELを用いたディスプレイやプラズマディスプレイなどである。
In one variation, the
1つの変形例では、角度決定部24は、最小二乗法以外の既知の方法を用いて、回帰直線の傾きを算出する。この場合、角度決定部24は、決定された回帰直線の傾きに対して180度回転させるか否かを示す回転量を決定せず、これに伴い、独立変数の軸及び従属変数の軸を決定しない。例えば、カルマンフィルタ又はパーティクルフィルタなどのアルゴリズムを用いることができる。
In one modified example, the
1つの変形例では、角度決定部24は、変数Dを定めず、データポイントバッファに保持されているデータポイントのうち既定の保持時間を超えたと判断されたデータポイントの保持を終了しない。この場合、角度決定部24は、変数Iで定める時間ごとに、変数Iで定める時間ずつずらした特定の時間帯に格納されたデータポイントを参照することにより角度を決定する。
In one variation, the
1つの変形例では、角度決定部24は、変数Vを定めない。この場合、角度決定部24は、独立変数の分散の値に関わらず、関数aop(x,y)を用いて角度を算出し、決定する。
In one variant, the
1つの変形例では、電子装置10は重力方向を判定することが可能な加速度センサを備える。角度決定部24は、加速度センサから取得された情報を用いて重み係数を決定する。例えば、スマートフォンが縦持ちされてタッチパネル17のy軸が重力方向となる場合、角度決定部24はwを2に決定する。一方、スマートフォンが横持ちされてタッチパネル17のx軸が重力方向となり、かつゲームアプリケーションが備えるゲームエンジンが縦横の座標の変換をしない場合、角度決定部24はwを0.5などの1より小さい値に決定する。
In one variant,
1つの変形例では、角度決定部24は、タッチイベントを取得するとき、2つの変数からなる数値の組(x、y)を取得し、データポイント取得時間tを対応付けずに、2つの変数からなる数値の組(x、y)をデータポイントバッファに格納する。例えば、角度決定部24は、データポイント取得時間tに対応する情報をデータポイントバッファ以外の記憶装置14内のメモリ領域などに記憶し、データポイントバッファに格納するデータに対応付けて管理することができる。
In one modification, the
以上に説明した処理又は動作において、あるステップにおいて、そのステップではまだ利用することができないはずのデータを利用しているなどの処理又は動作上の矛盾が生じない限りにおいて、処理又は動作を自由に変更することができる。また以上に説明してきた各実施例は、本発明を説明するための例示であり、本発明はこれらの実施例に限定されるものではない。本発明は、その要旨を逸脱しない限り、種々の形態で実施することができる。 In the processes or operations described above, as long as there is no contradiction in the process or operation, such as using data that cannot be used at that step in a certain step, the process or operation can be freely performed. can be changed. Moreover, each embodiment described above is an illustration for explaining the present invention, and the present invention is not limited to these examples. The present invention can be embodied in various forms without departing from the gist thereof.
10 電子装置
11 プロセッサ
12 入力装置
13 表示装置
14 記憶装置
15 通信装置
16 バス
17 タッチパネル
21 入力部
22 表示部
23 制御部
24 角度決定部
25 状態決定部
26 アプリケーション部
31、33、35 角度
32、34、36 方向
81、82、83、84 回帰直線
91、92a、92b、93a、93b、94a、94b、94c 角度
120 集合
121 仮想キャラクタ
122 角度
131 仮想カメラ
132 視線方向
133 2次元スクリーン
10
Claims (14)
前記タッチパネルへのユーザの操作により発生したタッチイベントに基づいて取得される第1の軸の値及び第2の軸の値により示されるデータポイントを保持するステップと、
前記保持されているデータポイントのうち所定の変数に基づく特定の時間帯に保持されたデータポイントに基づいて回帰直線の傾きを決定するステップと、
前記特定の時間帯に保持されたデータポイントの集合としての変位方向に基づいて前記決定された回帰直線の傾きを回転させる回転量を決定するステップと、
前記決定された回帰直線の傾き及び前記決定された回転量に基づいて、前記ユーザが仮想空間内の操作対象オブジェクトを制御するための角度を決定するステップと、
を実行させるプログラム。 A program to be executed in an electronic device having a touch panel, the electronic device comprising:
holding data points indicated by a first axis value and a second axis value obtained based on a touch event generated by a user's operation on the touch panel;
determining the slope of a regression line based on the retained data points held at a particular time period based on a predetermined variable ;
determining a rotation amount by which to rotate the slope of the determined regression line based on the displacement direction as a set of data points held in the specific time period ;
determining an angle for the user to control the operation target object in the virtual space based on the determined slope of the regression line and the determined amount of rotation;
program to run.
前記保持されているデータポイントにおける時系列的に前後するデータポイントの変位方向に基づいて、前記操作対象オブジェクトを制御するための角度を決定するにあたって、前記決定された回帰直線の傾きに対して180度回転させるか否かを示す回転量を決定する、請求項1に記載のプログラム。 The step of determining the amount of rotation includes:
In determining the angle for controlling the operation target object based on the displacement directions of the data points that chronologically precede and follow in the retained data points, 180 is applied to the slope of the determined regression line. 2. The program according to claim 1, which determines an amount of rotation indicating whether to rotate by degrees.
前記保持されているデータポイントにおける前記第1の軸の値の変位量及び前記第2の軸の値の変位量に基づいて、独立変数の軸として該第1の軸及び該第2の軸のいずれか一方の軸を決定するステップと、他方の軸を従属変数の軸として決定するステップと、を更に実行させ、
前記回帰直線の傾きを決定するステップは、
前記決定された独立変数の軸及び従属変数の軸に更に基づいて、回帰直線の傾きを決定する、請求項1又は2に記載のプログラム。 The program causes the electronic device to:
of the first axis and the second axis as independent variable axes based on the variability of the first axis value and the variability of the second axis value at the retained data points; further performing the steps of determining one of the axes and determining the other axis as the axis of the dependent variable;
Determining the slope of the regression line comprises:
3. The program according to claim 1 or 2, further comprising determining a slope of a regression line further based on the determined independent variable axis and dependent variable axis.
前記保持されているデータポイントにおける、前記第1の軸の最大値と最小値の差分値及び前記第2の軸の最大値と最小値の差分値に基づいて、独立変数の軸として前記いずれか一方の軸を決定する、請求項3に記載のプログラム。 The step of determining one of the axes includes:
any of the above as an axis of an independent variable based on the difference between the maximum and minimum values of the first axis and the difference between the maximum and minimum values of the second axis in the retained data points 4. A program according to claim 3, for determining one axis.
前記保持されているデータポイントにおける、前記第1の軸の最大値と最小値の差分値に対して重み付けを行った値及び前記第2の軸の最大値と最小値の差分値の大きさを比較することにより、独立変数の軸として前記いずれか一方の軸を決定する、請求項3又は4に記載のプログラム。 The step of determining one of the axes includes:
A value obtained by weighting the difference between the maximum value and the minimum value of the first axis and the magnitude of the difference value between the maximum value and the minimum value of the second axis in the retained data points 5. The program according to claim 3 or 4, wherein said one axis is determined as the axis of the independent variable by comparison.
前記保持されているデータポイントにおける時系列的に前後する、前記決定された独立変数の軸の値の差分値の正負の数量を比較することにより、前記操作対象オブジェクトを制御するための角度を決定するにあたって、前記決定された回帰直線の傾きに対して180度回転させるか否かを示す回転量を決定する、請求項3から5のいずれか1項に記載のプログラム。 The step of determining the amount of rotation includes:
An angle for controlling the operation target object is determined by comparing positive and negative amounts of difference values of the determined independent variable axis values chronologically before and after the held data points. 6. The program according to any one of claims 3 to 5, further comprising determining a rotation amount indicating whether or not to rotate the determined regression line by 180 degrees with respect to the determined slope of the regression line.
前記保持されているデータポイントにおける、独立変数の平均及び従属変数の平均を決定するステップと、
前記決定された平均を用いて、前記保持されているデータポイントにおける、独立変数の偏差及び従属変数の偏差を決定するステップと、
前記決定された独立変数の偏差を用いて、前記保持されているデータポイントにおける独立変数の分散を決定するステップと、
前記決定された独立変数の偏差及び従属変数の偏差を用いて、前記保持されているデータポイントにおける共分散を決定するステップと、
前記決定された共分散を前記決定された独立変数の分散で割ることにより回帰直線の傾きを決定するステップと、
を含む請求項3から6のいずれか1項に記載のプログラム。 Determining the slope of the regression line comprises:
determining the mean of the independent variables and the mean of the dependent variables at the retained data points;
determining the deviation of the independent variables and the deviation of the dependent variables in the retained data points using the determined means;
using the determined independent variable deviations to determine the variance of the independent variables in the retained data points;
using the determined independent variable deviations and dependent variable deviations to determine covariances in the retained data points;
determining the slope of a regression line by dividing the determined covariance by the determined independent variable variance;
7. The program according to any one of claims 3 to 6, comprising
前記第2の軸は、前記タッチパネルのセンサが配列される方向の長手方向を示し、前記第1の軸に直交するY軸であり、
前記回帰直線の傾きを決定するステップは、
前記決定された独立変数の軸が前記第2の軸である場合、前記決定された共分散を前記決定された独立変数の分散で割ることにより決定された回帰直線の傾きに対応する角度を、90度から引くことにより回帰直線の傾きを決定する、請求項7に記載のプログラム。 The first axis is an X-axis indicating a lateral direction of the direction in which the sensors of the touch panel are arranged,
The second axis is a Y-axis that indicates the longitudinal direction of the direction in which the sensors of the touch panel are arranged and is orthogonal to the first axis,
Determining the slope of the regression line comprises:
if the determined independent variable axis is the second axis, the angle corresponding to the slope of the regression line determined by dividing the determined covariance by the determined independent variable variance; 8. The program of claim 7, wherein the slope of the regression line is determined by subtracting from 90 degrees.
既定の処理時間ごとに角度を決定する、請求項1から9のいずれか1項に記載のプログラム。 Determining the angle comprises:
10. The program according to any one of claims 1 to 9, wherein the angle is determined every predetermined processing time.
前記既定の処理時間は、ゲームを実行するためのフレームレートに対応する時間であり、
前記既定の処理時間ごとに決定される角度に基づいて、前記既定の処理時間ごとに角度及び大きさを決定するステップと、
前記既定の処理時間ごとに決定される角度及び大きさに基づいて、前記タッチパネルに表示される前記操作対象オブジェクトを制御するステップと、
を実行させる一組のプログラム。 A set of programs for a game executed on the electronic device comprising the touch panel, comprising the program of claim 10,
The predetermined processing time is a time corresponding to a frame rate for executing the game,
determining an angle and a size for each predetermined processing time based on the angle determined for each predetermined processing time;
a step of controlling the operation target object displayed on the touch panel based on the angle and size determined for each predetermined processing time;
A set of programs that run
前記既定の処理時間は、ゲームを実行するためのフレームレートに対応する時間であり、
前記既定の処理時間ごとに決定される角度に基づいて、前記既定の処理時間ごとに角度及び大きさを決定するステップと、
前記既定の処理時間ごとに決定される角度及び大きさに基づいて、前記タッチパネルに表示されるゲーム画像を撮影するための前記操作対象オブジェクトである仮想カメラを制御するステップと、
を実行させる一組のプログラム。 A set of programs for a game executed on the electronic device comprising the touch panel, comprising the program of claim 10,
The predetermined processing time is a time corresponding to a frame rate for executing the game,
determining an angle and a size for each predetermined processing time based on the angle determined for each predetermined processing time;
a step of controlling a virtual camera, which is the operation target object for capturing a game image displayed on the touch panel, based on the angle and size determined for each predetermined processing time;
A set of programs that run
前記タッチパネルへのユーザの操作により発生したタッチイベントに基づいて取得される第1の軸の値及び第2の軸の値により示されるデータポイントを保持し、
前記保持されているデータポイントのうち所定の変数に基づく特定の時間帯に保持されたデータポイントに基づいて回帰直線の傾きを決定し、
前記特定の時間帯に保持されたデータポイントの集合としての変位方向に基づいて前記決定された回帰直線の傾きを回転させる回転量を決定し、
前記決定された回帰直線の傾き及び前記決定された回転量に基づいて、前記ユーザが仮想空間内の操作対象オブジェクトを制御するための角度を決定する、
電子装置。 An electronic device comprising a touch panel,
holding data points indicated by a first axis value and a second axis value obtained based on a touch event generated by a user's operation on the touch panel;
determining a slope of a regression line based on data points retained at a particular time period based on a predetermined variable among the retained data points;
Determining a rotation amount for rotating the slope of the determined regression line based on the displacement direction as a set of data points held in the specific time period ,
determining an angle for the user to control the operation target object in the virtual space based on the determined slope of the regression line and the determined amount of rotation;
electronic device.
前記タッチパネルへのユーザの操作により発生したタッチイベントに基づいて取得される第1の軸の値及び第2の軸の値により示されるデータポイントを保持するステップと、
前記保持されているデータポイントのうち所定の変数に基づく特定の時間帯に保持されたデータポイントに基づいて回帰直線の傾きを決定するステップと、
前記特定の時間帯に保持されたデータポイントの集合としての変位方向に基づいて前記決定された回帰直線の傾きを回転させる回転量を決定するステップと、
前記決定された回帰直線の傾き及び前記決定された回転量に基づいて、前記ユーザが仮想空間内の操作対象オブジェクトを制御するための角度を決定するステップと、
を有する方法。 A method performed in an electronic device comprising a touch panel, comprising:
holding data points indicated by a first axis value and a second axis value obtained based on a touch event generated by a user's operation on the touch panel;
determining the slope of a regression line based on the retained data points held at a particular time period based on a predetermined variable ;
determining a rotation amount by which to rotate the slope of the determined regression line based on the displacement direction as a set of data points held in the specific time period ;
determining an angle for the user to control the operation target object in the virtual space based on the determined slope of the regression line and the determined amount of rotation;
How to have
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP2018133541A JP7250451B2 (en) | 2018-07-13 | 2018-07-13 | Programs, electronic devices, and methods |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP2018133541A JP7250451B2 (en) | 2018-07-13 | 2018-07-13 | Programs, electronic devices, and methods |
Related Parent Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| JP2018094656A Division JP6389581B1 (en) | 2018-05-16 | 2018-05-16 | Program, electronic apparatus, and method |
Publications (2)
| Publication Number | Publication Date |
|---|---|
| JP2019200765A JP2019200765A (en) | 2019-11-21 |
| JP7250451B2 true JP7250451B2 (en) | 2023-04-03 |
Family
ID=68611263
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| JP2018133541A Active JP7250451B2 (en) | 2018-07-13 | 2018-07-13 | Programs, electronic devices, and methods |
Country Status (1)
| Country | Link |
|---|---|
| JP (1) | JP7250451B2 (en) |
Citations (4)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| JP3734820B1 (en) | 2004-09-03 | 2006-01-11 | 任天堂株式会社 | GAME PROGRAM, GAME DEVICE, AND INPUT DEVICE |
| WO2013038630A1 (en) | 2011-09-13 | 2013-03-21 | パナソニック株式会社 | Information inputting device, and information inputting method |
| JP2014154055A (en) | 2013-02-13 | 2014-08-25 | Mitsubishi Electric Corp | Image processor and image processing method |
| JP6389581B1 (en) | 2018-05-16 | 2018-09-12 | 株式会社Cygames | Program, electronic apparatus, and method |
-
2018
- 2018-07-13 JP JP2018133541A patent/JP7250451B2/en active Active
Patent Citations (4)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| JP3734820B1 (en) | 2004-09-03 | 2006-01-11 | 任天堂株式会社 | GAME PROGRAM, GAME DEVICE, AND INPUT DEVICE |
| WO2013038630A1 (en) | 2011-09-13 | 2013-03-21 | パナソニック株式会社 | Information inputting device, and information inputting method |
| JP2014154055A (en) | 2013-02-13 | 2014-08-25 | Mitsubishi Electric Corp | Image processor and image processing method |
| JP6389581B1 (en) | 2018-05-16 | 2018-09-12 | 株式会社Cygames | Program, electronic apparatus, and method |
Also Published As
| Publication number | Publication date |
|---|---|
| JP2019200765A (en) | 2019-11-21 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| JP6389581B1 (en) | Program, electronic apparatus, and method | |
| US10761612B2 (en) | Gesture recognition techniques | |
| KR20190141748A (en) | Method and device for detecting plane and / or quadtrees for use as a virtual substrate | |
| US12121797B2 (en) | Program, electronic device, and method | |
| JP7162079B2 (en) | A recording medium for recording a method, system and computer program for remotely controlling a display device via head gestures | |
| KR20130098907A (en) | Information processing apparatus, control method thereof, and storage medium | |
| US10073609B2 (en) | Information-processing device, storage medium, information-processing method and information-processing system for controlling movement of a display area | |
| JP7250451B2 (en) | Programs, electronic devices, and methods | |
| CN118092749A (en) | Touch area determination method, device, electronic device and storage medium | |
| HK40037105A (en) | Storage medium, electronic device, and method | |
| JP7471782B2 (en) | Program, electronic device, and method | |
| HK40037105B (en) | Storage medium, electronic device, and method | |
| JP7143364B2 (en) | Method, program and electronic device | |
| JP6911216B1 (en) | Methods, programs, and electronics | |
| HK40046182A (en) | Computer readable medium, electronic device, and method | |
| JP7373090B1 (en) | Information processing system, information processing device, program and information processing method | |
| HK40046182B (en) | Computer readable medium, electronic device, and method | |
| HK40082831A (en) | Method, program, and electronic device | |
| CN117112094A (en) | Control interaction method and device, storage medium and electronic device |
Legal Events
| Date | Code | Title | Description |
|---|---|---|---|
| A621 | Written request for application examination |
Free format text: JAPANESE INTERMEDIATE CODE: A621 Effective date: 20210517 |
|
| A131 | Notification of reasons for refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A131 Effective date: 20220629 |
|
| A601 | Written request for extension of time |
Free format text: JAPANESE INTERMEDIATE CODE: A601 Effective date: 20220829 |
|
| A521 | Request for written amendment filed |
Free format text: JAPANESE INTERMEDIATE CODE: A523 Effective date: 20221027 |
|
| 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: 20230220 |
|
| A61 | First payment of annual fees (during grant procedure) |
Free format text: JAPANESE INTERMEDIATE CODE: A61 Effective date: 20230322 |
|
| R150 | Certificate of patent or registration of utility model |
Ref document number: 7250451 Country of ref document: JP Free format text: JAPANESE INTERMEDIATE CODE: R150 |
|
| R250 | Receipt of annual fees |
Free format text: JAPANESE INTERMEDIATE CODE: R250 |