Virtual vehicle control method and device, equipment and storage medium
By using a combination of the first brake control and the accelerator control in the virtual vehicle control system, the operation of the virtual vehicle exit drift state is simplified, and the drift efficiency is improved, solving the problems of cumbersome operation and low efficiency in the prior art.
Patent Information
- Application Number
- CN202510454418.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2022-05-20
- Publication Date
- 2025-05-23
AI Technical Summary
In the prior art, it is complicated for users to operate a virtual vehicle to exit the drift state, and the drifting efficiency is low.
The drift angle of the virtual vehicle is gradually reduced by the first brake control, and automatically exits the drift state when the drift angle is less than the first threshold; at the same time, the throttle control is used to accelerate the decreasing speed of the drift angle.
It realizes simplified operation of automatic exit from the drift state, improves the drift efficiency of virtual vehicles, and provides a richer way of movement.
Smart Images

Figure CN120022583A_ABST
Abstract
Description
[0001] This application is a divisional application of the invention patent application with the application number 202210555884.1 and the invention title "Control Method, Device, Equipment and Storage Medium of Virtual Vehicle" submitted on May 20, 2022. Technical Field
[0002] This application relates to the field of computer and Internet technologies, and particularly relates to a control method, device, equipment and storage medium of a virtual vehicle. Background Art
[0003] A user can control a virtual vehicle to move in a virtual environment.
[0004] In the related art, a direction adjustment control, an accelerator control, and a drift control are displayed on a user interface. During the movement of the virtual vehicle, the movement direction of the virtual vehicle is adjusted through the direction adjustment control, the virtual vehicle is controlled to keep accelerating by long-pressing the accelerator control, the virtual vehicle is controlled to stop accelerating by releasing the accelerator control, and the virtual vehicle is controlled to enter a drift state through the drift control. Moreover, during the drift of the virtual vehicle, the user continuously adjusts the movement direction of the virtual vehicle through the direction adjustment control to exit the drift state.
[0005] However, in the above-mentioned related art, the user operation is cumbersome when controlling the virtual vehicle to exit the drift state. Summary of the Invention
[0006] Embodiments of this application provide a control method, device, equipment and storage medium of a virtual vehicle, which can simplify user operations and improve the drift-exiting efficiency of the virtual vehicle. The technical solutions are as follows.
[0007] According to one aspect of the embodiments of this application, a control method of a virtual vehicle is provided, and the method includes the following steps:
[0008] Display a virtual vehicle in a drift state; wherein, the drift state is a state where the drift angle of the virtual vehicle is greater than a first threshold, and the drift angle is the included angle between the movement direction of the virtual vehicle and the head orientation of the virtual vehicle;
[0009] In response to an operation on a first brake control, control the drift angle of the virtual vehicle to gradually decrease;
[0010] In response to a first operation on an accelerator control, control the virtual vehicle to accelerate and increase the decreasing speed of the drift angle of the virtual vehicle;
[0011] When the drift angle of the virtual vehicle is less than the first threshold, control the virtual vehicle to exit the drift state.
[0012] According to one aspect of an embodiment of the present application, a control device for a virtual vehicle is provided, the device comprising the following modules:
[0013] A vehicle drift module, used to display a virtual vehicle in a drifting state; wherein the drifting state is a state in which a drift angle of the virtual vehicle is greater than a first threshold value, and the drift angle is an angle between a moving direction of the virtual vehicle and a front direction of the virtual vehicle;
[0014] A vehicle control module, configured to control the drift angle of the virtual vehicle to gradually decrease in response to an operation on a first brake control;
[0015] An acceleration and de-drifting module, configured to control the virtual vehicle to accelerate and move, and to increase the speed of reducing the drift angle of the virtual vehicle in response to a first operation on a throttle control;
[0016] The vehicle de-drifting module is used to control the virtual vehicle to exit the drifting state when the drift angle of the virtual vehicle is less than the first threshold.
[0017] According to one aspect of an embodiment of the present application, an embodiment of the present application provides a terminal device, which includes a processor and a memory, in which a computer program is stored, and the computer program is loaded and executed by the processor to implement the above-mentioned virtual vehicle control method.
[0018] According to one aspect of an embodiment of the present application, an embodiment of the present application provides a computer-readable storage medium, in which a computer program is stored. The computer program is loaded and executed by a processor to implement the above-mentioned virtual vehicle control method.
[0019] According to one aspect of the embodiments of the present application, a computer program product or a computer program is provided, the computer program product or the computer program including computer instructions, the computer instructions being stored in a computer-readable storage medium. A processor of a terminal device reads the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions, so that the terminal device executes the control method of the virtual vehicle.
[0020] The technical solution provided in the embodiments of the present application can bring the following beneficial effects:
[0021] The drift angle of the virtual vehicle is controlled to decrease through the first brake control. When the drift angle of the virtual vehicle is reduced to less than a threshold value, the virtual vehicle is controlled to exit the drift state, thereby automating the exit from the drift state. The user does not need to frequently adjust the moving direction or the front orientation of the virtual vehicle through the direction adjustment control, thereby simplifying user operations. The speed of decreasing the drift angle of the virtual vehicle is accelerated through the throttle control, thereby accelerating the virtual vehicle's exit from the drift state and improving the virtual vehicle's drift exit efficiency. Moreover, the acceleration of the virtual vehicle is controlled through the throttle control, thereby providing a drift acceleration movement method, thereby enriching the movement methods of the virtual vehicle. BRIEF DESCRIPTION OF THE DRAWINGS
[0022] Figure 1 is a schematic diagram of a control system of a virtual vehicle provided by an embodiment of the present application;
[0023] Figure 2 A schematic diagram of a user interface is exemplarily shown;
[0024] Figure 3 is a flow chart of a control method for a virtual vehicle provided by an embodiment of the present application;
[0025] Figure 4 A schematic diagram of a user interface is exemplarily shown;
[0026] Figure 5 A schematic diagram showing a drift angle variation method is shown as an example;
[0027] Figure 6 is a flow chart of a virtual vehicle control method provided by another embodiment of the present application;
[0028] Figure 7 is a flow chart of a virtual vehicle control method provided by another embodiment of the present application;
[0029] Figures 8 to 12 A schematic diagram of a user interface is exemplarily shown;
[0030] Fig.13 A schematic diagram showing an exemplary control method of a virtual vehicle;
[0031] Fig.14 is a flow chart of a virtual vehicle control method provided by another embodiment of the present application;
[0032] Fig.15 A schematic diagram showing, by way of example, a user controlling a virtual car connection;
[0033] Fig.16 is a block diagram of a control device for a virtual vehicle provided by an embodiment of the present application;
[0034] Fig.17is a block diagram of a control device for a virtual vehicle provided by another embodiment of the present application;
[0035] Fig.18 This is a structural block diagram of a terminal device provided by an embodiment of the present application. DETAILED DESCRIPTION
[0036] In order to make the objectives, technical solutions and advantages of the present application clearer, the implementation methods of the present application will be further described in detail below with reference to the accompanying drawings.
[0037] Please refer to Figure 1 , which shows a schematic diagram of a control system of a virtual vehicle provided by an embodiment of the present application. The control system of the virtual vehicle may include: a terminal device 10 and a server 20.
[0038] The terminal device 10 may be an electronic device such as a mobile phone, a tablet computer, a game console, an e-book reader, a multimedia player, a wearable device, a PC (Personal Computer), etc., which is not limited in the present embodiment. In some embodiments, the terminal device 10 includes a client of an application. The application may be an application that needs to be downloaded and installed, or may be a click-to-use application, which is not limited in the present embodiment.
[0039] In the embodiment of the present application, the above-mentioned application refers to any application that can control the movement of a virtual vehicle in a virtual environment. Exemplarily, the application can be a racing game, a MOBA (Multiplayer Online Battle Arena) game, a TPS (Third-Personal Shooting Game), a FPS (First-Person Shooting Game), a multiplayer gunfight survival game, an augmented reality (Augmented Reality, AR) application, a three-dimensional map program, a social application, an interactive entertainment application, and the like. In addition, for different applications, the form of the virtual vehicle provided by it will also be different, and it can be pre-configured according to actual needs, and the embodiment of the present application does not limit this. Of course, in an exemplary embodiment, the same application can also provide users with a variety of virtual vehicles with different forms, and the embodiment of the present application does not limit this.
[0040] The above-mentioned virtual vehicle refers to a virtual item that can be moved and controlled by the user in the application. Among them, the virtual vehicle can be displayed in three-dimensional form or in two-dimensional form, which is not limited in the embodiments of the present application. In some embodiments, the virtual vehicle can also be called a virtual vehicle. For example, in a racing game, the virtual vehicle is the vehicle controlled by the user during the racing process; in a shooting game, the virtual vehicle can be a virtual vehicle that the user searches for in a virtual environment; in a MOBA game, the virtual vehicle can be a virtual vehicle summoned by the user to control the virtual character; and so on, which is not limited in the embodiments of the present application.
[0041] The server 20 is used to provide background services for the terminal device 10. The server 20 can be a single server, a server cluster consisting of multiple servers, or a cloud computing service center. In some embodiments, the server 20 can be a background server of the client of the above application. In an exemplary embodiment, the server 20 provides background services for multiple terminal devices 10.
[0042] The terminal device 10 and the server 20 perform data transmission via a network.
[0043] In an embodiment of the present application, the user can control the virtual vehicle in the above application to move flexibly. For example, Figure 2 As shown, a virtual vehicle 21 and operation controls for controlling the virtual vehicle 21 are displayed in the user interface of the terminal device 10. The operation controls include a direction adjustment control 22, a throttle control 23, a first brake control 24 and a second brake control 25.
[0044] The direction adjustment control 22 is used to control the front direction of the virtual vehicle 21. The user controls the front direction of the virtual vehicle 21 by operating the direction adjustment control 22. In one possible implementation, the direction adjustment control 22 includes a plurality of sub-controls, and different sub-controls correspond to different adjustment directions. In another possible implementation, the direction adjustment control 22 includes a slider, and the user adjusts the front direction of the virtual vehicle by sliding the slider, and different sliding directions correspond to different adjustment directions.
[0045] The throttle control 23 is used to control the virtual vehicle 21 to accelerate. The user controls the virtual vehicle 21 to accelerate by operating the throttle control 23.
[0046] The first brake control 24 is used to control the virtual vehicle 21 to decelerate or reverse. When the virtual vehicle 21 is accelerating, the user controls the virtual vehicle 21 to decelerate slowly by clicking the first brake control 24; or, the user controls the virtual vehicle 21 to decelerate quickly by continuously pressing the first brake control 24, and when the speed of the virtual vehicle 21 decreases to zero, if the continuous pressing operation does not disappear, the virtual vehicle 21 continues to reverse.
[0047] The second brake control 25 is used to control the virtual vehicle 21 to decelerate. The second brake control 25 is another control different from the first brake control 24. For example, the first brake control 24 can be understood as a foot brake control, and the second brake control 25 can be understood as a hand brake control. The user controls the virtual vehicle 21 to enter a drift state by operating the direction adjustment control 22 and clicking the second brake control 25 once, and then controls the virtual vehicle 21 to rapidly reduce its movement until the speed is zero by clicking the second brake control 25 twice.
[0048] It should be noted that the above-mentioned slow deceleration movement, fast deceleration movement and rapid reduction movement refer to three different deceleration modes of the virtual vehicle. For example, the deceleration efficiency of the slow deceleration movement is less than the deceleration efficiency of the fast deceleration movement, and the deceleration efficiency of the fast deceleration movement is less than the deceleration efficiency of the rapid reduction movement.
[0049] In some embodiments, the operation controls further include a nitrogen control 26 and a reset control 27 .
[0050] The nitrogen control 26 is used to control the virtual vehicle 21 to accelerate according to the accumulated nitrogen resources. The user controls the virtual vehicle 21 to consume the accumulated nitrogen resources for acceleration by operating the nitrogen control 26. In some embodiments, a nitrogen indicator icon is also displayed in the user interface. Among them, the nitrogen indicator icon includes a plurality of sub-icons, and the sub-icons correspond to a first display style and a second display style. The amount of nitrogen resources accumulated by the virtual vehicle 21 is positively correlated with the number of sub-icons displayed in the first display style. In the process of accumulating nitrogen resources, the nitrogen indicator icon displays the transformation process of the sub-icon from the second display style to the first display style to represent the accumulation of nitrogen resources; in the process of consuming nitrogen resources, the nitrogen indicator icon displays the transformation process of the sub-icon from the first display style to the second display style to represent the consumption of nitrogen resources.
[0051] The reset control 27 is used to control the virtual vehicle 21 to get out of a stuck state. During the movement of the virtual vehicle 21, if the virtual vehicle 21 is uncontrollable due to the virtual vehicle 21 moving to a special location, the virtual vehicle 21 is controlled to get out of the special location and reset to the nearest non-special location by operating the reset control 27, so that the virtual vehicle 21 continues to move from the non-special location.
[0052] It should be noted that the above description of the operation controls is exemplary and explanatory. In the exemplary embodiment, the functions of the operation controls can be flexibly set and adjusted, and the embodiments of the present application do not limit this. Taking the above first brake control as an example, when the virtual vehicle is accelerating, the user can control the virtual vehicle to decelerate through the first brake control; when the virtual vehicle is in a drifting state, the user can control the virtual vehicle to reduce its drift angle through the first brake control.
[0053] Please refer to Figure 3 , which shows a flow chart of a control method for a virtual vehicle provided by an embodiment of the present application. Figure 1 The terminal device 10 of the control system of the virtual vehicle shown is executed, and the execution subject of each step can be the client of the application in the terminal device 10. The method may include at least one of the following steps (301-304):
[0054] Step 301, displaying a virtual vehicle in a drifting state.
[0055] The drift state is a motion state in which the moving direction of the virtual vehicle is inconsistent with the vehicle head direction; that is, when the virtual vehicle is in a drift state, there is an angle between the moving direction of the virtual vehicle and the vehicle head direction. The vehicle head direction refers to the direction from the rear of the virtual vehicle to the front of the vehicle. For example, Figure 4 As shown, when the virtual vehicle 41 is in a drifting state, there is an angle between the direction of the head of the virtual vehicle and the moving direction. In the embodiment of the present application, the drifting state is a state in which the drift angle of the virtual vehicle is greater than the first threshold. The drift angle is the angle between the moving direction of the virtual vehicle and the direction of the head of the virtual vehicle.
[0056] In some embodiments, the first threshold value can be any value, such as 0°, 10°, 13°, 15°, etc. The first threshold value can be flexibly set according to the actual situation, and the embodiment of the present application does not limit this. In one possible implementation, in order to improve the authenticity of the drift state, the first threshold value is 0°. During the movement of the virtual vehicle, if the virtual vehicle has a drift angle, the client determines that the virtual vehicle is in a drift state; that is, the client controls the drift angle of the virtual vehicle from nothing to something to control the virtual vehicle to enter a drift state. In another possible implementation, in order to improve the display effect of the drift state so that the user can perceive that the virtual vehicle has entered a drift state, the first threshold value is not 0°. During the movement of the virtual vehicle, if the drift angle of the virtual vehicle is greater than a certain value, the client determines that the virtual vehicle is in a drift state; that is, the client controls the drift angle of the virtual vehicle to increase to a certain value to control the virtual vehicle to enter a drift state.
[0057] In an embodiment of the present application, a virtual vehicle is displayed on the client, and after the virtual vehicle enters a drifting state, the client displays the virtual vehicle in a drifting state. In some embodiments, the virtual vehicle corresponds to a performance orientation and a logical orientation. Among them, the performance orientation corresponds to the above-mentioned vehicle head orientation, and is used to show the user's control expectations for the virtual vehicle; the logical orientation corresponds to the above-mentioned moving direction, and is used to characterize the actual feedback of the virtual vehicle's physical system in response to the control expectations. In an embodiment of the present application, the client controls the vehicle head orientation of the virtual vehicle through the performance orientation, and controls the moving direction of the virtual vehicle through the logical orientation.
[0058] In a possible implementation, there is a calculation rule between the logical orientation and the expressive orientation. In some embodiments, the client determines the expressive orientation of the virtual vehicle based on the user's operation on the direction adjustment control, and then obtains the calculation parameters and the calculation rule, determines the logical orientation of the virtual vehicle based on the expressive orientation, and further, controls the front orientation of the virtual vehicle based on the expressive orientation, and controls the moving direction of the virtual vehicle based on the logical orientation in the current image frame.
[0059] In another possible implementation, the logical orientation is a delayed response to the performance orientation. In some embodiments, the client determines the performance orientation of the virtual vehicle based on the user's operation on the direction adjustment control, determines the historical performance orientation of the virtual vehicle as the logical orientation of the virtual vehicle, and further controls the front orientation of the virtual vehicle based on the performance orientation in the current image frame, and controls the moving direction of the virtual vehicle based on the logical orientation. The historical performance orientation refers to the performance orientation of the virtual vehicle in the previous image frame.
[0060] Step 302: In response to the operation on the first brake control, the drift angle of the virtual vehicle is controlled to gradually decrease.
[0061] In some embodiments, a first brake control is displayed in the client, wherein the first brake control is used to control the virtual vehicle to decelerate or reverse.
[0062] In an embodiment of the present application, after displaying the above-mentioned first brake control, the client detects the first brake control, and when an operation on the first brake control is detected, the drift angle of the virtual vehicle is controlled to gradually decrease. Exemplarily, the above-mentioned operation on the first brake control is a click operation, and the click operation refers to an instantaneous pressing operation on a certain point of action. When the client detects that the pressing operation on a certain point of action disappears immediately after it appears, it is determined that a click operation on the point of action is detected. In an embodiment of the present application, the point of action can be any point within the triggering area of the first brake control. Of course, in an exemplary embodiment, the above-mentioned operation on the first brake control can be flexibly set and adjusted according to actual conditions, such as sliding operation, dragging operation, corresponding key pressing operation, etc., and the embodiment of the present application does not limit this.
[0063] In some embodiments, the client increases the grip of the virtual vehicle to control the virtual vehicle's drift angle to decrease. Grip is used to characterize the resistance between the virtual vehicle and the ground. There is a negative correlation between grip and drift angle; that is, the larger the drift angle, the smaller the grip, and the smaller the drift angle, the greater the grip. In some embodiments, in the drift state, the drift angle of the virtual vehicle increases and the grip of the virtual vehicle decreases. At this time, the resistance between the virtual vehicle and the ground is small, and the virtual vehicle slips, so that the drift angle of the virtual vehicle further increases and the grip further decreases; thereafter, when the operation of the first brake control is detected, the virtual vehicle begins to prepare to exit the drift state and increase the grip of the virtual vehicle. At this time, the resistance between the virtual vehicle and the ground increases, the slip of the virtual vehicle decreases, and the drift angle of the virtual vehicle decreases, so that the grip of the virtual vehicle further increases.
[0064] In an embodiment of the present application, when the client detects an operation on the first brake control, the drift angle of the virtual vehicle is controlled to gradually decrease, and the virtual vehicle is controlled to decelerate. In some embodiments, while the client controls the drift angle of the virtual vehicle to decrease, the virtual vehicle is controlled to decelerate based on the second basic acceleration. The second basic acceleration refers to the acceleration corresponding to the operation on the first brake control.
[0065] Step 303 , in response to the first operation on the throttle control, controlling the virtual vehicle to accelerate and move, and increasing the speed of reducing the drift angle of the virtual vehicle.
[0066] In some embodiments, a throttle control is displayed in the client, wherein the throttle control is used to control the acceleration of the virtual vehicle.
[0067] In an embodiment of the present application, after displaying the above-mentioned throttle control, the client detects the throttle control, and when the first operation on the throttle control is detected, the virtual vehicle is controlled to accelerate and move, and the speed of reducing the drift angle of the virtual vehicle is increased. Exemplarily, the above-mentioned first operation on the throttle control is a click operation, and the click operation refers to an instantaneous pressing operation on any action point in the trigger area of the throttle control. Of course, in an exemplary embodiment, the above-mentioned first operation on the throttle control can be flexibly set and adjusted according to actual conditions, such as a sliding operation, a dragging operation, a pressing operation of a corresponding key position, etc., and the embodiment of the present application does not limit this.
[0068] In some embodiments, the client increases the grip of the virtual vehicle to speed up the reduction speed of the drift angle of the virtual vehicle. The grip is positively correlated with the reduction speed of the drift angle; that is, the greater the grip, the faster the reduction speed of the drift angle, and the smaller the grip, the greater the reduction speed of the drift angle. Exemplarily, when the first operation on the throttle operation control is detected, the grip of the virtual vehicle is increased on the basis of the current grip of the virtual vehicle. At this time, the resistance between the virtual vehicle and the ground is further increased on the original basis, so that the virtual vehicle's drift angle is reduced faster.
[0069] In some embodiments, when the client detects an operation on the throttle control, the client adds an additional first acceleration to the first basic acceleration of the virtual vehicle to obtain a first target acceleration of the virtual vehicle, and then controls the virtual vehicle to accelerate based on the first target acceleration. The first basic acceleration refers to the acceleration corresponding to the first operation on the throttle control.
[0070] Step 304: When the drift angle of the virtual vehicle is less than a first threshold, control the virtual vehicle to exit the drift state.
[0071] In an embodiment of the present application, in the process of the drift angle gradually decreasing, the client detects the drift angle, and when the drift angle of the virtual vehicle is less than a first threshold, the virtual vehicle is controlled to exit the drift state. In one possible implementation, the above-mentioned first threshold is 0°. When the client determines that there is no angle between the front direction of the virtual vehicle and the moving direction, the virtual vehicle is controlled to exit the drift state. In another possible implementation, the above-mentioned first threshold is not 0°. When the client determines that the angle between the front direction of the virtual vehicle and the moving direction is less than a certain value, the client controls the virtual vehicle to exit the drift state, so as to avoid delays from the drift state to the exit of the drift state.
[0072] In some embodiments, after the virtual vehicle exits the drifting state, it enters the running state, wherein the running state refers to a state where the virtual vehicle is accelerating forward without being airborne, drifting, or using nitrogen resources.
[0073] One point that needs to be explained is that, in the embodiment of the present application, the process of reducing the drift angle may also be referred to as the de-drifting process (i.e., the process of exiting drift). For a virtual vehicle in a drifting state, when the client detects an operation on a first brake control, it determines that the de-drifting process starts; when the client detects a first operation on a throttle control, it determines that the de-drifting is accelerated; and when the drift angle is less than a first threshold, it determines that the de-drifting process ends.
[0074] To sum up, in the technical solution provided in the embodiment of the present application, the drift angle of the virtual vehicle is controlled to decrease through the first brake control. When the drift angle of the virtual vehicle is reduced to less than a threshold value, the virtual vehicle is controlled to exit the drift state, thereby realizing the automation of exiting the drift state. The user does not need to frequently adjust the moving direction or the front direction of the virtual vehicle through the direction adjustment control, thereby simplifying user operation. The speed of reducing the drift angle of the virtual vehicle is accelerated through the throttle control, so that the virtual vehicle exits the drift state quickly and improves the efficiency of drifting out of the virtual vehicle. Moreover, the acceleration of the virtual vehicle is controlled through the throttle control, thereby providing a drift-accelerated movement method, which enriches the movement methods of the virtual vehicle.
[0075] In addition, the grip is associated with the speed at which the drift angle decreases. The speed at which the drift angle decreases is increased by increasing the grip. Specific parameters are used to control the virtual vehicle. Compared with the automatically played animation, the movement of the virtual vehicle during the de-drifting process is more realistic.
[0076] In addition, an additional first acceleration is superimposed on the first basic acceleration corresponding to the first operation of the throttle control to control the accelerated movement of the virtual vehicle. On the one hand, specific parameters are used to control the virtual vehicle, and the movement performance of the virtual vehicle during the de-drifting process is more realistic. On the other hand, by superimposing acceleration, a drift acceleration movement method is provided before the virtual vehicle exits the drift state, enriching the movement method of the virtual vehicle.
[0077] Next, the method of reducing the above drift angle is introduced.
[0078] In an exemplary embodiment, the above step 302 includes at least one of the following steps:
[0079] 1. Get the target vehicle head direction of the virtual vehicle at the next timestamp.
[0080] The timestamp is used to indicate the display time of the image frame. In some embodiments, the previous timestamp is used to indicate the display time of the previous image frame, the current timestamp is used to indicate the display time of the current image frame, and the next timestamp is used to indicate the display time of the next image frame. Among them, the time interval between two adjacent timestamps is a unit time, and the unit time is the time interval between two adjacent image frames. Exemplarily, the unit time can be any value, such as 0.025s, 0.033s, 0.050s, etc. The unit time can be flexibly set and adjusted according to actual conditions, and the embodiments of the present application are not limited to this.
[0081] In an embodiment of the present application, when the client controls the drift angle of the virtual vehicle to gradually decrease, the target vehicle head orientation of the virtual vehicle at the next timestamp is obtained. In some embodiments, the client can determine the target vehicle head orientation based on the operation of the direction adjustment control, or can determine the vehicle head orientation of the virtual vehicle based on the historical vehicle head orientation of the virtual vehicle. The historical vehicle head orientation refers to the vehicle head orientation of the virtual vehicle at the current timestamp.
[0082] In a possible implementation, the client determines the target vehicle head orientation according to the operation on the direction adjustment control. In some embodiments, during the process of reducing the drift angle, when the client detects the operation on the direction adjustment control, the client determines the target vehicle head orientation based on the operation on the direction adjustment control; or, when the client does not detect the operation on the direction adjustment control, the client determines the target vehicle head orientation based on the most recently detected operation on the direction adjustment control.
[0083] In another possible implementation, the client determines the head direction of the virtual vehicle based on the historical head direction of the virtual vehicle. In some embodiments, during the process of reducing the drift angle, the client obtains the head direction of the virtual vehicle at the current timestamp as the target head direction.
[0084] It should be noted that the above-mentioned introduction to the method for obtaining the target vehicle head orientation is only exemplary and explanatory. In an exemplary embodiment, the method for obtaining the target vehicle head orientation can be flexibly set and adjusted according to the actual situation, and the embodiment of the present application does not limit this. For example, in the process of reducing the drift angle, the user can adjust the vehicle head orientation of the virtual vehicle through the direction adjustment control. When the client detects an operation on the direction adjustment control, it determines the target vehicle head orientation of the virtual vehicle at the next timestamp according to the operation. When the client does not detect an operation on the direction adjustment control, it determines the vehicle head orientation of the virtual vehicle at the current timestamp as the above-mentioned target vehicle head orientation.
[0085] 2. According to the target vehicle head direction, determine the target moving direction of the virtual vehicle at the next timestamp.
[0086] In the embodiment of the present application, there is an association between the target vehicle head orientation and the target moving direction. After determining the target vehicle head orientation, the client determines the target moving direction of the virtual vehicle at the next timestamp based on the target vehicle head orientation. It should be noted that in the embodiment of the present application, the angle between the target moving direction and the target vehicle head orientation is smaller than the angle between the moving direction and the vehicle head orientation at the current timestamp.
[0087] In some embodiments, when obtaining the above-mentioned target moving direction, the client determines the angular change of the moving direction according to the grip and moving direction of the virtual vehicle at the current timestamp and the target vehicle head direction. Among them, the grip is positively correlated with the angular change of the moving direction per unit time. Afterwards, the client determines the target moving direction of the virtual vehicle at the next timestamp according to the moving direction at the current timestamp and the angular change of the moving direction.
[0088] 3. Control the virtual vehicle to move according to the target moving direction at the next time stamp.
[0089] In an embodiment of the present application, after determining the target vehicle head orientation and the target moving direction, the client controls the virtual vehicle to move according to the target moving direction at the next timestamp, and the vehicle head orientation displayed by the virtual vehicle is the target vehicle head orientation.
[0090] To summarize, in the technical solution provided in the embodiment of the present application, the target moving direction is determined by the target vehicle head orientation, and the vehicle head orientation and the moving direction are associated, so that the user does not need to control the vehicle head orientation and the moving direction at the same time, thereby simplifying the user's operation on the virtual vehicle and improving the user's control efficiency on the virtual vehicle; moreover, according to the grip and moving direction of the virtual vehicle at the current timestamp and the target vehicle head orientation of the virtual vehicle at the next timestamp, the angular change of the moving direction is determined, and then the target moving direction is determined, thereby realizing the frame-by-frame change of the virtual vehicle, and the change of the subsequent image frame depends on the parameters in the current image frame, so that the change of the virtual vehicle is more realistic and coherent.
[0091] It should be noted that the way the drift angle is changed in step 302 is also applicable to the way the drift angle is changed in step 303 .
[0092] For example, assuming that the direction of the head of the virtual vehicle is d(t), the moving direction is v(t), the grip is Fz, and the unit time is Δt, the iterative formula for the target moving direction of the virtual vehicle is as follows:
[0093] v(t+Δt)=Fz*(d(t+Δt)-v(t))+v(t);
[0094] v(t+2*Δt)=Fz*(d(t+2*Δt)-v(t+Δt))+v(t+Δt);
[0095] …
[0096] v(t+n*Δt)=Fz*[d(t+n*Δt)-v(t+(n-1)*Δt)]+v(t+(n-1)*Δt);
[0097] There is a negative correlation between grip and drift angle. When the client detects the operation of the first brake control, the grip of the virtual vehicle is increased. Based on the above iterative formula, it can be seen that in this process, the moving direction of the virtual vehicle gradually approaches the front of the vehicle, and the drift angle of the virtual vehicle gradually decreases; further, when the operation of the throttle control is detected, the grip of the virtual vehicle is continued to be increased on the original basis. Based on the above iterative formula, it can be seen that in this process, the moving direction of the virtual vehicle accelerates to approach the front of the vehicle, and the drift angle of the virtual vehicle decreases faster.
[0098] For example, in conjunction with reference Figure 5 Taking the starting front direction of the virtual vehicle as 90° as an example, when the client detects an operation on the first brake control, the drift angle of the virtual vehicle is controlled to gradually decrease. When the client detects an operation on the throttle control, the drift angle of the virtual vehicle is controlled to decrease rapidly.
[0099] In some embodiments, after exiting the drift state, the virtual vehicle keeps accelerating. Below, the acceleration movement mode of the virtual vehicle after exiting the drift state is introduced.
[0100] In a possible implementation manner, the above step 304 further includes the following sub-steps:
[0101] 1. Within the first time period from the exit of the drift state, control the virtual vehicle to accelerate.
[0102] In the embodiment of the present application, after determining that the virtual vehicle exits the drift state, the client controls the virtual vehicle to accelerate within a first time period from the exit moment of the drift state.
[0103] In some embodiments, when the client controls the virtual vehicle to accelerate, an additional second acceleration is superimposed on the first basic acceleration of the virtual vehicle to obtain the second target acceleration of the virtual vehicle, and then the virtual vehicle is controlled to accelerate based on the second target acceleration within a first duration from the exit moment of the drift state. The second acceleration and the first acceleration may be the same or different, and this embodiment of the present application does not limit this; the first duration may be any duration, such as 0.2s, 0.3s, 0.4s, etc., and the first duration may be flexibly set and adjusted according to actual conditions, and this embodiment of the present application does not limit this.
[0104] In some embodiments, after the first time period, the client controls the virtual vehicle to accelerate based on the first basic acceleration.
[0105] In summary, in the technical solution provided in the embodiment of the present application, the virtual vehicle is automatically controlled to accelerate and move after the drift is completed, which simplifies the user operation.
[0106] In another possible implementation manner, the above step 304 further includes at least one of the following sub-steps:
[0107] 1. When a second operation on the accelerator control is detected, controlling the virtual vehicle to accelerate during a duration of the second operation.
[0108] In the embodiment of the present application, after determining that the virtual vehicle has exited the drift state, the client detects the throttle control, and when the second operation on the throttle control is detected, the virtual vehicle is controlled to accelerate and move during the duration of the second operation. Exemplarily, the second operation on the throttle control is a continuous pressing operation, which refers to a continuous pressing operation on a certain action point. When the client detects that the pressing operation on a certain action point occurs and lasts for a period of time, it is determined that the continuous pressing operation on the action point is detected. In the embodiment of the present application, the action point can be any point in the trigger area of the throttle operation control.
[0109] In some embodiments, when controlling the virtual vehicle to accelerate, the client adds an additional third acceleration to the first basic acceleration of the virtual vehicle to obtain a third target acceleration of the virtual vehicle, and then controls the virtual vehicle to accelerate based on the third target acceleration during the duration of the second operation. The third acceleration may be the same as or different from the second acceleration, and this is not limited in the embodiments of the present application.
[0110] One point that needs to be explained is that, in the embodiment of the present application, the detection moment of the above-mentioned second operation is the moment when the virtual vehicle exits the drift state, but the user's triggering moment for the second operation can be any moment between the moment when the drift angle is determined to decrease rapidly and the moment when the virtual vehicle is determined to exit the drift state, and the embodiment of the present application is not limited to this.
[0111] 2. From the moment of exiting the drift state, if the duration of the second operation reaches the maximum response value, the first prompt information is displayed.
[0112] In the embodiment of the present application, after detecting the second operation, the client counts the duration of the second operation, and if the duration of the second operation reaches the maximum response value from the exit moment of the drift state, the first prompt information is displayed. The first prompt information is a prompt information for indicating that the full throttle technique is triggered. Exemplarily, the first prompt information can also be understood as indicating that the duration of the second operation reaches the maximum response value.
[0113] The maximum response value refers to the maximum response duration of the second operation from the exit moment of the drift state. When the duration of the second operation reaches the maximum response value, even if the user continues to trigger the second operation, the client will no longer respond to the second operation. In some embodiments, after the duration of the second operation reaches the maximum response value, the client controls the virtual vehicle to accelerate based on the first basic acceleration.
[0114] To sum up, in the technical solution provided in the embodiment of the present application, the acceleration duration of the virtual vehicle is determined according to the duration of the second operation. The user can select the acceleration duration of the virtual vehicle according to the actual situation, thereby improving the flexibility of user operation. After the duration of the second operation reaches the maximum response value, the first prompt information is displayed to indicate that the duration of the second operation reaches the maximum response value, thereby avoiding the user from continuing to trigger the second operation during the non-response period.
[0115] In another possible implementation manner, the above step 304 further includes at least one of the following sub-steps:
[0116] 1. Within the first time period from the exit of the drift state, control the virtual vehicle to accelerate.
[0117] 2. Starting from the end time of the first duration, when a second operation on the accelerator control is detected, continue to control the virtual vehicle to accelerate during the duration of the second operation.
[0118] Among them, the detection moment of the above-mentioned second operation is the end moment of the first duration, and the user's triggering moment for the second operation can be any moment between the moment when the drift angle is determined to decrease rapidly and the end moment of the first duration. The embodiment of the present application is not limited to this.
[0119] 3. From the end time of the first duration, if the duration of the second operation reaches the maximum response value, the first prompt information is displayed.
[0120] To sum up, in the technical solution provided in the embodiment of the present application, the virtual vehicle is automatically controlled to accelerate after the drift ends, and then the acceleration duration of the virtual vehicle is extended according to the duration of the second operation. While simplifying the user operation, it provides the user with a flexible way to select the acceleration duration.
[0121] Please refer to Figure 6 , which shows a flow chart of a control method for a virtual vehicle provided by another embodiment of the present application. Figure 1 The terminal device 10 of the control system of the virtual vehicle shown is executed, and the execution subject of each step can be the client of the application in the terminal device 10. The method may include at least one of the following steps (601-604):
[0122] Step 601, displaying a virtual vehicle in a drifting state.
[0123] Step 602: In response to the operation on the first brake control, the drift angle of the virtual vehicle is controlled to gradually decrease.
[0124] The above steps 601 and 602 are Figure 3 301 in the embodiment is similar to 302, see Figure 3 The embodiments are not described in detail here.
[0125] Step 603 : In response to the first operation on the throttle control, determining the movement mode of the virtual vehicle according to the drift angle of the virtual vehicle.
[0126] In some embodiments, when the client detects a first operation on the throttle control, if the drift angle of the virtual vehicle is less than a second threshold, the virtual vehicle is controlled to accelerate and move, and the speed of reducing the drift angle of the virtual vehicle is increased. In addition, a second prompt message is displayed, and the second prompt message is used to indicate that the ejection cornering technique is triggered. Exemplarily, the second prompt message can also be understood as being used to indicate that the virtual vehicle enters a target retreat drift state. The target retreat drift state refers to a movement mode in which the speed of the virtual vehicle is accelerated and the speed of reducing the drift angle is accelerated. Exemplarily, the target retreat drift state can also be referred to as a fast retreat drift state, or an accelerated retreat drift state, or a ejection cornering state, or an accelerated cornering state.
[0127] In some embodiments, when the client detects the first operation on the throttle control, if the drift angle of the virtual vehicle is greater than the third threshold, it is determined that the virtual vehicle is in an out-of-control state. In the out-of-control state, the grip of the virtual vehicle approaches zero. It can be seen from the above iterative formula that when the grip of the virtual vehicle approaches zero, the moving direction of the virtual vehicle cannot be adjusted. At this time, the client needs to control the virtual vehicle to switch from the out-of-control state to the grip recovery state. In some embodiments, the client increases the grip of the virtual vehicle to control the virtual vehicle to exit the out-of-control state; and, when the first operation on the throttle control is detected and the drift angle of the virtual vehicle is greater than the third threshold, the client displays a third prompt message, which is a prompt message for indicating that the grip recovery technique is triggered. Exemplarily, the third prompt message can also be understood as being used to indicate that the virtual vehicle enters the grip recovery state.
[0128] In some embodiments, when the client detects a first operation on the throttle control, if the drift angle of the virtual vehicle is greater than the second threshold and less than the third threshold, the drift angle of the virtual vehicle is controlled to continue to gradually decrease, and the virtual vehicle is controlled to accelerate based on the first basic acceleration of the virtual vehicle.
[0129] In fact, the second threshold and the third threshold can be any values, such as the second threshold can be 40°, 45°, 50°, etc., and the third threshold can be 65°, 67°, 80°, etc., which are not limited in the present embodiment. The second threshold is smaller than the third threshold.
[0130] Step 604: When the drift angle of the virtual vehicle is less than a first threshold, control the virtual vehicle to exit the drift state.
[0131] The above step 604 and Figure 3 304 in the embodiment is similar, see Figure 3 The embodiments are not described in detail here.
[0132] To sum up, in the technical solution provided in the embodiment of the present application, by combining the first brake control and the throttle control, different movement modes are provided for the virtual vehicle under different drift angles during the drifting of the virtual vehicle, thereby enriching the movement modes of the virtual vehicle; moreover, when the drift angle of the virtual vehicle is large, the first brake control and the throttle control are used to control the virtual vehicle to recover from an out-of-control state to a grip state; when the drift angle of the virtual vehicle is small, the first brake control and the throttle control are used to control the virtual vehicle to quickly de-drift; when the drift angle of the virtual vehicle is centered, the drift angle is stably maintained to be reduced; by setting different drift angles, the movement of the virtual vehicle is made more realistic, which is conducive to providing users with an immersive experience.
[0133] Please refer to Figure 7 , which shows a flow chart of a control method for a virtual vehicle provided by another embodiment of the present application. Figure 1 The terminal device 10 of the control system of the virtual vehicle shown is executed, and the execution subject of each step can be the client of the application in the terminal device 10. The method may include at least one of the following steps (701-706):
[0134] Step 701, when it is detected that the direction adjustment control and the second brake control are both in a triggered state, control the virtual vehicle to enter a drift state.
[0135] In some embodiments, a direction adjustment control is displayed in the client, and the direction adjustment control is used to adjust the front direction of the virtual vehicle.
[0136] In a possible implementation, the direction adjustment control includes a plurality of sub-controls, and different sub-controls correspond to different adjustment directions. In some embodiments, the user controls different adjustment directions through different sub-controls, and when the client detects an operation on a target sub-control, the client controls the adjustment of the front of the virtual vehicle toward the direction indicated by the target sub-control based on the attribute information of the operation. Exemplarily, the attribute information includes the number of clicks, and the number of clicks is positively correlated with the direction adjustment amplitude, that is, the greater the number of clicks, the greater the direction adjustment amplitude, and the smaller the number of clicks, the smaller the direction adjustment amplitude; or, the attribute information includes the pressing time, and the pressing time is positively correlated with the direction adjustment amplitude, that is, the longer the pressing time, the greater the direction adjustment amplitude, and the smaller the number of clicks, the shorter the pressing time.
[0137] In another possible implementation, the direction adjustment control includes a slider, and the user adjusts the direction of the front of the virtual vehicle by sliding the slider, and different sliding directions correspond to different adjustment directions. In some embodiments, when the client detects a sliding operation on the slider, the client controls the direction of the front of the virtual vehicle to adjust based on the attribute information of the sliding operation. Exemplarily, the attribute information includes the sliding direction and the sliding distance, and the client determines the adjustment direction for the front of the vehicle based on the sliding direction, and determines the adjustment angle for the front of the vehicle based on the sliding distance.
[0138] In the embodiment of the present application, when the client detects that both the direction adjustment control and the second brake control are in the triggered state, the client controls the virtual vehicle to enter the drift state. The direction adjustment control and the second brake control are both in the triggered state means that there is a moment when the user triggers the direction adjustment control and the second brake control at the same time. Whether the trigger start time and the trigger end time of the two operation controls are the same or different is not limited in the embodiment of the present application.
[0139] It should be noted that in the embodiment of the present application, the second brake control is another control different from the first brake control. For example, the second brake control can be understood as a hand brake control, through which the virtual vehicle can be controlled to enter a tire lock state after decelerating to zero; the first brake control can be understood as a foot brake control, through which the virtual vehicle can be controlled to start reversing after decelerating to zero.
[0140] Step 702 : In response to the operation on the second brake control, the virtual vehicle is controlled to decelerate and move until the speed reaches zero.
[0141] In an embodiment of the present application, when the virtual vehicle is in a drifting state, if the client detects an operation on the second brake control, the virtual vehicle is controlled to decelerate and move until the speed is zero. In some embodiments, after the speed of the virtual vehicle is reduced to zero, the virtual vehicle may enter a tire locked state, that is, the virtual vehicle stops moving.
[0142] Step 703 : When no operation on the second brake control is detected, control the display of the virtual vehicle in a drifting state.
[0143] Step 704 , in response to the operation on the first brake control, controlling the drift angle of the virtual vehicle to gradually decrease.
[0144] Step 705 , in response to the first operation on the throttle control, controlling the virtual vehicle to accelerate and move, and increasing the speed of reducing the drift angle of the virtual vehicle.
[0145] Step 706: When the drift angle of the virtual vehicle is less than the first threshold, control the virtual vehicle to exit the drift state.
[0146] The above steps 703-706 and Figure 3 Steps 301-304 in the embodiment are similar, see Figure 3 The embodiments are not described in detail here.
[0147] For example, in conjunction with reference Figures 8 to 12 , introduces the drift state and the movement mode of the virtual vehicle after exiting the drift state. Figure 8 As shown, the virtual vehicle 81 is in a flat running state. Afterwards, when it is detected that the direction adjustment control 82 and the second brake control 83 are triggered at the same time, as shown in FIG. Fig. 9 As shown, the virtual vehicle 81 is controlled to enter a drift state. Fig.10 As shown, when the virtual vehicle 81 is in a drifting state, when the operation of the first brake control 84 is detected, the drift angle of the virtual vehicle 81 is controlled to decrease, so as to control the virtual vehicle 81 to start de-drifting. Fig.11As shown, when the virtual vehicle 81 is in a drifting state, when a click operation on the throttle control 85 is detected, if the drift angle of the virtual vehicle 81 is less than the second threshold, the drift angle of the virtual vehicle 81 is controlled to decrease faster, and the virtual vehicle 81 is controlled to move faster. At the same time, the second prompt information 86 is displayed to indicate that the virtual vehicle 81 enters the ejection state. Afterwards, when the drift angle of the virtual vehicle 81 is less than the first threshold, the virtual vehicle 81 exits the drifting state and re-enters the flat running state, and the virtual vehicle 81 is automatically controlled to continue to accelerate and move for 0.3s. Afterwards, as shown in FIG. Fig.12 As shown, when a continuous pressing operation on the throttle control 85 is detected, the acceleration movement of the virtual vehicle 81 is extended during the duration of the continuous pressing operation, and when the duration of the continuous pressing operation reaches 0.5s, the first prompt message 87 is displayed to indicate that the duration of the second operation reaches the maximum response value.
[0148] To sum up, in the technical solution provided in the embodiment of the present application, the direction adjustment control is used in conjunction with the second handbrake control to control the virtual vehicle to enter a drift state. Afterwards, the second handbrake control is used again to control the virtual vehicle to stop moving. There is no need to set a new drift control to control the virtual vehicle to enter a drift state, thereby improving the simplicity of the user interface.
[0149] In addition, combined with reference Fig.13 , the movement process of the virtual vehicle from the drift state to the exit drift state is introduced. The specific steps are as follows:
[0150] Step 1301, when it is detected that the direction adjustment control and the second brake control are triggered at the same time, display a virtual vehicle in a drifting state.
[0151] Step 1302: When an operation on the first brake control is detected, the drift angle of the virtual vehicle is controlled to gradually decrease.
[0152] Step 1303: When a first operation on the throttle control is detected, obtain the drift angle of the virtual vehicle.
[0153] Step 1304, determining whether the drift angle of the virtual vehicle is less than a first threshold value. If the drift angle of the virtual vehicle is less than the first threshold value, executing step 1305; if the drift angle of the virtual vehicle is not less than the first threshold value, executing step 1306.
[0154] Step 1305, controlling the drift angle of the virtual vehicle to decrease faster, and controlling the virtual vehicle to move faster.
[0155] Step 1306, determining whether the drift angle of the virtual vehicle is greater than a second threshold value. If the drift angle of the virtual vehicle is greater than the second threshold value, executing step 1307; if the drift angle of the virtual vehicle is not greater than the second threshold value, executing step 1308.
[0156] Step 1307 , increasing the grip of the virtual vehicle to control the virtual vehicle to switch from an out-of-control state to a grip recovery state.
[0157] Step 1308, controlling the drift angle of the virtual vehicle to continue to decrease.
[0158] Step 1309: When the drift angle of the virtual vehicle is less than the first threshold, determine that the virtual vehicle exits the drift state.
[0159] Step 1310, determining whether a second operation on the throttle control is detected. If the second operation on the throttle control is detected, executing step 1311; if the second operation on the throttle control is not detected, executing step 1312.
[0160] Step 1311, controlling the virtual vehicle to accelerate and move within a first time period.
[0161] Step 1312: Control the virtual vehicle to accelerate during the duration of the second operation.
[0162] Step 1313, determine whether the duration of the second operation reaches the maximum response value. If the duration of the second operation reaches the maximum response value, execute step 1314; if the duration of the second operation does not reach the maximum response value, continue to execute step 1312.
[0163] Step 1314, display the first prompt information.
[0164] Next, the movement of the virtual vehicle outside the drift state is introduced.
[0165] Please refer to Fig.14 , which shows a flow chart of a control method for a virtual vehicle provided by another embodiment of the present application. Figure 1 The terminal device 10 of the control system of the virtual vehicle shown is executed, and the execution subject of each step can be the client of the application in the terminal device 10. The method may include at least one of the following steps (1401-1402):
[0166] Step 1401: In response to a click operation on a throttle control, control the virtual vehicle to accelerate.
[0167] The throttle control is used to control the acceleration of the virtual vehicle. In an embodiment of the present application, when the client detects a click operation on the throttle control, the client controls the virtual vehicle to accelerate. In some embodiments, the throttle control corresponds to a first basic acceleration, and the client controls the virtual vehicle to accelerate based on the first basic acceleration. The direction of the first basic acceleration is the same as the moving direction of the virtual vehicle.
[0168] Step 1402: In response to the operation on the first brake control, the virtual vehicle is controlled to decelerate.
[0169] The first brake control is used to control the virtual vehicle to decelerate or reverse. In the embodiment of the present application, the client controls the virtual vehicle to decelerate when an operation on the first brake control is detected.
[0170] In a possible implementation, the above operation is a click operation. When the client detects a click operation on the first brake control, the client controls the virtual vehicle to decelerate and move until the speed is zero. In some embodiments, the first brake control corresponds to a second basic acceleration, and the client controls the virtual vehicle to decelerate and move based on the second basic acceleration. The direction of the second basic acceleration is opposite to the moving direction of the virtual vehicle.
[0171] In another possible implementation, the above operation is a continuous pressing operation. In an embodiment of the present application, when the client detects a continuous pressing operation on the first brake control, the client controls the virtual vehicle to decelerate and move; further, when the speed of the virtual vehicle is reduced to zero and the continuous pressing operation does not disappear, the virtual vehicle is controlled to reverse. In some embodiments, the first brake control corresponds to a second basic acceleration and a fourth acceleration, and the fourth acceleration is superimposed on the second basic acceleration to obtain a fourth target acceleration, and then the client controls the virtual vehicle to decelerate and move based on the fourth target acceleration. The direction of the fourth target acceleration is opposite to the moving direction of the virtual vehicle.
[0172] To sum up, in the technical solution provided in the embodiment of the present application, the virtual vehicle is controlled to accelerate and move by clicking on the throttle control. There is no need to press the throttle control continuously to keep the virtual vehicle accelerating and moving, which simplifies user operations and reduces the detection overhead of the terminal device. The first brake control can be used to control the virtual vehicle to reduce movement or reverse, enriching the movement methods of the virtual vehicle and making the speed adjustment of the virtual vehicle more flexible.
[0173] In addition, combined with reference Fig.15 , the control method of virtual vehicles is introduced from the perspective of human-computer interaction.
[0174] The details are as follows:
[0175] In the level running state, the user clicks the throttle control, and the client controls the virtual vehicle to accelerate based on the first basic acceleration; the user clicks the first brake control, and the client controls the virtual vehicle to decelerate based on the second basic acceleration; the user continuously presses the first brake control, and the client controls the virtual vehicle to decelerate based on the second acceleration superimposed with the fourth acceleration.
[0176] For the drift state, the user clicks the direction adjustment control and the second brake control at the same time, and the client controls the virtual vehicle to enter the drift state; the user clicks the first brake control, and the client controls the drift angle of the virtual vehicle to decrease; the user clicks the throttle control, and when the drift angle is greater than the third threshold, the client increases the grip to control the virtual vehicle to switch from the out-of-control state to the grip recovery state. When the drift angle is less than the third threshold and greater than the second threshold, the client controls the drift angle of the virtual vehicle to continue to decrease. When the drift angle is less than the third threshold, the client controls the drift angle of the virtual vehicle to decrease rapidly, and controls the virtual vehicle to accelerate based on the first basic acceleration superimposed on the first acceleration.
[0177] For the level running state after exiting the drift state, the client automatically controls the virtual vehicle to accelerate within a first duration based on the first basic acceleration superimposed on the second acceleration; the user continuously presses the accelerator control, and the client controls the virtual vehicle to accelerate within the duration of the continuous pressing operation based on the first basic acceleration superimposed on the third acceleration; thereafter, when the duration of the continuous pressing operation reaches the maximum response value, the client controls the virtual vehicle to accelerate based on the first basic acceleration.
[0178] It should be noted that in the embodiments of the present application, for the above descriptions of "greater than" and "less than", "equal to" can be merged into any branch. For example, "less than the first threshold" can be understood as "less than the first threshold" or "less than or equal to the first threshold".
[0179] It should also be noted that the introduction of the present application through the embodiments above is merely exemplary and explanatory, and new embodiments formed by arbitrarily combining the steps in the above embodiments are also within the scope of protection of the present application.
[0180] The following is an embodiment of the device of the present application, which can be used to execute the embodiment of the method of the present application. For details not disclosed in the embodiment of the device of the present application, please refer to the embodiment of the method of the present application.
[0181] Please refer to Fig.16, which shows a block diagram of a control device for a virtual vehicle provided by an embodiment of the present application. The device has the function of implementing the control method of the virtual vehicle, which can be implemented by hardware or by hardware executing corresponding software. The device can be a terminal device or can be set in a terminal device. The device 1600 may include: a vehicle drift module 1610, a vehicle control module 1620, an acceleration and de-drift module 1630 and a vehicle de-drift module 1640.
[0182] The vehicle drift module 1610 is used to display a virtual vehicle in a drifting state; wherein the drifting state is a state in which the drift angle of the virtual vehicle is greater than a first threshold, and the drift angle is the angle between the moving direction of the virtual vehicle and the front direction of the virtual vehicle.
[0183] The vehicle control module 1620 is used to control the drift angle of the virtual vehicle to gradually decrease in response to the operation of the first brake control.
[0184] The acceleration and de-drifting module 1630 is used to control the virtual vehicle to accelerate and move, and to increase the speed of reducing the drift angle of the virtual vehicle in response to a first operation on the throttle control.
[0185] The vehicle de-drifting module 1640 is used to control the virtual vehicle to exit the drifting state when the drift angle of the virtual vehicle is less than the first threshold.
[0186] In an exemplary embodiment, the acceleration and de-drifting module 1630 is also used to increase the grip of the virtual vehicle, and the grip is positively correlated with the speed of reduction of the drift angle.
[0187] In an exemplary embodiment, the accelerated de-drifting module 1630 is further configured to:
[0188] superimposing an additional first acceleration on the first basic acceleration of the virtual vehicle to obtain a first target acceleration of the virtual vehicle;
[0189] The virtual vehicle is controlled to accelerate based on the first target acceleration.
[0190] In an exemplary embodiment, the vehicle control module 1620 includes: a direction obtaining unit, a movement determining unit and a movement control unit.
[0191] The orientation acquisition unit is used to acquire the target vehicle head orientation of the virtual vehicle at the next time stamp, and the time interval between two adjacent time stamps is the unit time.
[0192] A movement determination unit is used to determine the target movement direction of the virtual vehicle at the next timestamp according to the target vehicle head direction; wherein the angle between the target movement direction and the target vehicle head direction is smaller than the angle between the movement direction and the vehicle head direction at the current timestamp.
[0193] A movement control unit is used to control the virtual vehicle to move according to the target movement direction at the next time stamp.
[0194] In an exemplary embodiment, the movement determination unit is configured to:
[0195] Determine the angular change in the moving direction according to the grip and moving direction of the virtual vehicle at the current timestamp and the target vehicle head direction; wherein the grip is positively correlated with the angular change in the moving direction per unit time;
[0196] The target moving direction of the virtual vehicle at the next time stamp is determined according to the moving direction at the current time stamp and the angular change of the moving direction.
[0197] In an exemplary embodiment, if Fig.17 As shown, the device 1600 further includes: a vehicle acceleration module 1650 .
[0198] The vehicle acceleration module 1650 is used to control the virtual vehicle to accelerate within a first time period from the exit moment of the drift state.
[0199] In an exemplary embodiment, the vehicle acceleration module 1650 is further configured to:
[0200] Adding an additional second acceleration to the first basic acceleration of the virtual vehicle to obtain a second target acceleration of the virtual vehicle;
[0201] Within a first time period from the exit point of the drift state, the virtual vehicle is controlled to accelerate based on the second target acceleration.
[0202] In an exemplary embodiment, if Fig.17 As shown, the device 1600 further includes: an information display module 1660 .
[0203] The vehicle acceleration module 1650 is further configured to control the virtual vehicle to accelerate during a duration of the second operation when a second operation on the throttle control is detected;
[0204] The information display module 1660 is used to display a first prompt message if the duration of the second operation reaches the maximum response value from the exit moment of the drift state, wherein the first prompt message is used to indicate that the duration of the second operation reaches the maximum response value.
[0205] In an exemplary embodiment, the acceleration and de-drift module 1630 is also used to execute the steps of controlling the virtual vehicle to accelerate and move, and speed up the reduction speed of the drift angle of the virtual vehicle in response to the first operation on the throttle control when the drift angle of the virtual vehicle is less than a second threshold.
[0206] In an exemplary embodiment, the information display module 1660 is further used to display a second prompt information, where the second prompt information is used to indicate that the virtual vehicle enters a target de-drifting state.
[0207] In an exemplary embodiment, if Fig.17 As shown, the device 1600 further includes: a state determination module 1670 and a state switching module 1680 .
[0208] The state determination module 1670 is used to determine that the virtual vehicle is in an out-of-control state in response to the first operation on the throttle control when the drift angle of the virtual vehicle is greater than a third threshold; wherein, in the out-of-control state, the grip of the virtual vehicle approaches zero and the moving direction of the virtual vehicle cannot be adjusted.
[0209] The state switching module 1680 is used to control the virtual vehicle to switch from the out-of-control state to the grip recovery state.
[0210] In an exemplary embodiment, the state switching module 1680 is further configured to:
[0211] Controlling the grip of the virtual vehicle to increase, so as to control the virtual vehicle to exit the out-of-control state;
[0212] A third prompt message is displayed, where the third prompt message is used to instruct the virtual vehicle to enter the grip recovery state.
[0213] In an exemplary embodiment, the vehicle control module 1620 is also used to control the drift angle of the virtual vehicle to continue to gradually decrease in response to the first operation on the throttle control when the drift angle of the virtual vehicle is greater than a second threshold and less than a third threshold, and to control the virtual vehicle to accelerate based on the first basic acceleration of the virtual vehicle.
[0214] In an exemplary embodiment, the vehicle drift module 1610 is also used to control the virtual vehicle to enter the drift state when it is detected that both the direction adjustment control and the second brake control are in a triggered state; wherein the second brake control is another control different from the first brake control.
[0215] In an exemplary embodiment, if Fig.17 As shown, the device 1600 further includes: a vehicle deceleration module 1690 .
[0216] The vehicle deceleration module 1690 is used to control the virtual vehicle to decelerate and move until the speed reaches zero in response to the operation on the second brake control.
[0217] In an exemplary embodiment, the vehicle acceleration module 1650 is further configured to control the virtual vehicle to accelerate in response to a click operation on the throttle control.
[0218] In an exemplary embodiment, the vehicle deceleration module 1690 is further configured to control the virtual vehicle to decelerate in response to an operation on the first brake control.
[0219] In an exemplary embodiment, the vehicle deceleration module 1690 is further configured to:
[0220] In response to a click operation on the first brake control, controlling the virtual vehicle to decelerate and move until the speed reaches zero;
[0221] or,
[0222] In response to the continuous pressing operation on the first brake control, the virtual vehicle is controlled to decelerate; when the speed of the virtual vehicle is reduced to zero and the continuous pressing operation does not disappear, the virtual vehicle is controlled to reverse.
[0223] To sum up, in the technical solution provided in the embodiment of the present application, the drift angle of the virtual vehicle is controlled to decrease through the first brake control. When the drift angle of the virtual vehicle is reduced to less than a threshold value, the virtual vehicle is controlled to exit the drift state, thereby realizing the automation of exiting the drift state. The user does not need to frequently adjust the moving direction or the front direction of the virtual vehicle through the direction adjustment control, thereby simplifying user operation. The speed of reducing the drift angle of the virtual vehicle is accelerated through the throttle control, so that the virtual vehicle exits the drift state quickly and improves the efficiency of drifting out of the virtual vehicle. Moreover, the acceleration of the virtual vehicle is controlled through the throttle control, thereby providing a drift-accelerated movement method, which enriches the movement methods of the virtual vehicle.
[0224] It should be noted that the device provided in the above embodiment, when implementing its functions, is only illustrated by the division of the above functional modules. In actual applications, the above functions can be assigned to different functional modules as needed, that is, the internal structure of the device is divided into different functional modules to complete all or part of the functions described above. In addition, the device and method embodiments provided in the above embodiment belong to the same concept, and the specific implementation process is detailed in the method embodiment, which will not be repeated here.
[0225] Please refer to Fig.18 , which shows a terminal device 1800 provided by an embodiment of the present application. The terminal device 1800 may be, for example, a mobile phone, a tablet computer, a game console, an e-book reader, a multimedia playback device, a wearable device, or a PC (Personal Computer). The terminal device 1800 is used to implement the functions of the control method of the virtual vehicle. Specifically:
[0226] Typically, the terminal device 1800 includes: a processor 1801 and a memory 1802 .
[0227] The processor 1801 may include one or more processing cores, such as a 4-core processor, an 8-core processor, etc. The processor 1801 may be implemented in at least one hardware form of DSP (Digital Signal Processing), FPGA (Field Programmable Gate Array), and PLA (Programmable Logic Array). The processor 1801 may also include a main processor and a coprocessor. The main processor is a processor for processing data in an awake state, also known as a CPU (Central Processing Unit); the coprocessor is a low-power processor for processing data in a standby state. In some embodiments, the processor 1801 may be integrated with a GPU (Graphics Processing Unit), which is responsible for rendering and drawing the content to be displayed on the display screen. In some embodiments, the processor 1801 may also include an AI (Artificial Intelligence) processor, which is used to process computing operations related to machine learning.
[0228] The memory 1802 may include one or more computer-readable storage media, which may be non-transitory. The memory 1802 may also include a high-speed random access memory, and a non-volatile memory, such as one or more disk storage devices, flash memory storage devices. In some embodiments, the non-transitory computer-readable storage medium in the memory 1802 is used to store at least one instruction, at least one program, code set or instruction set, and the at least one instruction, at least one program, code set or instruction set is configured to be executed by one or more processors to implement the above-mentioned interface display method.
[0229] In some embodiments, the terminal device 1800 may further optionally include: a peripheral device interface 1803 and at least one peripheral device. The processor 1801, the memory 1802 and the peripheral device interface 1803 may be connected via a bus or a signal line. Each peripheral device may be connected to the peripheral device interface 1803 via a bus, a signal line or a circuit board. Specifically, the peripheral device includes: at least one of a radio frequency circuit 1804, a display screen 1805, a camera assembly 1806, an audio circuit 1807 and a power supply 1808.
[0230] Those skilled in the art will understand that Fig.18 The structure shown in the figure does not constitute a limitation on the terminal device 1800, and may include more or fewer components than shown in the figure, or combine certain components, or adopt a different component arrangement.
[0231] In an exemplary embodiment, a computer-readable storage medium is further provided, wherein a computer program is stored in the storage medium, and when the computer program is executed by a processor, the control method of the virtual vehicle is implemented.
[0232] In some embodiments, the computer readable storage medium may include: ROM (Read Only Memory), RAM (Random Access Memory), SSD (Solid State Drives) or optical disks, etc. Among them, the random access memory may include ReRAM (Resistance Random Access Memory) and DRAM (Dynamic Random Access Memory).
[0233] In an exemplary embodiment, a computer program product is also provided, the computer program product includes computer instructions, the computer instructions are stored in a computer-readable storage medium. A processor of a terminal device reads the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions, so that the terminal device executes the control method of the virtual vehicle.
[0234] It should be understood that the "multiple" mentioned in this article refers to two or more. "And / or" describes the association relationship of associated objects, indicating that three relationships may exist. For example, A and / or B can represent: A exists alone, A and B exist at the same time, and B exists alone. The character " / " generally indicates that the objects associated before and after are in an "or" relationship. In addition, the step numbers described in this article only illustrate a possible execution sequence between the steps. In some other embodiments, the above steps may not be executed in the order of the numbers, such as two steps with different numbers are executed at the same time, or two steps with different numbers are executed in the opposite order to the diagram. The embodiments of the present application are not limited to this.
[0235] The above description is only an exemplary embodiment of the present application and is not intended to limit the present application. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present application shall be included in the protection scope of the present application.
Claims
1. A control method for a virtual vehicle, It is characterized in that The method comprises: In response to a first braking operation, controlling a drift angle of a virtual vehicle in a drift state to gradually decrease, wherein the drift state is a state in which the drift angle of the virtual vehicle is greater than a first threshold, and the drift angle is an angle between a moving direction of the virtual vehicle and a front direction of the virtual vehicle; In response to a first acceleration operation, accelerating a speed at which the drift angle of the virtual vehicle decreases; When the drift angle of the virtual vehicle is less than the first threshold, the virtual vehicle is controlled to exit the drift state.
2. The method according to claim 1, It is characterized in that The step of accelerating the reduction speed of the drift angle of the virtual vehicle comprises: The grip of the virtual vehicle is increased, and the grip is positively correlated with the speed at which the drift angle decreases.
3. The method according to claim 1 or 2, It is characterized in that The method further comprises: In response to the first acceleration operation, the virtual vehicle is controlled to move at an accelerated speed, and at the same time, the step of accelerating the speed of decreasing the drift angle of the virtual vehicle is performed.
4. The method according to claim 3, It is characterized in that The controlling the virtual vehicle to accelerate and move comprises: superimposing a first acceleration on a first basic acceleration of the virtual vehicle to obtain a first target acceleration of the virtual vehicle; The virtual vehicle is controlled to move at the first target acceleration.
5. The method according to any one of claims 1 to 4, It is characterized in that The step of controlling the drift angle of the virtual vehicle to gradually decrease comprises: Obtaining the target vehicle head direction of the virtual vehicle at the next time stamp; Determine the target moving direction of the virtual vehicle at the next timestamp according to the target vehicle head direction; wherein the angle between the target moving direction and the target vehicle head direction is smaller than the angle between the moving direction and the vehicle head direction at the current timestamp; The virtual vehicle is controlled to move along the target moving direction at the next time stamp.
6. The method according to claim 5, It is characterized in that Determining the target moving direction of the virtual vehicle at the next timestamp according to the target vehicle head direction includes: Determine the angular change of the moving direction according to the grip and moving direction of the virtual vehicle at the current time stamp and the target vehicle head direction; The target moving direction of the virtual vehicle at the next time stamp is determined according to the moving direction at the current time stamp and the angular change of the moving direction.
7. The method according to any one of claims 1 to 6, It is characterized in that After controlling the virtual vehicle to exit the drift state, the method further includes: The virtual vehicle is controlled to move at an accelerated speed within a first time period.
8. The method according to claim 7, It is characterized in that The controlling the virtual vehicle to accelerate within a first time period includes: superimposing a second acceleration on the first basic acceleration of the virtual vehicle to obtain a second target acceleration of the virtual vehicle; Within the first time period from the exit point of the drift state, the virtual vehicle is controlled to accelerate at the second target acceleration.
9. The method according to any one of claims 1 to 8, It is characterized in that After controlling the virtual vehicle to exit the drift state, the method further includes: In response to a second acceleration operation, controlling the virtual vehicle to move at an accelerated speed; If the duration of the second acceleration operation reaches the maximum response value, a prompt message is displayed to indicate that the full throttle technique is triggered.
10. The method according to any one of claims 1 to 9, It is characterized in that The method further comprises: In response to the first acceleration operation, when the drift angle of the virtual vehicle is less than a second threshold, performing the step of accelerating the speed of decreasing the drift angle of the virtual vehicle; Displays a prompt message indicating that the ejection technique has been triggered.
11. The method according to any one of claims 1 to 10, It is characterized in that The method further comprises: In response to the first acceleration operation, when the drift angle of the virtual vehicle is greater than a third threshold, determining that the virtual vehicle is in an out-of-control state; wherein in the out-of-control state, the grip of the virtual vehicle approaches zero, and the moving direction of the virtual vehicle cannot be adjusted; The virtual vehicle is controlled to switch from the out-of-control state to a grip recovery state.
12. The method according to claim 11, It is characterized in that The controlling the virtual vehicle to switch from the out-of-control state to the grip recovery state includes: Controlling the grip of the virtual vehicle to increase, so as to control the virtual vehicle to exit the out-of-control state; Displays a prompt message indicating that the recovery grip technique has been triggered.
13. The method according to any one of claims 1 to 12, It is characterized in that The method further comprises: In response to the first acceleration operation, when the drift angle of the virtual vehicle is greater than a second threshold and less than a third threshold, the drift angle of the virtual vehicle is controlled to continue to gradually decrease, and the virtual vehicle is controlled to accelerate based on a first basic acceleration of the virtual vehicle.
14. The method according to any one of claims 1 to 13, It is characterized in that The method further comprises: In the case where the direction adjustment operation and the second braking operation are detected simultaneously, the virtual vehicle is controlled to enter the drift state.
15. The method according to any one of claims 1 to 14, It is characterized in that The method further comprises: In response to a third acceleration operation, controlling the virtual vehicle to move at an accelerated speed; In response to the first brake operation, the virtual vehicle is controlled to move at a decelerated speed.
16. The method according to claim 15, It is characterized in that In response to the first braking operation, controlling the virtual vehicle to decelerate and move includes: In response to a click operation on the first brake control, controlling the virtual vehicle to decelerate and move until the speed reaches zero; or, In response to a continuous pressing operation on the first brake control, the virtual vehicle is controlled to decelerate; when the speed of the virtual vehicle is reduced to zero and the continuous pressing operation does not disappear, the virtual vehicle is controlled to reverse.
17. A control device for a virtual vehicle, It is characterized in that The device comprises: a vehicle control module, configured to control a drift angle of a virtual vehicle in a drift state to gradually decrease in response to a first brake operation, wherein the drift state is a state in which the drift angle of the virtual vehicle is greater than a first threshold, and the drift angle is an angle between a moving direction of the virtual vehicle and a front direction of the virtual vehicle; An acceleration and de-drifting module, configured to accelerate a speed at which the drift angle of the virtual vehicle decreases in response to a first acceleration operation; The vehicle de-drifting module is used to control the virtual vehicle to exit the drifting state when the drift angle of the virtual vehicle is less than the first threshold.
18. A terminal device, It is characterized in that The terminal device includes a processor and a memory, wherein a computer program is stored in the memory, and the computer program is loaded and executed by the processor to implement the control method of the virtual vehicle as described in any one of claims 1 to 16.
19. A computer-readable storage medium, It is characterized in that The storage medium stores a computer program, which is loaded and executed by a processor to implement the control method of a virtual vehicle as claimed in any one of claims 1 to 16.
20. A computer program product, It is characterized in that The computer program product includes computer instructions, which are stored in a computer-readable storage medium. A processor reads and executes the computer instructions from the computer-readable storage medium to implement the control method of a virtual vehicle as claimed in any one of claims 1 to 16.