Control method, device, and apparatus for virtual vehicle, and storage medium

By controlling the drift state and adjusting the direction of the car in the virtual vehicle, the problem of collisions in continuous curves of the virtual vehicle was solved, and the ability to pass through was improved.

CN116983651BActive Publication Date: 2026-05-19TENCENT TECH (CHENGDU) CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
TENCENT TECH (CHENGDU) CO LTD
Filing Date
2022-05-20
Publication Date
2026-05-19

AI Technical Summary

Technical Problem

When virtual roads in a virtual environment have consecutive curves, virtual vehicles are prone to colliding with roadside props, causing them to slow down and affecting their ability to navigate consecutive curves.

Method used

By controlling the virtual vehicle to enter a drift state and using the coordinated operation of the steering control unit and the handbrake control unit to adjust the direction of the car, the virtual vehicle can change its steering direction without interrupting the drift, thereby reducing the turning radius.

Benefits of technology

It improves the ability of virtual vehicles to navigate continuous curves, reduces collisions with roadside objects, and increases driving efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116983651B_ABST
    Figure CN116983651B_ABST
Patent Text Reader

Abstract

The application discloses a virtual vehicle control method, device, equipment and storage medium, and belongs to the technical field of virtual world. The method comprises the following steps: displaying a virtual vehicle located in a virtual environment; in response to a first steering operation on a direction control component and a brake operation on a hand brake control component, controlling the virtual vehicle to enter a drift state; in response to a second steering operation on the direction control component, controlling the vehicle head of the virtual vehicle in the drift state to rotate to a second direction, the second direction being located on a first side of a speed direction; and in response to the brake operation on the hand brake control component, controlling the vehicle head of the virtual vehicle in the drift state to rotate to a third direction, the third direction being located on a second side of the speed direction. The application keeps the drift state of the virtual vehicle through the brake operation, and rotates the vehicle head from the first side of the speed direction to the second side, so that the turning radius of the virtual vehicle through continuous bends is reduced, and the ability of the virtual vehicle to pass through the continuous bends is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of virtual world technology, and in particular to a method, apparatus, device and storage medium for controlling a virtual vehicle. Background Technology

[0002] Applications that include virtual environments often need to control virtual objects to perform virtual activities within the virtual environment; for example, virtual vehicles need to be controlled to drive virtually within the virtual environment.

[0003] In related technologies, virtual roads in virtual environments have curves. By controlling virtual vehicles to enter a drift state, the turning radius of virtual vehicles when passing through curves is reduced, so as to drive through the curves of virtual roads quickly.

[0004] When there are consecutive curves in the virtual road, virtual vehicles are prone to colliding with virtual roadside props, causing them to slow down. The ability of virtual vehicles to pass through consecutive curves needs to be improved. Summary of the Invention

[0005] This application provides a control method, apparatus, device, and storage medium for a virtual vehicle, the technical solution of which is as follows:

[0006] According to one aspect of this application, a method for controlling a virtual vehicle is provided, the method comprising:

[0007] Display the virtual vehicle in motion within the virtual environment;

[0008] In response to a first steering operation on the steering control unit and a braking operation on the handbrake control unit, the virtual vehicle is controlled to enter a drift state. The first steering operation is used to control the virtual vehicle to turn towards a first side of the speed direction. The front of the virtual vehicle is facing the first direction, and the first direction is located on the first side of the speed direction.

[0009] In response to a second steering operation on the direction control component, the front of the virtual vehicle maintaining the drift state is controlled to rotate to a second direction. The second steering operation is used to control the virtual vehicle to turn to a second side of the velocity direction. The second direction is located on the first side of the velocity direction, and the second angle formed by the second direction and the velocity direction is smaller than the first angle formed by the first direction and the velocity direction.

[0010] In response to the braking operation on the handbrake control unit, the front of the virtual vehicle maintaining the drift state is controlled to rotate to a third direction, the third direction being located on the second side of the speed direction.

[0011] According to another aspect of this application, a control device for a virtual vehicle is provided, the device comprising:

[0012] The display module is used to display the virtual vehicle in a driving state located in the virtual environment;

[0013] The control module is used to control the virtual vehicle to enter a drift state in response to a first steering operation on the direction control component and a braking operation on the handbrake control component. The first steering operation is used to control the virtual vehicle to turn towards a first side of the speed direction. The front of the virtual vehicle is facing the first direction, and the first direction is located on the first side of the speed direction.

[0014] The control module is further configured to respond to a second steering operation on the direction control component to control the front of the virtual vehicle maintaining the drift state to rotate to a second direction. The second steering operation is configured to control the virtual vehicle to turn to a second side of the speed direction. The second direction is located on the first side of the speed direction, and the second angle formed by the second direction and the speed direction is smaller than the first angle formed by the first direction and the speed direction.

[0015] The control module is also configured to, in response to the braking operation on the handbrake control component, control the front of the virtual vehicle maintaining the drift state to rotate to a third direction, the third direction being located on the second side of the speed direction.

[0016] In an optional design of this application, the control module is further configured to: in response to the braking operation on the handbrake control component, control the frontal orientation of the virtual vehicle maintaining the drift state to rotate to the third direction when the angle between the frontal orientation of the virtual vehicle and the speed direction of the virtual vehicle exceeds a target threshold.

[0017] In an optional design of this application, the control module is further configured to: in response to the braking operation on the handbrake control component, control the head direction of the virtual vehicle maintaining the drift state to rotate to the third direction when the angle between the heading of the virtual vehicle and the speed direction of the virtual vehicle exceeds a target threshold, and display information on the release of the reverse drift skill.

[0018] In an optional design of this application, the control module is further configured to:

[0019] If the angle between the direction the virtual vehicle is facing and the direction of its speed does not exceed the target threshold, control the virtual vehicle to exit the drift state and enter the straight-line running state.

[0020] In an optional design of this application, the device further includes:

[0021] The determination module is used to determine the speed direction of the virtual vehicle based on the virtual vehicle's grip, the virtual vehicle's frontal orientation, and the virtual vehicle's historical speed direction.

[0022] In an alternative design of this application, the second steering operation is a continuous pressing operation on the direction control component;

[0023] The control module is also configured to: in response to the continuous pressing operation on the direction control component and the braking operation on the handbrake control component, control the front of the virtual vehicle maintaining the drift state to rotate to the third direction.

[0024] In an optional design of this application, the control module is further configured to:

[0025] In response to the first steering operation on the direction control component, the front of the virtual vehicle is controlled to rotate to the first direction, which is located on the first side of the velocity direction;

[0026] In response to a braking operation on the handbrake control unit, the virtual vehicle is controlled to enter the drift state.

[0027] In an optional design of this application, the control module is further configured to:

[0028] In response to the braking operation on the handbrake control unit, the virtual speed of the virtual vehicle is controlled to decrease.

[0029] In an optional design of this application, the control module is further configured to:

[0030] If the angle between the virtual vehicle's heading and its speed direction exceeds a target threshold, the virtual vehicle is controlled to maintain the drift state.

[0031] If the angle between the direction the virtual vehicle is facing and the direction of its speed does not exceed the target threshold, control the virtual vehicle to exit the drift state and enter the straight-line running state.

[0032] In an optional design of this application, the control module is further configured to:

[0033] If the distance between the virtual vehicle and the virtual edge exceeds a target threshold, in response to the braking operation on the handbrake control component, the front of the virtual vehicle maintaining the drift state is controlled to rotate to the third direction, where the virtual edge is the edge of the virtual road surface in the virtual environment;

[0034] If the distance between the virtual vehicle and the virtual edge does not exceed the target threshold, the virtual speed of the virtual vehicle maintaining the drift state is controlled to decrease in response to the braking operation on the handbrake control component.

[0035] In an optional design of this application, the device further includes an update module for updating the target threshold based on the number of times the reverse drift skill is triggered in a continuous turning virtual road segment.

[0036] In an optional design of this application, the update module is further configured to:

[0037] If the number of times the reverse drift skill is triggered in the continuous turning virtual road segment exceeds the number threshold, the target threshold is updated to a first angle threshold, where the first angle threshold is less than the target threshold.

[0038] If the number of times the reverse drift skill is triggered in the continuous turning virtual road segment does not exceed the number threshold, the target threshold is updated to the second angle threshold, which is greater than the target threshold.

[0039] According to another aspect of this application, a computer device is provided, the computer device including a processor and a memory, the memory storing at least one instruction, at least one program, code set or instruction set, the at least one instruction, the at least one program, the code set or instruction set being loaded and executed by the processor to implement the virtual vehicle control method as described above.

[0040] According to another aspect of this application, a computer-readable storage medium is provided, wherein at least one instruction, at least one program, code set, or instruction set is stored therein, wherein the at least one instruction, the at least one program, the code set, or the instruction set is loaded and executed by a processor to implement the virtual vehicle control method described above.

[0041] According to another aspect of this application, a computer program product is provided, the computer program product including computer instructions stored in a computer-readable storage medium, wherein a processor reads from the computer-readable storage medium and executes the computer instructions to implement the virtual vehicle control method described above.

[0042] The beneficial effects of the technical solution provided in this application include at least the following:

[0043] By performing a second steering operation while the virtual vehicle is in a drift state, the direction in which the virtual vehicle is facing changes. The drift state of the virtual vehicle is maintained by braking. Without interrupting the drift state, the direction in which the virtual vehicle is facing is changed from the first side of the speed direction to the second side of the speed direction, thus realizing the virtual vehicle's reverse drift. This reduces the turning radius of the virtual vehicle when passing through continuous curves and improves the virtual vehicle's ability to pass through continuous curves. Attached Figure Description

[0044] To more clearly illustrate the technical solutions in the embodiments of this application, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0045] Figure 1 This is a schematic diagram of the structure of a terminal provided in an exemplary embodiment of this application;

[0046] Figure 2 This is a structural block diagram of a computer system provided in an exemplary embodiment of this application;

[0047] Figure 3 This is a schematic diagram of the interface of a virtual vehicle control method provided in an exemplary embodiment of this application;

[0048] Figure 4 This is a schematic diagram of the interface of a virtual vehicle control method provided in an exemplary embodiment of this application;

[0049] Figure 5 This is a flowchart of a virtual vehicle control method provided in an exemplary embodiment of this application;

[0050] Figure 6 This is a flowchart of a virtual vehicle control method provided in an exemplary embodiment of this application;

[0051] Figure 7 This is a schematic diagram of the interface of a virtual vehicle control method provided in an exemplary embodiment of this application;

[0052] Figure 8 This is a flowchart of a virtual vehicle control method provided in an exemplary embodiment of this application;

[0053] Figure 9 This is a schematic diagram of the interface of a virtual vehicle control method provided in an exemplary embodiment of this application;

[0054] Figure 10 This is a schematic diagram of the interface of a virtual vehicle control method provided in an exemplary embodiment of this application;

[0055] Figure 11 This is a flowchart of a virtual vehicle control method provided in an exemplary embodiment of this application;

[0056] Figure 12 This is a schematic diagram illustrating the calculation of the drift angle provided in an exemplary embodiment of this application;

[0057] Figure 13 This is a flowchart of a virtual vehicle control method provided in an exemplary embodiment of this application;

[0058] Figure 14 This is a flowchart of a virtual vehicle control method provided in an exemplary embodiment of this application;

[0059] Figure 15 This is a flowchart of a virtual vehicle control method provided in an exemplary embodiment of this application;

[0060] Figure 16 This is a flowchart of a virtual vehicle control method provided in an exemplary embodiment of this application;

[0061] Figure 17 This is a flowchart of a virtual vehicle control method provided in an exemplary embodiment of this application;

[0062] Figure 18 This is a flowchart of a virtual vehicle control method provided in an exemplary embodiment of this application;

[0063] Figure 19 This is a schematic diagram of the interface of a virtual vehicle control method provided in an exemplary embodiment of this application;

[0064] Figure 20 This is a structural block diagram of a virtual vehicle control device provided in an exemplary embodiment of this application;

[0065] Figure 21 This is a structural block diagram of a terminal provided in an exemplary embodiment of this application.

[0066] The accompanying drawings, which are incorporated in and form part of this specification, illustrate embodiments consistent with this application and, together with the description, serve to explain the principles of this application. Detailed Implementation

[0067] To make the objectives, technical solutions, and advantages of this application clearer, the embodiments of this application will be described in further detail below with reference to the accompanying drawings.

[0068] Exemplary embodiments will now be described in detail, examples of which are illustrated in the accompanying drawings. When the following description relates to the drawings, unless otherwise indicated, the same numbers in different drawings denote the same or similar elements. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with this application. Rather, they are merely examples of apparatuses and methods consistent with some aspects of this application as detailed in the appended claims.

[0069] The terminology used in this disclosure is for the purpose of describing particular embodiments only and is not intended to be limiting of the disclosure. The singular forms “a,” “the,” and “the” as used in this disclosure and the appended claims are also intended to include the plural forms unless the context clearly indicates otherwise. It should also be understood that the term “and / or” as used herein refers to and includes any and all possible combinations of one or more of the associated listed items.

[0070] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, data stored, data displayed, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of the relevant data shall comply with the relevant laws, regulations and standards of the relevant countries and regions.

[0071] It should be understood that although the terms first, second, etc., may be used in this disclosure to describe various information, such information should not be limited to these terms. These terms are only used to distinguish information of the same type from one another. For example, a first parameter may also be referred to as a second parameter without departing from the scope of this disclosure, and similarly, a second parameter may also be referred to as a first parameter. Depending on the context, the word "if" as used herein may be interpreted as "when," "when," or "in response to determination."

[0072] The method provided in this application can be applied to applications with virtual environments and virtual characters. For example, an application supporting a virtual environment is one in which the user can control the movement of a virtual character within the virtual environment. For example, the method provided in this application can be applied to any of the following applications: Virtual Reality (VR) applications, Augmented Reality (AR) applications, 3D mapping applications, Virtual Reality games, Augmented Reality games, First-Person Shooter (FPS) games, Third-Person Shooter (TPS) games, Multiplayer Online Battle Arena Games (MOBA) games, and Simulation Games (SLG).

[0073] For example, a game in a virtual environment consists of maps of one or more game worlds. The virtual environment in the game simulates scenes from the real world. Users can control virtual characters in the game to perform actions such as walking, running, jumping, shooting, fighting, and driving in the virtual environment. The game is highly interactive, and multiple users can team up online to play competitive games.

[0074] In some embodiments, the aforementioned application may be a shooting game, racing game, role-playing game, adventure game, sandbox game, tactical competitive game, etc. The client can support at least one of the following operating systems: Windows, macOS, Android, iOS, and Linux, and clients on different operating systems can interconnect. In some embodiments, the aforementioned client is a program suitable for mobile terminals with touchscreens.

[0075] For example, the virtual vehicle control method provided in this application embodiment can be applied to applications that support racing games, allowing players to control virtual vehicles to participate in virtual racing competitions; similarly, the virtual vehicle control method provided in this application embodiment can be applied to applications that support role-playing games, allowing players to control virtual vehicles to move within virtual scenes to meet their needs for roaming and sightseeing. In some embodiments, the aforementioned client is an application developed based on a 3D engine, such as the Unity engine.

[0076] The terminal in this application can be a desktop computer, a laptop computer, a mobile phone, a tablet computer, an e-book reader, an MP3 (Moving Picture Experts Group Audio Layer III) player, an MP4 (Moving Picture Experts Group Audio Layer IV) player, etc. The terminal has a client installed and running that supports a virtual environment, such as a client for an application supporting a 3D virtual environment. This application can be any of the following: a Battle Royale (BR) game, a virtual reality application, an augmented reality application, a 3D map application, a third-person shooter game, a first-person shooter game, or a multiplayer online battle royale game. Optionally, the application can be a standalone application, such as a standalone 3D game application, or a network-based application.

[0077] Figure 1 This is a schematic diagram of the structure of a terminal provided in an exemplary embodiment of this application. The terminal includes a processor 101, a touch screen 102, and a memory 103.

[0078] The processor 101 may be at least one of a single-core processor, a multi-core processor, an embedded chip, and a processor with instruction execution power.

[0079] The touchscreen 102 includes a regular touchscreen or a pressure-sensitive touchscreen. A regular touchscreen can measure pressing or sliding operations applied to the touchscreen 102; a pressure-sensitive touchscreen can measure the pressure applied to the touchscreen 102.

[0080] The memory 103 stores the executable program of the processor 101. Schematic, the memory 103 stores a virtual environment program A, an application program B, an application program C, a touch pressure sensing module 18, and the kernel layer 19 of the operating system. Virtual environment program A is an application program developed based on the 3D virtual environment module 17. Optionally, virtual environment program A includes, but is not limited to, at least one of the following developed by the 3D virtual environment module (also called the virtual environment module) 17: a game program, a virtual reality program, a 3D map program, and a 3D demonstration program. For example, when the terminal's operating system is Android, virtual environment program A is developed using Java and C# programming languages; or, when the terminal's operating system is iOS, virtual environment program A is developed using Objective-C and C# programming languages.

[0081] The 3D virtual environment module 17 is a module that supports multiple operating system platforms. It is illustrative and can be used in program development in multiple fields such as game development, virtual reality (VR) and 3D mapping. The specific type of the 3D virtual environment module 17 is not limited in this application embodiment. In the following embodiment, the 3D virtual environment module 17 is used as an example to illustrate the concept.

[0082] The touch (and pressure) sensing module 18 is used to receive touch events (and pressure touch events) reported by the touchscreen driver 191. Optionally, the touch sensing module may not have pressure sensing functionality and may not receive pressure touch events. Touch events include: the type of the touch event and coordinate values. The types of touch events include, but are not limited to: touch start events, touch movement events, and touch drop events. Pressure touch events include: the pressure value and coordinate values ​​of the pressure touch event. The coordinate values ​​are used to indicate the touch position of the pressure touch operation on the display screen. Optionally, a two-dimensional coordinate system is obtained by establishing a horizontal coordinate axis in the horizontal direction of the display screen and a vertical coordinate axis in the vertical direction of the display screen.

[0083] Schematic, kernel layer 19 includes touchscreen driver 191 and other drivers 192. Touchscreen driver 191 is a module for detecting pressure touch events. When touchscreen driver 191 detects a pressure touch event, it transmits the pressure touch event to pressure sensing module 18.

[0084] Other drivers 192 may be drivers related to processor 101, drivers related to memory 103, drivers related to network components, drivers related to sound components, etc.

[0085] Those skilled in the art will understand that the above is merely a general illustration of the terminal's structure. In different embodiments, the terminal may have more or fewer components. For example, the terminal may also include a gravity acceleration sensor, a gyroscope sensor, a power supply, etc.

[0086] Figure 2 The diagram shows a structural block diagram of a computer system 200 provided in an exemplary embodiment of this application. The computer system 200 includes: a terminal 210 and a server cluster 220.

[0087] Terminal 210 has a client 211 installed and running that supports a virtual environment. This client 211 can be an application that supports a virtual environment. When the terminal runs the client 211, the user interface of the client 211 is displayed on the screen of terminal 210. This client can be any type of game, such as an FPS game, a TPS game, a MOBA game, a competitive game, or an SLG game. In this embodiment, a racing game is used as an example. Terminal 210 is the terminal used by a first user 212. The first user 212 uses terminal 210 to control a first virtual character located in the virtual environment to perform activities. This first virtual character can be referred to as the first virtual character of the first user 212. The activities of the first virtual character include, but are not limited to, at least one of the following: adjusting body posture, crawling, walking, running, riding, flying, jumping, driving, picking up, shooting, attacking, and throwing. For illustrative purposes, the first virtual character is a virtual character, such as a realistic or anime character.

[0088] The device type of terminal 210 includes at least one of the following: smartphone, tablet computer, e-book reader, MP3 player, MP4 player, laptop computer, and desktop computer.

[0089] Figure 2 Only one terminal is shown, but multiple other terminals 240 exist in different embodiments. In some embodiments, at least one other terminal 240 is a terminal corresponding to the developer, on which a virtual environment client development and editing platform is installed. The developer can edit and update the client on the other terminal 240 and transmit the updated client installation package to the server cluster 220 via wired or wireless network. The terminal 210 can download the client installation package from the server cluster 220 to update the client.

[0090] Terminal 210 and other terminals 240 are connected to server cluster 220 via wireless or wired networks.

[0091] Server cluster 220 includes at least one of a single server, multiple servers, a cloud computing platform, and a virtualization center. Server cluster 220 provides backend services to clients supporting a 3D virtual environment. Optionally, server cluster 220 undertakes the primary computing task, and the terminal undertakes the secondary computing task; or, server cluster 220 undertakes the secondary computing task, and the terminal undertakes the primary computing task; or, server cluster 220 and the terminal collaborate on computing using a distributed computing architecture.

[0092] Optionally, both the aforementioned terminals and servers are computer devices.

[0093] In an illustrative example, server cluster 220 includes servers 221 and 226. Server 221 includes a processor 222, a user account database 223, a battle service module 224, and a user-facing input / output interface (I / O interface) 225. The processor 222 loads instructions stored in server 221 and processes data in the user account database 223 and the battle service module 224. The user account database 223 stores data about user accounts used by terminal 210 and other terminals 240, such as user avatars, nicknames, combat power indices, and the service area where the user accounts are located. The battle service module 224 provides multiple battle rooms for users to play against each other. The user-facing I / O interface 225 establishes communication and exchanges data with terminal 210 via a wireless or wired network.

[0094] Based on the above introduction to the virtual environment and the description of the implementation environment, the control method for the virtual vehicle provided in the embodiments of this application will be described below.

[0095] In illustrative purposes, the virtual vehicle control method provided in this application can be implemented through player operation on a terminal, or through player operation on a controller, console, or other device connected to the terminal.

[0096] In the case of operation via a terminal, the multiple control components involved in the virtual vehicle control method provided in this application embodiment can all be implemented as controls on the terminal's display interface; in the case of operation via a handle, console, or other device connected to the terminal, the multiple control components involved in the virtual vehicle control method provided in this application embodiment can all be implemented as a component of the handle or console. For example, the direction control component can be implemented as a movement button or joystick on the handle; as another example, the throttle control component can be implemented as an accelerator pedal on the console, and the direction control component can be displayed as a steering wheel on the console.

[0097] Taking the virtual vehicle control method provided in this application as an example, which is implemented through player operation on the terminal, Figure 3 A schematic diagram of the interface for a virtual vehicle control method provided in an exemplary embodiment of this application is shown. The virtual vehicle 320 is displayed on the display interface 310, and the virtual vehicle 320 drives within a virtual scene displayed on the display interface 310.

[0098] Indicatively, the display interface 310 includes at least one of the following controls: brake control 301, energy control 302, throttle control 303, steering control 304, handbrake control 305, and reset control 306. Each control is described below:

[0099] The brake control 301 is used to control the grip of the virtual vehicle 320, which refers to the friction between the tires of the virtual vehicle 320 and the ground. In response to a trigger operation on the brake control 301, the speed of the virtual vehicle 320 is reduced.

[0100] It should be understood that the reduction in the speed of the virtual vehicle 320 is achieved by increasing the grip of the virtual vehicle 320, and the rate of speed reduction of the virtual vehicle 320 can be set according to actual needs. Taking the player clicking the brake control 301 as an example, in response to the click operation on the brake control 301, the friction between the tires of the virtual vehicle 320 and the ground increases, the grip of the virtual vehicle is enhanced, and thus the speed of the virtual vehicle 320 decreases accordingly.

[0101] Energy control 302 is used to indicate the amount of acceleration energy stored in the virtual vehicle 320; in response to a trigger operation on energy control 302, one unit of acceleration energy can be consumed to provide acceleration service for the virtual vehicle 320. Optionally, an acceleration energy storage control 01 is displayed around the energy control 302, which is used to indicate the amount of acceleration energy stored in the virtual vehicle 320.

[0102] Taking nitrogen as an example of acceleration energy, energy control 302 indicates the amount of nitrogen available to accelerate the virtual vehicle 320; for example, energy control 302 indicates the amount of nitrogen in one bottle. The storage quantity control 01 indicates the number of nitrogen bottles corresponding to the virtual vehicle 320. In response to a trigger operation on energy control 302, consuming one bottle of nitrogen to provide acceleration for the virtual vehicle 320 displays a message indicating that one bottle of nitrogen has been consumed on display interface 310.

[0103] The accelerator control 303 is used to increase the speed of the virtual vehicle 320. In response to a trigger operation on the accelerator control 303, the virtual vehicle 320 is controlled to accelerate. The trigger operation on the accelerator control 303 can be at least one of the following: a single click, a double click, a touch operation, or a continuous press operation. In this embodiment, in response to a trigger operation on the accelerator control 303, the accelerator corresponding to the virtual vehicle 320 will automatically remain pressed, so that the virtual vehicle 320 maintains a continuous acceleration state. For example, if the player clicks and then releases the accelerator control 303, the virtual vehicle 320 enters a state of continuous acceleration.

[0104] Optionally, when the virtual vehicle 320 is in a state of continuous acceleration, the brake control 301 is also used to implement at least one of the functions of stopping acceleration, decelerating and reversing of the virtual vehicle 320.

[0105] Optionally, after the virtual vehicle enters a continuous acceleration state, in response to a trigger operation on the brake control 301, the virtual vehicle 320 is controlled to stop accelerating, simulating the state of the accelerator being released. Specifically, if the trigger operation on the brake control 301 is a single click, the virtual vehicle 320 is controlled to stop accelerating and enter a constant speed driving state; if the trigger operation on the brake control 301 is a continuous press operation, the virtual vehicle 320 is controlled to stop accelerating and enter a continuous deceleration state. Optionally, if the speed of the virtual vehicle 320 drops to 0 while it is in a continuous deceleration state, and the continuous press on the brake control 301 remains, the virtual vehicle 320 is controlled to enter a reversing state.

[0106] In one alternative implementation, the brake control 301 and the accelerator control 303 cannot be used simultaneously.

[0107] The direction control 304 is used to steer the virtual vehicle 320. Specifically, the direction control 304 may include a left turn control and a right turn control, used to steer the virtual vehicle 320 left and right.

[0108] The handbrake control 305 is used to brake the virtual vehicle 320. In a straight-line running state, in response to a trigger operation on the handbrake control 305, the speed of the virtual vehicle 320 is reduced. Optionally, in response to simultaneous trigger operations on the direction control 304 and the handbrake control 305, the virtual vehicle 320 enters a drift state in a curve. Optionally, in the drift state, in response to a trigger operation on the handbrake control 305, the front of the virtual vehicle 320 is controlled to rotate inward, and the speed reduction of the virtual vehicle 320 is greater than the speed reduction of the virtual vehicle 320 in a straight-line running state.

[0109] The reset control 306 is used to restart the virtual vehicle 320. In response to a trigger operation on the reset control 306, the virtual vehicle 320 is controlled to appear on an open road surface and restart. The reset control 306 is typically used during the virtual vehicle 320's extrication from difficult situations.

[0110] Figure 4 This illustration shows an interface diagram of a virtual vehicle control method provided in an exemplary embodiment of this application. Figure 3 Similarly, the display interface 410 shows a virtual vehicle 420. The virtual vehicle 420 is in a drifting state in the curve, which can also be called a tail-sliding state. In the drifting state, the virtual vehicle 420 slides sideways by oversteering.

[0111] The virtual vehicle control method provided in this application includes:

[0112] In response to a first steering operation on the steering control unit and a braking operation on the handbrake control unit, the virtual vehicle is controlled to enter a drift state. The first steering operation is used to control the virtual vehicle to turn towards the first side of the speed direction. The front of the virtual vehicle is facing the first direction, which is located on the first side of the speed direction.

[0113] In response to a second steering operation on the direction control unit, the front of the virtual vehicle maintaining the drift state is controlled to turn to a second direction. The second steering operation is used to control the virtual vehicle to turn to a second side of the velocity direction. The second direction is located on the first side of the velocity direction, and the second angle formed by the second direction and the velocity direction is smaller than the first angle formed by the first direction and the velocity direction.

[0114] In response to braking operations on the handbrake control unit, the front of the virtual vehicle maintaining its drift state is rotated to a third direction, which is located on the second side of the speed direction.

[0115] Taking the virtual vehicle control method provided in this application, implemented through player operation on a terminal, as an example, refer to... Figure 4 The brake control unit, energy control unit, and throttle control unit can be displayed in the style of controls in the display interface 410. Specifically, the display interface 410 displays brake control 401, energy control 402, throttle control 403, left turn control 4041, right turn control 4042, and handbrake control 405, respectively.

[0116] For example, in response to a first steering operation on the right turn control 4042 in the steering control unit and a braking operation on the handbrake control 405, the virtual vehicle 420 is controlled to enter a drift state. For example, a vehicle condition display area 02 is displayed in the display interface 410, which is used to display the driving state of the virtual vehicle 420, including at least numerical information of the virtual vehicle 420's speed and / or a speed display bar. For example, in response to the braking operation on the handbrake control 405, the virtual speed indicated by the numerical information of the virtual vehicle 420's speed and / or the speed display bar in the vehicle condition display area 02 decreases.

[0117] For example, a virtual vehicle 420 in a drift state displays virtual tire marks on a virtual road; a first steering operation on the right turn control 4042 in the steering control unit is used to control the virtual vehicle 420 to turn to the right in the speed direction.

[0118] The virtual vehicle 420 is oriented in the first direction 431, and this first direction 431 is located to the right of the first velocity direction 441. It can be understood that the virtual vehicle 420's orientation, i.e., the first direction 431 and the first velocity direction 441, are not on the same straight line, and the virtual vehicle's drift angle is the angle formed by the first direction 431 and the first velocity direction 441. The first velocity direction 441 is the velocity direction of the virtual vehicle when its orientation is the first direction 431. For example, the first velocity direction 441 is the tangent direction in the virtual vehicle's trajectory at the position where its orientation is the first direction 431.

[0119] In response to a second steering operation on the left turn control 4041 in the steering control unit, the front of the virtual vehicle 420, which is maintaining a drift state, is controlled to turn to the second direction 432.

[0120] For example, the second steering operation on the left-turn control 4041 in the steering control unit is used to control the virtual vehicle 420 to turn to the left in the velocity direction. Since the virtual vehicle 420 remains in a drifting state, virtual tire tracks are displayed on the virtual road.

[0121] The virtual vehicle 420's front orientation rotates to the second direction 432, and the virtual vehicle 420's front orientation in the second direction 432 is located to the right of the second velocity direction 442. It can be understood that the virtual vehicle 420's front orientation, i.e., the second direction 432 and the second velocity direction 442, is not on the same straight line.

[0122] The second angle formed by the second direction 432 and the second velocity direction 442 is smaller than the first angle formed by the first direction 431 and the first velocity direction 441. The second velocity direction 442 is the velocity direction of the virtual vehicle 420 when the front of the virtual vehicle is facing the second direction 432.

[0123] In response to a braking operation on the handbrake control 405, the front of the virtual vehicle 420, which is in a drifting state, is controlled to rotate to a third direction 433; for example, since the virtual vehicle 420 is in a drifting state, virtual tracks caused by tire friction are displayed on the virtual road.

[0124] For example, during the process of the virtual vehicle 420 turning to the left in the direction of speed, the braking operation on the handbrake control 405 controls the direction of the virtual vehicle 420, which is maintaining a drift state, to turn to a third direction 433; for example, after executing the second steering operation on the left turn control 4041 in the direction control component, the braking operation on the handbrake control 405 is executed.

[0125] In one alternative, in response to a second steering operation on the left turn control 4041 in the steering control unit and a braking operation on the handbrake control 405, the 420 front-end orientation of the virtual vehicle maintaining a drift state is controlled to turn to a third direction 433, that is, the second steering operation on the left turn control 4041 in the steering control unit and the braking operation on the handbrake control 405 are performed simultaneously.

[0126] The virtual vehicle 420's front orientation rotates to the third direction 433, and the virtual vehicle 420's front orientation in the third direction 433 is located to the left of the third velocity direction 443. It can be understood that the virtual vehicle 420's front orientation, i.e., the third direction 433, and the third velocity direction 443, are not on the same straight line.

[0127] The third speed direction 443 is the speed direction of the virtual vehicle 420 when its front is facing the third direction 433.

[0128] For example, the velocity direction of the virtual vehicle mentioned above can be calculated iteratively using the following formula:

[0129] v(t+Δt)=Grip force×(d(t+Δt)-v(t))+v(t);

[0130] v(t+2×Δt)=Grip force×(d(t+2×Δt)-v(t+Δt))+v(t+Δt);

[0131] ...

[0132] v(t+n×Δt)=grip×[d(t+n×Δt)-v(t+(n-1)×Δt)]+v(t+(n-1)×Δt).

[0133] Wherein, the virtual vehicle's velocity direction at initial time t is v(t), its heading at initial time t is d(t), and the unit time is Δt. Then, the drift angle of the virtual vehicle 420 at initial time t is d(t) - v(t); that is, the drift angle is the angle between the vehicle's heading and its velocity direction.

[0134] The velocity direction of the virtual vehicle 420 at time t+Δt is v(t+Δt), and the frontal orientation of the virtual vehicle 420 at time t+Δt is d(t+Δt). Subsequently, the drift angle of the virtual vehicle 420 at time t+Δt can be calculated by d(t+Δt)-v(t+Δt), and the remaining information can be deduced in the same way.

[0135] Optionally, the drift angle of the virtual vehicle at time i is the difference between the direction the virtual vehicle is facing at time i and the direction of its velocity at time i. For example, the drift angle of virtual vehicle 420 at the initial time t is d(t)-v(t).

[0136] For example, the velocity direction of the virtual vehicle at the second moment can be determined based on the grip, the vehicle's heading at the second moment, and the velocity direction at the first moment. Here, the second moment is the moment when the first moment has elapsed by a unit of time, and the vehicle's heading at the second moment is the sum of the vehicle's heading at the first moment and the rotation angle of the virtual vehicle within a unit of time.

[0137] For example, the velocity direction of the virtual vehicle at the second moment is the sum of the difference between the vehicle's heading at the second moment and the velocity direction at the first moment, multiplied by the grip force and the ground force, and then added to the velocity direction at the first moment. For instance, the velocity direction of the virtual vehicle 420 at time t+Δt is v(t+Δt), which can be calculated using v(t+Δt) = grip force × (d(t+Δt) - v(t)) + v(t).

[0138] Optionally, the unit time Δt can be calculated in units of 1 frame, and grip is a fixed function.

[0139] For example, assuming the grip of the virtual vehicle 420 is constant at 0.5, and the initial direction of the virtual vehicle 420's front is straight ahead, let d(t) = 90°, and the initial velocity direction of the virtual vehicle 420 be v(t) = 15°. Then, the drift angle of the virtual vehicle 420 at time t (the initial time) is 90° – 15° = 75°. Subsequently, the virtual vehicle 420 rotates its front 15° to the left within the time interval Δt, i.e., d(t + Δt) = 105°.

[0140] Based on the above formula, assuming Δt = 1, the velocity direction of the virtual vehicle 420 can be calculated using the above formula: v(t + Δt) = 0.5 × (105° - 15°) + 15° = 60°. Therefore, the drift angle of the virtual vehicle 420 at time t + Δt is 105° – 60° = 45°.

[0141] Optionally, if the angle between the heading and speed direction of the virtual vehicle 420 is less than the drift reversal angle, the virtual vehicle 420 is determined to have completed the drift reversal, exiting the drift state, and then the virtual vehicle 420 is controlled to enter a level driving state. The drift reversal angle can be set according to actual needs, for example, a drift reversal angle of 13 degrees.

[0142] Figure 5 A flowchart illustrating a virtual vehicle control method provided in an exemplary embodiment of this application is shown. This method can be applied to a terminal supporting a virtual environment, and includes:

[0143] Step 510: Display the virtual vehicle in motion within the virtual environment;

[0144] For example, a virtual environment is used to provide a space for virtual vehicles to drive;

[0145] For example, the virtual vehicle control method can be applied to applications that support racing games, where players control virtual vehicles to participate in virtual racing competitions in a virtual environment; or, it can be applied to applications that support role-playing games, where players control virtual vehicles to move around in a virtual environment to meet their needs for roaming and sightseeing.

[0146] Step 520: In response to the first steering operation on the steering control unit and the braking operation on the handbrake control unit, control the virtual vehicle to enter a drift state;

[0147] For example, the first steering operation controls the virtual vehicle to steer towards a first side in the velocity direction; the first side is typically the left or right, and the corresponding second side is the side opposite to the first side. The virtual vehicle's front is facing the first direction, which is located on the first side of the velocity direction. The velocity direction is the velocity direction corresponding to the vehicle's front being facing the first direction.

[0148] For example, the drift state can also be called the tail-slip state. In the drift state, the virtual vehicle slides sideways in an oversteer manner so that the virtual vehicle can drive out of the curve.

[0149] In this embodiment, the virtual vehicle is controlled to enter a drift state in response to a first steering operation on the steering control component and a braking operation on the handbrake control component; for example, simultaneously clicking the left turn control and the handbrake control in the steering control component controls the virtual vehicle to drift to the left. In another implementation, clicking the left turn control and the handbrake control in the steering control component sequentially controls the virtual vehicle to drift to the left.

[0150] The directional control component and handbrake control component can be implemented as controls on the terminal's display interface, or as a handle or component on the control panel connected to the terminal. For example, the directional control component and handbrake control component can be implemented as directional controls and handbrake controls on the terminal, respectively; or the directional control component can be implemented as a movement button or joystick on the handle, and the handbrake control component can be implemented as a confirmation button on the handle; or the directional control component and handbrake control component can be implemented as a steering wheel and handbrake lever on the control panel, respectively.

[0151] For example, the handbrake control unit is used to brake the virtual vehicle and control the virtual vehicle's speed to decrease.

[0152] Step 530: In response to a second steering operation on the steering control unit, control the front of the virtual vehicle maintaining the drift state to turn to the second direction;

[0153] The second steering operation controls the virtual vehicle to steer to a second side in the direction of speed; the second side is the opposite side to the first side. For example, if the first side is the left, the second side is the right.

[0154] The second direction is located to the first side of the velocity direction, and the velocity direction corresponding to the second direction is the velocity direction when the vehicle's front is facing the second direction. For example, the velocity direction is the tangent direction in the virtual vehicle's trajectory at the position where the vehicle's front is facing the second direction. The second angle formed by the second direction and the velocity direction is smaller than the first angle formed by the first direction and the velocity direction; for example, the virtual vehicle maintains a drift state while rotating to the second direction.

[0155] Step 540: In response to the braking operation on the handbrake control unit, control the direction of the virtual vehicle maintaining the drift state to a third direction;

[0156] For example, a handbrake control unit is used to brake the virtual vehicle and control its speed to decrease. In one implementation, the braking operation on the handbrake control unit is a single click, and the handbrake unit is used to significantly reduce the virtual speed of the virtual vehicle in a short period of time. Compared to a foot brake control unit, the handbrake control unit reduces the virtual speed by a greater amount per unit time.

[0157] The third direction is located on the second side of the velocity direction; for example, the virtual vehicle changes from drifting towards the first side to drifting towards the second side. For example, the virtual vehicle maintains its drift state while rotating to the third direction.

[0158] In summary, the method provided in this embodiment changes the direction of the virtual vehicle's front end by performing a second steering operation when the virtual vehicle is in a drift state; the drift state of the virtual vehicle is maintained by braking; and the direction of the virtual vehicle's front end is turned from the first side of the speed direction to the second side of the speed direction without interrupting the drift state, thus enabling the virtual vehicle to perform a reverse drift, reducing the turning radius of the virtual vehicle when passing through continuous curves, and improving the virtual vehicle's ability to pass through continuous curves.

[0159] Figure 6 A flowchart illustrating a virtual vehicle control method provided in an exemplary embodiment of this application is shown. This method can be applied to a terminal that supports a virtual environment. Figure 5 In the illustrated embodiment, step 540 can be implemented as step 542:

[0160] Step 542: If the angle between the virtual vehicle's heading and its speed direction exceeds the target threshold, in response to the braking operation on the handbrake control unit, control the heading of the virtual vehicle, which is maintaining a drift state, to rotate to a third direction.

[0161] For example, the included angle is constructed by using the speed direction of the virtual vehicle and the direction the virtual vehicle is facing as two sides, and the included angle is less than 180 degrees.

[0162] For example, a target threshold is used to determine whether the virtual vehicle is in a drift state; if the angle between the virtual vehicle's heading and its velocity direction exceeds the target threshold, the virtual vehicle remains in a drift state. For example, the target threshold is 13 degrees. While the virtual vehicle is in a drift state, in response to a braking operation on the handbrake control unit, the virtual vehicle's heading rotates to a third direction.

[0163] For example, the virtual vehicle changes from drifting to the first side to drifting to the second side.

[0164] Optionally, in one implementation, step 542 in the embodiment can be implemented as the following sub-steps:

[0165] If the angle between the virtual vehicle's heading and its speed direction exceeds the target threshold, in response to the braking operation on the handbrake control unit, the heading of the virtual vehicle maintaining the drift state is turned to a third direction, and the release information of the reverse drift skill is displayed.

[0166] For example, the reverse drift skill is used to instruct a virtual vehicle to change from drifting to the first side to drifting to the second side. The release information of the reverse drift skill can be at least one of text information, highlight effects, flash effects, aperture effects, and sound effects.

[0167] Figure 7 A schematic diagram of an interface for a virtual vehicle control method provided in an exemplary embodiment of this application is shown. A virtual vehicle 620 is displayed on a display interface 610, and the virtual vehicle 620 drives in a virtual scene displayed on the display interface 610. When the virtual vehicle 620 drifts from a first side to a second side (i.e., the direction from the front of the virtual vehicle is a third direction), a reverse drift skill release information 632 is displayed, which indicates that the reverse drift skill is triggered. For example, triggering the reverse drift skill increases at least one of virtual economic value, virtual experience value, and virtual task progress.

[0168] In summary, the method provided in this embodiment determines the driving state of the virtual vehicle through a target threshold. When the virtual vehicle is in a drifting state, the drifting state of the virtual vehicle is maintained by braking. The virtual vehicle can perform reverse drifting without interrupting the drifting state, thereby reducing the turning radius of the virtual vehicle when passing through continuous curves and improving the ability of the virtual vehicle to pass through continuous curves.

[0169] Figure 8A flowchart illustrating a virtual vehicle control method provided in an exemplary embodiment of this application is shown. This method can be applied to a terminal that supports a virtual environment. Figure 6 Based on the illustrated embodiment, step 552 is also included:

[0170] Step 552: If the angle between the virtual vehicle's heading and its speed direction does not exceed the target threshold, control the virtual vehicle to exit the drift state and enter the straight-line running state.

[0171] For example, the included angle is constructed by using the speed direction of the virtual vehicle and the direction the virtual vehicle is facing as two sides, and the included angle is less than 180 degrees.

[0172] For example, a target threshold is used to determine whether the virtual vehicle is in a drifting state; if the angle between the virtual vehicle's heading and its velocity direction does not exceed the target threshold, the virtual vehicle exits the drifting state and enters a level driving state. For example, the target threshold is 13 degrees.

[0173] For example, the virtual vehicle will not skid when in a level running state. It should be noted that, in one example, the level running state indicates that the virtual vehicle's heading and velocity direction are in a straight line. To avoid sluggishness in entering the level running state, the virtual vehicle enters the level running state when the angle between the virtual vehicle's heading and velocity direction is less than a target threshold.

[0174] It should be noted that the virtual vehicle exiting the drift state indicates the end of the virtual vehicle's drift state. Optionally, when the virtual vehicle is in the drift state, virtual tire friction marks are displayed on the virtual road in the virtual environment.

[0175] Figure 9 This diagram illustrates an interface schematic of a virtual vehicle control method provided in an exemplary embodiment of this application. A virtual vehicle 642 is displayed on a display interface 640, and the virtual vehicle 642 drives within a virtual scene displayed on the display interface 640. The virtual vehicle 642 is positioned at a fourth position point 646b.

[0176] There are two virtual tracks of virtual vehicle 642 on the virtual road. The first virtual track 644 is the track left by virtual vehicle 642 when it is in the first drift state. Virtual vehicle 642 enters the first drift state at the first position point 644a and exits the first drift state at the second position point 644b. In the first drift state, virtual vehicle 642 drifts to the left.

[0177] At the second position point 644b, virtual vehicle 642 enters a level running state, and maintains this state between the second position point 644b and the third position point 646a. While in a level running state, virtual vehicle 642 leaves no tracks on the virtual road.

[0178] The second virtual trace 646 is the trace left on the virtual road by the virtual vehicle 642 when it is in the second drift state. The virtual vehicle 642 enters the second drift state at the third position point 646a, and in the second drift state, the virtual vehicle 642 drifts to the right. From the third position point 646a to the fourth position point 646b, the virtual vehicle 642 maintains the second drift state.

[0179] Figure 10 This diagram illustrates an interface schematic of a virtual vehicle control method provided in an exemplary embodiment of this application. A virtual vehicle 652 is displayed on a display interface 650, and the virtual vehicle 652 drives within a virtual scene displayed on the display interface 650. The virtual vehicle 652 is positioned at a third position point 654c.

[0180] A virtual track of virtual vehicle 652 exists on the virtual road. Continuous virtual track 654 represents the tracks left by virtual vehicle 652 while in a continuous drift state. Virtual vehicle 642 enters a continuous drift state at the first position point 654a, and maintains this state from the first position point 654a to the third position point 654c. In this continuous drift state, virtual vehicle 642 first drifts to the left, then to the right. Specifically, from the first position point 654a to the second position point 654b, virtual vehicle 642 maintains a leftward drift; from the second position point 654b to the third position point 654c, virtual vehicle 642 maintains a rightward drift, meaning that at the second position point 654b, virtual vehicle 642 reverses its drift from left to right.

[0181] In summary, the method provided in this embodiment determines the driving state of the virtual vehicle by setting a target threshold. When the angle between the virtual vehicle's heading and its speed direction does not exceed the target threshold, the virtual vehicle is controlled to exit the drift state and enter a flat running state. This allows for more flexible control of the virtual vehicle's driving state and improves its maneuverability. Entering a flat running state when the angle does not exceed the target threshold closely resembles the driving principles of the real world.

[0182] Figure 11 A flowchart illustrating a virtual vehicle control method provided in an exemplary embodiment of this application is shown. This method can be applied to a terminal that supports a virtual environment. Figure 6 The illustrated embodiment further includes step 535:

[0183] Step 535: Determine the speed direction of the virtual vehicle based on its grip, the direction it faces, and its historical speed direction.

[0184] For example, the angle between the direction the virtual vehicle is facing and the direction of its speed is the drift angle.

[0185] The larger the drift angle, the greater the degree of body deviation of the virtual vehicle, which will result in a longer time required for the virtual vehicle to exit the drift state. In addition, the drift angle is affected by the virtual vehicle's grip, and changes in grip are achieved through trigger operations on the brake control components.

[0186] It should be understood that when the virtual vehicle is moving at a straight distance, its speed direction is basically the same as its forward direction, and the drift angle can be set to 0 degrees. When the virtual vehicle is reversing, its speed direction is opposite to its forward direction, and the drift angle can be set to 180 degrees.

[0187] When a virtual vehicle is drifting, its velocity direction is not the same as its heading direction. That is, the vehicle's velocity direction is the first direction, and its heading direction is the second direction. These first and second directions are different, and there is a certain angle of deviation between them. This angle is the drift angle. It is precisely because of this drift angle that the virtual vehicle exhibits a drifting posture.

[0188] In a demonstrative way, the virtual vehicle can be gradually rotated towards the front of the car by its speed and direction to achieve a gripping effect, and eventually the virtual vehicle will drift away and return to a flat running state.

[0189] Taking the direction of the velocity of a virtual vehicle at initial time t as v(t), the direction of the vehicle's front as d(t) at initial time t, and the unit time as Δt as an example, Figure 12 A schematic diagram illustrating the calculation of the drift angle provided in an exemplary embodiment of this application is shown.

[0190] For example, the velocity direction of a virtual vehicle can be iteratively calculated using the following formula:

[0191] v(t+Δt)=Grip force×(d(t+Δt)-v(t))+v(t);

[0192] v(t+2×Δt)=Grip force×(d(t+2×Δt)-v(t+Δt))+v(t+Δt);

[0193] ...

[0194] v(t+n×Δt)=grip×[d(t+n×Δt)-v(t+(n-1)×Δt)]+v(t+(n-1)×Δt).

[0195] In this context, the velocity direction of the virtual vehicle 420 at initial time t is v(t), the heading direction at initial time t is d(t), and the unit time is Δt. Therefore, the drift angle of the virtual vehicle 420 at initial time t is d(t) - v(t), the velocity direction of the virtual vehicle 420 at time t+Δt is v(t+Δt), and the heading direction of the virtual vehicle 420 at time t+Δt is d(t+Δt). Subsequently, the drift angle of the virtual vehicle 420 at time t+Δt can be calculated using d(t+Δt) - v(t+Δt), and the remaining information can be deduced similarly.

[0196] Optionally, the drift angle of the virtual vehicle at time i is the difference between the direction of the virtual vehicle's front at time i and the direction of its velocity at time i. For example, the drift angle of virtual vehicle 420 at the initial time t is d(t)-v(t).

[0197] Furthermore, the velocity direction of the virtual vehicle at the second moment can be determined based on the grip, the vehicle's heading direction at the second moment, and the velocity direction at the first moment. The second moment is the point in time after the first moment has elapsed, and the vehicle's heading direction at the second moment is the sum of the vehicle's heading direction at the first moment and the rotation angle of the virtual vehicle within that unit of time.

[0198] For example, the velocity direction of the virtual vehicle at the second moment is the difference between the vehicle's frontal direction at the second moment and the velocity direction at the first moment, multiplied by the grip force and the ground force, plus the velocity direction at the first moment. For instance, the velocity direction of the virtual vehicle 420 at time t+Δt is v(t+Δt), which can be calculated using v(t+Δt) = grip force × (d(t+Δt) - v(t)) + v(t).

[0199] Optionally, the unit time Δt can be calculated in units of 1 frame, and grip is a fixed function.

[0200] According to the above formula, the drift angle of the virtual vehicle at the initial time t is d(t) - v(t), the velocity direction of the virtual vehicle at time t+Δt is v(t+Δt), and the heading direction of the virtual vehicle 420 at time t+Δt is d(t+Δt). The remaining information can be deduced similarly. Taking the drift angle of the virtual vehicle 420 at the initial time t as d(t) - v(t) and the velocity direction of the virtual vehicle 420 at time t+Δt as an example, the drift angle of the virtual vehicle 420 at time t+Δt can be calculated using d(t+Δt) - v(t+Δt).

[0201] refer to Figure 12 Assuming the virtual vehicle's grip is constant at 0.5, and its initial direction is straight ahead, let d(t) = 90°, and its initial velocity direction v(t) = 15°. Then, the virtual vehicle's drift angle at time t (the initial time) is 90° – 15° = 75°. Subsequently, the virtual vehicle rotates 15° to the left within a time interval Δt, i.e., d(t + Δt) = 105°.

[0202] Based on the above formula, assuming Δt = 1, the velocity direction of the virtual vehicle can be calculated using the formula: v(t + Δt) = 0.5 × (105° - 15°) + 15° = 60°. Therefore, the drift angle of the virtual vehicle at time t + Δt is 105° – 60° = 45°. Similarly, the drift angle of the virtual vehicle at the next time step can be calculated iteratively using the above formula.

[0203] As described above, the first trigger operation on the brake control component can improve the virtual vehicle's grip, thereby affecting the change in the virtual vehicle's drift angle. Specifically, the increased grip accelerates the decrease in drift angle, thus speeding up the virtual vehicle's exit from drift and entry into a level driving state.

[0204] In summary, the method provided in this embodiment determines the speed direction of the virtual vehicle by introducing grip force, establishes a relationship between the speed direction, the vehicle's heading, and grip force, and ensures the accuracy of the basis for determining the driving state of the virtual vehicle through iterative calculation, which is close to the driving principles of the real world.

[0205] Figure 13 A flowchart illustrating a virtual vehicle control method provided in an exemplary embodiment of this application is shown. This method can be applied to a terminal that supports a virtual environment. Figure 5 In the illustrated embodiment, step 540 can be implemented as step 544:

[0206] Step 544: In response to the continuous pressing operation on the steering control unit and the braking operation on the handbrake control unit, control the front of the virtual vehicle that is maintaining the drift state to turn to a third direction;

[0207] For example, the second steering operation is a continuous pressing operation on the steering control component. In this embodiment, in response to a continuous pressing operation on the steering control component and a braking operation at the same time, the front of the virtual vehicle maintaining the drift state is controlled to turn to a third direction.

[0208] For example, the braking operation on the handbrake control unit can be at least one of the following operations: single-click operation, double-click operation, touch operation, single-press operation, and continuous press operation. For instance, a player clicks the handbrake control unit to control the virtual vehicle's speed to decrease.

[0209] For example, continuous pressing of the direction control component controls the virtual vehicle to continuously steer until it turns into a third direction. Braking of the handbrake control component keeps the virtual vehicle in a drift state, preventing it from exiting the drift state and entering a level driving state.

[0210] In summary, the method provided in this embodiment, by determining the first steering operation as a continuous pressing operation, controls the virtual vehicle to maintain a drift state while simultaneously executing a continuous pressing operation on the direction control component and a braking operation, and changes the drift from drifting to the first side to drifting to the second side, which closely resembles the driving principle in the real world.

[0211] Figure 14 A flowchart illustrating a virtual vehicle control method provided in an exemplary embodiment of this application is shown. This method can be applied to a terminal that supports a virtual environment. Figure 5 Based on the illustrated embodiment, step 554 is also included:

[0212] Step 554: In response to the braking operation on the handbrake control unit, control the virtual speed of the virtual vehicle to decrease;

[0213] For example, when controlling a virtual vehicle to enter a drift state, the virtual vehicle's virtual speed is significantly reduced in a short period of time by braking on the handbrake control unit. For example, braking on the handbrake control unit does not directly affect whether the virtual vehicle is in a drift state. Whether the virtual vehicle is in a drift state is independent of whether step 554 is executed. Optionally, whether the virtual vehicle is in a drift state is determined by the angle between the virtual vehicle's frontal orientation and its velocity direction.

[0214] Optionally, in one alternative implementation, step 554 may be followed by at least one of the following two sub-steps:

[0215] Sub-step 1: If the angle between the virtual vehicle's heading and its speed direction exceeds the target threshold, control the virtual vehicle to maintain a drift state;

[0216] For example, an angle is constructed using the virtual vehicle's velocity direction and its frontal orientation as two sides, with the angle being less than 180 degrees. For example, a target threshold is used to determine whether the virtual vehicle is in a drifting state; if the angle between the virtual vehicle's frontal orientation and velocity direction exceeds the target threshold, the virtual vehicle remains in a drifting state. For example, the target threshold is 13 degrees.

[0217] Sub-step 2: If the angle between the virtual vehicle's heading and its speed direction does not exceed the target threshold, control the virtual vehicle to exit the drift state and enter the straight-line running state.

[0218] For example, a target threshold is used to determine whether the virtual vehicle is in a drifting state; if the angle between the virtual vehicle's heading and its velocity direction does not exceed the target threshold, the virtual vehicle exits the drifting state and enters a level driving state. For example, the target threshold is 13 degrees.

[0219] In summary, the method provided in this embodiment controls the virtual speed of a virtual vehicle by performing a braking operation when the virtual vehicle is in a drifting state, thereby reducing the virtual speed of the virtual vehicle. This provides a speed control method for a virtual vehicle in a drifting state, and the braking operation ensures the flexibility of control over the virtual vehicle in a drifting state.

[0220] Figure 15 A flowchart illustrating a virtual vehicle control method provided in an exemplary embodiment of this application is shown. This method can be applied to a terminal that supports a virtual environment. Figure 5 In the illustrated embodiment, step 520 can be implemented as steps 522 and 524:

[0221] Step 522: In response to a first steering operation on the steering control unit, control the virtual vehicle's front end to turn to a first direction, the first direction being located on the first side of the velocity direction;

[0222] The first steering operation is used to control the virtual vehicle to turn towards the first side of the speed direction; through the first steering operation on the direction control component, the virtual vehicle is controlled to continue turning until it turns to the first direction.

[0223] Step 524: In response to the braking operation on the handbrake control unit, control the virtual vehicle to enter a drift state.

[0224] For example, the drift state can also be called the tail-slip state. In the drift state, the virtual vehicle slides sideways by oversteering in order to exit the curve. By braking on the handbrake control unit, the virtual vehicle is controlled to exit the straight-running state and enter the drift state, and the virtual vehicle is controlled to drift to the first side.

[0225] In summary, the method provided in this embodiment controls the virtual vehicle to perform steering and enter a drift state by executing the first steering operation and braking operation in sequence, ensuring the flexibility of control over the virtual vehicle and improving the virtual vehicle's driving ability in the virtual environment.

[0226] Figure 16 A flowchart illustrating a virtual vehicle control method provided in an exemplary embodiment of this application is shown. This method can be applied to a terminal that supports a virtual environment. Figure 5 In the illustrated embodiment, step 540 can be implemented as step 546, and further includes step 556:

[0227] Step 546: If the distance between the virtual vehicle and the virtual edge exceeds the target threshold, in response to the braking operation on the handbrake control unit, control the direction of the virtual vehicle that is maintaining the drift state to turn to a third direction.

[0228] A virtual edge is the edge of a virtual road surface in a virtual environment. For example, the edge of a virtual road surface can be the edge lane line on the virtual road surface, the edge of the shoulder located outside the virtual road surface, or at least one edge line in an open road surface where a virtual vehicle cannot continue to drive. This embodiment does not impose any limitations on this.

[0229] Optionally, if a virtual vehicle crosses or touches a virtual edge, the virtual vehicle is in a state that is detrimental to driving; for example, the virtual vehicle is damaged, the driving ability of the virtual vehicle is reduced by at least one of acceleration, steering, or braking, or the virtual economic value, virtual experience value, or virtual task progress is lost.

[0230] If the distance between the virtual vehicle and the virtual edge of the virtual road exceeds a target threshold, in response to a braking operation on the handbrake control unit, the virtual vehicle changes its drift from the first side to the second side. Since the distance between the virtual vehicle and the virtual edge of the virtual road exceeds the target threshold, there is no risk that the virtual vehicle will collide with or cross the virtual edge.

[0231] It should be noted that in step 546 of this embodiment, in response to the braking operation on the handbrake control component, the virtual speed of the virtual vehicle is usually controlled to decrease; however, it is not excluded that in response to the braking operation on the handbrake control component, the virtual speed of the virtual vehicle is controlled to remain unchanged.

[0232] Step 556: If the distance between the virtual vehicle and the virtual edge does not exceed the target threshold, in response to the braking operation on the handbrake control unit, control the virtual speed of the virtual vehicle that is maintaining the drift state to decrease.

[0233] If the distance between the virtual vehicle and the virtual edge of the virtual road does not exceed the target threshold, the virtual vehicle's virtual speed decreases in response to braking operation on the handbrake control unit. Since the distance between the virtual vehicle and the virtual edge of the virtual road does not exceed the target threshold, there is a risk that the virtual vehicle may collide with or cross the virtual edge. Reducing the virtual vehicle's virtual speed through braking delays the time before the virtual vehicle collides with or crosses the virtual edge; allowing for a longer operation time facilitates control of the virtual vehicle's driving state and helps avoid affecting its driving behavior.

[0234] It should be noted that in step 546 of this embodiment, when the virtual speed of the virtual vehicle is controlled to decrease in response to the braking operation on the handbrake control component, the first deceleration rate of the virtual speed of the virtual vehicle is less than the second deceleration rate. When the virtual speed of the virtual vehicle decreases, both the first deceleration rate and the second deceleration rate are greater than 0.

[0235] The first deceleration rate is the rate at which the virtual speed of the virtual vehicle decreases in response to braking operations on the handbrake control unit when the distance between the virtual vehicle and the virtual edge exceeds a target threshold. The second deceleration rate is the rate at which the virtual speed of the virtual vehicle decreases in response to braking operations on the handbrake control unit when the distance between the virtual vehicle and the virtual edge does not exceed the target threshold.

[0236] For example: the first deceleration rate is a decrease in the virtual vehicle's virtual speed of 2 m / s per second; the second deceleration rate is a decrease in the virtual vehicle's virtual speed of 5 m / s per second. It can be understood that, within a unit of time, if the distance between the virtual vehicle and the virtual edge exceeds the target threshold, the deceleration effect of the virtual vehicle is worse than if the distance between the virtual vehicle and the virtual edge does not exceed the target threshold.

[0237] In summary, the method provided in this embodiment determines whether there is a driving risk by measuring the distance between the virtual vehicle and the virtual edge; when there is no driving risk, it controls the virtual vehicle to change its drift from the first side to the second side, reducing the turning radius of the virtual vehicle when passing through continuous curves and improving the virtual vehicle's ability to pass through continuous curves; when there is a driving risk, it controls the virtual vehicle's virtual speed to decrease, prolonging the time when the virtual vehicle experiences a driving risk, ensuring the driving safety of the virtual vehicle, and avoiding damage to the virtual vehicle caused by the driving risk.

[0238] Figure 17 A flowchart illustrating a virtual vehicle control method provided in an exemplary embodiment of this application is shown. This method can be applied to a terminal that supports a virtual environment. Figure 6 Based on the illustrated embodiment, step 558 is also included:

[0239] Step 558: Update the target threshold based on the number of times the reverse drift skill is triggered in the continuous turning virtual road segment;

[0240] For example, a continuously turning virtual road segment is a section of a virtual road in a virtual environment with at least two points where the direction changes. In one example, when driving a virtual vehicle through a continuously turning virtual road segment, it is necessary to control the virtual vehicle to first turn to the first side of the virtual vehicle's speed direction, and then turn to the second side of the speed direction; to avoid the virtual vehicle colliding with the edge of the virtual road surface.

[0241] Furthermore, the number of times the reverse drift skill is triggered in a continuous turning virtual road segment indicates the player's preference for the reverse drift skill while traversing the continuous turning virtual road segment. A high number of reverse drift triggers indicates that the player prefers to trigger the reverse drift skill while traversing the continuous turning virtual road segment. A low number of reverse drift triggers indicates that the player prefers to traverse the continuous turning virtual road segment by turning or entering a drift state multiple times. For example, the reverse drift skill indicates that the virtual vehicle maintaining a drift state changes from drifting to the first side to drifting to the second side.

[0242] Optionally, in one implementation, step 558 can be implemented as the following two sub-steps:

[0243] Sub-step 3: If the number of times the reverse drift skill is triggered in the continuous turning virtual road segment exceeds the number of times the threshold is exceeded, the target threshold is updated to the first angle threshold, and the first angle threshold is less than the target threshold;

[0244] For example, triggering the reverse drift skill more than a threshold indicates that the virtual vehicle is more likely to trigger the reverse drift skill when passing through a continuously turning virtual road segment. By updating the target threshold to a first angle threshold, the time the virtual vehicle maintains a drift state is increased, making it easier for the player to perform braking operations while the virtual vehicle is drifting, controlling the virtual vehicle's front to turn to a third direction to trigger the reverse drift skill.

[0245] Sub-step 4: If the number of times the reverse drift skill is triggered in the continuous turning virtual road segment does not exceed the number threshold, update the target threshold to the second angle threshold, and the second angle threshold is greater than the target threshold;

[0246] For example, if the number of times the reverse drift skill is triggered does not exceed the threshold, the virtual vehicle is instructed to either turn or enter drift state multiple times when passing through a continuously turning virtual road segment. By updating the target threshold to the second angle threshold, the time the virtual vehicle maintains the drift state is shortened, making it easier for the virtual vehicle to exit the drift state as soon as possible, so as to pass through the continuously turning virtual road segment by turning or re-entering the drift state.

[0247] In summary, the method provided in this embodiment determines the virtual vehicle's preference for passing through continuously turning virtual road segments by setting a threshold for the number of times it prefers to trigger the reverse drift skill. When the vehicle prefers to trigger the reverse drift skill to pass through the continuously turning virtual road segment, a strict exit condition for the drift state is set to prolong the time the virtual vehicle is in the drift state, providing a favorable condition for triggering the reverse drift skill. When the vehicle prefers to turn or enter the drift state multiple times to pass through the continuously turning virtual road segment, a lenient exit condition for the drift state is set to shorten the time the virtual vehicle is in the drift state, which is conducive to quickly exiting the drift state to perform a turn or enter the drift state multiple times.

[0248] Figure 18 A flowchart of a virtual vehicle control method according to an embodiment of this application is shown. The virtual vehicle control method includes the following steps:

[0249] Step 702: In response to clicking the right turn control, the virtual vehicle turns to the right;

[0250] For example, in response to clicking the right turn control, the virtual vehicle's front end faces right.

[0251] Step 704: In response to clicking the handbrake control, the virtual vehicle is triggered to enter drift mode and drift to the right;

[0252] In response to clicking the handbrake control, the virtual vehicle's speed decreases rapidly.

[0253] For example, the virtual vehicle enters a drift state because the angle between the virtual vehicle's frontal orientation and its speed direction exceeds a target threshold; the virtual vehicle drifts to the right because its frontal orientation is to the right.

[0254] Step 706: Release the handbrake control;

[0255] For example, releasing the handbrake control means no longer continuously pressing the handbrake control.

[0256] Step 708: The virtual vehicle maintains its drift state and drifts to the right;

[0257] With the handbrake control released, the virtual vehicle continues to drift and drifts to the right;

[0258] The virtual vehicle is unaffected by the handbrake control and no longer rapidly reduces its speed.

[0259] Step 710: The virtual vehicle decelerates until it comes to a stop.

[0260] Without releasing the handbrake control, the virtual vehicle decelerates to a stop.

[0261] The virtual vehicle is continuously affected by the handbrake control, rapidly reducing its speed until the virtual vehicle comes to a stop.

[0262] Step 712: Click the handbrake control again?

[0263] Step 714: The virtual vehicle maintains its drift state and drifts to the right;

[0264] Without clicking the handbrake control again, the virtual vehicle continues to drift to the right; the virtual vehicle is unaffected by the handbrake control and no longer rapidly decreases its speed.

[0265] If the handbrake control is clicked again, step 710 is executed, and the virtual vehicle decelerates to a stop.

[0266] Step 716: Click the left turn control;

[0267] For example, in response to clicking the left turn control, the virtual vehicle's front end faces left;

[0268] Step 718: The virtual vehicle turns left;

[0269] When the left turn control is clicked, the virtual vehicle's front end faces left.

[0270] For example, the virtual vehicle maintains a drift state.

[0271] Step 720: The virtual vehicle maintains its drift state and drifts to the right;

[0272] Without clicking the left turn control, the virtual vehicle remains in a drifting state and drifts to the right; the virtual vehicle is not affected by the left turn control, and the direction in which the virtual vehicle's front is turned to the left is not affected by the left turn control.

[0273] Step 722: Click the handbrake control?

[0274] In response to clicking the handbrake control, the virtual vehicle's speed decreases rapidly.

[0275] Step 724: The virtual vehicle maintains its drift state and drifts to the left;

[0276] When the handbrake control is clicked, the virtual vehicle continues to drift and drifts to the left;

[0277] The virtual vehicle's front end changes from pointing to the right to pointing to the left, and it drifts to the left.

[0278] Step 726: Does the drift angle exceed the target threshold?

[0279] Without clicking the handbrake control, determine whether the drift angle exceeds the target threshold. The drift angle is the angle between the direction the virtual vehicle is facing and the direction of its speed.

[0280] Step 728: The virtual vehicle maintains its drift state and drifts to the right;

[0281] If the drift angle exceeds the target threshold, the virtual vehicle maintains its drift state and drifts to the right.

[0282] Step 730: The virtual vehicle exits drift mode and enters straight-line running mode;

[0283] If the drift angle does not exceed the target threshold, the virtual vehicle exits the drift state and enters the straight-line running state.

[0284] Figure 19 The diagram illustrates an interface schematic of a virtual vehicle control method provided in an exemplary embodiment of this application. The brake control component, energy control component, and throttle control component can be displayed in the style of controls in the display interface 810. The display interface 810 displays a brake control 801, an energy control 802, a throttle control 803, a left turn control 8041, a right turn control 8042, and a handbrake control 805.

[0285] Displays a virtual vehicle 820 in motion within the virtual environment; the virtual vehicle 820 is moving forward, and the direction of its speed is the same as the direction in which its front is facing.

[0286] In response to a click on the right-turn control 8042, the virtual vehicle 820 is controlled to turn its front end to the right; in response to a click on the right-turn control 8042, the front end is positioned to the right in the direction of speed; the click on the right-turn control 8042 is used to control the virtual vehicle 820 to turn to the right in the direction of speed. For example, since the virtual vehicle 820 is in a flat-running state, no virtual tire tracks are displayed on the virtual road.

[0287] In response to a braking operation on the handbrake control 805, the virtual vehicle is controlled to enter a drift state, with the vehicle's front facing the first direction. For example, the drift state can also be called a tail-slip state. In the drift state, the virtual vehicle sideslips with oversteer to facilitate exiting a curve. By braking on the handbrake control 805, the virtual vehicle is controlled to exit the straight-line running state and enter the drift state, drifting to the right.

[0288] In response to a click on the left-turn control 8041, the virtual vehicle, which is maintaining its drift state, is controlled to turn its front towards the second direction; the second angle formed by the second direction and the velocity direction is smaller than the first angle formed by the first direction and the velocity direction; the virtual vehicle maintains its drift state and drifts to the right.

[0289] In response to a braking operation on the handbrake control 805, the direction of the virtual vehicle maintaining a drift state is rotated to a third direction; the third direction is to the left of the velocity direction; for example, the virtual vehicle changes from drifting to drifting to drifting to drifting to the left. Optionally, information about the release of a reverse drift skill is displayed; the reverse drift skill is used to instruct the virtual vehicle to change from drifting to drifting to drifting to the left, or from drifting to drifting to drifting to the right. The information about the release of a reverse drift skill can be at least one of text information, highlight effects, flash effects, aperture effects, and sound effects.

[0290] Furthermore, after displaying the release information of the reverse drift skill, that is, after the virtual vehicle changes from drifting to drifting to drifting to the left, the driving skills are connected through the control operation of the virtual vehicle; for example, by responding to the trigger operation on the energy control 802, the launch out-of-corner skill is triggered, and the driving speed of the virtual vehicle increases.

[0291] By responding to a click on the brake control 801, the virtual vehicle's grip increases; by responding to a trigger on the energy control 802, a bottle of nitro is consumed to provide acceleration for the virtual vehicle 820, and a prompt message indicating that a bottle of nitro has been consumed can be displayed on the display interface 810; the boost nitro exit skill is triggered.

[0292] Those skilled in the art will understand that the above embodiments can be implemented independently, or the above embodiments can be freely combined to create new embodiments to implement the virtual vehicle control method of this application.

[0293] Figure 20 A block diagram of a virtual vehicle control device provided in an exemplary embodiment of this application is shown. The device includes:

[0294] Display module 910 is used to display the virtual vehicle in a driving state in the virtual environment;

[0295] The control module 920 is used to control the virtual vehicle to enter a drift state in response to a first steering operation on the direction control component and a braking operation on the handbrake control component. The first steering operation is used to control the virtual vehicle to turn towards a first side of the speed direction. The front of the virtual vehicle is facing the first direction, and the first direction is located on the first side of the speed direction.

[0296] The control module 920 is further configured to respond to a second steering operation on the direction control component to control the front of the virtual vehicle maintaining the drift state to rotate to a second direction. The second steering operation is configured to control the virtual vehicle to turn to a second side of the speed direction. The second direction is located on the first side of the speed direction, and the second angle formed by the second direction and the speed direction is smaller than the first angle formed by the first direction and the speed direction.

[0297] The control module 920 is also configured to, in response to the braking operation on the handbrake control component, control the front of the virtual vehicle maintaining the drift state to rotate to a third direction, the third direction being located on the second side of the speed direction.

[0298] In an optional design of this application, the control module 920 is further configured to: in response to the braking operation on the handbrake control component, control the head direction of the virtual vehicle maintaining the drift state to rotate to the third direction when the angle between the heading of the virtual vehicle and the speed direction of the virtual vehicle exceeds a target threshold.

[0299] In an optional design of this application, the control module 920 is further configured to: in response to the braking operation on the handbrake control component, control the head direction of the virtual vehicle maintaining the drift state to rotate to the third direction when the angle between the heading of the virtual vehicle and the speed direction of the virtual vehicle exceeds a target threshold, and display information on the release of the reverse drift skill.

[0300] In an optional design of this application, the control module 920 is further configured to:

[0301] If the angle between the direction the virtual vehicle is facing and the direction of its speed does not exceed the target threshold, control the virtual vehicle to exit the drift state and enter the straight-line running state.

[0302] In an optional design of this application, the device further includes:

[0303] The determination module 930 is used to determine the speed direction of the virtual vehicle based on the grip of the virtual vehicle, the orientation of the virtual vehicle's front end, and the historical speed direction of the virtual vehicle.

[0304] In an alternative design of this application, the second steering operation is a continuous pressing operation on the direction control component; the control module 920 is further configured to: in response to the continuous pressing operation on the direction control component and the braking operation on the handbrake control component, control the front of the virtual vehicle maintaining the drift state to rotate to the third direction.

[0305] In an optional design of this application, the control module 920 is further configured to:

[0306] In response to the first steering operation on the direction control component, the front of the virtual vehicle is controlled to rotate to the first direction, which is located on the first side of the velocity direction;

[0307] In response to a braking operation on the handbrake control unit, the virtual vehicle is controlled to enter the drift state.

[0308] In an optional design of this application, the control module 920 is further configured to:

[0309] In response to the braking operation on the handbrake control unit, the virtual speed of the virtual vehicle is controlled to decrease.

[0310] In an optional design of this application, the control module 920 is further configured to:

[0311] If the angle between the virtual vehicle's heading and its speed direction exceeds a target threshold, the virtual vehicle is controlled to maintain the drift state.

[0312] If the angle between the direction the virtual vehicle is facing and the direction of its speed does not exceed the target threshold, control the virtual vehicle to exit the drift state and enter the straight-line running state.

[0313] In an optional design of this application, the control module 920 is further configured to:

[0314] If the distance between the virtual vehicle and the virtual edge exceeds a target threshold, in response to the braking operation on the handbrake control component, the front of the virtual vehicle maintaining the drift state is controlled to rotate to the third direction, where the virtual edge is the edge of the virtual road surface in the virtual environment;

[0315] If the distance between the virtual vehicle and the virtual edge does not exceed the target threshold, the virtual speed of the virtual vehicle maintaining the drift state is controlled to decrease in response to the braking operation on the handbrake control component.

[0316] In an optional design of this application, the device further includes an update module 940 for updating the target threshold based on the number of times the reverse drift skill is triggered in a continuous turning virtual road segment.

[0317] In an optional design of this application, the update module 940 is further configured to:

[0318] If the number of times the reverse drift skill is triggered in the continuous turning virtual road segment exceeds the number threshold, the target threshold is updated to a first angle threshold, where the first angle threshold is less than the target threshold.

[0319] If the number of times the reverse drift skill is triggered in the continuous turning virtual road segment does not exceed the number threshold, the target threshold is updated to the second angle threshold, which is greater than the target threshold.

[0320] It should be noted that the device provided in the above embodiments is only illustrated by the division of the above functional modules when implementing its functions. In actual applications, the above functions can be assigned to different functional modules according to actual needs, that is, the content structure of the device can be divided into different functional modules to complete all or part of the functions described above.

[0321] Regarding the apparatus in the above embodiments, the specific manner in which each module performs its operation has been described in detail in the embodiments of the relevant method; the technical effects achieved by each module performing its operation are the same as the technical effects in the embodiments of the relevant method, and will not be elaborated here.

[0322] This application also provides a computer device, which includes a processor and a memory, wherein the memory stores a computer program; the processor is used to execute the computer program in the memory to implement the virtual vehicle control method provided in the above method embodiments.

[0323] Figure 21 A structural block diagram of a terminal 1900 provided in an exemplary embodiment of this application is shown. The terminal 1900 may be a smartphone, tablet computer, MP3 player (Moving Picture Experts Group Audio Layer III), MP4 player (Moving Picture Experts Group Audio Layer IV), laptop computer, or desktop computer. The terminal 1900 may also be referred to as a user device, portable terminal, laptop terminal, desktop terminal, or other names.

[0324] Typically, terminal 1900 includes a processor 1901 and a memory 1902. Processor 1901 may include one or more processing cores, such as a quad-core processor or an octa-core processor. Processor 1901 may be implemented using at least one hardware form selected from DSP (Digital Signal Processing), FPGA (Field-Programmable Gate Array), and PLA (Programmable Logic Array). Processor 1901 may also include a main processor and a coprocessor. The main processor, also known as a CPU (Central Processing Unit), is used to process data in the wake-up state; the coprocessor is a low-power processor used to process data in the standby state. In some embodiments, processor 1901 may integrate a GPU (Graphics Processing Unit), which is responsible for rendering and drawing the content to be displayed on the screen. In some embodiments, processor 1901 may also include an AI (Artificial Intelligence) processor, which handles computational operations related to machine learning.

[0325] The memory 1902 may include one or more computer-readable storage media, which may be non-transitory. The memory 1902 may also include high-speed random access memory and non-volatile memory, such as one or more disk storage devices or flash memory devices. In some embodiments, the non-transitory computer-readable storage media in the memory 1902 is used to store at least one instruction, which is executed by the processor 1901 to implement the virtual vehicle control method provided in the method embodiments of this application.

[0326] In some embodiments, the terminal 1900 may also optionally include a peripheral device interface 1903 and at least one peripheral device. The processor 1901, memory 1902, and peripheral device interface 1903 can be connected via a bus or signal line. Each peripheral device can be connected to the peripheral device interface 1903 via a bus, signal line, or circuit board. Specifically, the peripheral device includes at least one of the following: a radio frequency circuit 1904, a touch display screen 1905, a camera assembly 1906, an audio circuit 1907, and a power supply 1908.

[0327] Peripheral interface 1903 can be used to connect at least one I / O (Input / Output) related peripheral device to processor 1901 and memory 1902. In some embodiments, processor 1901, memory 1902 and peripheral interface 1903 are integrated on the same chip or circuit board; in some other embodiments, any one or two of processor 1901, memory 1902 and peripheral interface 1903 can be implemented on separate chips or circuit boards, which is not limited in this embodiment.

[0328] The radio frequency (RF) circuit 1904 is used to receive and transmit RF (Radio Frequency) signals, also known as electromagnetic signals. The RF circuit 1904 communicates with communication networks and other communication devices via electromagnetic signals. The RF circuit 1904 converts electrical signals into electromagnetic signals for transmission, or converts received electromagnetic signals back into electrical signals. Optionally, the RF circuit 1904 includes: an antenna system, an RF transceiver, one or more amplifiers, a tuner, an oscillator, a digital signal processor, a codec chipset, a user identity module card, etc. The RF circuit 1904 can communicate with other terminals through at least one wireless communication protocol. This wireless communication protocol includes, but is not limited to: the World Wide Web, metropolitan area networks, intranets, various generations of mobile communication networks (2G, 3G, 4G, and 5G), wireless local area networks, and / or WiFi (Wireless Fidelity) networks. In some embodiments, the RF circuit 1904 may also include circuitry related to NFC (Near Field Communication), which is not limited in this application.

[0329] The touch display screen 1905 is used to display a UI (User Interface). This UI may include graphics, text, icons, videos, and any combination thereof. The touch display screen 1905 also has the energy to collect touch signals on or above its surface. These touch signals can be input as control signals to the processor 1901 for processing. In this case, the touch display screen 1905 can also be used to provide virtual buttons and / or a virtual keyboard, also known as soft buttons and / or a soft keyboard. In some embodiments, there may be one touch display screen 1905, which is used as the front panel of the terminal 1900; in other embodiments, there may be at least two touch display screens, respectively disposed on different surfaces of the terminal 1900 or in a folded design; in still other embodiments, the touch display screen 1905 may be a flexible display screen, disposed on a curved surface or a folded surface of the terminal 1900. Furthermore, the touch display screen 1905 may also be configured as a non-rectangular, irregular shape, i.e., a non-rectangular screen. The touch display 1905 can be made of materials such as LCD (Liquid Crystal Display) and OLED (Organic Light-Emitting Diode).

[0330] The camera assembly 1906 is used to acquire images or videos. Optionally, the camera assembly 1906 includes a front-facing camera and a rear-facing camera. Typically, the front-facing camera is located on the front panel of the terminal, and the rear-facing camera is located on the back of the terminal. In some embodiments, there are at least two rear-facing cameras, which are any one of a main camera, a depth-sensing camera, a wide-angle camera, and a telephoto camera, to achieve background blurring by fusion of the main camera and the depth-sensing camera, panoramic shooting for VR (Virtual Reality) shooting, or other fusion shooting functions by fusion of the main camera and the wide-angle camera. In some embodiments, the camera assembly 1906 may also include a flash. The flash can be a single-color temperature flash or a dual-color temperature flash. A dual-color temperature flash refers to a combination of a warm-light flash and a cool-light flash, which can be used for light compensation at different color temperatures.

[0331] The audio circuit 1907 may include a microphone and a speaker. The microphone is used to collect sound waves from the user and the environment, converting them into electrical signals that are input to the processor 1901 for processing, or to the radio frequency circuit 1904 for voice communication. For stereo sound acquisition or noise reduction purposes, multiple microphones may be used, each positioned at a different location on the terminal 1900. The microphone may also be an array microphone or an omnidirectional microphone. The speaker is used to convert electrical signals from the processor 1901 or the radio frequency circuit 1904 into sound waves. The speaker may be a conventional diaphragm speaker or a piezoelectric ceramic speaker. When the speaker is a piezoelectric ceramic speaker, it can convert electrical signals not only into audible sound waves but also into inaudible sound waves for purposes such as distance measurement. In some embodiments, the audio circuit 1907 may also include a headphone jack.

[0332] Power supply 1908 is used to power the various components in terminal 1900. Power supply 1908 can be AC ​​power, DC power, a disposable battery, or a rechargeable battery. When power supply 1908 includes a rechargeable battery, the rechargeable battery can be a wired rechargeable battery or a wireless rechargeable battery. A wired rechargeable battery is a battery that is charged via a wired line, and a wireless rechargeable battery is a battery that is charged via a wireless coil. The rechargeable battery can also be used to support fast charging technology.

[0333] In some embodiments, the terminal 1900 further includes one or more sensors 1909. The one or more sensors 1909 include, but are not limited to: an accelerometer 1910, a gyroscope 1911, a pressure sensor 1912, an optical sensor 1913, and a proximity sensor 1914.

[0334] Accelerometer 1910 can detect the magnitude of acceleration on the three coordinate axes of a coordinate system established by terminal 1900. For example, accelerometer 1910 can be used to detect the components of gravitational acceleration on the three coordinate axes. Processor 1901 can control touchscreen 1905 to display the user interface in landscape or portrait view based on the gravitational acceleration signal collected by accelerometer 1910. Accelerometer 1910 can also be used for game or user motion data acquisition. Gyroscope 1911 can detect the orientation and rotation angle of terminal 1900. Gyroscope 1911 can work in conjunction with accelerometer 1910 to acquire 3D user actions on terminal 1900. Based on the data collected by gyroscope 1911, processor 1901 can perform the following functions: motion sensing (e.g., changing the UI based on user tilt), image stabilization during shooting, game control, and inertial navigation.

[0335] The pressure sensor 1912 can be disposed on the side bezel of the terminal 1900 and / or on the lower layer of the touch display screen 1905. When the pressure sensor 1912 is disposed on the side bezel of the terminal 1900, it can detect the user's grip signal on the terminal 1900, and the processor 1901 can perform left / right hand recognition or quick operation based on the grip signal collected by the pressure sensor 1912. When the pressure sensor 1912 is disposed on the lower layer of the touch display screen 1905, the processor 1901 can control the operable controls on the UI interface based on the user's pressure operation on the touch display screen 1905. The operable controls include at least one of button controls, scroll bar controls, icon controls, and menu controls.

[0336] An optical sensor 1913 is used to collect ambient light intensity. In one embodiment, the processor 1901 can control the display brightness of the touch screen 1905 based on the ambient light intensity collected by the optical sensor 1913. Specifically, when the ambient light intensity is high, the display brightness of the touch screen 1905 is increased; when the ambient light intensity is low, the display brightness of the touch screen 1905 is decreased. In another embodiment, the processor 1901 can also dynamically adjust the shooting parameters of the camera assembly 1906 based on the ambient light intensity collected by the optical sensor 1913.

[0337] The proximity sensor 1914, also known as a distance sensor, is typically located on the front panel of the terminal 1900. The proximity sensor 1914 is used to detect the distance between the user and the front of the terminal 1900. In one embodiment, when the proximity sensor 1914 detects that the distance between the user and the front of the terminal 1900 is gradually decreasing, the processor 1901 controls the touchscreen display 1905 to switch from a screen-on state to a screen-off state; when the proximity sensor 1914 detects that the distance between the user and the front of the terminal 1900 is gradually increasing, the processor 1901 controls the touchscreen display 1905 to switch from a screen-off state to a screen-on state.

[0338] Those skilled in the art will understand that the above structure does not constitute a limitation on the terminal 1900, and may include more or fewer components than shown, or combine certain components, or adopt different component arrangements.

[0339] In an exemplary embodiment, a chip is also provided, the chip including programmable logic circuitry and / or program instructions, which, when the chip is run on a computer device, are used to implement the virtual vehicle control method described above.

[0340] In an exemplary embodiment, a computer program product is also provided, comprising computer instructions stored in a computer-readable storage medium. A processor of a computer device reads the computer instructions from the computer-readable storage medium and executes the computer instructions to implement the virtual vehicle control method provided in the above-described method embodiments.

[0341] In an exemplary embodiment, a computer-readable storage medium is also provided, which stores a computer program that is loaded and executed by a processor to implement the virtual vehicle control method provided in the above-described method embodiments.

[0342] Those skilled in the art will understand that all or part of the steps of the above embodiments can be implemented by hardware, or by a program instructing related hardware. The program can be stored in a computer-readable storage medium, such as a read-only memory, a disk, or an optical disk. Those skilled in the art should recognize that the functions described in the embodiments of this application in one or more of the above examples can be implemented by hardware, software, firmware, or any combination thereof. When implemented in software, these functions can be stored in a computer-readable medium or transmitted as one or more instructions or code on a computer-readable medium. Computer-readable media include computer storage media and communication media, wherein communication media include any medium that facilitates the transmission of computer programs from one place to another. Storage media can be any available medium accessible to general-purpose or special-purpose computers.

[0343] The above description is merely an optional embodiment of this application and is not intended to limit this application. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of this application should be included within the protection scope of this application.

Claims

1. A method for controlling a virtual vehicle, characterized in that, The method includes: Display the virtual vehicle in motion within the virtual environment; In response to a first steering operation on the steering control unit and a braking operation on the handbrake control unit, the virtual vehicle is controlled to enter a drift state. The first steering operation is used to control the virtual vehicle to turn towards a first side of the speed direction. The front of the virtual vehicle is facing the first direction, and the first direction is located on the first side of the speed direction. In response to a second steering operation on the direction control component, the front of the virtual vehicle maintaining the drift state is controlled to rotate to a second direction. The second steering operation is used to control the virtual vehicle to turn to a second side of the velocity direction. The second direction is located on the first side of the velocity direction, and the second angle formed by the second direction and the velocity direction is smaller than the first angle formed by the first direction and the velocity direction. In response to the braking operation on the handbrake control unit, the front of the virtual vehicle maintaining the drift state is controlled to rotate to a third direction, the third direction being located on the second side of the speed direction.

2. The method according to claim 1, characterized in that, The control of the virtual vehicle maintaining the drift state to rotate its front end to a third direction in response to the braking operation on the handbrake control component includes: If the angle between the virtual vehicle's heading and its speed direction exceeds a target threshold, in response to the braking operation on the handbrake control unit, the heading of the virtual vehicle maintaining the drift state is controlled to rotate to the third direction.

3. The method according to claim 2, characterized in that, When the angle between the virtual vehicle's heading and its velocity direction exceeds a target threshold, in response to the braking operation on the handbrake control component, controlling the heading of the virtual vehicle maintaining the drift state to rotate to the third direction includes: If the angle between the virtual vehicle's heading and its speed direction exceeds a target threshold, in response to the braking operation on the handbrake control unit, the heading of the virtual vehicle maintaining the drift state is controlled to rotate to the third direction, and information on the release of the reverse drift skill is displayed.

4. The method according to claim 2, characterized in that, The method further includes: If the angle between the direction the virtual vehicle is facing and the direction of its speed does not exceed the target threshold, control the virtual vehicle to exit the drift state and enter the straight-line running state.

5. The method according to any one of claims 2 to 4, characterized in that, The method further includes: The speed direction of the virtual vehicle is determined based on its grip, its frontal orientation, and its historical speed direction.

6. The method according to claim 1, characterized in that, The second steering operation is a continuous pressing operation on the direction control component; The control of the virtual vehicle maintaining the drift state to rotate its front end to a third direction in response to the braking operation on the handbrake control component includes: In response to the continuous pressing operation on the direction control component and the braking operation on the handbrake control component, the front of the virtual vehicle maintaining the drift state is controlled to rotate to the third direction.

7. The method according to any one of claims 1 to 4, characterized in that, The control of the virtual vehicle into a drift state in response to a first steering operation on the steering control unit and a braking operation on the handbrake control unit includes: In response to the first steering operation on the direction control component, the front of the virtual vehicle is controlled to rotate to the first direction, which is located on the first side of the velocity direction; In response to a braking operation on the handbrake control unit, the virtual vehicle is controlled to enter the drift state.

8. The method according to any one of claims 1 to 4, characterized in that, The method further includes: In response to the braking operation on the handbrake control unit, the virtual speed of the virtual vehicle is controlled to decrease.

9. The method according to claim 8, characterized in that, The method further includes: If the angle between the virtual vehicle's heading and its speed direction exceeds a target threshold, the virtual vehicle is controlled to maintain the drift state. If the angle between the direction the virtual vehicle is facing and the direction of its speed does not exceed the target threshold, control the virtual vehicle to exit the drift state and enter the straight-line running state.

10. The method according to claim 1, characterized in that, The response to the braking operation on the handbrake control component, displaying the frontal orientation of the virtual vehicle maintaining the drift state turning to a third direction, includes: If the distance between the virtual vehicle and the virtual edge exceeds a target threshold, in response to the braking operation on the handbrake control component, the front of the virtual vehicle maintaining the drift state is controlled to rotate to the third direction, where the virtual edge is the edge of the virtual road surface in the virtual environment; The method further includes: If the distance between the virtual vehicle and the virtual edge does not exceed the target threshold, the virtual speed of the virtual vehicle maintaining the drift state is controlled to decrease in response to the braking operation on the handbrake control component.

11. The method according to any one of claims 2 to 4, characterized in that, The method further includes: The target threshold is updated based on the number of times the reverse drift skill is triggered in a continuous turning virtual road segment.

12. The method according to claim 11, characterized in that, The step of updating the target threshold based on the number of times the reverse drift skill is triggered in a continuous turning virtual road segment includes: If the number of times the reverse drift skill is triggered in the continuous turning virtual road segment exceeds the number threshold, the target threshold is updated to a first angle threshold, where the first angle threshold is less than the target threshold. If the number of times the reverse drift skill is triggered in the continuous turning virtual road segment does not exceed the number threshold, the target threshold is updated to the second angle threshold, which is greater than the target threshold.

13. A control device for a virtual vehicle, characterized in that, The device includes: The display module is used to display the virtual vehicle in a driving state located in the virtual environment; The control module is used to control the virtual vehicle to enter a drift state in response to a first steering operation on the direction control component and a braking operation on the handbrake control component. The first steering operation is used to control the virtual vehicle to turn towards a first side of the speed direction. The front of the virtual vehicle is facing the first direction, and the first direction is located on the first side of the speed direction. The control module is further configured to respond to a second steering operation on the direction control component to control the front of the virtual vehicle maintaining the drift state to rotate to a second direction. The second steering operation is configured to control the virtual vehicle to turn to a second side of the speed direction. The second direction is located on the first side of the speed direction, and the second angle formed by the second direction and the speed direction is smaller than the first angle formed by the first direction and the speed direction. The control module is also configured to, in response to the braking operation on the handbrake control component, control the front of the virtual vehicle maintaining the drift state to rotate to a third direction, the third direction being located on the second side of the speed direction.

14. A computer device, characterized in that, The computer device includes: a processor and a memory, wherein the memory stores at least one program; the processor is configured to execute the at least one program in the memory to implement the virtual vehicle control method as described in any one of claims 1 to 12.

15. A computer-readable storage medium, characterized in that, The readable storage medium stores executable instructions, which are loaded and executed by a processor to implement the virtual vehicle control method as described in any one of claims 1 to 12.

16. A computer program product, characterized in that, The computer program product includes computer instructions stored in a computer-readable storage medium, and a processor reads and executes the computer instructions from the computer-readable storage medium to implement the virtual vehicle control method as described in any one of claims 1 to 12.