Virtual object control method and apparatus, storage medium, and electronic device
By executing software applications on the terminal device and introducing multi-directional controls, users can control the drift angle of virtual objects with high accuracy, solving the problem of low accuracy of control results in the prior art, and improving the gaming experience.
Patent Information
- Application Number
- PCT/CN2024/120117
- Authority / Receiving Office
- WO · WO
- Patent Type
- Applications
- Current Assignee / Owner
- Priority Date
- 2023-10-19
- Filing Date
- 2024-09-20
- Publication Date
- 2025-06-26
AI Technical Summary
In the prior art, when a user controls a virtual object through one-handed method, he can only control it from a single direction dimension, resulting in a low accuracy of the control result.
By executing software applications on the processor of the terminal device, rendering the graphical user interface, and introducing a first directional control and a second directional control in the game scene, in response to user touch operations, to control movement and state transition of virtual objects, including normal driving and drifting driving states, and to determine the drift angle according to the touch attributes.
It realizes the high precision of controlling the drift angle of virtual objects through one-handed method, which improves the player's operation experience and fun in the game.
Smart Images

Figure CN2024120117_26062025_PF_FP_ABST
Abstract
Description
Virtual object control method and device, storage medium, and electronic device
[0001] CROSS-REFERENCE TO RELATED APPLICATIONS
[0002] This disclosure claims priority to Chinese patent application number 202311361247.1, filed on October 19, 2023, entitled “Virtual Object Control Method and Device, Storage Medium, and Electronic Device,” the entire contents of which are incorporated herein by reference. Technical Field
[0003] The embodiments of the present disclosure relate to the field of human-computer interaction technology, and in particular, to a method for controlling a virtual object, a device for controlling a virtual object, a computer-readable storage medium, and an electronic device. Background Art
[0004] In related virtual object control methods, when a user controls a virtual object with one hand, the user can only control the virtual object in a single direction, which results in low accuracy in the control result of the virtual object.
[0005] Summary of the Invention
[0006] The purpose of the present disclosure is to provide a control method for a virtual object, a control device for a virtual object, a computer-readable storage medium, and an electronic device, thereby overcoming, at least to a certain extent, the problem of low accuracy of control results of virtual objects caused by limitations and defects of related technologies.
[0007] According to one aspect of the present disclosure, a method for controlling a virtual object is provided. The method comprises executing a software application on a processor of a terminal device and rendering a graphical user interface on a touch display of the terminal device. The content displayed by the graphical user interface at least partially includes a game scene, the game scene includes at least one virtual object, and the graphical user interface further includes a first direction control and a second direction control. The method for controlling the virtual object comprises:
[0008] In response to a first touch operation on the first direction control, controlling a target virtual object to move in a first direction in a first operating state in the game scene;
[0009] In response to the first touch operation satisfying a first preset condition, controlling the target virtual object to transition from a first operating state to a second operating state; the target virtual object includes a target virtual vehicle, the first operating state includes a normal driving state, and the second operating state includes a drifting driving state;
[0010] In response to a second touch operation on the graphical user interface, determining a current drift angle of the target virtual object in the second operating state according to touch attributes of the second touch operation;
[0011] Control the target virtual object to move at the current drift angle in the second operating state.
[0012] According to one aspect of the present disclosure, a device for controlling a virtual object is provided. The device executes a software application on a processor of a terminal device and renders a graphical user interface on a touch display of the terminal device. The content displayed by the graphical user interface at least partially includes a game scene, and the game scene includes at least one virtual object. The graphical user interface also includes a first direction control and a second direction control. The device for controlling the virtual object includes:
[0013] A first control module is configured to execute, in response to a first touch operation on the first direction control, control a target virtual object to move in a first direction in a first operating state in the game scene;
[0014] A first state transition module is configured to control the target virtual object to transition from a first operating state to a second operating state in response to the first touch operation satisfying a first preset condition; the target virtual object includes a target virtual vehicle, the first operating state includes a normal driving state, and the second operating state includes a drifting driving state;
[0015] a drift angle determination module configured to execute, in response to a second touch operation on the graphical user interface, determining a current drift angle of the target virtual object in the second operating state according to touch attributes of the second touch operation;
[0016] The second control module is configured to control the target virtual object to move at the current drift angle in the second operating state.
[0017] According to one aspect of the present disclosure, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the computer program implements any one of the above-mentioned methods for controlling a virtual object.
[0018] According to one aspect of the present disclosure, there is provided an electronic device, including:
[0019] processor; and
[0020] a memory for storing executable instructions of the processor;
[0021] The processor is configured to execute any one of the above-mentioned methods for controlling a virtual object by executing the executable instructions.
[0022] A method for controlling a virtual object provided by an embodiment of the present disclosure includes, on the one hand, controlling a target virtual object to move in a first direction in a first operating state in a game scene in response to a first touch operation on a first direction control; then, in response to the first touch operation satisfying a first preset condition, controlling the target virtual object to switch from the first operating state to a second operating state; further, in response to a second touch operation on a graphical user interface, determining a current drift angle of the target virtual object in the second operating state according to the touch attributes of the second touch operation; finally, controlling the target virtual object to move at the current drift angle in the second operating state, thereby realizing control of the target virtual object from the current drift angle. The invention can realize the movement of the target virtual object, that is, the drift control of the target virtual object is realized by one hand, thereby solving the problem in the related art that the virtual object can only be controlled from a single direction dimension, resulting in low accuracy of the control result of the virtual object, and improving the accuracy of the control result of the virtual object; on the other hand, since the current drift angle of the target virtual object in the second operating state can be determined based on the second touch operation; finally, the target virtual object is controlled to move at the current drift angle in the second operating state, so that the player can determine the size of the current drift angle according to actual needs, thereby enhancing the player's fun in the game process and improving the player's gaming experience. BRIEF DESCRIPTION OF THE DRAWINGS
[0023] The accompanying drawings are incorporated into and constitute a part of the specification, illustrate embodiments consistent with the present disclosure, and together with the specification, are used to explain the principles of the present disclosure. Obviously, the drawings described below are only some embodiments of the present disclosure, and those skilled in the art can derive other drawings based on these drawings without inventive effort.
[0024] FIG1 schematically shows a flow chart of a method for controlling a virtual object according to one embodiment of the present disclosure.
[0025] FIG2 schematically shows an example diagram of a game scene including a virtual driving environment and a target virtual object according to one embodiment of the examples of the present disclosure.
[0026] FIG3 schematically shows an example diagram of a game scene including multiple touch areas according to one embodiment of the examples of the present disclosure.
[0027] FIG4 schematically shows an example diagram of a scene of a normal driving state according to one of the embodiments of the present disclosure.
[0028] FIG5 schematically illustrates an example diagram of a scenario in which a first distance difference is controlled based on a first moving direction according to one embodiment of the examples of the present disclosure.
[0029] FIG6 schematically shows an example diagram of a scenario in which a second distance difference is controlled based on a second moving direction according to one embodiment of the examples of the present disclosure.
[0030] FIG7 schematically illustrates an example scenario diagram showing the contact area between a touch operation and a graphical user interface according to one embodiment of the examples of the present disclosure.
[0031] FIG8 schematically shows an example diagram of a scenario of switching from a drifting state to a normal driving state according to one of the embodiments of the present disclosure.
[0032] FIG9 schematically shows a flow chart of a method for controlling the throttle state of a target virtual object in a game scene according to one embodiment of the examples of the present disclosure.
[0033] FIG10 schematically shows an example scene diagram of manual throttle control of a target virtual object according to one embodiment of the examples of the present disclosure.
[0034] FIG11 schematically shows a flow chart of a method for controlling the braking state of a target virtual object in a game scene according to one embodiment of the examples of the present disclosure.
[0035] FIG12 schematically shows an example scene diagram of manual braking control of a target virtual object according to one embodiment of the examples of the present disclosure.
[0036] FIG13 schematically shows a block diagram of a device for controlling a virtual object according to one embodiment of the present disclosure.
[0037] FIG14 schematically illustrates an electronic device for implementing the above-mentioned method for controlling a virtual object according to one embodiment of the examples of the present disclosure. DETAILED DESCRIPTION
[0038] Example embodiments will now be described more fully with reference to the accompanying drawings. However, example embodiments can be implemented in a variety of forms and should not be construed as limited to the examples set forth herein; rather, these embodiments are provided so that the present disclosure will be more comprehensive and complete and will fully convey the concepts of the example embodiments to those skilled in the art. The described features, structures, or characteristics may be combined in any suitable manner in one or more embodiments. In the following description, many specific details are provided to provide a full understanding of the embodiments of the present disclosure. However, those skilled in the art will appreciate that the technical solutions of the present disclosure may be practiced while omitting one or more of the specific details, or that other methods, components, devices, steps, etc. may be employed. In other cases, well-known technical solutions are not shown or described in detail to avoid obscuring various aspects of the present disclosure.
[0039] In addition, the accompanying drawings are merely schematic illustrations of the present disclosure and are not necessarily drawn to scale. Identical reference numerals in the figures denote identical or similar parts, and thus repetitive descriptions thereof will be omitted. Some of the block diagrams shown in the accompanying drawings are functional entities that do not necessarily correspond to physically or logically separate entities. These functional entities may be implemented in software, in one or more hardware modules or integrated circuits, or in different networks and / or processor devices and / or microcontroller devices.
[0040] In related vertical screen racing games, due to the limitation of one finger, players can usually only control the left and right directions under automatic throttle; that is, during the game, players cannot use one finger to keep the direction key pressed and click the drift button to realize the drift function of the vehicle; at the same time, if the drift button is clicked quickly, it is also difficult to control the size of the drift angle.
[0041] Furthermore, in common one-handed operation games, players can only control the direction of the vehicle or the track the car is on with their fingers, and cannot control other operation dimensions, such as braking, drifting, etc.; in this scenario, long-term one-dimensional operation reduces the difficulty of competition and makes players feel tired.
[0042] Based on this, the exemplary embodiments of the present disclosure first provide a method for controlling a virtual object, which can be configured on a terminal device or a server. The terminal device may include a mobile terminal, a computer terminal, or a similar computing device. Specifically, taking running on a mobile terminal as an example, the mobile terminal may be a smartphone (such as an Android phone, an iOS phone, etc.), a tablet computer, a PDA, a mobile Internet device (Mobile Internet Devices, referred to as MID), a PAD, and other terminal devices. The mobile terminal may include one or more processors (the processor may include but is 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 processing unit (TPU), an artificial intelligence (AI) type processor, etc.) and a memory for storing data. Optionally, the mobile terminal may also include a transmission device, an input and output device, and a display device for communication functions. It will be understood by those skilled in the art that the above structural description is only illustrative and does not limit the structure of the mobile terminal. For example, the mobile terminal may also include more or fewer components than the above structural description, or have a configuration different from the above structural description.
[0043] In an example embodiment, the method for controlling virtual objects described in the example embodiments of the present disclosure requires executing a software application on a processor of a terminal device and rendering a graphical user interface on a touch display of the terminal device, wherein the content displayed by the graphical user interface at least partially includes a game scene, the game scene includes at least one virtual object, and the graphical user interface also includes a first direction control and a second direction control, wherein the software application described herein may be an application for a vehicle racing game, etc.; the game scene may be a competition scene corresponding to the game, and the target virtual object described herein may be a target virtual vehicle, or a target virtual aircraft or a target virtual ship, etc., and this example does not impose any special restrictions on this; the same game scene may include both target virtual objects controlled by the terminal device and other virtual objects controlled by other terminal devices, and this example does not impose any special restrictions on this.
[0044] In an exemplary embodiment, referring to FIG1 , the method for controlling a virtual object may include the following steps:
[0045] Step S110. In response to a first touch operation on the first direction control, controlling the target virtual object to move in a first direction in a first operating state in the game scene;
[0046] Step S120. In response to the first touch operation satisfying a first preset condition, controlling the target virtual object to transition from a first operating state to a second operating state; the target virtual object includes a target virtual vehicle, the first operating state includes a normal driving state, and the second operating state includes a drifting driving state;
[0047] Step S130. In response to a second touch operation on the graphical user interface, determine a current drift angle of the target virtual object in the second operating state according to touch attributes of the second touch operation;
[0048] Step S140: Control the target virtual object to move at the current drift angle in the second operating state.
[0049] In the above-mentioned method for controlling a virtual object, on the one hand, by responding to a first touch operation on the first direction control, the target virtual object is controlled to move in a first operating state in the game scene; then, in response to the first touch operation satisfying a first preset condition, the target virtual object is controlled to switch from the first operating state to a second operating state; and then, in response to a second touch operation on the graphical user interface, the current drift angle of the target virtual object in the second operating state is determined according to the touch attributes of the second touch operation; finally, the target virtual object is controlled to move at the current drift angle in the second operating state, thereby realizing the movement of the target virtual object from the current drift angle, that is, It realizes drift control of the target virtual object with one hand, thereby solving the problem in the related art that the virtual object can only be controlled from a single direction dimension, resulting in low accuracy of the control result of the virtual object, and improving the accuracy of the control result of the virtual object; on the other hand, since the current drift angle of the target virtual object in the second operating state can be determined based on the second touch operation; finally, the target virtual object is controlled to move at the current drift angle in the second operating state, so that the player can determine the size of the current drift angle according to actual needs, thereby enhancing the player's fun in the game process and improving the player's gaming experience.
[0050] Hereinafter, the method for controlling a virtual object according to an exemplary embodiment of the present disclosure will be explained and illustrated in detail with reference to the accompanying drawings.
[0051] First, the game scene involved in the exemplary embodiments of the present disclosure will be explained and illustrated. Specifically, referring to FIG2 , the game scene described in the exemplary embodiments of the present disclosure may include a virtual driving environment 201 and a target virtual object 202. In actual application, the target virtual object can be controlled to drive left, right, or forward in the virtual driving environment. Of course, the target virtual object can also be controlled to drift within the current game scene in the virtual driving environment.
[0052] In an exemplary embodiment, as shown in FIG3 , the graphical interface further includes multiple touch areas, which may include, for example, a first touch area 301, a second touch area 302, a third touch area 303, and a fourth touch area 304. In actual application, other touch areas may be configured as needed, and this example does not impose any particular restrictions thereon. The purpose of configuring multiple touch areas is to control the target virtual object to execute different operation instructions based on touch operations applied to different touch areas. For example, a touch operation applied to the first touch area may control the target virtual object to drive normally in the virtual driving environment of the game, a touch operation applied to the second touch area may control the target virtual object to drift in the virtual driving environment, a touch operation applied to the third touch area may control the target virtual object to manually control the throttle in the virtual driving environment, and a touch operation applied to the fourth touch area may control the target virtual object to manually control the brakes in the virtual driving environment. The first direction control and the second direction control can be located in the first touch area, and are used to control the target virtual object to move in the first direction and the second direction, respectively, that is, to turn left and turn right (or turn right or turn left). At the same time, it should be supplemented here that the first touch area, the second touch area, the third touch area, and the fourth touch area described in the exemplary embodiment of the present disclosure are only for exemplary purposes and have no other restrictive effect; and the positions of the first touch area, the second touch area, the third touch area, and the fourth touch area in the graphical user interface can be set according to actual needs. The accompanying drawings are only for exemplary purposes and do not limit the positions of the reference touch points in the graphical user interface.
[0053] Secondly, the operating states involved in the exemplary embodiments of the present disclosure are explained and illustrated. Specifically, the exemplary embodiments of the present disclosure involve a variety of different operating states of the target virtual object; for example, a first operating state in a normal driving state, a second operating state in a drifting driving state, a third operating state in an automatic throttle state, and a fourth operating state in a manual throttle state (some operating states may overlap, for example, when the target virtual object is in the first operating state, it may also be in any of the third operating state or the fourth operating state at the same time); in the actual game process, the player can touch the first direction control and the second direction control in the first touch area (i.e., the first touch operation) with a single finger, thereby controlling the target virtual object to drive normally in the game scene; the target virtual object can also be controlled to enter the second operating state by changing the touch position of the first touch operation, and at the same time, the drift angle of the target virtual object can be controlled based on the second touch operation.
[0054] Furthermore, the technical implementation principles of the exemplary embodiments of the present disclosure are explained and illustrated. Specifically, the control method of the virtual object described in the exemplary embodiments of the present disclosure can achieve the following three purposes: on the one hand, the drift angle of the target virtual object in the game scene can be controlled by a single finger (i.e., using the same finger as the one that controls the movement direction); on the other hand, the throttle size of the target virtual object in the game scene can be controlled by a single finger (i.e., using the same finger as the one that controls the movement direction); and on the other hand, the brakes can be applied while controlling the movement direction of the target virtual object by a single finger.
[0055] The following will further explain and illustrate the control method of the virtual object shown in FIG1 in conjunction with FIG3-4. Specifically:
[0056] In step S110 , in response to a first touch operation on the first direction control, the target virtual object is controlled to move in a first direction in a first running state in the game scene.
[0057] During normal gameplay, if there is no need to control the target virtual object to drift, the target virtual object can be directly controlled to move in a normal driving state through the first direction control or the second direction control in the first touch area, such as through the first direction control (it should be noted that the above-mentioned first direction control is only for referring to one of the two direction controls, not specifically one of the direction controls) to control the target virtual object to move left or right; wherein, the specific scene diagram can be referred to as shown in Figure 4, and the two double-arrow controls in the figure are one of the many implementation methods of the first direction control and the second direction control. Players can use these two controls to control the left and right turns of the target virtual object.
[0058] In step S120, in response to the first touch operation satisfying a first preset condition, the target virtual object is controlled to transition from a first operating state to a second operating state. The target virtual object includes a target virtual vehicle, the first operating state includes a normal driving state, and the second operating state includes a drifting driving state.
[0059] Specifically, in actual applications, in order to achieve drift control of the target virtual object in a single-finger operation scenario, the first touch operation must meet certain conditions, namely, a first preset condition. The first preset condition is used to distinguish the operation of triggering the drift driving state of the target virtual object from general operations on the first and second directional controls.
[0060] The first preset condition may be that the longitudinal displacement of the touch position of the first touch operation is greater than a first preset value. Specifically, when the player's finger performing the first touch operation slides downward or upward on the touch screen a certain distance, such that the longitudinal displacement of the touch position of the first touch operation from the initial touch position is greater than the first preset value, the target virtual object is triggered to enter the drift driving state.
[0061] The first preset condition may also be that the touch position of the first touch operation enters the second touch area of the graphical user interface. Specifically, when the touch position of the finger of the player performing the first touch operation on the touch screen moves from the first touch area where the first and second directional controls are located to the second touch area, the target virtual object is triggered to enter the drift driving state. The second touch area may be located above or below the first touch area.
[0062] The first preset condition may also be other touch operations that are sufficiently different from general operations on the first direction control and the second direction control, for example, the touch area of the first touch operation is larger than the preset area, the touch pressure of the first touch operation is greater than the preset pressure, etc.
[0063] In step S130 , in response to a second touch operation on the graphical user interface, a current drift angle of the target virtual object in the second operating state is determined according to touch attributes of the second touch operation.
[0064] Specifically, since the current drift angle can be determined by the touch offset distance, the touch area, and the touch pressure during the actual game, in response to the second touch operation on the graphical user interface, determining the current drift angle of the target virtual object in the second operating state according to the touch attributes of the second touch operation can be achieved through the following different methods:
[0065] The first implementation method is: in response to the second touch operation on the graphical user interface, the current drift angle of the target virtual object in the second operating state is determined according to the touch attributes of the second touch operation, which can be achieved as follows: first, in response to the second touch operation on the graphical user interface, the first starting touch position and the first current touch position of the second touch operation are determined; wherein, the first current touch position may include the first sub-current position of the second touch operation in the first moving direction; the first current touch position may also include the second sub-current position of the second touch operation in the second moving direction; secondly, the current drift angle of the target virtual object in the second operating state is determined according to the first starting touch position and the first current touch position. It should be noted that the second touch operation described here is implemented on the basis of the first touch operation. The second touch operation and the first touch operation are continuous operations, and the player's touch finger does not leave the touch screen between the two touch operations; that is, in actual application, the player's finger performs a touch operation on the first direction control or the second direction control of the first touch area. Before the first preset condition is met, the touch operation is called the first touch operation; after the first touch operation meets the first preset condition, the touch operation (including sliding up and down or sliding left and right, etc.) performed by the same touch finger of the player on the touch screen is called the second touch operation. The first starting position is the touch position when the first touch operation meets the first preset condition. The first starting position is both the end position of the first touch operation and the starting position of the second touch operation. The touch area of the second touch operation may be in the first touch area or in the second touch area. Strictly speaking, the first touch operation and the second touch operation are a series of uninterrupted touch operations. The first touch operation and the second touch operation are used only for the purpose of facilitating explanation and have no other restrictive effect.
[0066] In an exemplary embodiment, determining the current drift angle of the target virtual object in the second operating state based on the first starting touch position and the first current touch position can be achieved as follows: first, determining a first distance difference between a first sub-current position of the second touch operation in the first moving direction and the first starting touch position; and second, determining the current drift angle of the target virtual object in the second operating state based on the first distance difference. The first moving direction described herein may be the direction of an up-down swipe of the touching finger on the touch screen. For a specific scenario diagram, see FIG5 . Determining the first sub-current position in the first moving direction is necessary because when a player swipes up or down to control the drift angle, the swipe direction may deviate from the first moving direction. Only the swipe distance in the first moving direction determines the change in the drift angle; the greater the swipe distance, the greater the change in the drift angle. Furthermore, in actual application, a game player can determine the current drift angle of the target virtual object by swiping up or down in a graphical user interface. For example, to decrease the drift angle, swipe up, or to increase the drift angle, swipe down. Alternatively, swiping up may increase the drift angle, while swiping down may decrease it.
[0067] In an exemplary embodiment, determining the current drift angle of the target virtual object in the second operating state based on the first starting touch position and the first current touch position can also be achieved in the following manner: first, determining the second distance difference between the second sub-current position of the second touch operation in the second moving direction and the first starting touch position; second, determining the current drift angle of the target virtual object in the second operating state based on the second distance difference. The second moving direction recorded here can be the left and right sliding direction of the touching finger on the touch screen. The specific scene diagram can be shown in Figure 6. As mentioned above, the reason for determining the second sub-current position in the second moving direction is that when the player controls the drift angle by sliding left and right, the sliding direction may deviate from the second moving direction, and only the sliding distance in the second moving direction can determine the change in the drift angle. The greater the sliding distance, the greater the change in the drift angle. Furthermore, in actual application, game players can swipe left and right in the graphical user interface to determine the current drift angle of the target virtual object; for example, if you need to reduce the drift angle, you can swipe to the left, and if you need to increase the drift, you can swipe to the right. Of course, you can also swipe to the left to increase the drift angle and swipe to the right to reduce the drift angle.
[0068] A second implementation method is: in response to a second touch operation on a graphical user interface, determining the current drift angle of the target virtual object in the second operating state based on the touch attributes of the second touch operation. Alternatively, the method can be implemented as follows: in response to a second touch operation on the graphical user interface, determining the first touch area of the second touch operation, and determining the current drift angle of the target virtual object in the second operating state. That is, in actual application, game players can determine the current drift angle based on the contact area between the second touch operation and the graphical user interface. For example, if the drift angle needs to be increased, the contact area can be increased; if the drift angle needs to be decreased, the contact area can be decreased. A specific scenario example diagram can be seen in FIG7 .
[0069] A third implementation method is: in response to a second touch operation on the graphical user interface, determining the current drift angle of the target virtual object in the second operating state according to the touch attributes of the second touch operation. It can also be implemented as follows: in response to the second touch operation on the graphical user interface, determining the first touch pressure of the second touch operation, and determining the current drift angle of the target virtual object in the second operating state according to the first pressure value of the first touch pressure. That is, in actual application, the player can determine the current drift angle by the pressure of the second touch operation; for example, if the drift angle needs to be increased, the touch pressure value can be increased, and if the drift angle needs to be reduced, the touch pressure value can be reduced; that is, during the game, the drift angle of the target virtual object can be controlled by using the corresponding pressure according to actual needs.
[0070] The fourth implementation method is: in response to the second touch operation on the graphical user interface, determining the current drift angle of the target virtual object in the second operating state according to the touch attributes of the second touch operation. It can also be implemented as follows: first, in response to the second touch operation on the graphical user interface, determining the first starting touch position, the first current touch position and the first touch area of the second touch operation; secondly, determining the first reference distance between the first current touch position and the first starting touch position, and determining the current drift angle of the target virtual object in the second operating state according to the first reference distance and the first touch area of the second touch operation. That is to say, in the actual application process, the sliding distance of the second touch operation and the contact area between the second touch operation and the graphical user interface can be comprehensively considered to determine the current drift angle; in the actual application process, a network model can be set here to achieve it; for example, the first reference distance and the first touch area obtained by detection are input into the network model to obtain the corresponding current drift angle; wherein, the first reference distance recorded here may include the reference distance in the first moving direction, and may also include the reference distance in the second moving direction; the network model recorded here may include a convolutional neural network model, a recurrent neural network model, a deep neural network model, and a decision tree model, etc., and this example does not impose any special restrictions on this.
[0071] The fifth implementation method is: in response to the second touch operation on the graphical user interface, determine the current drift angle of the target virtual object in the second operating state according to the touch attributes of the second touch operation. It can also be implemented in the following way: first, in response to the second touch operation on the graphical user interface, determine the first starting touch position, the first current touch position and the first touch pressure of the second touch operation; secondly, determine the first reference distance between the first current touch position and the first starting touch position, and determine the current drift angle of the target virtual object in the second operating state according to the first reference distance and the first pressure value of the first touch pressure. That is to say, in the actual application process, the sliding distance of the second touch operation and the first touch pressure of the second touch operation can be comprehensively considered to determine the current drift angle; in the actual application process, a network model can be set here to achieve it; for example, the first reference distance and the first pressure value obtained by detection are input into the network model to obtain the corresponding current drift angle; wherein, the first reference distance recorded here may include the reference distance in the first moving direction, and may also include the reference distance in the second moving direction; the network model recorded here may include a convolutional neural network model, a recurrent neural network model, a deep neural network model, and a decision tree model, etc., and this example does not impose any special restrictions on this.
[0072] The sixth implementation method is: in response to the second touch operation on the graphical user interface, the current drift angle of the target virtual object in the second operating state is determined according to the touch attributes of the second touch operation. It can also be implemented in the following way: first, in response to the second touch operation on the graphical user interface, the first starting touch position, the first current touch position, and the first touch area and first touch pressure of the second touch operation are determined; secondly, the first reference distance between the first current touch position and the first starting touch position is determined, and the current drift angle of the target virtual object in the second operating state is determined according to the first reference distance, the first touch area of the second touch operation, and the first pressure value of the first touch pressure. That is to say, in the actual application process, the sliding distance of the second touch operation, the first contact area between the second touch operation and the graphical user interface, and the first touch pressure of the second touch operation can be comprehensively considered to determine the current drift angle; in the actual application process, a network model can be set here to achieve it; for example, the first reference distance, the first touch area and the first pressure value obtained by detection are input into the network model to obtain the corresponding current drift angle; wherein, the first reference distance recorded here may include the reference distance in the first moving direction, and may also include the reference distance in the second moving direction; the network model recorded here may include a convolutional neural network model, a recurrent neural network model, a deep neural network model and a decision tree model, etc., and this example does not impose any special restrictions on this.
[0073] In step S140 , the target virtual object is controlled to move at the current drift angle in the second operating state.
[0074] Specifically, after obtaining the current drift angle, the target virtual object can be controlled to drift at the current drift angle. Based on this, the target virtual object can be controlled to drift in the game scene by a single finger.
[0075] Furthermore, in actual application, if it is necessary to switch from the drifting state to the normal driving state, the following operation needs to be performed: in response to the termination of the second touch operation or in response to the third touch operation on the graphical user interface, the target virtual object is controlled to be converted from the second operating state to the first operating state, and the target virtual object is controlled to move in the first operating state. That is to say, if you want to switch the target virtual object from the drifting state to the normal driving state, you can end the second touch operation (that is, immediately switch to the normal driving state when the second touch operation is terminated), or you can perform the third touch operation (that is, when the second touch operation is terminated, it does not immediately switch to the normal driving state, and only switch to the normal driving state after the third touch operation is performed); wherein, the third touch operation can be sliding up, down, left or right along the second reference touch area, etc., and this example does not impose any special restrictions on this; wherein, the specific scene diagram can refer to that shown in Figure 8. The third touch operation can also be a touch operation on the second direction control (i.e., the direction control corresponding to the turning direction opposite to the first direction control). For example, after the player controls the target virtual object to drift left, touching the right turn direction control can switch the target virtual object to a normal driving state; conversely, after the player controls the target virtual object to drift right, touching the left turn direction control can switch the target virtual object to a normal driving state).
[0076] Thus far, the scheme for controlling the drift of the target virtual object in the game scene has been fully realized. On this basis, the control method of the virtual object recorded in the exemplary embodiment of the present disclosure can also control the throttle state and brake state of the target virtual object in the game scene.
[0077] The following will explain and illustrate the throttle state control process of the target virtual object in conjunction with Figure 9. Specifically, referring to Figure 9, controlling the throttle state of the target virtual object in the game scene may include the following steps:
[0078] Step S910: Control the target virtual object to move in the third running state in the game scene.
[0079] Specifically, as shown in Figure 3, the third touch area in the graphical user interface is independent of the first touch area and the second touch area; in actual application, the third touch area can be set at the upper position of the graphical user interface according to actual needs, and of course it can also be set at other positions, such as the left position, the right position or the upper position, etc. This example does not impose any special restrictions on this; for example, in order to facilitate smooth operation, if the second touch operation is located below the first touch operation, the third touch area can be set above the first touch area; of course, it can also be set below the first touch area, to the left or to the right according to actual needs, depending on the specific function allocation of each touch area, and this example does not impose any special restrictions on this. Furthermore, during normal game play, if there is no need to manually control the throttle state of the target virtual object, the target virtual object can be directly controlled by the processor to drive in an automatic throttle state, that is, the throttle of the target virtual object is automatically controlled by the game system by default, and the player does not need to actively control it.
[0080] Step S920: In response to a fourth touch operation on the graphical user interface, controlling the target virtual object to transition from a third operating state to a fourth operating state. The third operating state includes an automatic throttle state, and the fourth operating state includes a manual throttle state.
[0081] Specifically, in actual application, in order to manually control the throttle state of the target virtual object in a single-finger manipulation scenario, it is necessary to activate the manual throttle control state of the target virtual object through a fourth touch operation; the starting touch position of the fourth touch operation is the first directional control or the second directional control, and the ending touch position of the fourth touch operation is located in the third touch area of the graphical user interface or has a longitudinal distance from the starting touch position greater than a second preset value. In other words, during actual gaming, if the touch area corresponding to the touch operation is the first directional control or the second directional control located in the first touch area, the target virtual object is in a normal driving state, and the throttle of the target virtual object is automatically controlled by the gaming system; if the touch position corresponding to the touch operation moves from the first touch area to the third touch area, or the longitudinal distance between the ending touch of the touch operation and the starting touch position is greater than a second preset value, the touch operation is the fourth touch operation, thereby controlling the throttle of the target virtual object to be in a manual control state; wherein, the specific scene diagram can be referred to as shown in FIG10. The longitudinal distance between the end touch and the start touch position is greater than the second preset value, that is, the distance of sliding up or down by the second preset value. It should be noted that in order to distinguish it from the touch operation that triggers the target virtual object to enter the drift state (that is, the first touch operation that meets the first preset condition), if the drift is triggered by sliding downward by the distance of the first preset value, then sliding upward by the distance of the second preset value triggers the manual throttle state).
[0082] Step S930 : In response to a fifth touch operation on the graphical user interface, determine a current acceleration of the target virtual object in the fourth operating state according to touch attributes of the fifth touch operation.
[0083] Specifically, since during an actual game, the magnitude of the current acceleration (also referred to as the current throttle state) can be determined by the offset distance, the touch area, and the touch pressure, in response to the fifth touch operation on the graphical user interface, determining the current acceleration of the target virtual object in the fourth operating state based on the touch attributes of the fifth touch operation can be achieved through the following different methods:
[0084] The first implementation method is, in response to the fifth touch operation on the graphical user interface, determining the current acceleration of the target virtual object in the fourth operating state according to the touch attributes of the fifth touch operation, which can be achieved as follows: in response to the fifth touch operation on the graphical user interface, determining the second starting touch position and the second current touch position of the fifth touch operation, and determining the current acceleration of the target virtual object in the fourth operating state according to the second starting touch position and the second current touch position; or in response to the fifth touch operation on the graphical user interface, determining the current acceleration of the target virtual object in the fourth operating state according to the second touch area of the fifth touch operation; or in response to the fifth touch operation on the graphical user interface, determining the second touch pressure of the fifth touch operation, and determining the current acceleration of the target virtual object in the fourth operating state according to the second pressure value of the second touch pressure. That is to say, during the actual game process, the current acceleration can be determined solely by relying on the second reference distance between the second current touch position of the fifth touch operation and the second starting touch position, or by relying solely on the second touch area of the fifth touch operation, or by relying solely on the second pressure value of the second touch pressure of the fifth touch operation.
[0085] Furthermore, it should be noted that the fifth touch operation recorded here is implemented on the basis of the fourth touch operation; that is, in actual application, the touch operation of sliding from the first touch area to the third touch area (that is, the touch operation in which the starting touch position is the first direction control or the second direction control and the ending touch position is located in the third touch area) or the touch operation in which the starting touch position is located in the first touch area and the longitudinal distance between the ending touch position and the starting touch position is greater than the second preset value is called the fourth touch operation, and the operation of sliding up and down or left and right on the basis of the third touch area is called the fifth touch operation; the fourth touch operation and the fifth touch operation are a series of uninterrupted touch operations (that is, two consecutive touch operations, and the touching finger does not leave the touch screen). The fourth touch operation and the fifth touch operation are used only to facilitate explanation and have no other restrictive effect.
[0086] In an example embodiment, in response to the fifth touch operation on the graphical user interface, the current acceleration of the target virtual object in the fourth operating state is determined according to the touch attributes of the fifth touch operation. It can also be achieved in the following way: in response to the fifth touch operation on the graphical user interface, the second starting touch position, the second current touch position and the second touch area of the fifth touch operation are determined; the second reference distance between the second current touch position and the second starting touch position is determined, and based on the second reference distance and the second touch area, the current acceleration of the target virtual object in the fourth operating state is determined according to the touch attributes of the fifth touch operation. That is to say, in actual application, the sliding distance of the fifth touch operation and the contact area between the fifth touch operation and the graphical user interface can be comprehensively considered to determine the current acceleration; in actual application, a network model can be set here to achieve this; for example, the detected second reference distance and the second touch area are input into the network model to obtain the corresponding current acceleration; wherein, the second reference distance recorded here may include a reference distance in the first moving direction, and may also include a reference distance in the second moving direction; the network model recorded here may include a convolutional neural network model, a recurrent neural network model, a deep neural network model, and a decision tree model, etc., and this example does not impose any special restrictions on this.
[0087] In an exemplary embodiment, in response to a fifth touch operation on the graphical user interface, determining the current acceleration of the target virtual object in the fourth operating state according to the touch attributes of the fifth touch operation can also be achieved as follows: in response to the fifth touch operation on the graphical user interface, determining the second starting touch position, the second current touch position and the second touch pressure of the fifth touch operation; determining a second reference distance between the second current touch position and the second starting touch position, and determining the current acceleration of the target virtual object in the fourth operating state according to the touch attributes of the fifth touch operation based on the second reference distance and the second pressure value of the second touch pressure. That is to say, in actual application, the sliding distance of the fifth touch operation (the third reference distance) and the second touch pressure of the fifth touch operation during the touch process can be comprehensively considered to determine the current acceleration; in actual application, a network model can be set here to implement it; for example, the detected second reference distance and the second pressure value are input into the network model to obtain the corresponding current acceleration; wherein, the second reference distance recorded here may include the reference distance in the first moving direction, and may also include the reference distance in the second moving direction; the network model recorded here may include a convolutional neural network model, a recurrent neural network model, a deep neural network model, and a decision tree model, etc., and this example does not impose any special restrictions on this.
[0088] In an example embodiment, in response to the fifth touch operation on the graphical user interface, the current acceleration of the target virtual object in the fourth operating state is determined according to the touch attributes of the fifth touch operation, which can also be achieved as follows: in response to the fifth touch operation on the graphical user interface, the second starting touch position, the second current touch position of the fifth touch operation, and the second touch area and the second touch pressure of the fifth touch operation are determined; the second reference distance between the second current touch position and the second starting touch position is determined, and according to the second reference distance, the second touch area and the second pressure value of the second touch pressure, the current acceleration of the target virtual object in the fourth operating state is determined according to the touch attributes of the fifth touch operation. That is to say, in the actual application process, the sliding distance of the fifth touch operation (second reference distance), the second touch area of the fifth touch operation and the graphical user interface, and the second touch pressure of the fifth touch operation during the touch process can be comprehensively considered to determine the current acceleration; in the actual application process, a network model can be set here to implement it; for example, the detected second reference distance, second touch area and second pressure value are input into the network model to obtain the corresponding current drift angle; wherein, the second reference distance recorded here may include the reference distance in the first moving direction, and may also include the reference distance in the second moving direction; the network model recorded here may include a convolutional neural network model, a recurrent neural network model, a deep neural network model, a decision tree model, etc., and this example does not impose any special restrictions on this.
[0089] Step S940: Control the target virtual object to move at the current acceleration in the fourth operating state.
[0090] Specifically, after obtaining the current acceleration, the target virtual object can be controlled to move at the current acceleration. Based on this, the throttle state of the target virtual object can be controlled by a single finger.
[0091] Furthermore, in actual use, if it is necessary to switch from the manual throttle state to the automatic throttle state, the following operation is also required: in response to a sixth touch operation on the graphical user interface, the target virtual object is controlled to transition from the fourth operating state to the third operating state, and the target virtual object is controlled to move in the third operating state. Furthermore, the sixth touch operation described herein can be a double-click operation anywhere on the graphical user interface, or a single-click operation anywhere, and this example does not impose any specific restrictions on this.
[0092] The following will explain and illustrate the control process of the braking state of the target virtual object in conjunction with Figure 11. Specifically, referring to Figure 11, controlling the braking state of the target virtual object in the game scene may include the following steps:
[0093] Step S1110, in response to a seventh touch operation on a fourth touch area of the graphical user interface, controlling the target virtual object to perform a braking task;
[0094] Step S1120 : Control the moving direction of the target virtual object at the touch position of the fourth touch area according to the seventh touch operation.
[0095] Specifically, continuing to refer to Figure 3, the fourth touch area in the graphical user interface is independent of the first touch area, the second touch area, and the third touch area; in actual application, the fourth touch area can be set at the lower position of the graphical user interface according to actual needs, and of course it can also be set at other positions, such as the left position, the right position, or the upper position, etc. This example does not impose any special restrictions on this; for example, in order to facilitate smooth operation, the fourth touch area can be set at the lower position of the second touch area; of course, it can also be set at other positions according to actual needs, and this example does not impose any special restrictions on this.
[0096] Specifically, in the actual application process, in order to realize manual control of the brakes of the target virtual object in the scenario of single-finger control of the moving direction, it is necessary to slide the touch area corresponding to the touch operation to the fourth touch area; that is, in the actual game process, if the touch area corresponding to the touch operation is the first touch area (specifically for the first direction control or the second direction control), the target virtual object is in a normal driving state, and the target virtual object cannot perform the braking task or the brake is automatically controlled by the game system; if the touch area corresponding to the touch operation is switched from the first touch area to the fourth touch area, the player can control the moving direction of the target virtual object while controlling it to brake; wherein, the specific scene diagram can be referred to as shown in Figure 12. When the player's touching finger is in the fourth touch area, the target virtual object enters the foot brake state, and the touching finger can be dragged left and right while maintaining the foot brake while controlling the left and right directions.
[0097] At this point, the virtual object control method described in the exemplary embodiments of this disclosure has been fully implemented. Based on the aforementioned content, it can be seen that the virtual object control method described in the exemplary embodiments of this disclosure can achieve the drift angle, driving speed, and braking speed of the target virtual vehicle through single-finger control in a vertical screen scene, thereby achieving the goal of enriching the player's gaming experience during the game.
[0098] The following are embodiments of the apparatus of the present disclosure, which are configured to perform the embodiments of the method of the present disclosure. For details not disclosed in the apparatus embodiments of the present disclosure, please refer to the embodiments of the method of the present disclosure.
[0099] The exemplary embodiments of the present disclosure also provide a device for controlling a virtual object, which executes a software application on a processor of a terminal device and renders a graphical user interface on a touch display of the terminal device. The content displayed by the graphical user interface at least partially includes a game scene, the game scene includes at least one virtual object, and the graphical user interface also includes a first direction control and a second direction control. Specifically, referring to FIG13 , the device for controlling a virtual object may include a first control module 1310, a first state transition module 1320, a drift angle determination module 1330, and a first control module 1340. Among them:
[0100] The first control module 1310 is configured to execute, in response to a first touch operation on the first direction control, control a target virtual object to move in a first direction in a first operating state in the game scene;
[0101] A first state transition module 1320 is configured to control the target virtual object to transition from a first operating state to a second operating state in response to the first touch operation satisfying a first preset condition; the target virtual object includes a target virtual vehicle, the first operating state includes a normal driving state, and the second operating state includes a drifting driving state;
[0102] a drift angle determination module 1330 configured to, in response to a second touch operation on the graphical user interface, determine a current drift angle of the target virtual object in the second operating state according to touch attributes of the second touch operation;
[0103] The second control module 1340 is configured to control the target virtual object to move at the current drift angle in the second operating state.
[0104] In an exemplary embodiment of the present disclosure, in response to a second touch operation on the graphical user interface, the current drift angle of the target virtual object in the second operating state is determined according to the touch attributes of the second touch operation, including: in response to the second touch operation on the graphical user interface, determining the first starting touch position and the first current touch position of the second touch operation; determining the current drift angle of the target virtual object in the second operating state according to the first starting touch position and the first current touch position; the second touch operation and the first touch operation are continuous operations, and the first starting position is the touch position when the first touch operation meets the first preset condition.
[0105] In an exemplary embodiment of the present disclosure, the first current touch position includes a first sub-current position of the second touch operation in the first moving direction; wherein, determining the current drift angle of the target virtual object in the second operating state based on the first starting touch position and the first current touch position includes: determining a first distance difference between the first sub-current position of the second touch operation in the first moving direction and the first starting touch position; and determining the current drift angle of the target virtual object in the second operating state based on the first distance difference.
[0106] In an exemplary embodiment of the present disclosure, the first current touch position includes a second sub-current position of the second touch operation in the second moving direction; wherein, determining the current drift angle of the target virtual object in the second operating state based on the first starting touch position and the first current touch position includes: determining a second distance difference between the second sub-current position of the second touch operation in the second moving direction and the first starting touch position; and determining the current drift angle of the target virtual object in the second operating state based on the second distance difference.
[0107] In an exemplary embodiment of the present disclosure, in response to a second touch operation on the graphical user interface, the current drift angle of the target virtual object in the second operating state is determined according to the touch attributes of the second touch operation, including: in response to the second touch operation on the graphical user interface, determining the first touch area of the second touch operation, and determining the current drift angle of the target virtual object in the second operating state.
[0108] In an exemplary embodiment of the present disclosure, in response to a second touch operation on the graphical user interface, the current drift angle of the target virtual object in the second operating state is determined according to the touch attributes of the second touch operation, including: in response to the second touch operation on the graphical user interface, determining the first touch pressure of the second touch operation, and determining the current drift angle of the target virtual object in the second operating state according to the first pressure value of the first touch pressure.
[0109] In an exemplary embodiment of the present disclosure, in response to a second touch operation on the graphical user interface, the current drift angle of the target virtual object in the second operating state is determined according to the touch attributes of the second touch operation, including: in response to the second touch operation on the graphical user interface, determining the first starting touch position, the first current touch position and the first touch area of the second touch operation; determining a first reference distance between the first current touch position and the first starting touch position, and determining the current drift angle of the target virtual object in the second operating state according to the first reference distance and the first touch area of the second touch operation.
[0110] In an exemplary embodiment of the present disclosure, in response to a second touch operation on the graphical user interface, the current drift angle of the target virtual object in the second operating state is determined according to the touch attributes of the second touch operation, including: in response to the second touch operation on the graphical user interface, determining the first starting touch position, the first current touch position and the first touch pressure of the second touch operation; determining a first reference distance between the first current touch position and the first starting touch position, and determining the current drift angle of the target virtual object in the second operating state according to the first reference distance and the first pressure value of the first touch pressure.
[0111] In an exemplary embodiment of the present disclosure, in response to a second touch operation on the graphical user interface, the current drift angle of the target virtual object in the second operating state is determined according to the touch attributes of the second touch operation, including: in response to the second touch operation on the graphical user interface, determining the first starting touch position, the first current touch position, and the first touch area and the first touch pressure of the second touch operation; determining a first reference distance between the first current touch position and the first starting touch position, and determining the current drift angle of the target virtual object in the second operating state according to the first reference distance, the first touch area of the second touch operation, and the first pressure value of the first touch pressure.
[0112] In an exemplary embodiment of the present disclosure, the control device for the virtual object further includes:
[0113] The second state transition module is configured to execute, in response to the termination of the second touch operation or in response to the third touch operation on the graphical user interface, control the target virtual object to transition from the second operating state to the first operating state, and control the target virtual object to move in the first operating state.
[0114] In an exemplary embodiment of the present disclosure, the control device for the virtual object further includes:
[0115] a third control module, configured to execute control of the target virtual object to move in a third operating state in the game scene;
[0116] a third state transition module configured to execute, in response to a fourth touch operation on the graphical user interface, control the target virtual object to transition from a third operating state to a fourth operating state; the third operating state includes an automatic throttle state, and the fourth operating state includes a manual throttle state;
[0117] an acceleration determination module configured to, in response to a fifth touch operation on the graphical user interface, determine a current acceleration of the target virtual object in the fourth operating state according to touch attributes of the fifth touch operation;
[0118] The fourth control module is configured to control the target virtual object to move at the current acceleration in the fourth operating state.
[0119] In an exemplary embodiment of the present disclosure, in response to the fifth touch operation on the graphical user interface, the current acceleration of the target virtual object in the fourth operating state is determined according to the touch attributes of the fifth touch operation, including: in response to the fifth touch operation on the graphical user interface, determining the second starting touch position and the second current touch position of the fifth touch operation, and determining the current acceleration of the target virtual object in the fourth operating state according to the second starting touch position and the second current touch position; or in response to the fifth touch operation on the graphical user interface, determining the current acceleration of the target virtual object in the fourth operating state according to the second touch area of the fifth touch operation; or in response to the fifth touch operation on the graphical user interface, determining the second touch pressure of the fifth touch operation, and determining the current acceleration of the target virtual object in the fourth operating state according to the second pressure value of the second touch pressure.
[0120] In an exemplary embodiment of the present disclosure, in response to a fifth touch operation on the graphical user interface, the current acceleration of the target virtual object in the fourth operating state is determined according to the touch attributes of the fifth touch operation, including: in response to the fifth touch operation on the graphical user interface, determining the second starting touch position, the second current touch position and the second touch area of the fifth touch operation; determining a second reference distance between the second current touch position and the second starting touch position, and determining the current acceleration of the target virtual object in the fourth operating state according to the second reference distance and the second touch area.
[0121] In an exemplary embodiment of the present disclosure, in response to a fifth touch operation on the graphical user interface, the current acceleration of the target virtual object in the fourth operating state is determined according to the touch attributes of the fifth touch operation, including: in response to the fifth touch operation on the graphical user interface, determining the second starting touch position, the second current touch position and the second touch pressure of the fifth touch operation; determining a second reference distance between the second current touch position and the second starting touch position, and determining the current acceleration of the target virtual object in the fourth operating state according to the second reference distance and the second pressure value of the second touch pressure.
[0122] In an exemplary embodiment of the present disclosure, in response to a fifth touch operation on the graphical user interface, the current acceleration of the target virtual object in the fourth operating state is determined according to the touch attributes of the fifth touch operation, including: in response to the fifth touch operation on the graphical user interface, determining the second starting touch position, the second current touch position, and the second touch area and the second touch pressure of the fifth touch operation; determining a second reference distance between the second current touch position and the second starting touch position, and determining the current acceleration of the target virtual object in the fourth operating state according to the second reference distance, the second touch area, and the second pressure value of the second touch pressure.
[0123] In an exemplary embodiment of the present disclosure, the control device for the virtual object further includes:
[0124] The fourth state conversion module is configured to execute, in response to a sixth touch operation on the graphical user interface, control the target virtual object to convert from the fourth operating state to the third operating state, and control the target virtual object to move in the third operating state.
[0125] In an exemplary embodiment of the present disclosure, the control device for the virtual object further includes:
[0126] The fifth control module is configured to execute a seventh touch operation in response to the fourth touch area of the graphical user interface, control the target virtual object to perform a braking task, and control the moving direction of the target virtual object according to the touch position of the seventh touch operation on the fourth touch area.
[0127] The specific details of each module in the above-mentioned virtual object control device have been described in detail in the corresponding virtual object control method, and therefore will not be repeated here.
[0128] It should be noted that although several modules or units of the device for action execution are mentioned in the detailed description above, this division is not mandatory. In fact, according to the embodiments of the present disclosure, the features and functions of two or more modules or units described above can be concretized in one module or unit. Conversely, the features and functions of one module or unit described above can be further divided into multiple modules or units to be concretized.
[0129] Furthermore, although the steps of the method of the present disclosure are described in a particular order in the accompanying drawings, this does not require or imply that the steps must be performed in this particular order, or that all steps shown must be performed to achieve the desired results. Additionally or alternatively, some steps may be omitted, multiple steps may be combined into one step, and / or one step may be decomposed into multiple steps.
[0130] In an exemplary embodiment of the present disclosure, an electronic device capable of implementing the above method is also provided.
[0131] Those skilled in the art will appreciate that various aspects of the present disclosure may be implemented as systems, methods, or program products. Therefore, various aspects of the present disclosure may be implemented in the following forms: a complete hardware implementation, a complete software implementation (including firmware, microcode, etc.), or a combination of hardware and software implementations, which may be collectively referred to herein as "circuits," "modules," or "systems."
[0132] An electronic device 1400 according to this embodiment of the present disclosure is described below with reference to FIG 14. The electronic device 1400 shown in FIG 14 is merely an example and should not limit the functions and scope of use of the embodiments of the present disclosure.
[0133] As shown in FIG14 , electronic device 1400 is implemented as a general-purpose computing device. Components of electronic device 1400 may include, but are not limited to, the aforementioned at least one processing unit 1410, the aforementioned at least one storage unit 1420, a bus 1430 connecting various system components (including storage unit 1420 and processing unit 1410), and a display unit 1440.
[0134] The storage unit stores program code, which can be executed by the processing unit 1410, so that the processing unit 1410 performs the steps according to various exemplary embodiments of the present disclosure described in the "Exemplary Method" section of this specification. For example, the processing unit 1410 can perform step S110 as shown in Figure 1: in response to a first touch operation on the first direction control, control the target virtual object to move in a first direction in a first operating state in the game scene; step S120: in response to the first touch operation satisfying a first preset condition, control the target virtual object to transition from the first operating state to a second operating state; the target virtual object includes a target virtual vehicle, the first operating state includes a normal driving state, and the second operating state includes a drifting driving state; step S130: in response to a second touch operation on the graphical user interface, determine the current drift angle of the target virtual object in the second operating state according to the touch attributes of the second touch operation; step S140: control the target virtual object to move at the current drift angle in the second operating state.
[0135] The storage unit 1420 may include a readable medium in the form of a volatile storage unit, such as a random access memory unit (RAM) 14201 and / or a cache memory unit 14202 , and may further include a read-only memory unit (ROM) 14203 .
[0136] The storage unit 1420 may also include a program / utility 14204 having a set (at least one) of program modules 14205, such program modules 14205 including but not limited to: an operating system, one or more application programs, other program modules, and program data, each of which or some combination may include an implementation of a network environment.
[0137] The bus 1430 may represent one or more of several types of bus structures, including a memory bus or memory controller, a peripheral bus, an accelerated graphics port, a processing unit, or a local bus using any of a variety of bus architectures.
[0138] Electronic device 1400 can also communicate with one or more external devices 1500 (e.g., a keyboard, pointing device, Bluetooth device, etc.), one or more devices that enable a user to interact with electronic device 1400, and / or any device that enables electronic device 1400 to communicate with one or more other computing devices (e.g., a router, modem, etc.). Such communication can occur via input / output (I / O) interface 1450. Furthermore, electronic device 1400 can communicate with one or more networks (e.g., a local area network (LAN), a wide area network (WAN), and / or a public network such as the Internet) via network adapter 1460. As shown, network adapter 1460 communicates with other modules of electronic device 1400 via bus 1430. It should be understood that, although not shown, other hardware and / or software modules can be used in conjunction with electronic device 1400, including but not limited to microcode, device drivers, redundant processing units, external disk drive arrays, RAID systems, tape drives, and data backup storage systems.
[0139] Through the description of the above embodiments, it is easy for those skilled in the art to understand that the example embodiments described herein can be implemented by software or by combining software with necessary hardware. Therefore, the technical solution according to the embodiments of the present disclosure can be embodied in the form of a software product, which can be stored in a non-volatile storage medium (which can be a CD-ROM, a USB flash drive, a mobile hard disk, etc.) or on a network, and includes several instructions to enable a computing device (which can be a personal computer, a server, a terminal device, or a network device, etc.) to execute the method according to the embodiments of the present disclosure.
[0140] In exemplary embodiments of the present disclosure, a computer-readable storage medium is also provided, on which is stored a program product capable of implementing the aforementioned methods of this specification. In some possible implementations, various aspects of the present disclosure may also be implemented in the form of a program product comprising program code. When the program product is executed on a terminal device, the program code is configured to cause the terminal device to execute the steps described in the "Exemplary Methods" section of this specification according to various exemplary embodiments of the present disclosure.
[0141] According to an embodiment of the present disclosure, a program product for implementing the above-mentioned method can be a portable compact disc read-only memory (CD-ROM) and include program code, and can be run on a terminal device, such as a personal computer. However, the program product of the present disclosure is not limited thereto. In this document, a readable storage medium can be any tangible medium containing or storing a program, which can be used by or in conjunction with an instruction execution system, apparatus, or device.
[0142] The program product may be implemented in any combination of one or more readable media. The readable medium may be a readable signal medium or a readable storage medium. The readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device, or component, or any combination thereof. More specific examples (a non-exhaustive list) of readable storage media include: an electrical connection with one or more wires, a portable disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination thereof.
[0143] A computer-readable signal medium may include a data signal propagated in baseband or as part of a carrier wave, which carries readable program code. Such propagated data signals may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination thereof. A readable signal medium may also be any readable medium other than a readable storage medium that can transmit, propagate, or transfer a program for use by or in conjunction with an instruction execution system, apparatus, or device.
[0144] The program code embodied on the readable medium may be transmitted using any appropriate medium, including but not limited to wireless, wireline, optical fiber cable, RF, etc., or any suitable combination of the foregoing.
[0145] The program code for performing the operations of the present disclosure may be written in any combination of one or more programming languages, including object-oriented programming languages such as Java, C++, and the like, as well as conventional procedural programming languages such as "C" or similar programming languages. The program code may be executed entirely on the user computing device, partially on the user device, as a stand-alone software package, partially on the user computing device and partially on a remote computing device, or entirely on a remote computing device or server. In cases involving a remote computing device, the remote computing device may be connected to the user computing device via any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computing device (e.g., via the Internet using an Internet service provider).
[0146] Furthermore, the above-mentioned figures are merely illustrative of the processes included in the methods according to exemplary embodiments of the present disclosure and are not intended to be limiting. It is readily understood that the processes illustrated in the above-mentioned figures do not indicate or limit the temporal order of these processes. Furthermore, it is readily understood that these processes may be executed synchronously or asynchronously, for example, in multiple modules.
[0147] Other embodiments of the present disclosure will readily occur to those skilled in the art after considering the specification and practicing the technical features disclosed herein. This disclosure is intended to cover any variations, uses, or adaptations of the present disclosure that follow the general principles of the present disclosure and include common knowledge or customary techniques in the art not disclosed herein. The specification and examples are to be considered as exemplary only, with the true scope and spirit of the present disclosure being indicated by the claims.
Claims
1. A method for controlling a virtual object, wherein a software application is executed on a processor of a terminal device, and a graphical user interface is rendered on a touch display of the terminal device, wherein the content displayed by the graphical user interface at least partially includes a game scene, wherein the game scene includes at least one virtual object, and the graphical user interface further includes a first direction control and a second direction control, wherein the method for controlling a virtual object comprises: In response to a first touch operation on the first direction control, controlling a target virtual object to move in a first direction in a first running state in the game scene; In response to the first touch operation satisfying a first preset condition, controlling the target virtual object to be converted from a first operating state to a second operating state; the target virtual object includes a target virtual vehicle, the first operating state includes a normal driving state, and the second operating state includes a drifting driving state; In response to a second touch operation on the graphical user interface, determining a current drift angle of the target virtual object in the second operating state according to a touch attribute of the second touch operation; Control the target virtual object to move at the current drift angle in the second operating state.
2. The method for controlling a virtual object according to claim 1, wherein the first preset condition comprises one of the following: The longitudinal displacement of the touch position of the first touch operation is greater than a first preset value; The touch position of the first touch operation enters a second touch area of the graphical user interface.
3. The method for controlling a virtual object according to claim 1, wherein: In response to a second touch operation on the graphical user interface, determining a current drift angle of the target virtual object in the second operating state according to a touch attribute of the second touch operation includes: In response to a second touch operation on the graphical user interface, determining a first starting touch position and a first current touch position of the second touch operation; Determining a current drift angle of the target virtual object in the second operating state according to the first starting touch position and the first current touch position; The second touch operation and the first touch operation are continuous operations, and the first starting position is a touch position when the first touch operation meets a first preset condition.
4. The method for controlling a virtual object according to claim 3, wherein: The first current touch position includes a first sub-current position of the second touch operation in the first moving direction; Wherein, determining the current drift angle of the target virtual object in the second operating state according to the first starting touch position and the first current touch position includes: Determine a first distance difference between a first sub-current position of the second touch operation in the first moving direction and the first starting touch position; A current drift angle of the target virtual object in the second operating state is determined according to the first distance difference.
5. The method for controlling a virtual object according to claim 3, wherein: The first current touch position includes a second sub-current position of the second touch operation in the second moving direction; Wherein, determining the current drift angle of the target virtual object in the second operating state according to the first starting touch position and the first current touch position includes: determining a second distance difference between a second sub-current position of the second touch operation in the second moving direction and the first starting touch position; A current drift angle of the target virtual object in the second operating state is determined according to the second distance difference.
6. The method for controlling a virtual object according to claim 1, wherein: In response to a second touch operation on the graphical user interface, determining a current drift angle of the target virtual object in the second operating state according to a touch attribute of the second touch operation includes: In response to a second touch operation on the graphical user interface, determining a first touch surface for the second touch operation The current drift angle of the target virtual object in the second operating state is determined.
7. The method for controlling a virtual object according to claim 1, wherein: In response to a second touch operation on the graphical user interface, determining a current drift angle of the target virtual object in the second operating state according to a touch attribute of the second touch operation includes: In response to a second touch operation on the graphical user interface, a first touch pressure of the second touch operation is determined, and according to a first pressure value of the first touch pressure, a current drift angle of the target virtual object in the second operating state is determined.
8. The method for controlling a virtual object according to claim 1, wherein: In response to a second touch operation on the graphical user interface, determining a current drift angle of the target virtual object in the second operating state according to a touch attribute of the second touch operation includes: In response to a second touch operation on the graphical user interface, determining a first starting touch position, a first current touch position, and a first touch area of the second touch operation; Determine a first reference distance between the first current touch position and the first starting touch position, and determine a current drift angle of the target virtual object in the second operating state according to the first reference distance and a first touch area of the second touch operation.
9. The method for controlling a virtual object according to claim 1, wherein: In response to a second touch operation on the graphical user interface, determining a current drift angle of the target virtual object in the second operating state according to a touch attribute of the second touch operation includes: In response to a second touch operation on the graphical user interface, determining a first starting touch position, a first current touch position, and a first touch pressure of the second touch operation; Determine a first reference distance between the first current touch position and the first starting touch position, and determine a current drift angle of the target virtual object in the second operating state according to the first reference distance and a first pressure value of the first touch pressure.
10. The method for controlling a virtual object according to claim 1, wherein: In response to a second touch operation on the graphical user interface, determining a current drift angle of the target virtual object in the second operating state according to a touch attribute of the second touch operation includes: In response to a second touch operation on the graphical user interface, determining a first starting touch position, a first current touch position, a first touch area, and a first touch pressure of the second touch operation; Determine a first reference distance between the first current touch position and the first starting touch position, and determine a current drift angle of the target virtual object in the second operating state based on the first reference distance, the first touch area of the second touch operation, and the first pressure value of the first touch pressure.
11. The method for controlling a virtual object according to any one of claims 1 to 10, wherein: The control method of the virtual object also includes: In response to termination of the second touch operation or in response to a third touch operation on the graphical user interface, the target virtual object is controlled to be converted from the second operating state to the first operating state, and the target virtual object is controlled to move in the first operating state.
12. The method for controlling a virtual object according to claim 1, wherein: The control method of the virtual object also includes: Controlling the target virtual object to move in the game scene in a third running state; In response to a fourth touch operation on the graphical user interface, controlling the target virtual object to be converted from a third operating state to a fourth operating state; the third operating state includes an automatic throttle state, and the fourth operating state includes a manual throttle state; In response to a fifth touch operation on the graphical user interface, determining a current acceleration of the target virtual object in the fourth operating state according to a touch attribute of the fifth touch operation; The target virtual object is controlled to move at the current acceleration in the fourth operating state.
13. The method for controlling a virtual object according to claim 12, wherein: The starting touch position of the fourth touch operation is the first direction control or the second direction control, and the ending touch position of the fourth touch operation is located in the third touch area of the graphical user interface or has a longitudinal distance from the starting touch position greater than a second preset value.
14. The method for controlling a virtual object according to claim 12, wherein: In response to a fifth touch operation on the graphical user interface, determining a current acceleration of the target virtual object in the fourth operating state according to a touch attribute of the fifth touch operation includes: In response to a fifth touch operation on the graphical user interface, determining a second starting touch position and a second current touch position of the fifth touch operation, and determining a current acceleration of the target virtual object in the fourth operating state according to the second starting touch position and the second current touch position; or In response to a fifth touch operation on the graphical user interface, determining a current acceleration of the target virtual object in the fourth operating state according to a second touch area of the fifth touch operation; or In response to a fifth touch operation on the graphical user interface, a second touch pressure of the fifth touch operation is determined, and a current acceleration of the target virtual object in the fourth operating state is determined according to a second pressure value of the second touch pressure.
15. The method for controlling a virtual object according to claim 12, wherein: In response to a fifth touch operation on the graphical user interface, determining a current acceleration of the target virtual object in the fourth operating state according to a touch attribute of the fifth touch operation includes: In response to a fifth touch operation on the graphical user interface, determining a second starting touch position, a second current touch position, and a second touch area of the fifth touch operation; A second reference distance between the second current touch position and the second starting touch position is determined, and a current acceleration of the target virtual object in the fourth operating state is determined according to the second reference distance and the second touch area.
16. The method for controlling a virtual object according to claim 12, wherein: In response to a fifth touch operation on the graphical user interface, determining a current acceleration of the target virtual object in the fourth operating state according to a touch attribute of the fifth touch operation includes: In response to a fifth touch operation on the graphical user interface, determining a second starting touch position, a second current touch position, and a second touch pressure of the fifth touch operation; A second reference distance between the second current touch position and the second starting touch position is determined, and a current acceleration of the target virtual object in the fourth operating state is determined according to the second reference distance and a second pressure value of the second touch pressure.
17. The method for controlling a virtual object according to claim 12, wherein: In response to a fifth touch operation on the graphical user interface, determining a current acceleration of the target virtual object in the fourth operating state according to a touch attribute of the fifth touch operation includes: In response to a fifth touch operation on the graphical user interface, determining a second starting touch position, a second current touch position, a second touch area, and a second touch pressure of the fifth touch operation; A second reference distance between the second current touch position and the second starting touch position is determined, and a current acceleration of the target virtual object in the fourth operating state is determined according to the second reference distance, the second touch area, and a second pressure value of the second touch pressure.
18. The method for controlling a virtual object according to any one of claims 12 to 17, wherein: The control method of the virtual object also includes: In response to a sixth touch operation on the graphical user interface, the target virtual object is controlled to be converted from the fourth operating state to the third operating state, and the target virtual object is controlled to move in the third operating state.
19. The method for controlling a virtual object according to claim 1, wherein: The control method of the virtual object also includes: In response to a seventh touch operation on the fourth touch area of the graphical user interface, the target virtual object is controlled to perform a braking task, and the target virtual object is controlled to move in a predetermined direction according to the touch position of the fourth touch area by the seventh touch operation. The direction of movement of the elephant.
20. A control device for a virtual object, wherein a software application is executed on a processor of a terminal device and a graphical user interface is rendered on a touch display of the terminal device, wherein the content displayed by the graphical user interface at least partially includes a game scene, wherein the game scene includes at least one virtual object, and the graphical user interface further includes a first direction control and a second direction control, wherein the control device for the virtual object comprises: A first control module is configured to execute, in response to a first touch operation on the first direction control, control a target virtual object to move in a first direction in a first operating state in a game scene; A first state conversion module is configured to execute, in response to the first touch operation satisfying a first preset condition, controlling the target virtual object to convert from a first operating state to a second operating state; the target virtual object includes a target virtual vehicle, the first operating state includes a normal driving state, and the second operating state includes a drifting driving state; a drift angle determination module, configured to execute, in response to a second touch operation on the graphical user interface, determining a current drift angle of the target virtual object in the second operating state according to a touch attribute of the second touch operation; The second control module is configured to execute control to move the target virtual object at the current drift angle in the second operating state.
21. A computer-readable storage medium having a computer program stored thereon, wherein the computer program, when executed by a processor, implements the method for controlling a virtual object according to any one of claims 1 to 19.
22. An electronic device, comprising: processor; as well as A memory, configured to store executable instructions of the processor; Wherein, the processor is configured to execute the virtual object control method according to any one of claims 1-19 by executing the executable instructions.