CN111773720A - Virtual object control method and device, storage medium and electronic device - Google Patents

Virtual object control method and device, storage medium and electronic device Download PDF

Info

Publication number
CN111773720A
CN111773720A CN202010724387.0A CN202010724387A CN111773720A CN 111773720 A CN111773720 A CN 111773720A CN 202010724387 A CN202010724387 A CN 202010724387A CN 111773720 A CN111773720 A CN 111773720A
Authority
CN
China
Prior art keywords
virtual object
touch operation
point
touch
user interface
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.)
Pending
Application number
CN202010724387.0A
Other languages
Chinese (zh)
Inventor
刘海岩
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Netease Hangzhou Network Co Ltd
Original Assignee
Netease Hangzhou Network Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Netease Hangzhou Network Co Ltd filed Critical Netease Hangzhou Network Co Ltd
Priority to CN202010724387.0A priority Critical patent/CN111773720A/en
Publication of CN111773720A publication Critical patent/CN111773720A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • AHUMAN NECESSITIES
    • A63SPORTS; GAMES; AMUSEMENTS
    • A63FCARD, BOARD, OR ROULETTE GAMES; INDOOR GAMES USING SMALL MOVING PLAYING BODIES; VIDEO GAMES; GAMES NOT OTHERWISE PROVIDED FOR
    • A63F13/00Video games, i.e. games using an electronically generated display having two or more dimensions
    • A63F13/55Controlling game characters or game objects based on the game progress
    • A63F13/57Simulating properties, behaviour or motion of objects in the game world, e.g. computing tyre load in a car race game
    • AHUMAN NECESSITIES
    • A63SPORTS; GAMES; AMUSEMENTS
    • A63FCARD, BOARD, OR ROULETTE GAMES; INDOOR GAMES USING SMALL MOVING PLAYING BODIES; VIDEO GAMES; GAMES NOT OTHERWISE PROVIDED FOR
    • A63F13/00Video games, i.e. games using an electronically generated display having two or more dimensions
    • A63F13/20Input arrangements for video game devices
    • A63F13/21Input arrangements for video game devices characterised by their sensors, purposes or types
    • A63F13/214Input arrangements for video game devices characterised by their sensors, purposes or types for locating contacts on a surface, e.g. floor mats or touch pads
    • A63F13/2145Input arrangements for video game devices characterised by their sensors, purposes or types for locating contacts on a surface, e.g. floor mats or touch pads the surface being also a display device, e.g. touch screens
    • AHUMAN NECESSITIES
    • A63SPORTS; GAMES; AMUSEMENTS
    • A63FCARD, BOARD, OR ROULETTE GAMES; INDOOR GAMES USING SMALL MOVING PLAYING BODIES; VIDEO GAMES; GAMES NOT OTHERWISE PROVIDED FOR
    • A63F13/00Video games, i.e. games using an electronically generated display having two or more dimensions
    • A63F13/50Controlling the output signals based on the game progress
    • A63F13/52Controlling the output signals based on the game progress involving aspects of the displayed game scene
    • AHUMAN NECESSITIES
    • A63SPORTS; GAMES; AMUSEMENTS
    • A63FCARD, BOARD, OR ROULETTE GAMES; INDOOR GAMES USING SMALL MOVING PLAYING BODIES; VIDEO GAMES; GAMES NOT OTHERWISE PROVIDED FOR
    • A63F13/00Video games, i.e. games using an electronically generated display having two or more dimensions
    • A63F13/80Special adaptations for executing a specific game genre or game mode
    • A63F13/803Driving vehicles or craft, e.g. cars, airplanes, ships, robots or tanks
    • AHUMAN NECESSITIES
    • A63SPORTS; GAMES; AMUSEMENTS
    • A63FCARD, BOARD, OR ROULETTE GAMES; INDOOR GAMES USING SMALL MOVING PLAYING BODIES; VIDEO GAMES; GAMES NOT OTHERWISE PROVIDED FOR
    • A63F2300/00Features of games using an electronically generated display having two or more dimensions, e.g. on a television screen, showing representations related to the game
    • A63F2300/10Features of games using an electronically generated display having two or more dimensions, e.g. on a television screen, showing representations related to the game characterized by input arrangements for converting player-generated signals into game device control signals
    • A63F2300/1068Features of games using an electronically generated display having two or more dimensions, e.g. on a television screen, showing representations related to the game characterized by input arrangements for converting player-generated signals into game device control signals being specially adapted to detect the point of contact of the player on a surface, e.g. floor mat, touch pad
    • A63F2300/1075Features of games using an electronically generated display having two or more dimensions, e.g. on a television screen, showing representations related to the game characterized by input arrangements for converting player-generated signals into game device control signals being specially adapted to detect the point of contact of the player on a surface, e.g. floor mat, touch pad using a touch screen
    • AHUMAN NECESSITIES
    • A63SPORTS; GAMES; AMUSEMENTS
    • A63FCARD, BOARD, OR ROULETTE GAMES; INDOOR GAMES USING SMALL MOVING PLAYING BODIES; VIDEO GAMES; GAMES NOT OTHERWISE PROVIDED FOR
    • A63F2300/00Features of games using an electronically generated display having two or more dimensions, e.g. on a television screen, showing representations related to the game
    • A63F2300/30Features of games using an electronically generated display having two or more dimensions, e.g. on a television screen, showing representations related to the game characterized by output arrangements for receiving control signals generated by the game device
    • A63F2300/308Details of the user interface
    • AHUMAN NECESSITIES
    • A63SPORTS; GAMES; AMUSEMENTS
    • A63FCARD, BOARD, OR ROULETTE GAMES; INDOOR GAMES USING SMALL MOVING PLAYING BODIES; VIDEO GAMES; GAMES NOT OTHERWISE PROVIDED FOR
    • A63F2300/00Features of games using an electronically generated display having two or more dimensions, e.g. on a television screen, showing representations related to the game
    • A63F2300/80Features of games using an electronically generated display having two or more dimensions, e.g. on a television screen, showing representations related to the game specially adapted for executing a specific type of game
    • A63F2300/8017Driving on land or water; Flying

Abstract

The invention discloses a control method and device of a virtual object, a storage medium and an electronic device. The method comprises the following steps: providing a reference center on the graphical user interface; in response to a first touch operation for the graphical user interface, a turning angle of the virtual object is controlled according to an angle of a touch point of the first touch operation with respect to a reference center. The invention solves the technical problems of single control mode and higher control complexity of the racing games provided in the related technology.

Description

Virtual object control method and device, storage medium and electronic device
Technical Field
The present invention relates to the field of computers, and in particular, to a method and an apparatus for controlling a virtual object, a storage medium, and an electronic apparatus.
Background
Currently, most of the racing-type virtual objects (e.g. virtual racing cars) provided in the related art run at the hand-end adopt a landscape control mode, which requires a game player to perform a double-hand operation, for example: the game player adopts the left hand to control the moving direction control, and adopts the right hand to control the functional controls such as acceleration, braking, prop release and the like, and the control dimension is single. Moreover, the complex control mode using both hands is just one of the key reasons for the lack of the vertical screen racing games.
In the existing small amount of racing games operated by one hand, a game player can only control the turning direction of a virtual racing car or change the current track by simple touch operations (e.g. clicking operation, sliding operation), but cannot realize multi-dimensional operations, such as: the operation of controlling the brake, speed, nitrogen acceleration and the like of the virtual racing car, and the long-time single-dimensional operation can also reduce the difficulty of game competition and reduce the freshness of game contents for game players.
In view of the above problems, no effective solution has been proposed.
Disclosure of Invention
At least some embodiments of the present invention provide a method, an apparatus, a storage medium, and an electronic apparatus for controlling a virtual object, so as to at least solve the technical problems of a single control method and a high control complexity of a racing game provided in the related art.
According to an embodiment of the present invention, there is provided a method for controlling a virtual object, in which a graphical user interface is obtained by executing a software application on a processor of a mobile terminal and rendering the software application on a touch display of the mobile terminal, and content displayed on the graphical user interface at least partially includes a game scene and a virtual object, the method including:
providing a reference center on the graphical user interface; in response to a first touch operation for the graphical user interface, a turning angle of the virtual object is controlled according to an angle of a touch point of the first touch operation with respect to a reference center.
Optionally, the method further includes: and responding to the first touch operation, providing a direction control on the graphical user interface, wherein the direction control is used for displaying a connecting line between the touch point of the first touch operation and the reference center.
Optionally, the method further includes: providing a speed control at a graphical user interface; and responding to the first touch operation, controlling the distance between the speed control and the reference center according to the first touch operation, and controlling the moving speed of the virtual object according to the distance.
Optionally, the speed control is a circle or an arc with a reference center as a center, and controlling a distance between the speed control and the reference center according to the first touch operation includes: and controlling the speed control to be enlarged or reduced according to the first touch operation, wherein the distance between the speed control and the reference center is the radius of the speed control.
Optionally, the method further includes: displaying a numerical value of a current velocity of the virtual object on the velocity control.
Optionally, the moving speed of the virtual object is positively correlated with the size of the distance.
Optionally, the method further includes: providing a plurality of gear controls on a graphical user interface, wherein the gear controls are circles or arcs with a reference center as a circle center, and the gear controls are used for prompting a plurality of speed values of the virtual object.
Optionally, the method further includes: and in response to the termination of execution of the first touch operation, before other touch operations are detected again, controlling the virtual object to decelerate, and when the current speed of the virtual object is reduced to a speed value corresponding to the adjacent gear control, not decelerating.
Optionally, the method further includes: and controlling the virtual object to brake in response to a second touch operation, wherein the second touch operation is a sliding touch operation from the speed control to the reference center and the sliding speed exceeds a first preset speed.
Optionally, the method further includes: and responding to a third touch operation, and controlling the virtual object to drift according to the direction of the third touch operation, wherein the third touch operation is a sliding touch operation which is outward from the reference center and has a sliding speed exceeding a second preset speed.
Optionally, the method further includes: and controlling the virtual object to continuously drift in response to the stop of the movement of the touch point of the third touch operation, and controlling the virtual object to stop drifting when the termination of the execution of the third touch operation is determined.
Optionally, the method further includes: when the game attribute of the virtual object meets the preset condition, responding to a fourth touch operation aiming at the reference center, and controlling the virtual object to perform instantaneous acceleration, wherein the fourth touch operation comprises the following steps: click operation, double click operation, long press operation or re-press operation.
According to an embodiment of the present invention, there is provided another method for controlling a virtual object, in which a graphical user interface is obtained by executing a software application on a processor of a mobile terminal and rendering the software application on a touch display of the mobile terminal, and content displayed on the graphical user interface at least partially includes a game scene and a virtual object, the method including:
responding to two-point touch operation aiming at the graphical user interface, and acquiring an angle between a connecting line between a first touch point and a second touch point of the two-point touch operation and a horizontal axis or a vertical axis of the touch display; and controlling the turning angle of the virtual object according to the angle.
Optionally, the method further includes: and responding to the two-point touch operation, providing a direction control on the graphical user interface, wherein the direction control is used for displaying a connecting line between a first touch point and a second touch point of the two-point touch operation.
Optionally, the method further includes: providing a speed control at a graphical user interface; and responding to the two-point touch operation, controlling the size of the speed control according to the two-point touch operation, and controlling the moving speed of the virtual object according to the size of the speed control.
Optionally, the speed control is a circle or arc, and the size of the speed control is determined by the radius of the speed control.
Optionally, the method further includes: displaying a numerical value of a current velocity of the virtual object on the velocity control.
Optionally, the moving speed of the virtual object is positively correlated with the size of the speed control.
According to an embodiment of the present invention, there is further provided a method for controlling a virtual object, in which a graphical user interface is obtained by executing a software application on a processor of a mobile terminal and rendering the software application on a touch display of the mobile terminal, and content displayed on the graphical user interface at least partially includes a game scene and a virtual object, the method including:
detecting a use state of the mobile terminal, wherein the use state comprises: a vertical screen state and a horizontal screen state; when the mobile terminal is detected to be in a vertical screen state, providing a reference center on the graphical user interface, responding to single-point touch operation aiming at the graphical user interface, and controlling the turning angle of the virtual object according to the angle of a touch point of the single-point touch operation relative to the reference center; when the mobile terminal is detected to be in a horizontal screen state, responding to two-point touch operation aiming at the graphical user interface, and controlling the turning angle of the virtual object according to the angle between the connecting line between the first touch point and the second touch point of the two-point touch operation and the horizontal axis or the vertical axis of the touch display.
Optionally, the method further includes: and when the mobile terminal is detected to be in a vertical screen state, responding to the single-point touch operation, and providing a first direction control on the graphical user interface, wherein the first direction control is used for displaying a connecting line between a touch point of the single-point touch operation and the reference center.
Optionally, the method further includes: and when the mobile terminal is detected to be in a horizontal screen state, responding to the two-point touch operation, and providing a second direction control on the graphical user interface, wherein the second direction control is used for displaying a connecting line between a first touch point and a second touch point of the two-point touch operation.
Optionally, the method further includes: when the mobile terminal is detected to be in a vertical screen state, providing a first speed control on a graphical user interface; and responding to the single-point touch operation, controlling the distance between the first speed control and the reference center according to the single-point touch operation, and controlling the moving speed of the virtual object according to the distance.
Optionally, the method further includes: when the mobile terminal is detected to be in a horizontal screen state, providing a second speed control on the graphical user interface; and responding to the two-point touch operation, controlling the size of the second speed control according to the two-point touch operation, and controlling the moving speed of the virtual object according to the size of the second speed control.
Optionally, the first speed control is a circle or an arc with a reference center as a center, and controlling the distance between the first speed control and the reference center according to the single-point touch operation includes: and controlling the first speed control to be enlarged or reduced according to the single-point touch operation, wherein the distance between the first speed control and the reference center is the radius of the first speed control.
Optionally, the second speed control is a circle or an arc, and the method further includes: and controlling the second speed control to be enlarged or reduced according to the two-point touch operation, wherein the size of the speed control is determined by the radius of the speed control.
There is further provided, in accordance with an embodiment of the present invention, an apparatus for controlling a virtual object, wherein a graphical user interface is obtained by executing a software application on a processor of a mobile terminal and rendering the software application on a touch display of the mobile terminal, and content displayed on the graphical user interface at least partially includes a game scene and a virtual object, the apparatus including:
the processing module is used for providing a reference center on the graphical user interface; and the control module is used for responding to a first touch operation aiming at the graphical user interface and controlling the turning angle of the virtual object according to the angle of the touch point of the first touch operation relative to the reference center.
Optionally, the processing module is further configured to provide a direction control on the graphical user interface in response to the first touch operation, where the direction control is configured to display a connection line between a touch point of the first touch operation and the reference center.
Optionally, the processing module is further configured to provide a speed control on the graphical user interface; and the control module is also used for responding to the first touch operation, controlling the distance between the speed control and the reference center according to the first touch operation and controlling the moving speed of the virtual object according to the distance.
Optionally, the speed control is a circle or an arc with the reference center as a center of circle, the control module is further configured to control the speed control to zoom in or out according to the first touch operation, and a distance between the speed control and the reference center is a radius of the speed control.
Optionally, the processing module is further configured to display a numerical value of the current velocity of the virtual object on the velocity control.
Optionally, the moving speed of the virtual object is positively correlated with the size of the distance.
Optionally, the processing module is further configured to provide a plurality of gear controls on the graphical user interface, where the plurality of gear controls are circles or arcs with the reference center as a center, and the plurality of gear controls are used to prompt a plurality of speed values of the virtual object.
Optionally, the control module is further configured to, in response to the termination of the execution of the first touch operation, control the virtual object to decelerate before another touch operation is detected again, and when the current speed of the virtual object decreases to the speed value corresponding to the adjacent gear control, stop decelerating.
Optionally, the control module is further configured to control the virtual object to brake in response to a second touch operation, where the second touch operation is a sliding touch operation from the speed control to the reference center and the sliding speed exceeds a first preset speed.
Optionally, the control module is further configured to control the virtual object to drift according to a direction of a third touch operation in response to the third touch operation, where the third touch operation is a sliding touch operation that is outward from the reference center and has a sliding speed exceeding a second preset speed.
Optionally, the control module is further configured to control the virtual object to continuously drift in response to stop moving the touch point of the third touch operation, and control the virtual object to stop drifting when it is determined that the third touch operation is terminated.
Optionally, the control module is further configured to control the virtual object to perform instantaneous acceleration in response to a fourth touch operation on the reference center when the game attribute of the virtual object satisfies a preset condition, where the fourth touch operation includes: click operation, double click operation, long press operation or re-press operation.
According to an embodiment of the present invention, there is provided another apparatus for controlling a virtual object, a graphical user interface is obtained by executing a software application on a processor of a mobile terminal and rendering the software application on a touch display of the mobile terminal, and content displayed by the graphical user interface at least partially includes a game scene and a virtual object, the apparatus including:
the processing module is used for responding to two-point touch operation aiming at the graphical user interface and acquiring an angle between a connecting line between a first touch point and a second touch point of the two-point touch operation and a horizontal axis or a vertical axis of the touch display; and the control module is used for controlling the turning angle of the virtual object according to the angle.
Optionally, the processing module is further configured to provide a direction control on the graphical user interface in response to the two-point touch operation, where the direction control is configured to display a connection line between a first touch point and a second touch point of the two-point touch operation.
Optionally, the processing module is further configured to provide a speed control on the graphical user interface; and the control module is also used for responding to the two-point touch operation, controlling the size of the speed control according to the two-point touch operation and controlling the moving speed of the virtual object according to the size of the speed control.
Optionally, the speed control is a circle or arc, and the size of the speed control is determined by the radius of the speed control.
Optionally, the processing module is further configured to display a numerical value of the current velocity of the virtual object on the velocity control.
Optionally, the moving speed of the virtual object is positively correlated with the size of the speed control.
There is further provided, according to an embodiment of the present invention, an apparatus for controlling a virtual object, a graphical user interface obtained by executing a software application on a processor of a mobile terminal and rendering the software application on a touch display of the mobile terminal, content displayed by the graphical user interface at least partially including a game scene and the virtual object, the apparatus including:
the processing module is used for detecting the use state of the mobile terminal, wherein the use state comprises the following steps: a vertical screen state and a horizontal screen state; the control module is used for providing a reference center on the graphical user interface when the mobile terminal is detected to be in a vertical screen state, responding to a first touch operation aiming at the graphical user interface, and controlling the turning angle of the virtual object according to the angle of a touch point of the first touch operation relative to the reference center; when the mobile terminal is detected to be in a horizontal screen state, responding to two-point touch operation aiming at the graphical user interface, and controlling the turning angle of the virtual object according to the angle between the connecting line between the first touch point and the second touch point of the two-point touch operation and the horizontal axis or the vertical axis of the touch display.
Optionally, the processing module is further configured to provide a first direction control on the graphical user interface in response to the first touch operation when it is detected that the mobile terminal is in the vertical screen state, where the first direction control is used to display a connection line between a touch point of the first touch operation and the reference center.
Optionally, the processing module is further configured to provide a second direction control on the graphical user interface in response to the two-point touch operation when it is detected that the mobile terminal is in the horizontal screen state, where the second direction control is used to display a connection line between a first touch point and a second touch point of the two-point touch operation.
Optionally, the processing module is further configured to provide a first speed control on the graphical user interface when it is detected that the mobile terminal is in the vertical screen state; and the control module is also used for responding to the first touch operation, controlling the distance between the first speed control and the reference center according to the first touch operation and controlling the moving speed of the virtual object according to the distance.
Optionally, the processing module is further configured to provide a second speed control on the graphical user interface when it is detected that the mobile terminal is in the landscape state; and the control module is also used for responding to the two-point touch operation, controlling the size of the second speed control according to the two-point touch operation and controlling the moving speed of the virtual object according to the size of the second speed control.
Optionally, the first speed control is a circle or an arc with the reference center as a center of circle, and the control module is further configured to control the first speed control to enlarge or reduce according to the first touch operation, where a distance between the first speed control and the reference center is a radius of the first speed control.
Optionally, the second speed control is a circle or an arc, the control module is further configured to control the second speed control to zoom in or out according to the two-point touch operation, and the size of the speed control is determined by the radius of the speed control.
According to an embodiment of the present invention, there is further provided a storage medium having a computer program stored therein, wherein the computer program is configured to execute the control method of the virtual object in any one of the above items when running.
There is further provided, according to an embodiment of the present invention, a processor configured to execute a program, where the program is configured to execute a control method of a virtual object in any one of the above items when running.
There is further provided, according to an embodiment of the present invention, an electronic apparatus including a memory and a processor, the memory storing a computer program therein, the processor being configured to execute the computer program to perform the method for controlling a virtual object in any one of the above.
In at least some embodiments of the present invention, a manner of providing a reference center on a graphical user interface is adopted, and a turning angle of a virtual object is controlled according to an angle of a touch point of a first touch operation relative to the reference center in response to a first touch operation on the graphical user interface, so as to achieve a purpose of simply, conveniently and flexibly controlling the turning angle of the virtual object by using the reference center and the touch point in a one-handed control mode, thereby achieving technical effects of improving control flexibility and convenience of a racing game and reducing control complexity, and further solving technical problems of single control manner and high control complexity of the racing game provided in the related art.
Drawings
The accompanying drawings, which are included to provide a further understanding of the invention and are incorporated in and constitute a part of this application, illustrate embodiment(s) of the invention and together with the description serve to explain the invention without limiting the invention. In the drawings:
FIG. 1 is a flow chart of a method of controlling a virtual object according to one embodiment of the present invention;
FIG. 2 is a schematic diagram illustrating a single point manipulation mode according to an alternative embodiment of the present invention for controlling the virtual object to turn with reference to the Y-axis;
FIG. 3 is a schematic diagram illustrating the control of the virtual object steering with reference to the X-axis in a single-point steering mode according to an alternative embodiment of the present invention;
FIG. 4 is a diagram illustrating a direction control and a speed control in a single-point operation mode according to an alternative embodiment of the present invention;
FIG. 5 is a schematic diagram of another speed control in a single point maneuver mode, in accordance with an alternative embodiment of the present invention;
FIG. 6 is a schematic diagram illustrating a numerical display of a current velocity of a virtual object in a single-point manipulation mode according to an alternative embodiment of the present invention;
FIG. 7 is a schematic diagram illustrating a numerical display of a current velocity of a virtual object in a single-point manipulation mode according to an alternative embodiment of the present invention;
FIG. 8 is a schematic view of a shift control in a single point mode of operation according to an alternative embodiment of the present invention;
FIG. 9 is a schematic view of another shift control in a single point manipulation mode in accordance with an alternative embodiment of the present invention;
FIG. 10 is a schematic illustration of brake control of a virtual object in a single point manipulation mode according to an alternative embodiment of the present invention;
FIG. 11 is a schematic diagram illustrating virtual object drift control in a single-point steering mode according to an alternative embodiment of the present invention;
FIG. 12 is a schematic diagram illustrating a drift cue in a single-point steering mode according to an alternative embodiment of the present invention;
FIG. 13 is a schematic illustration of virtual object nitrogen acceleration control in a single point maneuver mode, in accordance with an alternative embodiment of the present invention;
FIG. 14 is a flowchart of another method of controlling a virtual object according to one embodiment of the invention;
FIG. 15 is a schematic diagram illustrating a two-point steering mode according to an alternative embodiment of the present invention, wherein the virtual object is controlled with reference to the Y-axis;
FIG. 16 is a schematic diagram illustrating the control of the virtual object steering with reference to the X-axis in a two-point steering mode according to an alternative embodiment of the present invention;
FIG. 17 is a diagram illustrating a direction control and a speed control in a two-point steering mode according to an alternative embodiment of the present invention;
FIG. 18 is a diagram illustrating a numerical display of a current velocity of a virtual object in a two-point manipulation mode according to an alternative embodiment of the present invention;
FIG. 19 is a flowchart of a method for controlling a virtual object according to an embodiment of the present invention;
fig. 20 is a block diagram of a control apparatus of a virtual object according to an embodiment of the present invention;
FIG. 21 is a block diagram of another control apparatus for a virtual object according to one embodiment of the present invention;
fig. 22 is a block diagram of a control apparatus for a virtual object according to an embodiment of the present invention.
Detailed Description
In order to make the technical solutions of the present invention better understood, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
It should be noted that the terms "first," "second," and the like in the description and claims of the present invention and in the drawings described above are used for distinguishing between similar elements and not necessarily for describing a particular sequential or chronological order. It is to be understood that the data so used is interchangeable under appropriate circumstances such that the embodiments of the invention described herein are capable of operation in sequences other than those illustrated or described herein. Furthermore, the terms "comprises," "comprising," and "having," and any variations thereof, are intended to cover a non-exclusive inclusion, such that a process, method, system, article, or apparatus that comprises a list of steps or elements is not necessarily limited to those steps or elements expressly listed, but may include other steps or elements not expressly listed or inherent to such process, method, article, or apparatus.
In accordance with one embodiment of the present invention, there is provided an embodiment of a method for controlling a virtual object, where the steps illustrated in the flowchart of the figure may be performed in a computer system, such as a set of computer-executable instructions, and where a logical order is illustrated in the flowchart, in some cases the steps illustrated or described may be performed in an order different than that illustrated herein.
The method embodiments may be performed in a mobile terminal, a computer terminal or a similar computing device. Taking the example of the Mobile terminal running on the Mobile terminal, the Mobile terminal may be a terminal device such as a smart phone (e.g., an Android phone, an iOS phone, etc.), a tablet computer, a palm computer, a Mobile Internet device (MID for short), a PAD, and the like. The mobile terminal may include one or more processors (which may include, but are not limited to, a Central Processing Unit (CPU), a Graphics Processing Unit (GPU), a Digital Signal Processing (DSP) chip, a Microprocessor (MCU), a programmable logic device (FPGA), a neural Network Processor (NPU), a Tensor Processor (TPU), an Artificial Intelligence (AI) type processor, etc.) and a memory for storing data. Optionally, the mobile terminal may further include a transmission device, an input/output device, and a display device for a communication function. It will be understood by those skilled in the art that the foregoing structural description is only illustrative and not restrictive of the structure of the mobile terminal. For example, the mobile terminal may also include more or fewer components than described above, or have a different configuration than described above.
The memory may be used to store computer programs, for example, software programs and modules of application software, such as computer programs corresponding to the control method of the virtual object in the embodiment of the present invention, and the processor executes various functional applications and data processing by running the computer programs stored in the memory, that is, implements the control method of the virtual object described above. The memory may include high speed random access memory, and may also include non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some examples, the memory may further include memory located remotely from the processor, and these remote memories may be connected to the mobile terminal through a network. Examples of such networks include, but are not limited to, the internet, intranets, local area networks, mobile communication networks, and combinations thereof.
The transmission device is used to receive or transmit data via a network. Specific examples of the network described above may include a wireless network provided by a communication provider of the mobile terminal. In one example, the transmission device includes a Network adapter (NIC) that can be connected to other Network devices through a base station to communicate with the internet. In one example, the transmission device may be a Radio Frequency (RF) module, which is used for communicating with the internet in a wireless manner.
The display device may be, for example, a touch screen type Liquid Crystal Display (LCD) and a touch display (also referred to as a "touch screen" or "touch display screen"). The liquid crystal display may enable a user to interact with a user interface of the mobile terminal. In some embodiments, the mobile terminal has a Graphical User Interface (GUI) with which a user can interact by touching finger contacts and/or gestures on a touch-sensitive surface, where the human-machine interaction function optionally includes the following interactions: executable instructions for creating web pages, drawing, word processing, making electronic documents, games, video conferencing, instant messaging, emailing, call interfacing, playing digital video, playing digital music, and/or web browsing, etc., for performing the above-described human-computer interaction functions, are configured/stored in one or more processor-executable computer program products or readable storage media.
In this embodiment, a method for controlling a virtual object running on the mobile terminal is provided, where a graphical user interface is obtained by executing a software application on a processor of the mobile terminal and rendering the software application on a touch display of the mobile terminal, and content displayed by the graphical user interface at least partially includes a game scene and a virtual object. Fig. 1 is a flowchart of a method for controlling a virtual object according to an embodiment of the present invention, as shown in fig. 1, the method including the steps of:
step S10, providing a reference center on the graphical user interface;
in step S11, in response to a first touch operation on the graphical user interface, a turning angle of the virtual object is controlled according to an angle of a touch point of the first touch operation with respect to a reference center.
Through the steps, a mode of providing a reference center on the graphical user interface can be adopted, the turning angle of the virtual object is controlled according to the angle of the touch point of the first touch operation relative to the reference center by responding to the first touch operation aiming at the graphical user interface, and the purpose of simply, conveniently and flexibly controlling the turning angle of the virtual object by using the reference center and the touch point in a single-hand operation mode is achieved, so that the technical effects of improving the operation flexibility and convenience of the racing game and reducing the operation complexity are achieved, and the technical problems that the operation mode of the racing game provided in the related technology is single and the operation complexity is high are solved.
The game scenes may include, but are not limited to, racing game scenes of racing-type games. The virtual objects may include, but are not limited to: virtual racing cars, virtual aircraft, virtual ships. The following will explain the implementation of the present invention in further detail by taking the virtual racing car as an example.
The reference center may be determined according to a display position of the virtual object in the game scene. For example: when the virtual object is displayed in a central region of the graphical user interface, the reference center may be a geometric center position of the graphical user interface. For another example: when the virtual object is displayed in the lower half area of the graphical user interface, the reference center may be a lower half center position of the graphical user interface. In addition, the reference center can be determined according to the size information of the graphical user interface and a single-hand manipulation mode (such as a left-hand manipulation mode or a right-hand manipulation mode) selected by the user without completely depending on the position of the virtual object. For example: when it is determined that the game player currently uses the super-large screen smart phone according to the size information of the graphical user interface, and the game player selects the left-hand manipulation mode, the reference center may be a center position of a left half portion of the graphical user interface. Therefore, the multi-dimensional single-hand operation mode is provided for the game player, and meanwhile, the fatigue caused by the single-hand operation can be effectively reduced. In addition, the display state of the reference center may be either a state visible to the game player (i.e., an opaque state or a translucent state) or a state invisible to the game player (i.e., a transparent state). The display shape of the reference center can be a single point or a specific figure (such as a circle, a square, a triangle, a diamond, etc.) with a certain size.
The first touch operation at least has the following functions: controlling the turning angle of the virtual object. The touch area acted by the first touch operation may be an area formed by the whole graphical user interface under the condition that no control is set in the graphical user interface; or the rest area of the whole graphical user interface except the control under the condition that the control is set in the graphical user interface; of course, it may also be a specific area within the graphical user interface, for example: left, right, below left, below right, etc. of the graphical user interface. The outline of the specific region is not particularly limited in the embodiment of the present invention. For example: the profile may be rectangular, circular, etc.
The direction control for the virtual object is actually controlled by the turning angle. In the related art, a virtual stick is generally used to directly control the moving direction of a virtual object. Specifically, during the process of controlling the moving direction of the virtual object through the virtual joystick, the position of the touch point acting on the virtual joystick directly corresponds to the moving direction of the virtual object, and as long as the position of the touch point remains unchanged, the moving direction of the virtual object also remains unchanged. In contrast, in the virtual object manipulation method provided by the embodiment of the invention, a specific corresponding relationship exists between the angle of the touch point of the first touch operation relative to the reference center and the turning angle of the virtual object. When the position of the touch point remains unchanged, the turning angle of the virtual object also remains unchanged. The virtual object will continue to perform the turning operation, and thus the actual moving direction of the virtual object is constantly changing.
In an alternative embodiment, the reference line used to determine the angle of the touch point with respect to the reference center may be parallel to either the horizontal or the vertical axis of the touch display. For convenience of explanation, a plane rectangular coordinate system may be established with the reference center as the origin of coordinates, wherein the X-axis is parallel to the horizontal axis of the touch display and the Y-axis is parallel to the longitudinal axis of the touch display.
If the Y-axis is used as a reference, determining the angle of the touch point relative to the reference center can be converted into determining the angle of the connecting line between the touch point and the reference center relative to the Y-axis. Fig. 2 is a schematic diagram illustrating steering of the virtual object with reference to the Y-axis in the single-point steering mode according to an alternative embodiment of the present invention, as shown in fig. 2, if the connecting line is located in the fourth quadrant of the rectangular plane coordinate system, the virtual object is controlled to perform a forward-right turning operation, and the greater the angle deviating from the Y-axis, the greater the turning angle of the virtual object. And if the connecting line is positioned in the third quadrant of the plane rectangular coordinate system, controlling the virtual object to perform a forward left turning operation, wherein the larger the angle deviated from the Y axis is, the larger the turning angle of the virtual object is. And if the connecting line is positioned in the first quadrant of the plane rectangular coordinate system, controlling the virtual object to perform a backward and right turning operation. And if the connecting line is positioned in the second quadrant of the plane rectangular coordinate system, controlling the virtual object to perform a backward left-turning operation.
If the X-axis is used as a reference, determining the angle of the touch point with respect to the reference center can be converted into determining the angle of the line between the touch point and the reference center with respect to the X-axis. Fig. 3 is a schematic diagram illustrating steering of the virtual object with reference to the X-axis in the single-point steering mode according to an alternative embodiment of the present invention, as shown in fig. 3, if the connecting line is located in the fourth quadrant of the rectangular plane coordinate system, the virtual object is controlled to perform a turning operation in the forward and right directions, and the greater the angle of deviation from the X-axis, the greater the turning angle of the virtual object. And if the connecting line is positioned in the third quadrant of the plane rectangular coordinate system, controlling the virtual object to perform a forward left turning operation, wherein the larger the angle deviated from the X axis is, the larger the turning angle of the virtual object is. And if the connecting line is positioned in the first quadrant of the plane rectangular coordinate system, controlling the virtual object to perform a backward and right turning operation. And if the connecting line is positioned in the second quadrant of the plane rectangular coordinate system, controlling the virtual object to perform a backward left-turning operation.
It should be noted that the steering operation described above is only an exemplary one, and is not to be construed as a limitation of the present invention. For the description of the angle of the touch point relative to the reference center and the corresponding relationship between the angle and the turning angle of the virtual object, those skilled in the art do not need to pay creative work, and other embodiments can be provided as long as the turning angle of the virtual object is determined according to the angle of the touch point relative to the reference center, which is within the protection scope of the present application. Of course, other steering maneuvers may also be employed. For example: and if the connecting line is positioned in the fourth quadrant of the plane rectangular coordinate system, controlling the virtual object to perform a forward left-turning operation. And if the connecting line is positioned in the third quadrant of the plane rectangular coordinate system, controlling the virtual object to perform a forward right turning operation. And if the connecting line is positioned in the first quadrant of the plane rectangular coordinate system, controlling the virtual object to perform a backward left-turning operation. And if the connecting line is positioned in the second quadrant of the plane rectangular coordinate system, controlling the virtual object to perform backward and right turning operation.
In addition, in the above-described steering manner, only the forward turning operation may be involved, and the backward turning operation may not be involved. For example: and if the connecting line is positioned in the first quadrant of the plane rectangular coordinate system, controlling the virtual object to perform a forward right turning operation. And if the connecting line is positioned in the second quadrant of the plane rectangular coordinate system, controlling the virtual object to perform a forward left-turning operation. When the virtual object needs to be controlled to execute the backward operation, the operation can be switched to the backward operation through other controls.
The angle can be described by absolute values or positive and negative values. And will not be described in detail herein.
Optionally, the method may further include the following steps:
step S12, in response to the first touch operation, providing a direction control on the graphical user interface, where the direction control is used to display a connection line between the touch point of the first touch operation and the reference center.
The direction control has the following functions: it is convenient for the game player to determine the size of the current turning angle of the virtual object. In an alternative embodiment, the direction control is displayed as a connection line between the touch point of the first touch operation and the reference center. It should be noted that the connecting line between the touch point and the reference center is only an exemplary illustration, and does not limit the present invention. The directional control may also be displayed in other forms, such as: virtual steering wheel, etc.
Optionally, the method may further include the following steps:
step S13, providing a speed control on the graphical user interface; and responding to the first touch operation, controlling the distance between the speed control and the reference center according to the first touch operation, and controlling the moving speed of the virtual object according to the distance.
The speed control functions not only to prompt the game player in real time with the current moving speed of the virtual object, but also to control the virtual object to avoid sudden speed changes. Considering that the speed of the vehicle does not instantaneously change during normal driving in real life, and the acceleration and deceleration of the vehicle need to be performed for a period of time, if the distance between the touch point of the first touch operation and the reference center is directly used to determine the moving speed of the virtual object, the moving speed of the virtual object will continuously change suddenly in the game scene, thereby being contrary to the real life scene. Based on the above analysis, the touch operation of the game player can be applied to the speed control, so that the speed control is changed based on the current position. That is, the movement of the touch point of the game player through the first touch operation can control the movement of the speed control so as to adjust the display position of the speed control in real time. Then, the mobile terminal controls the moving speed of the virtual object according to the distance between the display position and the reference center. As an optional embodiment, if the touch operation drags the speed control away from the reference center, the virtual object is controlled to perform an acceleration operation. And if the touch operation dragging speed control is close to the reference center, controlling the virtual object to execute deceleration operation. As another alternative, if the touch operation drags the speed control away from the reference center, the virtual object is controlled to perform a deceleration operation. And if the touch operation dragging speed control is close to the reference center, controlling the virtual object to execute acceleration operation.
The first touch operation may act directly on the speed control or may act on an area other than the speed control. The response area of the first touch operation may be the whole graphical user interface or a partial area of the whole graphical user interface, for example: left, right, below left, below right, etc. of the graphical user interface. When the sliding distance of the first touch operation includes a component in a direction away from the reference center, the speed control can be controlled to be away from the reference center. The greater this component, the greater the magnitude of the outward movement of the speed control.
Optionally, the speed control is a circle or an arc centered on the reference center, and in step S13, controlling the distance between the speed control and the reference center according to the first touch operation may include the following steps:
step S131, controlling the speed control to enlarge or reduce according to the first touch operation, wherein the distance between the speed control and the reference center is the radius of the speed control.
The speed control may be a closed curve (e.g., a circle centered on the reference center) or a non-closed curve (e.g., an arc centered on the reference center), which mainly depends on the actual manipulation area of the first touch operation. If the first touch operation is applied to the entire graphical user interface, the speed control may be a circular curve. If the first touch operation is concentrated on the lower area of the reference center, the speed control may be a semi-circular arc curve, or even an arc curve smaller than 90 degrees. It should be noted that the speed control can also be represented by other shapes, such as: line segments, squares, hexagons, pentagons, ovals or other irregular shapes. The speed control can be controlled to carry out amplification or reduction operation through the touch point of the first touch operation, so that the moving speed of the virtual object is controlled according to the size of the speed control.
Fig. 4 is a schematic diagram of a direction control and a speed control in a single-point manipulation mode according to an alternative embodiment of the present invention, where as shown in fig. 4, the reference center is located at a geometric center of the gui, and the direction control is a connection line between the reference center and a touch point of the first touch operation. The speed control is in a line segment shape, one end of the speed control is a reference center, the other end of the speed control is a point (for example, M point) selected on a connection line between the reference center and the touch point of the first touch operation, and the speed control is displayed at a position keeping a certain distance from the touch point of the first touch operation (at this time, the user is accelerating the virtual object through the speed control). The game player can control the movement of the speed control through the movement of the touch point of the first touch operation so as to control the speed control to perform zooming-in or zooming-out operation, namely, the operation is represented by the change of the length of the line segment.
Fig. 5 is a schematic diagram of another speed control in a single-point manipulation mode according to an alternative embodiment of the present invention, as shown in fig. 5, the reference center is located at a geometric center of the gui (as mentioned above, the reference center may also be located at another position on the gui), and the touch point of the first touch operation may be located on a circular curve (in actual operation, the touch point of the first touch operation is not necessarily located on the speed control all the time). The game player can control the movement of the speed control through the movement of the touch point of the first touch operation to control the speed control to perform zooming-in or zooming-out operation, and the distance between the speed control and the reference center is the radius of the circular curve.
Optionally, the method may further include the following steps:
in step S14, the value of the current velocity of the virtual object is displayed on the velocity control.
In order to enable the game player to more intuitively perceive the current moving speed of the virtual object, the current moving speed of the virtual object may be prompted within the graphical user interface. The prompting mode can display the numerical value of the current speed of the virtual object on the speed control, and can also display the current moving speed of the virtual object in other forms such as a virtual dial plate. Fig. 6 is a schematic diagram illustrating a numerical display of a current velocity of a virtual object in a single-point manipulation mode according to an alternative embodiment of the present invention, where, as shown in fig. 6, the velocity control is a circular curve. The reference center is located at a geometric center of the gui, and the touch point of the first touch operation may be located on the circular curve. The game player can control the movement of the speed control through the movement of the touch point of the first touch operation so as to control the speed control to carry out amplification or reduction operation, and the numerical value of the current speed of the virtual object is directly displayed on the circular curve. Fig. 7 is a schematic diagram illustrating a numerical display of a current velocity of a virtual object in a single-point manipulation mode according to an alternative embodiment of the present invention, where, as shown in fig. 7, the velocity control is a circular curve. The reference center is located at a geometric center of the gui, and the touch point of the first touch operation may be located on the circular curve. The game player can control the movement of the speed control through the movement of the touch point of the first touch operation to control the speed control to carry out amplification or reduction operation, and the numerical value of the current speed of the virtual object is displayed in the form of a virtual dial.
Optionally, the moving speed of the virtual object is positively correlated with the size of the distance.
That is, the farther the distance between the speed control and the reference center, the faster the movement speed of the virtual object. The moving speed of the virtual object and the distance between the speed control and the reference center can be in a linear relation or a nonlinear relation.
Optionally, the method may further include the following steps:
step S15, providing a plurality of shift controls on the graphical user interface, where the plurality of shift controls are circles or arcs with the reference center as the center of circle, and the plurality of shift controls are used to prompt a plurality of speed values of the virtual object.
To be able to assist the game player in better controlling the speed of movement of the virtual object, a plurality of gear controls are provided on the graphical user interface. The gear controls are circles or arcs with the reference center as the center of a circle, and the gear controls are used for prompting a plurality of speed numerical values of the virtual object. Therefore, the game player can not only obtain the current moving speed of the virtual object through the speed control, but also determine the gear corresponding to the current moving speed through the gear control, so that the game player can adjust the moving speed of the virtual object more pertinently by combining the speed control and the gear control. It should be noted that, similar to the speed control described above, the multiple gear control may also be represented in other shapes, such as: line segments, squares, hexagons, pentagons, ovals or other irregular shapes.
FIG. 8 is a schematic diagram of a shift control in a single point mode of operation according to an alternative embodiment of the present invention, and as shown in FIG. 8, the virtual object may be a virtual race car that operates by simulating the transmission of a real vehicle. When the speed control and the plurality of gear controls are both in the shape of line segments, the line segment between the reference center and the point F represents the speed control, the line segment between the reference center and the point A represents the 0-gear control, the line segment between the reference center and the point B represents the 1-gear control, the line segment between the reference center and the point C represents the 2-gear control, the line segment between the reference center and the point D represents the 3-gear control, and the line segment between the reference center and the point E represents the 4-gear control. The speed per hour corresponding to the 0-gear control is the minimum. The speed per hour corresponding to the 4-gear control is the maximum. The speed changing sequence of the 0-gear control, the 1-gear control, the 2-gear control, the 3-gear control and the 4-gear control is arranged in an ascending order. The speed range corresponding to the 0-gear control is 0-20 km/h. In an alternative example, the 1 st gear control corresponds to a speed range of 30-40 km/h. The speed range corresponding to the 2 nd gear control is 50-60 km/h. The speed range corresponding to the 3 rd gear control is 80-90 km/h. The speed range corresponding to the 4-gear control is more than 100 km/h. Therefore, when the game player controls the moving speed of the virtual object by adjusting the enlargement and the reduction of the speed control, the gear corresponding to the current moving speed can be determined according to the plurality of gear controls.
FIG. 9 is a schematic view of another gear control in a single point mode of operation according to an alternative embodiment of the present invention, and as shown in FIG. 9, the virtual object may be a virtual race car that operates by simulating the transmission of a real vehicle. When the speed control and the gear controls are both in the shape of a circular curve, the circular curves all use the reference center as a geometric center. The circular curve F represents a speed control, the circular curve A represents a 0-gear control, the circular curve B represents a 1-gear control, the circular curve C represents a 2-gear control, the circular curve D represents a 3-gear control, and the circular curve E represents a 4-gear control. The speed per hour corresponding to the 0-gear control is the minimum. The speed per hour corresponding to the 4-gear control is the maximum. The speed changing sequence of the 0-gear control, the 1-gear control, the 2-gear control, the 3-gear control and the 4-gear control is arranged in an ascending order. In an alternative example, the 0-gear control corresponds to a speed range of 0-20 km/h. The speed range corresponding to the 1 st gear control is 30-40 km/h. The speed range corresponding to the 2 nd gear control is 50-60 km/h. The speed range corresponding to the 3 rd gear control is 80-90 km/h. The speed range corresponding to the 4-gear control is more than 100 km/h. Therefore, when the game player controls the moving speed of the virtual object by adjusting the enlargement and the reduction of the speed control, the gear corresponding to the current moving speed can be determined according to the plurality of gear controls.
Optionally, the method may further include the following steps:
in step S16, in response to the termination of the execution of the first touch operation, the virtual object is controlled to decelerate before other touch operations are detected again, and the virtual object is not decelerated when the current speed of the virtual object decreases to the speed value corresponding to the adjacent gear control.
And if the first touch operation is detected to be terminated, recording the duration of the termination of the execution in response to the termination of the first touch operation. The longer the execution is terminated, the more likely the moving speed of the virtual object will decrease to the speed value corresponding to the adjacent gear control. That is, the speed control gradually shrinks to the nearest gear in the gear control along with the decrease of the moving speed, and then the virtual object is controlled to continue to run at the speed per hour corresponding to the nearest gear. If the execution is terminated for a short period of time, the moving speed of the virtual object will have a greater possibility of failing to decrease to the speed value corresponding to the adjacent gear control. When the response area of the first touch operation is not the entire graphical user interface, after the first touch operation is terminated, touch operations may also occur in other areas of the entire graphical user interface (i.e., other controls outside the response area, such as skill controls, information controls, etc.), in which case the moving speed of the virtual object is still performing deceleration operations to the adjacent gear control.
Optionally, the method may further include the following steps:
and step S17, controlling the virtual object to brake in response to a second touch operation, where the second touch operation is a sliding touch operation from the speed control to the reference center and the sliding speed exceeds a first preset speed.
The braking is emergency braking, which is different from ordinary braking (i.e. mild braking performed during turning or phase change), and the ordinary braking is implemented by controlling the speed control to be close to the reference center through the first touch operation. When the touch point of the second touch operation slides from the speed control to the reference center according to the first preset speed, the virtual object can be controlled to brake. Taking the virtual object as a virtual racing car as an example, the touch point operated by the second touch control slides to the reference center from the speed control according to the first preset speed, and at the moment, the emergency brake is activated to perform service braking, so that the virtual racing car is decelerated in an emergency manner until the virtual racing car stops traveling.
Fig. 10 is a schematic view illustrating braking control of a virtual object in a single-point operation mode according to an alternative embodiment of the present invention, as shown in fig. 10, when a touch point of a second touch operation is located on a speed control (e.g., a circular curve), a game player performs a sliding operation to slide the touch point of the second touch operation from the speed control to a reference center according to a first preset speed, at which time the circular curve may be quickly reduced to coincide with the reference center, so as to activate an emergency braking function to brake a virtual racing car, thereby making the virtual racing car suddenly slow down until the virtual racing car stops traveling.
Optionally, the method may further include the following steps:
in step S18, in response to a third touch operation, the virtual object is controlled to drift according to a direction of the third touch operation, where the third touch operation is a sliding touch operation that is outward from the reference center and has a sliding speed exceeding a second preset speed.
The third touch operation may be a sliding operation moving outward from the reference center at a second preset speed. The difference between the third touch operation and the second touch operation is that: the second touch operation is used for emergency braking of the virtual object, similar to activating a foot brake function of the virtual object, and the third touch operation is used for controlling the virtual object to drift, similar to activating a hand brake function of the virtual object.
Fig. 11 is a schematic diagram illustrating a virtual object drifting control in a single-point manipulation mode according to an alternative embodiment of the invention, and as shown in fig. 11, a game player activates a drifting function by performing a sliding touch operation from a reference center to the outside and with a sliding speed exceeding a second preset speed, so as to control the virtual object to drift. At this time, the drift direction of the virtual object needs to be controlled according to the moving direction of the touch point. The virtual object may be shifted toward a corresponding direction according to the moving direction of the touch point, for example, when the third touch operation is located at the lower left of the reference center, the virtual object may be controlled to shift to the right (of course, the third touch operation and the setting of the shift direction should be consistent with the setting between the first touch operation and the virtual object turning angle for consistency of the manipulation).
In controlling the virtual object to drift, drift prompt information may be provided in the graphical user interface. The embodiment of the present invention does not specifically limit the expression form of the drift prompt information. Taking the virtual object as a virtual racing car as an example, the drift prompt information may be expressed as additional effects such as a drift sliding track and smoke and dust caused by drift, or may be expressed as a change in the body form of the virtual racing car, for example: body highlighting, body flashing, and may also be presented as text or voice prompts independent of the virtual race car, such as: a text prompt such as 'continuously drifting' is displayed in the area above the left, right or the like of the virtual racing car.
Fig. 12 is a schematic diagram illustrating a drifting prompt message in a single-point manipulation mode according to an alternative embodiment of the invention, and as shown in fig. 12, a game player activates a drifting function by performing a sliding touch operation from a reference center to the outside and with a sliding speed exceeding a second preset speed, so as to control a virtual object to drift. At this time, the drifting direction of the virtual object needs to be controlled according to the moving direction of the touch point, and text-form drifting prompt information of "continuously drifting" also appears right above the virtual object.
Optionally, the method may further include the following steps:
in step S19, in response to the touch point of the third touch operation stopping moving, the virtual object is controlled to continuously drift, and when it is determined that the third touch operation terminates executing, the virtual object is controlled to stop drifting.
In the drifting process, if the touch point of the third touch operation stops moving and keeps in a contact state with the graphical user interface (i.e. the touch point does not disappear and is in a static state), a drifting instruction is continuously issued to the virtual object, so that the virtual object is continuously in a drifting state. When the third touch operation is terminated (i.e. the touch point disappears), the virtual object is controlled to stop drifting and to be recovered to the normal driving state from the drifting state.
Optionally, the method may further include the following steps:
step S20, when the game attribute of the virtual object satisfies the preset condition, in response to a fourth touch operation with respect to the reference center, controlling the virtual object to perform instantaneous acceleration, the fourth touch operation including: click operation, double click operation, long press operation or re-press operation.
The game property of the virtual object meeting the preset condition can trigger the game form of the virtual object to change, for example: if the instantaneous acceleration attribute of the virtual object meets the instantaneous acceleration condition set in the game scene, the game player can control the virtual object to perform instantaneous acceleration by executing the fourth touch operation. The fourth touch operation may include, but is not limited to: click operation, double click operation, long press operation or re-press operation. Still taking the virtual object as a virtual racing car as an example, when the virtual racing car makes the nitrogen acceleration energy bar reach a full state by colliding a nitrogen acceleration prop preset on the virtual racing track or by continuous drifting of the virtual racing car, it may be determined that the instantaneous acceleration attribute of the virtual racing car satisfies the instantaneous acceleration condition set in the game scene, and thus in response to the fourth touch operation for the reference center, the virtual racing car may be controlled to perform nitrogen acceleration. At this time, the touch point of the fourth touch operation coincides with the reference center.
In controlling the virtual object to perform the transient acceleration, a transient acceleration prompt message may be provided in the graphical user interface. The embodiment of the present invention does not specifically limit the expression form of the instant acceleration prompt message. Taking the example that the virtual object is a virtual racing car, the instantaneous acceleration prompt message may be expressed as an additional effect of adding a flame at an exhaust hole of the virtual racing car, or may be expressed as a change in the body form of the virtual racing car, for example: body highlighting, body flashing, and may also be presented as text or voice prompts independent of the virtual race car, such as: and displaying text prompts such as 'nitrogen accelerating' in the area of the upper left, right or right of the virtual racing car.
Fig. 13 is a schematic view illustrating nitrogen acceleration control of a virtual object in a single-point operation mode according to an alternative embodiment of the present invention, and as shown in fig. 13, when a nitrogen acceleration energy bar is filled by a virtual racing car through collision with a nitrogen acceleration prop preset on a virtual track or continuous drifting of the virtual racing car, a game player may control the virtual racing car to perform nitrogen acceleration by performing a click operation, a double click operation, a long press operation, or a double press operation at a position of a reference center. Meanwhile, a text-form nitrogen acceleration prompt message of 'nitrogen acceleration in progress' appears right above the virtual racing car.
In accordance with one embodiment of the present invention, another embodiment of a method for controlling a virtual object is provided, it should be noted that the steps illustrated in the flowchart of the accompanying drawings may be performed in a computer system such as a set of computer-executable instructions, and that while a logical order is illustrated in the flowchart, in some cases the steps illustrated or described may be performed in an order different than that illustrated herein.
The method embodiments may be performed in a mobile terminal, a computer terminal or a similar computing device. Taking the example of the Mobile terminal running on the Mobile terminal, the Mobile terminal may be a terminal device such as a smart phone (e.g., an Android phone, an iOS phone, etc.), a tablet computer, a palm computer, a Mobile Internet device (MID for short), a PAD, and the like. The mobile terminal may include one or more processors (which may include, but are not limited to, a Central Processing Unit (CPU), a Graphics Processing Unit (GPU), a Digital Signal Processing (DSP) chip, a Microprocessor (MCU), a programmable logic device (FPGA), a neural Network Processor (NPU), a Tensor Processor (TPU), an Artificial Intelligence (AI) type processor, etc.) and a memory for storing data. Optionally, the mobile terminal may further include a transmission device, an input/output device, and a display device for a communication function. It will be understood by those skilled in the art that the foregoing structural description is only illustrative and not restrictive of the structure of the mobile terminal. For example, the mobile terminal may also include more or fewer components than described above, or have a different configuration than described above.
The memory may be used to store computer programs, for example, software programs and modules of application software, such as computer programs corresponding to the control method of the virtual object in the embodiment of the present invention, and the processor executes various functional applications and data processing by running the computer programs stored in the memory, that is, implements the control method of the virtual object described above. The memory may include high speed random access memory, and may also include non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some examples, the memory may further include memory located remotely from the processor, and these remote memories may be connected to the mobile terminal through a network. Examples of such networks include, but are not limited to, the internet, intranets, local area networks, mobile communication networks, and combinations thereof.
The transmission device is used to receive or transmit data via a network. Specific examples of the network described above may include a wireless network provided by a communication provider of the mobile terminal. In one example, the transmission device includes a Network adapter (NIC) that can be connected to other Network devices through a base station to communicate with the internet. In one example, the transmission device may be a Radio Frequency (RF) module, which is used for communicating with the internet in a wireless manner.
The display device may be, for example, a touch screen type Liquid Crystal Display (LCD) and a touch display (also referred to as a "touch screen" or "touch display screen"). The liquid crystal display may enable a user to interact with a user interface of the mobile terminal. In some embodiments, the mobile terminal has a Graphical User Interface (GUI) with which a user can interact by touching finger contacts and/or gestures on a touch-sensitive surface, where the human-machine interaction function optionally includes the following interactions: executable instructions for creating web pages, drawing, word processing, making electronic documents, games, video conferencing, instant messaging, emailing, call interfacing, playing digital video, playing digital music, and/or web browsing, etc., for performing the above-described human-computer interaction functions, are configured/stored in one or more processor-executable computer program products or readable storage media.
In this embodiment, a method for controlling another virtual object running on the mobile terminal is provided, where a graphical user interface is obtained by executing a software application on a processor of the mobile terminal and rendering the software application on a touch display of the mobile terminal, and content displayed by the graphical user interface at least partially includes a game scene and a virtual object. Fig. 14 is a flowchart of another control method of a virtual object according to an embodiment of the present invention, as shown in fig. 14, the method includes the steps of:
step S140, in response to the two-point touch operation on the graphical user interface, acquiring an angle between a connecting line between a first touch point and a second touch point of the two-point touch operation and a horizontal axis or a vertical axis of the touch display;
in step S141, the turning angle of the virtual object is controlled according to the angle.
Through the steps, the method of responding to the two-point touch operation aiming at the graphical user interface and acquiring the angle between the connecting line between the first touch point and the second touch point of the two-point touch operation and the horizontal axis or the longitudinal axis of the touch display can be adopted, and the turning angle of the virtual object is controlled through the angle, so that the purpose of simply, conveniently and flexibly controlling the turning angle of the virtual object by using the first touch point and the second touch point of the two-point touch operation in a two-hand control mode is achieved, the technical effects of improving the control flexibility and convenience of the racing game and reducing the control complexity are achieved, and the technical problems of single control mode and high control complexity of the racing game provided in the related technology are solved.
The game scenes may include, but are not limited to, racing game scenes of racing-type games. The virtual objects may include, but are not limited to: virtual racing cars, virtual aircraft, virtual ships. The following will explain the implementation of the present invention in further detail by taking the virtual racing car as an example.
The two-point touch operation at least has the following functions: controlling the turning angle of the virtual object. The touch area acted by the two-point touch operation can be an area formed by the whole graphical user interface under the condition that no control is arranged in the graphical user interface; or the rest area of the whole graphical user interface except the control under the condition that the control is set in the graphical user interface; of course, it may also be a specific area within the graphical user interface, for example: left, right, below left, below right, etc. of the graphical user interface. The outline of the specific region is not particularly limited in the embodiment of the present invention. For example: the profile may be rectangular, circular, etc.
The direction control for the virtual object is actually controlled by the turning angle. In the related art, a virtual stick is generally used to directly control the moving direction of a virtual object. Specifically, during the process of controlling the moving direction of the virtual object through the virtual joystick, the position of the touch point acting on the virtual joystick directly corresponds to the moving direction of the virtual object, and as long as the position of the touch point remains unchanged, the moving direction of the virtual object also remains unchanged. In contrast, in the virtual object manipulation method provided by the embodiment of the present invention, for an angle between a connection line between a first touch point and a second touch point of the two-point touch operation and a horizontal axis or a vertical axis of the touch display, a specific corresponding relationship exists between the angle and a turning angle of the virtual object. When the positions of the first touch point and the second touch point are kept unchanged, the turning angle of the virtual object is also kept unchanged. The virtual object will continue to perform the turning operation, and thus the actual moving direction of the virtual object is constantly changing.
In an alternative embodiment, a planar rectangular coordinate system may be established with a particular location on the touch display (e.g., a corner vertex of the graphical user interface, a geometric center of the virtual object, etc.) set as the origin of coordinates, where the X-axis is parallel to the lateral axis of the touch display and the Y-axis is parallel to the longitudinal axis of the touch display. The angle can be described by absolute values or positive and negative values. And will not be described in detail herein.
Fig. 15 is a schematic diagram illustrating steering of the virtual object with reference to the Y-axis in the two-point manipulation mode according to an alternative embodiment of the present invention, where as shown in fig. 15, if the connection line between the first touch point and the second touch point rotates clockwise with respect to the Y-axis, the virtual object is controlled to perform a forward-right turning operation, and the greater the angle deviated from the Y-axis, the greater the turning angle of the virtual object. If the connection line between the first touch point and the second touch point rotates counterclockwise with respect to the Y-axis, the virtual object is controlled to perform a forward left-turn operation, and the greater the angle of deviation from the Y-axis, the greater the turning angle of the virtual object.
Fig. 16 is a schematic diagram illustrating a virtual object steering with reference to the X-axis in a two-point manipulation mode according to an alternative embodiment of the present invention, where as shown in fig. 16, if a connection line between a first touch point and a second touch point rotates clockwise with respect to the X-axis, the virtual object is controlled to perform a forward-right turning operation, and the greater the angle of deviation from the X-axis, the greater the turning angle of the virtual object. If the connection line between the first touch point and the second touch point rotates counterclockwise with respect to the X-axis, the virtual object is controlled to perform a forward left-turn operation, and the greater the angle of deviation from the X-axis, the greater the turning angle of the virtual object.
It should be noted that the steering operation described above is only an exemplary one, and is not to be construed as a limitation of the present invention. For the description of the deflection angle of the connection line between the first touch point and the second touch point and the corresponding relationship between the deflection angle and the turning angle of the virtual object, those skilled in the art do not need to pay creative work, and other embodiments may be provided as long as the turning angle of the virtual object is determined according to the deflection angle, which is within the protection scope of the present application. Of course, other steering maneuvers may also be employed. For example: and if the connecting line between the first touch point and the second touch point rotates clockwise relative to the Y axis, controlling the virtual object to execute a forward left-turning operation. And if the connecting line between the first touch point and the second touch point rotates anticlockwise relative to the Y axis, controlling the virtual object to execute a forward-right turning operation. In addition, in the above-described steering manner, only the forward turning operation may be involved, and the backward turning operation may not be involved. When the virtual object needs to be controlled to execute the backward operation, the operation can be switched to the backward operation through other controls.
Optionally, the method may further include the following steps:
step S142, in response to the two-point touch operation, providing a direction control on the graphical user interface, where the direction control is used to display a connection line between the first touch point and the second touch point of the two-point touch operation.
The direction control has the following functions: it is convenient for the game player to determine the size of the current turning angle of the virtual object. In an optional embodiment, the direction control is displayed as a connection line between a first touch point and a second touch point of a two-point touch operation. It should be noted that the connection line between the first touch point and the second touch point in the two-point touch operation is only an exemplary illustration, and does not limit the present invention. The directional control may also be displayed in other forms, such as: virtual steering wheel, etc.
Optionally, the method may further include the following steps:
step S143, providing a speed control on the graphical user interface; and responding to the two-point touch operation, controlling the size of the speed control according to the two-point touch operation, and controlling the moving speed of the virtual object according to the size of the speed control.
The speed control functions not only to prompt the game player in real time with the current moving speed of the virtual object, but also to control the virtual object to avoid sudden speed changes. Considering that the speed of the vehicle does not instantaneously change during normal driving in real life, and the acceleration and deceleration of the vehicle need to be performed for a period of time, if the distance between the first touch point and the second touch point is directly used to determine the moving speed of the virtual object, the moving speed of the virtual object will continuously change suddenly in the game scene, thereby being contrary to the real life scene. Based on the above analysis, the touch operation of the game player can be applied to the speed control, so that the speed control is changed based on the current position. That is, the game player can control the movement of the speed control by the movement of the first touch point and the second touch point of the two-point touch operation, so as to adjust the display position of the speed control in real time, and further control the speed control to be enlarged or reduced. Then, the mobile terminal controls the moving speed of the virtual object according to the enlargement or reduction of the speed control. As an optional embodiment, if the two-touch operation drags the speed control to be continuously enlarged, the virtual object is controlled to perform an acceleration operation. And if the dragging speed control is continuously reduced in the two-point touch operation, controlling the virtual object to execute the speed reduction operation. As another alternative embodiment, if the two-touch operation drags the speed control to be continuously enlarged, the virtual object is controlled to perform the deceleration operation. And if the dragging speed control is continuously reduced in the two-point touch operation, controlling the virtual object to execute acceleration operation.
The two-point touch operation can be directly acted on the speed control, and can also be acted on the area outside the speed control. The response area of the two-point touch operation may be the whole graphical user interface, or may be a partial area of the whole graphical user interface, for example: left, right, below left, below right, etc. of the graphical user interface.
In an alternative embodiment, the speed control may be a closed curve (e.g., a circular curve) or a non-closed curve (e.g., a circular arc curve), which depends on an actual manipulation area of the two-point touch operation. If the two-touch operation is applied to the whole graphical user interface, the speed control can be a circular curve. If the two-point touch operation is concentrated on the lower area of the reference center, the speed control can be a semi-circular curve or even an arc curve smaller than 90 degrees. It should be noted that the speed control can also be represented by other shapes, such as: line segments, squares, hexagons, pentagons, ovals or other irregular shapes. The speed control can be controlled to carry out amplification or reduction operation through the touch points of the two-point touch operation, so that the moving speed of the virtual object is controlled according to the size of the speed control.
Fig. 17 is a schematic diagram of a direction control and a speed control in a two-point manipulation mode according to an alternative embodiment of the present invention, and as shown in fig. 17, the direction control is displayed as a connection line between a first touch point and a second touch point of a two-point touch operation. The speed control takes the form of a circular curve whose center may be the geometric center of the graphical user interface or the geometric center of the virtual object (although other positions are possible, such as the center of the lower half of the graphical user interface). The game player can control the speed control to carry out the zooming-in or zooming-out operation through the movement of the touch points of the two-point touch operation, and the size of the speed control is mainly determined by the radius of the speed control.
It should be noted that, for the single-point touch operation and the two-point touch operation, the two may share the same speed control, or may use the same independent speed control, that is, different speed controls are used during the process of switching between the single-hand mode and the two-hand mode. When the two speed controls respectively use the same independent speed control, the two speed controls can adopt the same setting in at least one of the attributes of color, shape, position, size and the like, and the other attributes are different from each other. The single-point touch operation mode or the two-point touch operation mode can be applied to the vertical screen state and the horizontal screen state.
Optionally, the method may further include the following steps:
step S144, displaying the value of the current speed of the virtual object on the speed control.
In order to enable the game player to more intuitively perceive the current moving speed of the virtual object, the current moving speed of the virtual object may be prompted within the graphical user interface. The prompting mode can display the numerical value of the current speed of the virtual object on the speed control, and can also display the current moving speed of the virtual object in other forms such as a virtual dial plate. Fig. 18 is a schematic view illustrating a numerical display mode of a current velocity of a virtual object in a two-point manipulation mode according to an alternative embodiment of the present invention, where as shown in fig. 18, the velocity control is a circular curve, a center of the circular curve is located at a geometric center of the gui, and a first touch point and a second touch point of the two-point touch operation may be located on the circular curve. The game player can control the speed control to perform the zooming-in or zooming-out operation through the movement of the first touch point and the second touch point of the two-point touch operation, and the numerical value of the current speed of the virtual object is directly displayed on the circular curve, for example: the value of the current velocity of the virtual object of 170km/h is displayed on the circular curve.
Optionally, the moving speed of the virtual object is positively correlated with the size of the speed control.
That is, if the size of the speed control is larger, the moving speed of the virtual object is faster. Conversely, if the size of the speed control is smaller, the speed of movement of the virtual object is slower. The moving speed of the virtual object and the size of the speed control may be in a linear relationship or a nonlinear relationship.
There is also provided, in accordance with an embodiment of the present invention, a method for controlling a virtual object, including the steps illustrated in the flowchart of the accompanying drawings, which may be implemented in a computer system such as a set of computer-executable instructions, and where, although a logical order is illustrated in the flowchart, in some cases the steps illustrated or described may be performed in an order different than that illustrated.
The method embodiments may be performed in a mobile terminal, a computer terminal or a similar computing device. Taking the example of the Mobile terminal running on the Mobile terminal, the Mobile terminal may be a terminal device such as a smart phone (e.g., an Android phone, an iOS phone, etc.), a tablet computer, a palm computer, a Mobile Internet device (MID for short), a PAD, and the like. The mobile terminal may include one or more processors (which may include, but are not limited to, a Central Processing Unit (CPU), a Graphics Processing Unit (GPU), a Digital Signal Processing (DSP) chip, a Microprocessor (MCU), a programmable logic device (FPGA), a neural Network Processor (NPU), a Tensor Processor (TPU), an Artificial Intelligence (AI) type processor, etc.) and a memory for storing data. Optionally, the mobile terminal may further include a transmission device, an input/output device, and a display device for a communication function. It will be understood by those skilled in the art that the foregoing structural description is only illustrative and not restrictive of the structure of the mobile terminal. For example, the mobile terminal may also include more or fewer components than described above, or have a different configuration than described above.
The memory may be used to store computer programs, for example, software programs and modules of application software, such as computer programs corresponding to the control method of the virtual object in the embodiment of the present invention, and the processor executes various functional applications and data processing by running the computer programs stored in the memory, that is, implements the control method of the virtual object described above. The memory may include high speed random access memory, and may also include non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some examples, the memory may further include memory located remotely from the processor, and these remote memories may be connected to the mobile terminal through a network. Examples of such networks include, but are not limited to, the internet, intranets, local area networks, mobile communication networks, and combinations thereof.
The transmission device is used to receive or transmit data via a network. Specific examples of the network described above may include a wireless network provided by a communication provider of the mobile terminal. In one example, the transmission device includes a Network adapter (NIC) that can be connected to other Network devices through a base station to communicate with the internet. In one example, the transmission device may be a Radio Frequency (RF) module, which is used for communicating with the internet in a wireless manner.
The display device may be, for example, a touch screen type Liquid Crystal Display (LCD) and a touch display (also referred to as a "touch screen" or "touch display screen"). The liquid crystal display may enable a user to interact with a user interface of the mobile terminal. In some embodiments, the mobile terminal has a Graphical User Interface (GUI) with which a user can interact by touching finger contacts and/or gestures on a touch-sensitive surface, where the human-machine interaction function optionally includes the following interactions: executable instructions for creating web pages, drawing, word processing, making electronic documents, games, video conferencing, instant messaging, emailing, call interfacing, playing digital video, playing digital music, and/or web browsing, etc., for performing the above-described human-computer interaction functions, are configured/stored in one or more processor-executable computer program products or readable storage media.
In this embodiment, a method for controlling a virtual object running on the mobile terminal is provided, where a graphical user interface is obtained by executing a software application on a processor of the mobile terminal and rendering the software application on a touch display of the mobile terminal, and content displayed on the graphical user interface at least partially includes a game scene and a virtual object, and fig. 19 is a flowchart of a method for controlling a virtual object according to another embodiment of the present invention, as shown in fig. 19, where the method includes the following steps:
step S190, detecting the use state of the mobile terminal, wherein the use state comprises: a vertical screen state and a horizontal screen state;
step S191, when the mobile terminal is detected to be in the vertical screen state, providing a reference center on the graphical user interface, responding to the single-point touch operation aiming at the graphical user interface, and controlling the turning angle of the virtual object according to the angle of the touch point of the single-point touch operation relative to the reference center; when the mobile terminal is detected to be in a horizontal screen state, responding to two-point touch operation aiming at the graphical user interface, and controlling the turning angle of the virtual object according to the angle between the connecting line between the first touch point and the second touch point of the two-point touch operation and the horizontal axis or the vertical axis of the touch display.
Through the steps, the method for detecting the use state of the mobile terminal can be adopted, and the use state comprises the following steps: in the mode of the vertical screen state and the horizontal screen state, when the mobile terminal is detected to be in the vertical screen state, a reference center is provided on the graphical user interface, single-point touch operation aiming at the graphical user interface is responded, and the turning angle of the virtual object is controlled according to the angle of a touch point of the single-point touch operation relative to the reference center; when the mobile terminal is detected to be in the horizontal screen state, the turning angle of the virtual object is controlled according to the angle between the connecting line between the first touch point and the second touch point of the two-point touch operation and the horizontal axis or the vertical axis of the touch display in response to the two-point touch operation aiming at the graphical user interface, the aim of switching between the single-point control mode and the two-point control mode by using the detection result of the mobile terminal in the vertical screen state or the horizontal screen state is achieved, and the turning angle of the virtual object is simply, conveniently and flexibly controlled, so that the technical effects of improving the control flexibility and convenience of the racing game and reducing the control complexity are achieved, and the technical problems that the control mode of the racing game provided in the related technology is single and the control complexity is high are solved.
The game scenes may include, but are not limited to, racing game scenes of racing-type games. The virtual objects may include, but are not limited to: virtual racing cars, virtual aircraft, virtual ships. The following will explain the implementation of the present invention in further detail by taking the virtual racing car as an example.
And when the mobile terminal is detected to be in the vertical screen state, entering a single-point control mode. In the single-point manipulation mode, the reference center can be determined according to the display position of the virtual object in the game scene. For example: when the virtual object is displayed in a central region of the graphical user interface, the reference center may be a geometric center position of the graphical user interface. For another example: when the virtual object is displayed in the lower half area of the graphical user interface, the reference center may be a lower half center position of the graphical user interface. In addition, the reference center can be determined according to the size information of the graphical user interface and a single-hand manipulation mode (such as a left-hand manipulation mode or a right-hand manipulation mode) selected by the user without completely depending on the position of the virtual object. For example: when it is determined that the game player currently uses the super-large screen smart phone according to the size information of the graphical user interface, and the game player selects the left-hand manipulation mode, the reference center may be a center position of a left half portion of the graphical user interface. Therefore, the multi-dimensional single-hand operation mode is provided for the game player, and meanwhile, the fatigue caused by the single-hand operation can be effectively reduced. In addition, the display state of the reference center may be either a state visible to the game player (i.e., an opaque state or a translucent state) or a state invisible to the game player (i.e., a transparent state). The display shape of the reference center can be a single point or a specific figure (such as a circle, a square, a triangle, a diamond, etc.) with a certain size.
The single-point touch operation at least has the following functions: controlling the turning angle of the virtual object. The touch area acted by the single-point touch operation can be an area formed by the whole graphical user interface under the condition that no control is arranged in the graphical user interface; or the rest area of the whole graphical user interface except the control under the condition that the control is set in the graphical user interface; of course, it may also be a specific area within the graphical user interface, for example: left, right, below left, below right, etc. of the graphical user interface. The outline of the specific region is not particularly limited in the embodiment of the present invention. For example: the profile may be rectangular, circular, etc.
The direction control for the virtual object is actually controlled by the turning angle. In the related art, a virtual stick is generally used to directly control the moving direction of a virtual object. Specifically, during the process of controlling the moving direction of the virtual object through the virtual joystick, the position of the touch point acting on the virtual joystick directly corresponds to the moving direction of the virtual object, and as long as the position of the touch point remains unchanged, the moving direction of the virtual object also remains unchanged. In contrast, in the virtual object manipulation method provided by the embodiment of the invention, a specific corresponding relationship exists between the angle of the touch point of the single-point touch operation relative to the reference center and the turning angle of the virtual object. When the position of the touch point remains unchanged, the turning angle of the virtual object also remains unchanged. The virtual object will continue to perform the turning operation, and thus the actual moving direction of the virtual object is constantly changing.
In an alternative embodiment, the reference line used to determine the angle of the touch point with respect to the reference center may be parallel to either the horizontal or the vertical axis of the touch display. The angle can be described by absolute values or positive and negative values. And will not be described in detail herein.
And when the mobile terminal is detected to be in the horizontal screen state, entering a two-point control mode. In the two-point operation mode, the two-point touch operation at least has the following functions: controlling the turning angle of the virtual object. The touch area acted by the two-point touch operation can be an area formed by the whole graphical user interface under the condition that no control is arranged in the graphical user interface; or the rest area of the whole graphical user interface except the control under the condition that the control is set in the graphical user interface; of course, it may also be a specific area within the graphical user interface, for example: left, right, below left, below right, etc. of the graphical user interface. The outline of the specific region is not particularly limited in the embodiment of the present invention. For example: the profile may be rectangular, circular, etc.
The direction control for the virtual object is actually controlled by the turning angle. In the related art, a virtual stick is generally used to directly control the moving direction of a virtual object. Specifically, during the process of controlling the moving direction of the virtual object through the virtual joystick, the position of the touch point acting on the virtual joystick directly corresponds to the moving direction of the virtual object, and as long as the position of the touch point remains unchanged, the moving direction of the virtual object also remains unchanged. In contrast, in the virtual object manipulation method provided by the embodiment of the present invention, for an angle between a connection line between a first touch point and a second touch point of the two-point touch operation and a horizontal axis or a vertical axis of the touch display, a specific corresponding relationship exists between the angle and a turning angle of the virtual object. When the positions of the first touch point and the second touch point are kept unchanged, the turning angle of the virtual object is also kept unchanged. The virtual object will continue to perform the turning operation, and thus the actual moving direction of the virtual object is constantly changing.
In an alternative embodiment, a planar rectangular coordinate system may be established with a particular location on the touch display (e.g., a corner vertex of the graphical user interface, a geometric center of the virtual object, etc.) set as the origin of coordinates, where the X-axis is parallel to the lateral axis of the touch display and the Y-axis is parallel to the longitudinal axis of the touch display. The angle can be described by absolute values or positive and negative values. And will not be described in detail herein.
Optionally, the method may further include the following steps:
step S192, when it is detected that the mobile terminal is in the vertical screen state, providing a first direction control on the graphical user interface in response to the single-point touch operation, where the first direction control is used to display a connection line between a touch point of the single-point touch operation and the reference center.
When detecting that the mobile terminal is in a vertical screen state, the first direction control is used for: it is convenient for the game player to determine the size of the current turning angle of the virtual object. In an optional embodiment, the first direction control is displayed as a connecting line between a touch point of the single-point touch operation and the reference center. It should be noted that the connecting line between the touch point and the reference center is only an exemplary illustration, and does not limit the present invention. The first direction control may also be displayed in other forms, such as: virtual steering wheel, etc.
Optionally, the method may further include the following steps:
step S193, when it is detected that the mobile terminal is in the horizontal screen state, providing a second direction control on the graphical user interface in response to the two-point touch operation, where the second direction control is used to display a connection line between a first touch point and a second touch point of the two-point touch operation.
When detecting that the mobile terminal is in a landscape state, the second direction control is used for: it is convenient for the game player to determine the size of the current turning angle of the virtual object. In an optional embodiment, the second direction control is displayed as a connection line between a first touch point and a second touch point of the two-point touch operation. It should be noted that the connection line between the first touch point and the second touch point in the two-point touch operation is only an exemplary illustration, and does not limit the present invention. The directional control may also be displayed in other forms, such as: virtual steering wheel, etc.
Optionally, the method may further include the following steps:
step S194, when the mobile terminal is detected to be in a vertical screen state, providing a first speed control on a graphical user interface; and responding to the single-point touch operation, controlling the distance between the first speed control and the reference center according to the single-point touch operation, and controlling the moving speed of the virtual object according to the distance.
When the mobile terminal is detected to be in the vertical screen state, the first speed control has the functions of not only prompting the current moving speed of the virtual object to a game player in real time, but also controlling the virtual object to avoid sudden speed change. Considering that the speed of the vehicle does not instantaneously change during normal driving in real life, and the acceleration and deceleration of the vehicle need to be performed for a period of time, if the distance between the touch point of the single-point touch operation and the reference center is directly used to determine the moving speed of the virtual object, the moving speed of the virtual object will continuously change suddenly in the game scene, thereby being contrary to the real life scene. Based on the above analysis, the single-touch operation of the game player makes the first speed control change based on the current position by acting on the first speed control. That is, the movement of the first speed control can be controlled by the movement of the touch point of the game player through the single-point touch operation, so as to adjust the display position of the first speed control in real time. Then, the mobile terminal controls the moving speed of the virtual object according to the distance between the display position and the reference center. As an alternative embodiment, if the single-touch operation drags the first velocity control away from the reference center, the virtual object is controlled to perform an acceleration operation. And if the single-point touch operation drags the first speed control to be close to the reference center, controlling the virtual object to execute a deceleration operation. As another alternative embodiment, if the single-touch operation drags the first velocity control away from the reference center, the virtual object is controlled to perform a deceleration operation. And if the single-point touch operation drags the first speed control to be close to the reference center, controlling the virtual object to execute acceleration operation.
The single-point touch operation may act directly on the first speed control, or may act on a region other than the first speed control. The response area of the single-point touch operation may be the entire graphical user interface, or may be a partial area of the entire graphical user interface, for example: left, right, below left, below right, etc. of the graphical user interface. When the sliding distance of the single-point touch operation includes a component in a direction away from the reference center, the first speed control can be controlled to be away from the reference center. The larger this component, the greater the magnitude of the outward movement of the first speed control.
Optionally, the method may further include the following steps:
step S195, when the mobile terminal is detected to be in the horizontal screen state, providing a second speed control on the graphical user interface; and responding to the two-point touch operation, controlling the size of the second speed control according to the two-point touch operation, and controlling the moving speed of the virtual object according to the size of the second speed control.
The secondary speed control functions not only to prompt the game player in real time with the current moving speed of the virtual object, but also to control the virtual object to avoid sudden speed changes. Considering that the speed of the vehicle does not instantaneously change during normal driving in real life, and the acceleration and deceleration of the vehicle need to be performed for a period of time, if the distance between the first touch point and the second touch point is directly used to determine the moving speed of the virtual object, the moving speed of the virtual object will continuously change suddenly in the game scene, thereby being contrary to the real life scene. Based on the above analysis, the touch operation of the game player makes the second speed control change based on the current position by acting on the second speed control. That is, the game player can control the movement of the second velocity control by the movement of the first touch point and the second touch point of the two-point touch operation, so as to adjust the display position of the second velocity control in real time, and further control the enlargement or reduction of the second velocity control. Then, the mobile terminal controls the moving speed of the virtual object according to the enlargement or reduction of the second speed control. As an alternative embodiment, if the two-touch operation drags the second velocity control to be continuously enlarged, the virtual object is controlled to execute an acceleration operation. And if the two-point touch operation drags the second speed control to be continuously reduced, controlling the virtual object to execute a deceleration operation. As another alternative embodiment, if the two-touch operation drags the second speed control to be continuously enlarged, the virtual object is controlled to perform a deceleration operation. And if the two-point touch operation drags the second speed control to be continuously reduced, controlling the virtual object to execute acceleration operation.
The two-point touch operation may act directly on the second speed control, or may act on an area other than the second speed control. The response area of the two-point touch operation may be the whole graphical user interface, or may be a partial area of the whole graphical user interface, for example: left, right, below left, below right, etc. of the graphical user interface.
Optionally, the first speed control is a circle or an arc with the reference center as a center, and in step S194, controlling the distance between the first speed control and the reference center according to the single-point touch operation may include the following steps:
step S1941, the first speed control is controlled to be enlarged or reduced according to the single-point touch operation, and the distance between the first speed control and the reference center is the radius of the first speed control.
The first speed control may be a closed curve (e.g., a circle centered on the reference center) or a non-closed curve (e.g., an arc centered on the reference center), which mainly depends on the actual manipulation area of the single-point touch operation. If the single-touch operation is applied to the whole graphical user interface, the first speed control can be a circular curve. If the single-point touch operation is concentrated on the lower area of the reference center, the first speed control may be a semi-circular arc curve, or even an arc curve smaller than 90 degrees. It should be noted that the first speed control may also be represented by other shapes, such as: line segments, squares, hexagons, pentagons, ovals or other irregular shapes. The touch point through single-point touch operation can control the first speed control to carry out zooming-in or zooming-out operation, and the distance between the first speed control and the reference center is the radius of the first speed control.
Optionally, the second speed control is a circle or an arc, and the method may further include the following steps:
and step S196, controlling the second speed control to enlarge or reduce according to the two-point touch operation, wherein the size of the speed control is determined by the radius of the speed control.
In an alternative embodiment, the second speed control may be a closed curve (e.g., a circular curve) or a non-closed curve (e.g., a circular arc curve), which depends on an actual manipulation area of the two-point touch operation. The second speed control may be a circular curve if the two-touch operation is applied to the entire graphical user interface. If the two-point touch operation is concentrated on the lower area of the reference center, the second speed control may be a semi-circular arc curve, or even an arc curve smaller than 90 degrees. It should be noted that the second speed control can also be represented by other shapes, such as: line segments, squares, hexagons, pentagons, ovals or other irregular shapes. The second speed control can be controlled to carry out amplification or reduction operation through the touch points of the two-point touch operation, so that the moving speed of the virtual object is controlled according to the size of the speed control.
Through the above description of the embodiments, those skilled in the art can clearly understand that the method according to the above embodiments can be implemented by software plus a necessary general hardware platform, and certainly can also be implemented by hardware, but the former is a better implementation mode in many cases. Based on such understanding, the technical solutions of the present invention may be embodied in the form of a software product, which is stored in a storage medium (e.g., ROM/RAM, magnetic disk, optical disk) and includes instructions for enabling a terminal device (e.g., a mobile phone, a computer, a server, or a network device) to execute the method according to the embodiments of the present invention.
In this embodiment, a control device for a virtual object is further provided, and the device is used to implement the foregoing embodiments and preferred embodiments, and details of which have been already described are omitted. As used below, the term "module" may be a combination of software and/or hardware that implements a predetermined function. Although the means described in the embodiments below are preferably implemented in software, an implementation in hardware, or a combination of software and hardware is also possible and contemplated.
Fig. 20 is a block diagram of an apparatus for controlling a virtual object according to an embodiment of the present invention, in which a graphical user interface is obtained by executing a software application on a processor of a mobile terminal and rendering the software application on a touch display of the mobile terminal, and contents displayed on the graphical user interface at least partially include a game scene and a virtual object, as shown in fig. 20, the apparatus includes: a processing module 10 for providing a reference center on a graphical user interface; the control module 12 is configured to, in response to a first touch operation on the graphical user interface, control a turning angle of the virtual object according to an angle of a touch point of the first touch operation with respect to a reference center.
Optionally, the processing module 10 is further configured to provide, in response to the first touch operation, a direction control on the graphical user interface, where the direction control is configured to display a connection line between the touch point of the first touch operation and the reference center.
Optionally, the processing module 10 is further configured to provide a speed control in the graphical user interface; and the control module is also used for responding to the first touch operation, controlling the distance between the speed control and the reference center according to the first touch operation and controlling the moving speed of the virtual object according to the distance.
Optionally, the speed control is a circle or an arc with the reference center as a center of circle, the control module 12 is further configured to control the speed control to zoom in or out according to the first touch operation, and a distance between the speed control and the reference center is a radius of the speed control.
Optionally, the processing module 10 is further configured to display a numerical value of the current velocity of the virtual object on the velocity control.
Optionally, the moving speed of the virtual object is positively correlated with the size of the distance.
Optionally, the processing module 10 is further configured to provide a plurality of gear controls on the graphical user interface, where the plurality of gear controls are circles or arcs with the reference center as a center, and the plurality of gear controls are used to prompt a plurality of speed values of the virtual object.
Optionally, the control module 12 is further configured to, in response to the termination of the execution of the first touch operation, control the virtual object to decelerate before detecting another touch operation again, and when the current speed of the virtual object decreases to the speed value corresponding to the adjacent gear control, stop decelerating.
Optionally, the control module 12 is further configured to control the virtual object to brake in response to a second touch operation, where the second touch operation is a sliding touch operation from the speed control to the reference center and the sliding speed exceeds a first preset speed.
Optionally, the control module 12 is further configured to control the virtual object to drift according to a direction of a third touch operation in response to a third touch operation, where the third touch operation is a sliding touch operation that is outward from the reference center and has a sliding speed exceeding a second preset speed.
Optionally, the control module 12 is further configured to control the virtual object to continuously drift in response to the stop of the movement of the touch point of the third touch operation, and control the virtual object to stop drifting when it is determined that the third touch operation is terminated.
Optionally, the control module 12 is further configured to control the virtual object to perform instantaneous acceleration in response to a fourth touch operation with respect to the reference center when the game attribute of the virtual object satisfies the preset condition, where the fourth touch operation includes: click operation, double click operation, long press operation or re-press operation.
In this embodiment, another control device for a virtual object is further provided, and the device is used to implement the foregoing embodiments and preferred embodiments, and details of which have been already described are omitted. As used below, the term "module" may be a combination of software and/or hardware that implements a predetermined function. Although the means described in the embodiments below are preferably implemented in software, an implementation in hardware, or a combination of software and hardware is also possible and contemplated.
Fig. 21 is a block diagram of another apparatus for controlling a virtual object according to an embodiment of the present invention, in which a graphical user interface is obtained by executing a software application on a processor of a mobile terminal and rendering the software application on a touch display of the mobile terminal, and contents displayed on the graphical user interface at least partially include a game scene and a virtual object, as shown in fig. 21, the apparatus includes: the processing module 20 is configured to, in response to a two-point touch operation on the graphical user interface, obtain an angle between a connection line between a first touch point and a second touch point of the two-point touch operation and a horizontal axis or a vertical axis of the touch display; and a control module 22 for controlling the turning angle of the virtual object according to the angle.
Optionally, the processing module 20 is further configured to provide, in response to the two-point touch operation, a direction control on the graphical user interface, where the direction control is configured to display a connection line between a first touch point and a second touch point of the two-point touch operation.
Optionally, the processing module 20 is further configured to provide a speed control in the graphical user interface; the control module 22 is further configured to, in response to the two-touch operation, control the size of the speed control according to the two-touch operation, and control the moving speed of the virtual object according to the size of the speed control.
Optionally, the speed control is a circle or arc, and the size of the speed control is determined by the radius of the speed control.
Optionally, the processing module 20 is further configured to display the value of the current velocity of the virtual object on the velocity control.
Optionally, the moving speed of the virtual object is positively correlated with the size of the speed control.
In this embodiment, a further control device for a virtual object is further provided, and the device is used to implement the foregoing embodiments and preferred embodiments, and the description of the device that has been already made is omitted. As used below, the term "module" may be a combination of software and/or hardware that implements a predetermined function. Although the means described in the embodiments below are preferably implemented in software, an implementation in hardware, or a combination of software and hardware is also possible and contemplated.
Fig. 22 is a block diagram of a control apparatus for a virtual object according to an embodiment of the present invention, in which a graphical user interface is obtained by executing a software application on a processor of a mobile terminal and rendering the software application on a touch display of the mobile terminal, and contents displayed by the graphical user interface at least partially include a game scene and a virtual object, as shown in fig. 22, the apparatus includes: a processing module 30, configured to detect a usage status of the mobile terminal, where the usage status includes: a vertical screen state and a horizontal screen state; the control module 32 is configured to provide a reference center on the graphical user interface when it is detected that the mobile terminal is in a vertical screen state, and control a turning angle of the virtual object according to an angle of a touch point of a first touch operation with respect to the reference center in response to the first touch operation on the graphical user interface; when the mobile terminal is detected to be in a horizontal screen state, responding to two-point touch operation aiming at the graphical user interface, and controlling the turning angle of the virtual object according to the angle between the connecting line between the first touch point and the second touch point of the two-point touch operation and the horizontal axis or the vertical axis of the touch display.
Optionally, the processing module 30 is further configured to provide a first direction control on the graphical user interface in response to the first touch operation when it is detected that the mobile terminal is in the vertical screen state, where the first direction control is used to display a connection line between a touch point of the first touch operation and the reference center.
Optionally, the processing module 30 is further configured to provide a second direction control on the graphical user interface in response to the two-point touch operation when it is detected that the mobile terminal is in the horizontal screen state, where the second direction control is used to display a connection line between a first touch point and a second touch point of the two-point touch operation.
Optionally, the processing module 30 is further configured to provide a first speed control on the graphical user interface when it is detected that the mobile terminal is in the portrait screen state; the control module 32 is further configured to, in response to the first touch operation, control a distance between the first speed control and the reference center according to the first touch operation, and control a moving speed of the virtual object according to the distance.
Optionally, the processing module 30 is further configured to provide a second speed control on the graphical user interface when it is detected that the mobile terminal is in the landscape state; the control module 32 is further configured to, in response to the two-point touch operation, control the size of the second velocity control according to the two-point touch operation, and control the moving speed of the virtual object according to the size of the second velocity control.
Optionally, the first speed control is a circle or an arc with the reference center as a center of the circle, and the control module 32 is further configured to control the first speed control to zoom in or out according to the first touch operation, where a distance between the first speed control and the reference center is a radius of the first speed control.
Optionally, the second speed control is a circle or an arc, and the control module 32 is further configured to control the second speed control to zoom in or zoom out according to the two-point touch operation, where the size of the speed control is determined by the radius of the speed control.
It should be noted that, the above modules may be implemented by software or hardware, and for the latter, the following may be implemented, but not limited to: the modules are all positioned in the same processor; alternatively, the modules are respectively located in different processors in any combination.
Embodiments of the present invention also provide a storage medium having a computer program stored therein, wherein the computer program is arranged to perform the steps of any of the above method embodiments when executed.
Alternatively, in the present embodiment, the storage medium may be configured to store a computer program for executing the steps of:
s1, providing a reference center on the graphical user interface;
and S2, responding to the first touch operation of the graphical user interface, and controlling the turning angle of the virtual object according to the angle of the touch point of the first touch operation relative to the reference center.
Optionally, in this embodiment, the storage medium may be further configured to store a computer program for executing the following steps:
s1, responding to the two-point touch operation aiming at the graphical user interface, and acquiring the angle between the connecting line between the first touch point and the second touch point of the two-point touch operation and the horizontal axis or the vertical axis of the touch display;
and S2, controlling the turning angle of the virtual object according to the angle.
Optionally, in this embodiment, the storage medium may be further configured to store a computer program for executing the following steps:
s1, detecting the use state of the mobile terminal, wherein the use state comprises: a vertical screen state and a horizontal screen state;
s2, when the mobile terminal is detected to be in a vertical screen state, providing a reference center on the graphical user interface, responding to the single-point touch operation aiming at the graphical user interface, and controlling the turning angle of the virtual object according to the angle of the touch point of the single-point touch operation relative to the reference center; when the mobile terminal is detected to be in a horizontal screen state, responding to two-point touch operation aiming at the graphical user interface, and controlling the turning angle of the virtual object according to the angle between the connecting line between the first touch point and the second touch point of the two-point touch operation and the horizontal axis or the vertical axis of the touch display.
Optionally, in this embodiment, the storage medium may include, but is not limited to: various media capable of storing computer programs, such as a usb disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a removable hard disk, a magnetic disk, or an optical disk.
Embodiments of the present invention also provide an electronic device comprising a memory having a computer program stored therein and a processor arranged to run the computer program to perform the steps of any of the above method embodiments.
Optionally, the electronic apparatus may further include a transmission device and an input/output device, wherein the transmission device is connected to the processor, and the input/output device is connected to the processor.
Optionally, in this embodiment, the processor may be configured to execute the following steps by a computer program:
s1, providing a reference center on the graphical user interface;
and S2, responding to the first touch operation of the graphical user interface, and controlling the turning angle of the virtual object according to the angle of the touch point of the first touch operation relative to the reference center.
Optionally, in this embodiment, the processor may be further configured to execute, by the computer program, the following steps:
s1, responding to the two-point touch operation aiming at the graphical user interface, and acquiring the angle between the connecting line between the first touch point and the second touch point of the two-point touch operation and the horizontal axis or the vertical axis of the touch display;
and S2, controlling the turning angle of the virtual object according to the angle.
Optionally, in this embodiment, the processor may be further configured to execute, by the computer program, the following steps:
s1, detecting the use state of the mobile terminal, wherein the use state comprises: a vertical screen state and a horizontal screen state;
s2, when the mobile terminal is detected to be in a vertical screen state, providing a reference center on the graphical user interface, responding to the single-point touch operation aiming at the graphical user interface, and controlling the turning angle of the virtual object according to the angle of the touch point of the single-point touch operation relative to the reference center; when the mobile terminal is detected to be in a horizontal screen state, responding to two-point touch operation aiming at the graphical user interface, and controlling the turning angle of the virtual object according to the angle between the connecting line between the first touch point and the second touch point of the two-point touch operation and the horizontal axis or the vertical axis of the touch display.
Optionally, the specific examples in this embodiment may refer to the examples described in the above embodiments and optional implementation manners, and this embodiment is not described herein again.
The above-mentioned serial numbers of the embodiments of the present invention are merely for description and do not represent the merits of the embodiments.
In the above embodiments of the present invention, the descriptions of the respective embodiments have respective emphasis, and for parts that are not described in detail in a certain embodiment, reference may be made to related descriptions of other embodiments.
In the embodiments provided in the present application, it should be understood that the disclosed technology can be implemented in other ways. The above-described embodiments of the apparatus are merely illustrative, and for example, the division of the units may be a logical division, and in actual implementation, there may be another division, for example, multiple units or components may be combined or integrated into another system, or some features may be omitted, or not executed. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection through some interfaces, units or modules, and may be in an electrical or other form.
The units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiment.
In addition, functional units in the embodiments of the present invention may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit. The integrated unit can be realized in a form of hardware, and can also be realized in a form of a software functional unit.
The integrated unit, if implemented in the form of a software functional unit and sold or used as a stand-alone product, may be stored in a computer readable storage medium. Based on such understanding, the technical solution of the present invention may be embodied in the form of a software product, which is stored in a storage medium and includes instructions for causing a computer device (which may be a personal computer, a server, or a network device) to execute all or part of the steps of the method according to the embodiments of the present invention. And the aforementioned storage medium includes: a U-disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a removable hard disk, a magnetic or optical disk, and other various media capable of storing program codes.
The foregoing is only a preferred embodiment of the present invention, and it should be noted that, for those skilled in the art, various modifications and decorations can be made without departing from the principle of the present invention, and these modifications and decorations should also be regarded as the protection scope of the present invention.

Claims (31)

1. A method for controlling a virtual object, wherein a graphical user interface is obtained by executing a software application on a processor of a mobile terminal and rendering the software application on a touch display of the mobile terminal, and content displayed by the graphical user interface at least partially includes a game scene and a virtual object, the method comprising:
providing a reference center on the graphical user interface;
in response to a first touch operation on the graphical user interface, controlling a turning angle of the virtual object according to an angle of a touch point of the first touch operation relative to the reference center.
2. The method of claim 1, further comprising:
and responding to the first touch operation, providing a direction control on the graphical user interface, wherein the direction control is used for displaying a connecting line between a touch point of the first touch operation and the reference center.
3. The method of claim 1, further comprising:
providing a speed control at the graphical user interface;
responding to the first touch operation, controlling the distance between the speed control and the reference center according to the first touch operation, and controlling the moving speed of the virtual object according to the distance.
4. The method of claim 3, wherein the speed control is a circle or an arc centered on the reference center, and wherein controlling the distance between the speed control and the reference center according to the first touch operation comprises:
and controlling the speed control to be amplified or reduced according to the first touch operation, wherein the distance between the speed control and the reference center is the radius of the speed control.
5. The method of claim 3, further comprising:
displaying a numerical value of a current velocity of the virtual object on the velocity control.
6. The method of claim 3, wherein the speed of movement of the virtual object is positively correlated to the magnitude of the distance.
7. The method of claim 4, further comprising:
providing a plurality of gear controls on the graphical user interface, wherein the gear controls are circles or arcs with the reference center as a circle center, and the gear controls are used for prompting a plurality of speed values of the virtual object.
8. The method of claim 7, further comprising:
and in response to the termination of execution of the first touch operation, before other touch operations are detected again, controlling the virtual object to decelerate, and when the current speed of the virtual object is reduced to a speed value corresponding to the adjacent gear control, not decelerating.
9. The method of claim 3, further comprising:
and controlling the virtual object to brake in response to a second touch operation, wherein the second touch operation is a sliding touch operation from the speed control to the reference center and the sliding speed exceeds a first preset speed.
10. The method of claim 3, further comprising:
and responding to a third touch operation, and controlling the virtual object to drift according to the direction of the third touch operation, wherein the third touch operation is a sliding touch operation which is outward from the reference center and has a sliding speed exceeding a second preset speed.
11. The method of claim 10, further comprising:
and controlling the virtual object to continuously drift in response to the stop of the movement of the touch point of the third touch operation, and controlling the virtual object to stop drifting when the termination of the execution of the third touch operation is determined.
12. The method of claim 3, further comprising:
when the game attribute of the virtual object meets a preset condition, responding to a fourth touch operation aiming at the reference center, and controlling the virtual object to perform instantaneous acceleration, wherein the fourth touch operation comprises: click operation, double click operation, long press operation or re-press operation.
13. A method for controlling a virtual object, wherein a graphical user interface is obtained by executing a software application on a processor of a mobile terminal and rendering the software application on a touch display of the mobile terminal, and content displayed by the graphical user interface at least partially includes a game scene and a virtual object, the method comprising:
responding to the two-point touch operation aiming at the graphical user interface, and acquiring an angle between a connecting line between a first touch point and a second touch point of the two-point touch operation and a horizontal axis or a vertical axis of the touch display;
and controlling the turning angle of the virtual object according to the angle.
14. The method of claim 13, further comprising:
and responding to the two-point touch operation, providing a direction control on the graphical user interface, wherein the direction control is used for displaying a connecting line between a first touch point and a second touch point of the two-point touch operation.
15. The method of claim 13, further comprising:
providing a speed control at the graphical user interface;
and responding to the two-point touch operation, controlling the size of the speed control according to the two-point touch operation, and controlling the moving speed of the virtual object according to the size of the speed control.
16. The method of claim 15, wherein the speed control is a circle or arc, and wherein the size of the speed control is determined by a radius of the speed control.
17. The method of claim 15, further comprising:
displaying a numerical value of a current velocity of the virtual object on the velocity control.
18. The method of claim 15, wherein the speed of movement of the virtual object positively correlates to the size of the speed control.
19. A method for controlling a virtual object, wherein a graphical user interface is obtained by executing a software application on a processor of a mobile terminal and rendering the software application on a touch display of the mobile terminal, and content displayed by the graphical user interface at least partially includes a game scene and a virtual object, the method comprising:
detecting a use state of the mobile terminal, wherein the use state comprises: a vertical screen state and a horizontal screen state;
when the mobile terminal is detected to be in the vertical screen state, providing a reference center on the graphical user interface, responding to single-point touch operation aiming at the graphical user interface, and controlling the turning angle of the virtual object according to the angle of a touch point of the single-point touch operation relative to the reference center;
and when the mobile terminal is detected to be in the horizontal screen state, responding to the two-point touch operation aiming at the graphical user interface, and controlling the turning angle of the virtual object according to the angle between the connecting line between the first touch point and the second touch point of the two-point touch operation and the horizontal axis or the vertical axis of the touch display.
20. The method of claim 19, further comprising:
and when the mobile terminal is detected to be in a vertical screen state, responding to the single-point touch operation, and providing a first direction control on the graphical user interface, wherein the first direction control is used for displaying a connecting line between a touch point of the single-point touch operation and the reference center.
21. The method of claim 19, further comprising:
and when the mobile terminal is detected to be in a horizontal screen state, responding to the two-point touch operation, and providing a second direction control on the graphical user interface, wherein the second direction control is used for displaying a connecting line between a first touch point and a second touch point of the two-point touch operation.
22. The method of claim 19, further comprising:
when the mobile terminal is detected to be in a vertical screen state, providing a first speed control on the graphical user interface;
responding to the single-point touch operation, controlling the distance between the first speed control and the reference center according to the single-point touch operation, and controlling the moving speed of the virtual object according to the distance.
23. The method of claim 22, further comprising:
when the mobile terminal is detected to be in a horizontal screen state, providing a second speed control on the graphical user interface;
responding to the two-point touch operation, controlling the size of the second speed control according to the two-point touch operation, and controlling the moving speed of the virtual object according to the size of the second speed control.
24. The method of claim 22, wherein the first velocity control is a circle or an arc centered on the reference center, and wherein controlling the distance between the first velocity control and the reference center according to the single-point touch operation comprises:
and controlling the first speed control to be enlarged or reduced according to the single-point touch operation, wherein the distance between the first speed control and the reference center is the radius of the first speed control.
25. The method of claim 23, wherein the second speed control is a circle or an arc, the method further comprising:
and controlling the second speed control to be enlarged or reduced according to the two-point touch operation, wherein the size of the second speed control is determined by the radius of the speed control.
26. An apparatus for controlling a virtual object, wherein a graphical user interface is obtained by executing a software application on a processor of a mobile terminal and rendering on a touch-sensitive display of the mobile terminal, the content displayed by the graphical user interface at least partially including a game scene and a virtual object, the apparatus comprising:
the processing module is used for providing a reference center on the graphical user interface;
and the control module is used for responding to a first touch operation aiming at the graphical user interface and controlling the turning angle of the virtual object according to the angle of the touch point of the first touch operation relative to the reference center.
27. An apparatus for controlling a virtual object, wherein a graphical user interface is obtained by executing a software application on a processor of a mobile terminal and rendering on a touch-sensitive display of the mobile terminal, the content displayed by the graphical user interface at least partially including a game scene and a virtual object, the apparatus comprising:
the acquisition module is used for responding to two-point touch operation aiming at the graphical user interface and acquiring an angle between a connecting line between a first touch point and a second touch point of the two-point touch operation and a horizontal axis or a vertical axis of the touch display;
and the control module is used for controlling the turning angle of the virtual object according to the angle.
28. An apparatus for controlling a virtual object, wherein a graphical user interface is obtained by executing a software application on a processor of a mobile terminal and rendering on a touch-sensitive display of the mobile terminal, the content displayed by the graphical user interface at least partially including a game scene and a virtual object, the apparatus comprising:
a detection module, configured to detect a usage status of the mobile terminal, where the usage status includes: a vertical screen state and a horizontal screen state;
the control module is used for providing a reference center on the graphical user interface when the mobile terminal is detected to be in a vertical screen state, responding to single-point touch operation aiming at the graphical user interface, and controlling the turning angle of the virtual object according to the angle of a touch point of the single-point touch operation relative to the reference center; and when the mobile terminal is detected to be in a horizontal screen state, responding to the two-point touch operation aiming at the graphical user interface, and controlling the turning angle of the virtual object according to the angle between the connecting line between the first touch point and the second touch point of the two-point touch operation and the horizontal axis or the vertical axis of the touch display.
29. A storage medium having stored thereon a computer program, wherein the computer program is arranged to execute a method of controlling a virtual object as claimed in any one of claims 1 to 12, or a method of controlling a virtual object as claimed in any one of claims 13 to 18, or a method of controlling a virtual object as claimed in any one of claims 19 to 25 when executed.
30. A processor for running a program, wherein the program is arranged to execute a method for controlling a virtual object according to any one of claims 1 to 12, or a method for controlling a virtual object according to any one of claims 13 to 18, or a method for controlling a virtual object according to any one of claims 19 to 25.
31. An electronic device comprising a memory and a processor, wherein the memory has stored therein a computer program, and wherein the processor is configured to execute a method of controlling a virtual object as claimed in any one of claims 1 to 12, or a method of controlling a virtual object as claimed in any one of claims 13 to 18, or a method of controlling a virtual object as claimed in any one of claims 19 to 25.
CN202010724387.0A 2020-07-24 2020-07-24 Virtual object control method and device, storage medium and electronic device Pending CN111773720A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010724387.0A CN111773720A (en) 2020-07-24 2020-07-24 Virtual object control method and device, storage medium and electronic device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010724387.0A CN111773720A (en) 2020-07-24 2020-07-24 Virtual object control method and device, storage medium and electronic device

Publications (1)

Publication Number Publication Date
CN111773720A true CN111773720A (en) 2020-10-16

Family

ID=72764079

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010724387.0A Pending CN111773720A (en) 2020-07-24 2020-07-24 Virtual object control method and device, storage medium and electronic device

Country Status (1)

Country Link
CN (1) CN111773720A (en)

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112316446A (en) * 2020-11-04 2021-02-05 深圳乐漂科技有限公司 Method and system for controlling drifting of kart
CN113769372A (en) * 2021-09-15 2021-12-10 网易(杭州)网络有限公司 Control method and device of virtual vehicle and electronic equipment
CN114167864A (en) * 2021-12-01 2022-03-11 华人运通(上海)自动驾驶科技有限公司 Vehicle control method and system
CN115272630A (en) * 2022-09-29 2022-11-01 南方科技大学 Data processing method and device, virtual reality glasses and storage medium
WO2023221689A1 (en) * 2022-05-20 2023-11-23 腾讯科技(深圳)有限公司 Virtual vehicle control method and apparatus, device, and medium

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20060025218A1 (en) * 2004-07-29 2006-02-02 Nintendo Co., Ltd. Game apparatus utilizing touch panel and storage medium storing game program
JP2010029711A (en) * 2009-11-10 2010-02-12 Nintendo Co Ltd Game machine and game program using touch panel
JP2015192708A (en) * 2014-03-31 2015-11-05 株式会社バンダイナムコエンターテインメント program and server
WO2018091861A1 (en) * 2016-11-15 2018-05-24 Space Ape Games (Uk) Ltd Graphical user interface for single-input controls in a racing game on a touchscreen device
CN108635856A (en) * 2018-05-11 2018-10-12 网易(杭州)网络有限公司 Control method, device and the computer readable storage medium for medium velocity feedback of playing
CN109260702A (en) * 2018-08-30 2019-01-25 腾讯科技(深圳)有限公司 Virtual carrier control method, computer equipment and storage medium in virtual scene

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20060025218A1 (en) * 2004-07-29 2006-02-02 Nintendo Co., Ltd. Game apparatus utilizing touch panel and storage medium storing game program
JP2010029711A (en) * 2009-11-10 2010-02-12 Nintendo Co Ltd Game machine and game program using touch panel
JP2015192708A (en) * 2014-03-31 2015-11-05 株式会社バンダイナムコエンターテインメント program and server
WO2018091861A1 (en) * 2016-11-15 2018-05-24 Space Ape Games (Uk) Ltd Graphical user interface for single-input controls in a racing game on a touchscreen device
CN108635856A (en) * 2018-05-11 2018-10-12 网易(杭州)网络有限公司 Control method, device and the computer readable storage medium for medium velocity feedback of playing
CN109260702A (en) * 2018-08-30 2019-01-25 腾讯科技(深圳)有限公司 Virtual carrier control method, computer equipment and storage medium in virtual scene

Cited By (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112316446A (en) * 2020-11-04 2021-02-05 深圳乐漂科技有限公司 Method and system for controlling drifting of kart
CN113769372A (en) * 2021-09-15 2021-12-10 网易(杭州)网络有限公司 Control method and device of virtual vehicle and electronic equipment
CN114167864A (en) * 2021-12-01 2022-03-11 华人运通(上海)自动驾驶科技有限公司 Vehicle control method and system
CN114167864B (en) * 2021-12-01 2024-02-27 华人运通(上海)自动驾驶科技有限公司 Control method and system for vehicle
WO2023221689A1 (en) * 2022-05-20 2023-11-23 腾讯科技(深圳)有限公司 Virtual vehicle control method and apparatus, device, and medium
CN115272630A (en) * 2022-09-29 2022-11-01 南方科技大学 Data processing method and device, virtual reality glasses and storage medium
CN115272630B (en) * 2022-09-29 2022-12-23 南方科技大学 Data processing method and device, virtual reality glasses and storage medium

Similar Documents

Publication Publication Date Title
CN111773720A (en) Virtual object control method and device, storage medium and electronic device
CN107008003B (en) Information processing method, information processing device, electronic equipment and computer readable storage medium
US10583355B2 (en) Information processing method and apparatus, electronic device, and storage medium
US10716997B2 (en) Information processing method and apparatus, electronic device, and storage medium
TWI638308B (en) Control method and device based on touch screen
US10716996B2 (en) Information processing method and apparatus, electronic device, and storage medium
CN107526526B (en) Method and device for determining pressure-sensitive handwriting area
JP6921193B2 (en) Game programs, information processing devices, information processing systems, and game processing methods
US9772743B1 (en) Implementation of a movable control pad on a touch enabled device
CN110575671B (en) Method and device for controlling viewing angle in game and electronic equipment
KR20140112470A (en) Game controller on mobile touch-enabled devices
EP3092553A1 (en) Hover-sensitive control of secondary display
JP2021168972A (en) Game program, information processing device, information processing system, and game processing method
CN108553892B (en) Virtual object control method and device, storage medium and electronic equipment
CN108733288B (en) Information processing method, information processing device, electronic equipment and storage medium
WO2015126681A1 (en) Advanced game mechanics on hover-sensitive devices
JP6581639B2 (en) Game program and game system
US20210162296A1 (en) Method and device for controlling virtual object, electronic device and storage medium
CN108744527B (en) Method and device for controlling virtual carrier in game and computer readable storage medium
CN105320410A (en) Method and device for touch control on touch terminal
CN111481923A (en) Rocker display method and device, computer storage medium and electronic equipment
CN113440848A (en) In-game information marking method and device and electronic device
CN110658976B (en) Touch track display method and electronic equipment
WO2024007675A1 (en) Virtual object switching method and apparatus, storage medium, and electronic apparatus
EP2362302B1 (en) Method for controlling motions of an object in a 3-dimensional virtual environment

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination