Control method and control system of virtual rocker

文档序号:885641 发布日期:2021-03-23 浏览:11次 中文

阅读说明:本技术 一种虚拟摇杆的控制方法及控制系统 (Control method and control system of virtual rocker ) 是由 车晓云 于 2020-12-15 设计创作,主要内容包括:本发明涉及游戏技术领域,特别涉及一种虚拟摇杆的控制方法及控制系统,本发明的虚拟摇杆的控制方法通过匹配滑动操作经过的功能方向区域,进而响应功能方向区域的设定动作,滑动操作经过的功能方向区域均以角度为基础计算得到并实时匹配,角度是周向连续的,所以滑动操作过程中的每一个动态触点均明确对应一个功能方向区域,进而当需要连续操作相邻两个以上按键形成特殊操作指令时,只需在相邻按键对应的功能方向区域间不间断滑动便会得到精确响应,不会发生偏离和漏键,对应方向指令成功率显著提高,显著降低误操作发生的概率。(The invention relates to the technical field of games, in particular to a control method and a control system of a virtual rocker.)

1. A control method of a virtual rocker is characterized in that: providing a graphical user interface through a touch display screen of a mobile terminal, the graphical user interface comprising a mobile control area, the method comprising the steps of:

step S10: radiating at least one functional direction area to the periphery with the central point of the mobile control area;

step S20: when the sliding operation with the mobile control area as the initial position is detected, identifying a functional direction area through which the sliding operation passes;

step S30: and responding to the setting action corresponding to the functional direction area passed by the sliding operation.

2. The control method according to claim 1, characterized in that: the movement control area is a circular area.

3. The control method according to claim 1, characterized in that: the function direction area is a fan-like area with the central point of the movement control area as an end point.

4. A control method according to claim 3, characterized in that: the functional direction areas are fan-like areas with different or equal angles.

5. The control method according to claim 4, characterized in that: in step S10, radiating 8 functional direction areas to the periphery with the central point of the movement control area, and defining 8 functional direction areas as a left area, an upper right area, a lower left area, respectively; wherein the content of the first and second substances,

the angles of the upper left area, the upper area and the upper right area are the same and smaller than the angle of the lower area;

the angles of the left area and the right area are the same and larger than the angle of the lower area;

the angle sizes of the right lower area, the lower area and the left lower area are the same.

6. The control method according to claim 1, characterized in that: in step S20, the sliding operation includes a sliding operation that does not slide out of the movement control area and a sliding operation that slides out of the movement control area.

7. The control method according to claim 1, characterized in that: the center position of the movement control area displays an indicating ball;

in step S20, after the function direction area through which the sliding operation passes is identified, the indicator ball brightness is increased and moves within the movement control area in correspondence with the sliding operation.

8. The control method according to claim 1, characterized in that: the step S10 specifically includes:

step S101: recognizing a center point of the movement control area as an initial base point, setting one direction passing through the initial base point as a first direction, and setting the other direction passing through the initial base point as a second direction, the first direction and the second direction being perpendicular to each other;

step S102: identifying a first offset amount in the first direction and a second offset amount in the second direction of a target point with respect to the initial base point, and regarding a direction in which the initial base point points to the target point as a third direction; the target point is any point on the graphical user interface;

step S103: calculating an included angle between the third direction and the first direction based on the first offset and the second offset, and determining a direction value according to the included angle; wherein, the same direction value corresponds to the same functional direction area.

9. The control method according to claim 8, characterized in that: the included angle in step S103 ranges from-180 degrees to 180 degrees.

10. The control method according to claim 8, characterized in that: step S103 calculates an included angle between the third direction and the first direction based on the first offset amount and the second offset amount in the following manner:

θ=atan2(Rty,Rtx)/π×180

wherein Rty is the first offset, Rtx is the second offset, and θ is an included angle between the third direction and the first direction.

11. The control method according to claim 8, characterized in that: the step S20 specifically includes:

step S201: when the sliding operation with the mobile control area as the starting position is detected, identifying a first dynamic offset of a dynamic contact point of the sliding operation in the first direction and a second dynamic offset of the dynamic contact point in the second direction relative to the initial base point, and taking the direction in which the initial base point points to the dynamic contact point as a dynamic direction;

step S202: calculating a dynamic included angle between the dynamic direction and the first direction based on the first dynamic offset and the second dynamic offset, and determining a dynamic direction value according to the dynamic included angle;

step S203: and determining a functional direction area through which the sliding operation passes according to the dynamic direction value.

12. The control method according to claim 11, characterized in that: step S202 calculates a dynamic angle between the dynamic direction and the first direction based on the first dynamic offset and the second dynamic offset in the following manner:

θ’=atan2(Rty’,Rtx’)/π×180

wherein Rty 'is the first offset, Rtx' is the second offset, and θ is a dynamic angle between the dynamic direction and the first direction.

13. The control method according to claim 5, characterized in that: setting a specific area in the mobile control area; in step S20, when the slide operation is within the specific area, a setting operation corresponding to the specific area is responded.

14. The control method according to claim 13, characterized in that: dividing the specific area into a first area and a second area by taking the central axis of the specific area as a reference, wherein when the sliding operation is positioned in the first area, the setting action is taken as an action corresponding to the left area; and when the sliding operation is positioned in the second area, the setting action is taken as the action corresponding to the right area.

15. The control method according to claim 13, characterized in that: the ratio of the area of the specific region to the area of the movement control region is 1/9 to 1/4.

16. The control method according to claim 1, characterized in that: each functional direction area corresponds to one feedback color, and each functional direction area is correspondingly provided with a display area; the step S30 further includes the steps of:

step S301: identifying a display area corresponding to a function direction area through which the sliding operation passes;

step S302: determining a feedback color corresponding to the functional direction area;

step S303: displaying the feedback color on the display area for feedback.

17. The control method according to claim 16, characterized in that: the display area is a crescent area taking the boundary of the mobile control area as an inner arc;

the display areas are symmetrically arranged by taking an angular bisector of the functional direction area through which the sliding operation passes as a central line.

18. The control method according to claim 1, characterized in that: in step S30, vibration feedback is performed in response to the setting operation corresponding to the functional direction region through which the slide operation has passed.

19. A control system of a virtual rocker is characterized in that a graphical user interface is provided through a touch display screen of a mobile terminal, the graphical user interface comprises a mobile control area, and the control system comprises:

a direction defining module for identifying at least one functional direction area radiating to the surroundings with a center point of the movement control area;

the dynamic direction identification module is used for identifying a functional direction area through which the sliding operation passes when the sliding operation taking the mobile control area as an initial position is detected;

and the action control module is used for responding to the setting action corresponding to the functional direction area passed by the sliding operation.

[ technical field ] A method for producing a semiconductor device

The invention relates to the technical field of games, in particular to a control method and a control system of a virtual rocker.

[ background of the invention ]

Household games and street games, especially combat games, generally use 8-directional physical joysticks or keys to control characters to move on the screen, and along with the development of the electronic industry, intelligent game carriers such as smart phones are popularized, and physical joystick virtualization is brought forward.

However, when the existing virtual joystick is operated, a finger slides through a certain virtual key area, and is easy to deviate and miss keys, so that the success rate of command response is reduced, and misoperation is easy to occur.

[ summary of the invention ]

The invention provides a control method and a control system of a virtual rocker, aiming at solving the problems that the existing virtual rocker is easy to deviate and leak keys, the success rate of instruction response is reduced, and misoperation is easy to occur.

The technical scheme for solving the technical problem is to provide a control method of a virtual rocker, a graphical user interface is provided through a touch display screen of a mobile terminal, the graphical user interface comprises a mobile control area, and the method comprises the following steps: step S10: radiating at least one functional direction area to the periphery with the central point of the mobile control area; step S20: when the sliding operation with the mobile control area as the initial position is detected, identifying a functional direction area through which the sliding operation passes; step S30: and responding to the setting action corresponding to the functional direction area passed by the sliding operation.

Preferably, the movement control area is a circular area.

Preferably, the function direction area is a sector-like area having a center point of the movement control area as an end point.

Preferably, the functional direction areas are arranged as fan-like areas with different or equal angular sizes.

Preferably, in step S10, 8 functional direction areas are radiated to the periphery from the central point of the movement control area, and the 8 functional direction areas are defined as a left area, an upper right area, a lower left area, respectively; the angles of the upper left area, the upper area and the upper right area are the same and smaller than the angle of the lower area; the angles of the left area and the right area are the same and larger than the angle of the lower area; the angle sizes of the right lower area, the lower area and the left lower area are the same.

Preferably, in step S20, the sliding operation includes a sliding operation that does not slide out of the movement control area and a sliding operation that slides out of the movement control area.

Preferably, the central position of the movement control area displays an indication ball; in step S20, after the function direction area through which the sliding operation passes is identified, the indicator ball brightness is increased and moves within the movement control area in correspondence with the sliding operation.

Preferably, the step S10 specifically includes: step S101: recognizing a center point of the movement control area as an initial base point, setting one direction passing through the initial base point as a first direction, and setting the other direction passing through the initial base point as a second direction, the first direction and the second direction being perpendicular to each other; step S102: identifying a first offset amount in the first direction and a second offset amount in the second direction of a target point with respect to the initial base point, and regarding a direction in which the initial base point points to the target point as a third direction; the target point is any point on the graphical user interface; step S103: calculating an included angle between the third direction and the first direction based on the first offset and the second offset, and determining a direction value according to the included angle; wherein, the same direction value corresponds to the same functional direction area.

Preferably, the included angle in step S103 ranges from-180 ° to 180 °.

Preferably, in step S103, an included angle between the third direction and the first direction is calculated based on the first offset and the second offset in the following manner:

θ=atan2(Rty,Rtx)/π×180

wherein Rty is the first offset, Rtx is the second offset, and θ is an included angle between the third direction and the first direction.

Preferably, the step S20 specifically includes: step S201: when the sliding operation with the mobile control area as the starting position is detected, identifying a first dynamic offset of a dynamic contact point of the sliding operation in the first direction and a second dynamic offset of the dynamic contact point in the second direction relative to the initial base point, and taking the direction in which the initial base point points to the dynamic contact point as a dynamic direction; step S202: calculating a dynamic included angle between the dynamic direction and the first direction based on the first dynamic offset and the second dynamic offset, and determining a dynamic direction value according to the dynamic included angle; step S203: and determining a functional direction area through which the sliding operation passes according to the dynamic direction value.

Preferably, in step S202, the calculation manner of calculating the dynamic angle between the dynamic direction and the first direction based on the first dynamic offset and the second dynamic offset is as follows:

θ’=atan2(Rty’,Rtx’)/π×180

wherein Rty 'is the first offset, Rtx' is the second offset, and θ is a dynamic angle between the dynamic direction and the first direction.

Preferably, a specific area is set in the movement control area; in step S20, when the slide operation is within the specific area, a setting operation corresponding to the specific area is responded.

Preferably, the specific area is divided into a first area and a second area by taking the central axis of the specific area as a reference, and when the sliding operation is located in the first area, the setting action is taken as an action corresponding to the left area; and when the sliding operation is positioned in the second area, the setting action is taken as the action corresponding to the right area.

Preferably, the ratio of the area of the specific region to the area of the movement control region is 1/9 to 1/4.

Preferably, each functional direction area corresponds to one feedback color, and each functional direction area is correspondingly provided with a display area; the step S30 further includes the steps of: step S301: identifying a display area corresponding to a function direction area through which the sliding operation passes; step S302: determining a feedback color corresponding to the functional direction area; step S303: displaying the feedback color on the display area for feedback.

Preferably, the display area is a crescent area taking the boundary of the movement control area as an inner arc; the display areas are symmetrically arranged by taking an angular bisector of the functional direction area through which the sliding operation passes as a central line.

Preferably, in step S30, vibration feedback is performed in response to a setting operation corresponding to a functional direction region through which the slide operation has passed.

The present invention further provides a control system of a virtual joystick to solve the above technical problem, wherein a graphical user interface is provided through a touch display screen of a mobile terminal, the graphical user interface includes a mobile control area, and the control system includes: a direction defining module for identifying at least one functional direction area radiating to the surroundings with a center point of the movement control area; the dynamic direction identification module is used for identifying a functional direction area through which the sliding operation passes when the sliding operation taking the mobile control area as an initial position is detected; and the action control module is used for responding to the setting action corresponding to the functional direction area passed by the sliding operation.

Compared with the prior art, the control method and the control system of the virtual rocker have the following advantages:

1. the control method of the virtual rocker of the invention firstly radiates at least one function direction area to the periphery by the central point of the mobile control area, then identifies the function direction area passed by the sliding operation when the sliding operation with the mobile control area as the initial position is detected, and finally responds to the set action corresponding to the function direction area passed by the sliding operation, the function direction area passed by the sliding operation is calculated and matched in real time on the basis of the angle, the angle is circumferentially continuous, so each dynamic contact in the sliding operation process clearly corresponds to one function direction area, when more than two adjacent keys are required to be continuously operated to form a special operation instruction, the accurate response can be obtained only by continuously sliding between the function direction areas corresponding to the adjacent keys, no deviation and key leakage occur, the success rate of the corresponding direction instruction is obviously improved, the probability of misoperation is obviously reduced.

2. The functional direction area of the control method of the virtual rocker is set to be the sector-like area with different or equal angles, and through the design, the functional direction area which is easy to touch by mistake can be subjected to angle contraction correction, so that the misoperation probability is reduced, for example, the functional direction area jumping upwards is obviously reduced, and the phenomenon that a virtual game object jumps in a messy way after the angle contraction.

3. The control method of the virtual rocker takes the mobile control area as the sliding operation of the initial position, comprises the sliding operation of not sliding out of the mobile control area and the sliding operation of sliding out of the mobile control area, namely only the initial position of the sliding operation is defined, and the initial position can deviate from the mobile control area, thereby further reducing the occurrence of key leakage and improving the fault tolerance rate.

4. According to the control method of the virtual rocker, the indication ball is displayed in the center of the mobile control area, after the functional direction area where the sliding operation passes is identified, the brightness of the indication ball is increased and the indication ball moves in the mobile control area corresponding to the sliding operation, and therefore the effectiveness of the sliding operation can be prompted to a user in time through the design, and the user experience is improved.

5. The control method of the virtual rocker of the invention sets a specific area in the movement control area, the area of the specific area is smaller than that of the movement control area, in step S20, when the sliding operation is positioned in the specific area, the sliding operation triggers the virtual game object to respond to the setting action corresponding to the specific area, and the design enables the central area which is mixed in the direction of the movement control area and is difficult to be distinguished by finger touch to only respond to the setting action, thereby further reducing the misoperation rate.

6. The control method of the virtual rocker performs feedback according to the feedback mode corresponding to the function direction, and timely prompts that the operation of the user is effective or ineffective through the design so as to timely take further operation and greatly improve the user experience.

7. The invention also provides a control system of the virtual rocker, which has the same beneficial effects as the control method of the virtual rocker and is not repeated herein.

[ description of the drawings ]

In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the drawings needed to be used in the embodiments or the prior art descriptions will be briefly described below, and it is obvious that the drawings in the following description are only some embodiments of the present invention, and it is obvious for those skilled in the art to obtain other drawings based on these drawings without inventive exercise.

FIG. 1 is a flowchart illustrating steps of a method for controlling a virtual joystick according to a first embodiment of the present invention.

Fig. 2 is a diagram illustrating an example of a sliding operation recognition method of a virtual stick according to a first embodiment of the present invention.

Fig. 3 is a first flowchart illustrating a step S10 in the method for controlling a virtual joystick according to the first embodiment of the present invention.

Fig. 4 is an exemplary diagram of the identification direction value of a control method of the virtual joystick according to the first embodiment of the present invention.

Fig. 5 is a flowchart illustrating a step S10 in the method for controlling a virtual joystick according to the first embodiment of the present invention.

FIG. 6 is a diagram illustrating an exemplary adjustment of the functional direction area of a control method for a virtual joystick according to a first embodiment of the present invention.

FIG. 7 is a diagram illustrating specific regions of a control method for a virtual joystick according to a first embodiment of the present invention.

Fig. 8 is a flowchart illustrating a step S20 in the method for controlling a virtual joystick according to the first embodiment of the present invention.

FIG. 9 is a diagram illustrating an example of identifying dynamic direction values of a control method for a virtual joystick according to a first embodiment of the present invention.

FIG. 10 is a diagram illustrating an example of an indicating ball and color feedback of a method for controlling a virtual joystick according to a first embodiment of the present invention.

Fig. 11 is a schematic structural diagram of a control system of a virtual joystick according to a second embodiment of the present invention.

The attached drawings indicate the following:

40. a mobile terminal; 401. a graphical user interface; 402. a mobile control area; 403. a specific region; 404. an indicator ball; 405. a display area; 4031. a first region; 4032. a second region;

50. a control system; 501. a direction defining module; 502. a dynamic direction identification module; 503. and an action control module.

[ detailed description ] embodiments

In order to make the objects, technical solutions and advantages of the present invention more apparent, the present invention will be described in further detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative of the invention and are not intended to limit the invention.

The terms "vertical," "horizontal," "left," "right," "up," "down," "left up," "right up," "left down," "right down," and the like as used herein are for illustrative purposes only.

Referring to fig. 1, a first embodiment of the present invention provides a method for controlling a virtual joystick, in which a graphical user interface is provided through a touch display screen of a mobile terminal, the graphical user interface includes a mobile control area, and the method includes the following steps:

step S10: radiating at least one functional direction area to the periphery by moving the central point of the control area;

step S20: when the sliding operation taking the mobile control area as the initial position is detected, identifying a functional direction area through which the sliding operation passes;

step S30: and responding to the setting action corresponding to the functional direction area passed by the sliding operation.

Optionally, the Mobile terminal in this embodiment may be various devices such as a Mobile phone, a Mobile tablet, a Personal Digital Assistant (PDA), a Mobile Internet Device (MID), a television, and the like, which are all the more popular in work and life; among other things, the mobile terminal may support network technologies including, but not limited to: global System for Mobile Communications (GSM), General Packet Radio Service (GPRS), Code Division Multiple Access (CDMA), wideband Code Division Multiple Access (W-CDMA), CDMA2000, IMT Single Carrier (IMT Single Carrier), Enhanced Data rate GSM Evolution (Enhanced Data Rates for GSM Evolution, EDGE), Long-Term Evolution (Long-Term Evolution, LTE), advanced Long-Term Evolution (LTE), Time-Division Long-Term Evolution (Time-Division LTE, TD-LTE), High-Performance Radio Local Area Network (High-Performance Radio Local Area Network, High-Performance lan), High-Performance wide Area Network (High wan), Local multi-point dispatch Service (Local multi-point dispatch, LMDS), worldwide interoperability for microwave (OFDM), bluetooth (orthogonal frequency Division multiplexing), and bluetooth (orthogonal frequency Division multiplexing) technologies, High capacity spatial division multiple access (HC-SDMA), Universal Mobile Telecommunications System (UMTS), universal mobile telecommunications system time division duplex (UMTS-TDD), evolved high speed packet access (HSPA +), time division synchronous code division multiple access (TD-SCDMA), evolution data optimized (EV-DO), Digital Enhanced Cordless Telecommunications (DECT), and others.

Optionally, the control method of the virtual joystick in this embodiment may be executed in a terminal device or a server.

It will be appreciated that as an embodiment, the terminal device may be a local terminal device, such as a mobile terminal as described above. The local terminal device stores a game program and is used for presenting a game screen. The local terminal device is used for interacting with a user through a graphical user interface, namely, a game program is downloaded and installed and operated through the electronic device conventionally. The manner in which the local terminal device provides the graphical user interface to the user may include a variety of ways, for example, it may be rendered for display on a display screen of the terminal or provided to the user by holographic projection. For example, the local terminal device may include a display screen for presenting a graphical user interface including a game screen and a processor for running the game, generating the graphical user interface, and controlling display of the graphical user interface on the display screen.

It is understood that, as an embodiment, when the control method of the virtual joystick is operated as a server, a cloud game may be used. In the running mode of the cloud game, the storage and running of the control method of the virtual joystick are finished on a cloud game server, and a cloud game client is used for receiving and sending data and presenting game pictures; the game data processing is performed by the cloud game server serving as a cloud. When a game is played, a user operates the cloud game client to send an operation instruction to the cloud game server, the cloud game server runs the game according to the operation instruction, data such as game pictures and the like are encoded and compressed, the data are returned to the cloud game client through a network, and finally the data are decoded through the cloud game client and the game pictures are output.

Alternatively, the movement control area may be a circular area or a regular polygonal area; specifically, the movement control area is a circular area in the embodiment of the present invention.

Specifically, the function direction area is a sector-like area with the central point of the movement control area as an end point, the sector-like area takes two rays extending out of the end point as two side boundaries, and a boundary of the graphical user interface enclosed by the two rays extending outwards is a boundary far away from the end point. When the mobile control area is circular, the end point of the function direction area is the circle center of the mobile control area; when the movement control region is a regular polygon, the end point of the functional direction region is the geometric center of the regular polygon.

It can be understood that the sector areas corresponding to the functional direction areas may be different according to the different shapes of the gui and the different positions of the mobile control areas.

It can be understood that the sliding operation is generally performed by a finger, an initial drop point of the finger is a starting position of the moving operation, when the initial drop point of the finger is located in the movement control area, the functional direction area through which the sliding operation passes is identified in real time, and a finger contact point in the sliding process may be any point in the graphical user interface, that is, the sliding operation may be a sliding operation that does not slide out of the movement control area, or a sliding operation that slides out of the movement control area.

It can be understood that one function direction area may correspond to one setting action; or, a plurality of functional direction areas can correspond to one setting action; or, one function direction area is set to correspond to one first-layer setting action and a plurality of function direction areas are set to correspond to one second-layer setting action at the same time, and the first-layer setting action or the second-layer setting action is selected to respond by setting a speed threshold of sliding operation. For example, one function direction area (may be referred to as a first function direction area) may be set as a forward movement corresponding to the first floor setting operation, another adjacent function direction area (may be referred to as a second function direction area) may be set as a jump movement corresponding to the first floor setting operation, the first function direction area and the second function direction area may be set to correspond to the second floor movement together as a kicking movement, and when a sliding operation slides from the first function direction area to the second function direction area at a speed less than a speed threshold value, the forward movement and the jump movement are selected to be responded in sequence; a responsive fly-kick action is selected when the sliding operation slides from the first functional directional region and to the second functional directional region at a speed greater than a speed threshold.

Referring to fig. 1 and fig. 2, an example is given in the present embodiment, a graphical user interface 401 is provided through a touch display screen of a mobile terminal 40, the graphical user interface 401 includes a movement control area 402, the movement control area 402 may be a circular area, a center point of the movement control area 402 may be a circle center O, and at least one function direction area is radiated to the periphery by the circle center O, such as N1, N2, or N3 shown in fig. 2; assuming that the starting position is point P, point P is in the movement control region 402 and in the function direction region N3, assuming that the ending position is point P ', point P ' is in the function direction region N1 but not in the movement control region 402, when a sliding operation is detected with the starting position being point P, the ending position being point P ', and the trajectory being point s, the function direction region N3-N2-N1 through which the sliding operation s passes is identified, and the virtual game object is controlled to respond to the setting operation corresponding to the function direction region.

It should be understood that the virtual game object may respond to three different setting actions corresponding to the function direction regions N3, N2, N1 one by one, or may respond to one setting action corresponding to the function direction regions N3, N2, N1 in common. The functional direction areas N3, N2 and N1 through which the sliding operation s passes are calculated on the basis of angles and are matched in real time, the angles are circumferentially continuous, so that each dynamic contact on the sliding operation s clearly corresponds to one functional direction area, when more than two adjacent keys are required to be continuously operated to form a special operation instruction, accurate response can be obtained only by uninterruptedly sliding among the functional direction areas N3, N2 and N1 corresponding to the adjacent keys, deviation and key leakage cannot occur, the success rate of the corresponding direction instruction is remarkably improved, and the probability of misoperation is remarkably reduced. In addition, the sliding operation s only defines that the starting position P point is located in the movement control area 402, and the function direction areas N3, N2, N1 all extend outward in a fan shape to the boundary of the gui 401, so that the sliding operation s does not slide out of the movement control area 402 when passing through the function direction area N3, and the function direction area N3 can be identified; when the sliding operation s slides out of the movement control area 402 while passing through the functional direction areas N2, N1, the functional direction areas N2, N1 can be identified, and the fault tolerance is further improved.

Referring to fig. 3, as an embodiment, the step S10 specifically includes:

step S101: recognizing a central point of the movement control area as an initial base point, setting one direction passing through the initial base point as a first direction, and setting the other direction passing through the initial base point as a second direction, wherein the first direction and the second direction are perpendicular to each other;

step S102: identifying a first offset amount in a first direction and a second offset amount in a second direction of the target point with respect to the initial base point, and regarding a direction in which the initial base point points to the target point as a third direction; the target point is any point on the graphical user interface;

step S103: calculating an included angle between the third direction and the first direction based on the first offset and the second offset, and determining a direction value according to the included angle; wherein, the same direction value corresponds to the same functional direction area.

It will be appreciated that the first direction and the second direction are both in the same plane as the movement control area. When the mobile control area is circular, the initial base point is the circle center of the mobile control area, and the first direction and the second direction are intersected at the circle center and are mutually vertical; when the movement control area is a regular polygon, the initial base point is a geometric center of the regular polygon, and the first direction and the second direction intersect at the geometric center and are perpendicular to each other.

It is understood that the target point is any point on the graphical user interface, including any point inside the movement control area and outside the movement control area, and the third direction may be any circumferential direction.

It is to be understood that, by establishing a rectangular coordinate system with the initial base point as the origin of coordinates with the first and second directions as the two coordinate axes, respectively, the first offset amount may be a positive value or a negative value, and the second offset amount may be a positive value or a negative value.

Referring to fig. 3 and 4, in this embodiment, an example is provided, a graphical user interface 401 is provided through a touch display screen of a mobile terminal 40, the graphical user interface 401 includes a movement control area 402, the movement control area 402 may be circular, a center point of the movement control area 402 may be a circle center O, a first direction may be a vertical downward direction, a second direction may be a direction perpendicular to the first direction and horizontal rightward, a rectangular coordinate system is established with the second direction being an x-axis, the first direction being a y-axis, and the circle center O being a coordinate origin, a target point a is any point on the graphical user interface, a direction in which the circle center O points to the target point a is a third direction, a first offset of the target point a in the first direction is Rty, a second offset of the target point a in the second direction is Rtx, and an included angle between the third direction and the first direction is θ.

Specifically, the included angle θ can be calculated from the first offset Rty and the second offset Rtx by the following algorithm:

θ=atan2(Rty,Rtx)/π×180

it will be appreciated that the included angle theta ranges from-180 deg. to 180 deg..

It can be understood that the direction value can be obtained by rounding the ratio of the included angle θ to any preset angle, and the optional angle can be selected from the range of 0 ° to 180 °.

Optionally, the preset arbitrary angle is 90 °, 4 direction values are obtained through mapping, and the graphical user interface 401 is correspondingly divided into 4 functional direction areas, so that a 4-direction virtual rocker is realized; presetting any angle as 45 degrees, obtaining 8 direction values through mapping, and correspondingly dividing the graphical user interface 401 into 8 functional direction areas, thereby realizing an 8-direction virtual rocker.

When the preset arbitrary angle is 90 degrees, the calculation formula is as follows:

direction value round (theta/90, 0)

When the preset arbitrary angle is 45 degrees, the calculation formula is as follows:

direction value round (theta/45, 0)

Specifically, please refer to the following table, in the embodiment of the present invention, the preset arbitrary angle is 45 °, 8 direction values are obtained through mapping, and the graphical user interface 401 is correspondingly divided into 8 functional direction areas, so as to implement an 8-direction virtual joystick.

Further, the functional direction areas are set as fan-like areas with different or equal angular sizes.

As can be understood, each functional direction area corresponds to an angle range, the sum of the angle ranges corresponding to each functional direction area is 360 °, and the angle sizes of each functional direction area can be set to be the same; or setting the angle of each functional direction area to be different; or the angles of one group of functional direction areas are the same in size and are different from the angles of the other group of functional direction areas in size.

Referring to fig. 5, as an embodiment, the step S103 further includes:

step S104: adjusting the size of a functional direction area corresponding to one or more direction values according to a preset included angle, and simultaneously adjusting the size of the preset functional direction area; the adjustment mode of the function direction area corresponding to one or more direction values is opposite to that of the preset function direction area.

It is to be understood that the expansion or reduction adjustment may be performed for one function direction region corresponding to one direction value, or may be performed for a plurality of different function direction regions corresponding to a plurality of direction values. The preset function direction area is selected from other residual function direction areas which are not expanded or reduced in a targeted manner, and the preset function direction area and the function direction area which is adjusted in a targeted manner are opposite in adjustment mode, so that the function direction areas are circumferentially continuous and are not overlapped. For example, if the function direction area for the targeted adjustment is narrowed, the preset function direction area is enlarged; and expanding and adjusting the function direction area of the targeted adjustment, and then reducing and adjusting the preset function direction area.

Referring to fig. 5 and fig. 6, an example is given in this embodiment, specifically, the graphical user interface 401 is correspondingly divided into 8 function direction areas, and the direction values "-3", "4", "3", "-2", "-1", "0", "1" correspond to the function direction areas M1, M2, M3, M4, M5, M6, M7, and M8, which are 8 areas of the 8 function direction areas that represent upper left, upper right, upper left, right, lower left, lower right, and lower right, a reduction adjustment is performed on the upper left area M1, the upper area M2, and the upper right area M3, and a preset left area M4 and a preset right area M5 are simultaneously performed an expansion adjustment, and a calculation formula is as follows:

when the angle theta is more than or equal to 85 degrees,

direction value of round (4- (180-theta)/38, 0)

When theta is less than or equal to-85 degrees,

direction value ═ round (-4- (-180-theta)/38, 0)

It is understood that the upper left region M1 corresponding to the orientation value "-3" is reduced and adjusted from the original angle range α 1(-112.5 ° -157.5 °) to α 1 '(-123 ° -161 °), the upper region M2 corresponding to the orientation value "4" is reduced and adjusted from the original angle range α 2(-157.5 ° -180 °), 157.5 ° -180 °) to α 2' (-161 ° -180 °, 161 ° -180 °), the upper right region M3 corresponding to the orientation value "3" is reduced and adjusted from the original angle range α 3(112.5 ° -157.5 °) to α 3 '(123 ° -161 °), the left region M4 corresponding to the orientation value "-2" is expanded and adjusted from the original angle range α 4(-67.5 ° -112.5 °) to α 4' (-67.5 ° -123 °), the right region M5 corresponding to the orientation value "2" is expanded and adjusted from the original angle range α 5(67.5 ° -112.5 °) to α 5 ° -123 ° -67,67,67,67,67,67,67,67,67, the angular range of the lower left region M6 corresponding to the orientation value "-1" was unchanged from (-22.5 ° to-67.5 °), the angular range of the lower region M7 corresponding to the orientation value "0" was unchanged from (-22.5 ° to 22.5 °), and the angular range of the lower right region M8 corresponding to the orientation value "1" was unchanged from (22.5 ° to 67.5 °). It can be seen that the angular sizes of the upper left region M1, the upper region M2 and the upper right region M3 are the same and smaller than the angular size of the lower region M7; the angle of the left region M4 and the angle of the right region M5 are the same and larger than the angle of the lower region M7; the right lower region M6, the lower region M7, and the left lower region M8 have the same angular size. By performing the angle narrowing adjustment of the areas M1, M2, and M3 in the above manner, the probability of erroneous operation can be reduced, and in a general game, jumping motions are usually set in the upper left area M1, the upper area M2, and the upper right area M3, and after the angle narrowing, the phenomenon that the virtual game object jumps around is significantly reduced.

Further, as an implementation manner, a specific area is set in the movement control area, and the area of the specific area is smaller than that of the movement control area; in step S20, when the slide operation is within the specific area, the slide operation triggers a setting operation of the virtual game object in response to the specific area.

It will be appreciated that the particular zone falls entirely within the movement control zone.

Alternatively, the specific region may be a circular region or a regular polygonal region.

Specifically, in the embodiment of the present invention, the specific region is a circular region.

Optionally, the ratio of the area of the specific region to the area of the movement control region is 1/9-1/4.

Specifically, in the embodiment of the present invention, the ratio of the area of the specific region to the area of the movement control region is 1/4.

It can be understood that the sliding operation is a sliding operation with the movement control area as a starting position, and when any point in the sliding operation process falls into the specific area, the virtual game object is triggered to respond to the setting action corresponding to the specific area.

Specifically, in the embodiment of the present invention, the setting action corresponding to the specific area is a leftward movement or a rightward movement.

Referring to fig. 6 and 7, in this embodiment, an example is given, in which the movement control area 402 may be a circle, a center point of the movement control area 402 may be a center O, the specific area 403 may be a circle and concentric with the movement control area 402, a radius of the movement control area 402 is R, a radius of the specific area 403 is R, and R is smaller than R. The first direction may be a vertical downward direction and is on an axial line in the specific region 403, the second direction may be a direction perpendicular to the first direction and horizontal rightward, a rectangular coordinate system is established with the second direction as an x-axis, the first direction as a y-axis, and the center O as a coordinate origin, the y-axis divides the specific region 403 into two symmetric regions, i.e., a first region 4031 and a second region 4032, and the specific target point B is a point in the sliding operation process and is any point in the specific region 403, and may be set as follows:

when the offset of the specific target point B in the second direction is smaller than 0, that is, when the specific target point B is located in the first area 4031, triggering the virtual game object to respond to the action corresponding to the left area M4;

when the offset of the specific target point B in the second direction is greater than 0, that is, the specific target point B is located in the second area 4032, the virtual game object is triggered to respond to the action corresponding to the right area M5.

It can be understood that, since the specific area 403 includes a central area in the movement control area, which is mixed in direction and difficult to distinguish by finger touch, the specific area 403 is set to only respond to limited actions in the above manner, and the misoperation rate is further reduced.

Referring to fig. 8, as an embodiment, the step S20 specifically includes:

step S201: when the sliding operation with the mobile control area as the initial position is detected, identifying a first dynamic offset of a dynamic contact point of the sliding operation relative to an initial base point in a first direction and a second dynamic offset in a second direction, and taking the direction in which the initial base point points to the dynamic contact point as a dynamic direction;

step S202: calculating a dynamic included angle between the dynamic direction and the first direction based on the first dynamic offset and the second dynamic offset, and determining a dynamic direction value according to the dynamic included angle;

step S203: and determining a functional direction area through which the sliding operation passes according to the dynamic direction value.

It can be understood that the initial position of the sliding operation is an invalid operation when the initial position is outside the movement control area, and the sliding operation is not further identified; when the initial position of the sliding operation is located in the mobile control area, the dynamic contact of the sliding operation is identified in real time, the dynamic contact can be any point on the graphical user interface, including any point in the mobile control area and any point outside the mobile control area, and the dynamic direction can be any circumferential direction.

It is to be understood that, by establishing a rectangular coordinate system with the first direction and the second direction as two coordinate axes and the initial base point as the origin of coordinates, the first dynamic offset amount may be a positive value or a negative value, and the second dynamic offset amount may be a positive value or a negative value.

Referring to fig. 8 and fig. 9, in this embodiment, a point Q is any point in the movement control area 402, a point Q ' is any point on the gui 401, s ' is a sliding operation track from the point Q to the point Q ', a starting position Q of the sliding operation s ' is in the movement control area 402, the sliding operation s ' is valid, any dynamic contact C on the sliding operation s ' is identified in real time, a direction in which the center O points to the dynamic contact C is a dynamic direction, a first dynamic offset of the dynamic contact C in the first direction is Rty ', a second dynamic offset of the dynamic contact C in the second direction is Rtx ', and a dynamic angle between the dynamic direction and the first direction is θ '.

It will be appreciated that the dynamic angle θ ' can be calculated from the first dynamic offset Rty ' and the second dynamic offset Rtx ' by an arctangent function, as follows:

θ’=atan2(Rty’,Rtx’)/π×180

it will be appreciated that the dynamic angle theta' ranges from-180 deg. to 180 deg..

It is understood that the dynamic direction value can be obtained by rounding the ratio of the dynamic included angle θ' to any preset angle.

When the preset arbitrary angle is 90 degrees, the calculation formula is as follows:

dynamic direction value of round (theta'/90, 0)

When the preset arbitrary angle is 45 degrees, the calculation formula is as follows:

dynamic direction value of round (theta'/45, 0)

Specifically, in the embodiment of the present invention, the preset arbitrary angle is 45 °, the same direction value as the dynamic direction value among the 8 direction values is identified, and the functional direction area corresponding to this direction value among the 8 functional direction areas is identified as the functional direction area through which the sliding operation s' passes.

Further, as an embodiment, the center position of the movement control area displays an indication ball; in step S20, after the function direction region through which the slide operation passes is identified, the pointing ball brightness increases and moves within the movement control region in accordance with the slide operation.

Alternatively, the color of the indicating ball may be a bright color such as red, orange, yellow, etc. to provide a better visual cue for the user.

Specifically, in the present embodiment, the color of the indicator ball is red.

It can be understood that, when there is no sliding operation with the movement control area as the starting position, the center of the indication ball is the center of the movement control area, and at this time, the brightness of the indication ball is darker; when a sliding operation with the movement control area as a starting position occurs, after the functional direction area through which the sliding operation passes is identified, the brightness of the indication ball is increased and the indication ball moves in the movement control area corresponding to the sliding operation.

Alternatively, the indication ball may be located entirely within the movement control area after movement; alternatively, the center and a part of the indication ball are located within the movement control area, and the other part of the indication ball is located outside the movement control area.

Referring to fig. 10, in the present embodiment, an example is given, in which an indication ball 404 is displayed at a center position of a movement control area 402, a specific area 403 is set in the movement control area 402, when there is no sliding operation with the movement control area as a starting position, the indication ball 404 is located in the specific area 403, the center of the indication ball 404 is the center of the movement control area 402, the specific area 403, and the indication ball 404 are concentric, and at this time, the brightness of the indication ball is darker; when a sliding operation with the movement control region 404 as a start position passes through the upper region M2, upon recognition of the function direction region through which this sliding operation passes, i.e., upon recognition of the upper region M2, the brightness of the indicator ball 404 increases and moves to the boundary of the movement control region 402 within the upper region M2, at which time the center of the indicator ball 404 is located within the boundary of the movement control region 402, and the indicator ball 404 is located partially within the boundary of the movement control region 402 and partially outside the boundary of the movement control region 402.

Further, as an embodiment, each function direction area corresponds to one feedback color, and each function direction area corresponds to a display area, the step S30 further includes the following steps:

step S301: identifying a display area corresponding to a function direction area through which a sliding operation passes;

step S302: determining a feedback color corresponding to the functional direction area;

step S303: and displaying a feedback color on the display area for feedback.

By setting color feedback, the user is visually and timely prompted that the operation is effective or ineffective so as to timely take further operation and greatly improve the user experience.

It can be understood that, when there is no sliding operation with the movement control area as the starting position, the display areas corresponding to all the functional direction areas are in a hidden state; when the sliding operation with the movement control area as the initial position occurs, the feedback color is displayed only in the display area corresponding to the function direction area where the sliding operation is currently located, and the display areas corresponding to the other function direction areas are in a hidden state.

It is to be understood that the display area is disposed corresponding to the direction area, and the display area may be disposed inside the movement control area, or may be disposed outside the movement control area, or both inside and outside the movement control area.

Optionally, the display area is one of a crescent area, a triangular area and a trapezoidal area, and is symmetrically arranged with an angular bisector of the functional direction area through which the sliding operation passes as a center line.

Specifically, in the embodiment of the present invention, the display area is set as a crescent area outside the movement control area, and the boundary of the movement control area is used as an inner arc, and the angle size corresponding to the inner arc is greater than the angle size of the function direction area corresponding to the display area, and is preferably 180 °.

It can be understood that the feedback colors corresponding to the different directional regions are different for more intuitive feedback operation. In order to better improve the user experience, the cold and warm color systems can be selected to distinguish different direction areas.

Referring to fig. 10, in the present embodiment, an example is given, when there is no sliding operation with the movement control area 402 as the starting position, all the display areas are in the hidden state; when the slide operation with the movement control region 402 as the start position is slid into the upper region M2, the feedback color is displayed only in the display region 405 corresponding to the upper region M2, and the display regions corresponding to the remaining functional direction regions are in a hidden state; the display area 405 is a crescent-shaped area, the inner arc of the display area 405 is one section of the boundary of the movement control area 402, and the display area 405 is symmetrically arranged by taking the angular bisector n of the upper area M2 as a central line; the inner arc of the display area 405 corresponds to an angular size greater than the angular size of the upper area M2, preferably 180 °.

Further, in step S30, the virtual game object is controlled to perform vibration feedback in response to the setting action corresponding to the functional direction area through which the sliding operation passes, and the user is prompted to be effective or ineffective in a tactile sense by setting the vibration feedback, so that further operation can be performed in time, and the user experience can be further improved.

It is to be understood that, when the sliding operation performs the vibration feedback once every time the functional direction region is changed, the same vibration intensity or different vibration intensities may be set for the respective functional direction regions, and when the functional direction region is changed, the vibration intensity in response to leaving the functional direction region or the vibration intensity in response to entering the functional direction region may be set.

Those skilled in the art will appreciate that all or part of the steps of the above-described embodiments are implemented as computer programs executed by a CPU. When the computer program is executed by the CPU, the program for executing the above-mentioned functions defined by the above-mentioned method provided by the present invention may be stored in a computer-readable storage medium, which may be a read-only memory, a magnetic or optical disk, or the like.

Referring to fig. 11, a control system 50 of a virtual joystick according to a second embodiment of the present invention is provided, where the control system 50 is configured to execute the control method of the virtual joystick according to the first embodiment of the present invention, and provide a graphical user interface through a touch display screen of a mobile terminal, where the graphical user interface includes a movement control area, and the control system 50 includes:

a direction defining module 501 for identifying at least one functional direction area radiating to the surroundings with the center point of the mobile control area;

a dynamic direction identification module 502, configured to identify a functional direction area through which a sliding operation passes in response to detecting the sliding operation using the mobile control area as an initial position;

and an action control module 503, configured to respond to the setting action corresponding to the function direction area through which the sliding operation passes.

Further, the direction defining module 501 further includes an angle modification sub-module, configured to adjust the size of the functional direction area corresponding to one or more direction values in response to a preset included angle, and adjust the size of the preset functional direction area at the same time.

Further, the direction defining module 501 further includes a specific area sub-module, configured to trigger the virtual game object to respond to a setting action corresponding to the specific area when the sliding operation is located in the specific area.

Further, the motion control module 503 further includes a color feedback sub-module for displaying a feedback color on the display area for feedback.

Further, the motion control module 503 further includes a vibration feedback sub-module for performing vibration feedback while controlling the setting motion corresponding to the functional direction region through which the virtual game object passes in response to the sliding operation.

Further, the motion control module 503 further includes a speed recognition sub-module for responding to different setting motions corresponding to the same functional direction area.

Compared with the prior art, the control method and the control system of the virtual rocker have the following advantages:

1. the control method of the virtual rocker of the invention firstly radiates at least one function direction area to the periphery by the central point of the mobile control area, then identifies the function direction area passed by the sliding operation when the sliding operation with the mobile control area as the initial position is detected, and finally responds to the set action corresponding to the function direction area passed by the sliding operation, the function direction area passed by the sliding operation is calculated and matched in real time on the basis of the angle, the angle is circumferentially continuous, so each dynamic contact in the sliding operation process clearly corresponds to one function direction area, when more than two adjacent keys are required to be continuously operated to form a special operation instruction, the accurate response can be obtained only by continuously sliding between the function direction areas corresponding to the adjacent keys, no deviation and key leakage occur, the success rate of the corresponding direction instruction is obviously improved, the probability of misoperation is obviously reduced.

2. The functional direction area of the control method of the virtual rocker is set to be the sector-like area with different or equal angles, and through the design, the functional direction area which is easy to touch by mistake can be subjected to angle contraction correction, so that the misoperation probability is reduced, for example, the functional direction area jumping upwards is obviously reduced, and the phenomenon that a virtual game object jumps in a messy way after the angle contraction.

3. The control method of the virtual rocker takes the mobile control area as the sliding operation of the initial position, comprises the sliding operation of not sliding out of the mobile control area and the sliding operation of sliding out of the mobile control area, namely only the initial position of the sliding operation is defined, and the initial position can deviate from the mobile control area, thereby further reducing the occurrence of key leakage and improving the fault tolerance rate.

4. According to the control method of the virtual rocker, the indication ball is displayed in the center of the mobile control area, after the functional direction area where the sliding operation passes is identified, the brightness of the indication ball is increased and the indication ball moves in the mobile control area corresponding to the sliding operation, and therefore the effectiveness of the sliding operation can be prompted to a user in time through the design, and the user experience is improved.

5. The control method of the virtual rocker of the invention sets a specific area in the mobile control area, the area of the specific area is smaller than that of the mobile control area, in step S20, when the sliding operation is positioned in the specific area, the sliding operation triggers the virtual game object to respond to the set action corresponding to the specific area, and the design enables the central area which is mixed in the directions of the mobile control area and is difficult to distinguish by finger touch to only respond to the set action, thereby further reducing the misoperation rate.

6. The control method of the virtual rocker performs feedback according to the feedback mode corresponding to the function direction, and timely prompts that the operation of the user is effective or ineffective through the design so as to timely take further operation and greatly improve the user experience.

7. The invention also provides a control system of the virtual rocker, which has the same beneficial effects as the control method of the virtual rocker and is not repeated herein.

The control method and the control system for the virtual rocker disclosed by the embodiment of the invention are described in detail, a specific example is applied in the text to explain the principle and the implementation mode of the invention, and the description of the embodiment is only used for helping to understand the method and the core idea of the invention; meanwhile, for the persons skilled in the art, according to the idea of the present invention, there may be variations in the specific embodiments and the application scope, and in summary, the content of the present description should not be construed as a limitation to the present invention, and any modification, equivalent replacement, and improvement made within the principle of the present invention should be included in the protection scope of the present invention.

22页详细技术资料下载
上一篇:一种医用注射器针头装配设备
下一篇:一种软件控制的沉浸式体验仓及其使用方法

网友询问留言

已有0条留言

还没有人留言评论。精彩留言会获得点赞!

精彩留言,会给你点赞!

技术分类