Virtual vehicle control method, device, equipment, and computer program
By controlling a virtual vehicle to enter and maintain a drift state through steering and brake operations, the method addresses the issue of collision-prone navigation in continuous curves, enhancing maneuverability and curve negotiation.
Patent Information
- Application Number
- JP2024532536
- Authority / Receiving Office
- JP · JP
- Patent Type
- Patents
- Current Assignee / Owner
- Priority Date
- 2022-05-20
- Filing Date
- 2023-04-17
- Publication Date
- 2025-11-05
- Estimated Expiration
- 2043-04-17
AI Technical Summary
Virtual vehicles in continuous curves of a virtual environment are prone to collisions due to inadequate steering capabilities, leading to reduced performance in navigating successive curves.
A method and device for controlling a virtual vehicle to enter a drift state through a combination of steering and brake operations, allowing the vehicle to change its head direction and maintain a drift state, reducing the steering radius and improving curve negotiation.
The method enhances the virtual vehicle's ability to navigate successive curves by reducing the steering radius and maintaining a drift state, thereby improving its maneuverability and collision avoidance.
Smart Images

Figure 0007764608000001 
Figure 0007764608000002 
Figure 0007764608000003
Abstract
Description
[Technical Field]
[0001] The present application relates to the technical field of virtual worlds, and in particular to a method, device, apparatus, and storage medium for controlling a virtual vehicle.
[0002] This application claims priority to a Chinese patent application filed on May 20, 2022, bearing application number 202210555869.7 and entitled "Virtual vehicle control method, device, equipment, and storage medium," the entire contents of which are incorporated herein by reference. [Background technology]
[0003] In an application program that includes a virtual environment, it is usually necessary to control virtual objects so that they perform virtual activities in the virtual environment. For example, in the case of a virtual vehicle, it is necessary to control the virtual vehicle so that it performs virtual driving in the virtual environment.
[0004] In the related art, a virtual road in a virtual environment has a curve, and the virtual vehicle is controlled to enter a drift state, thereby reducing the steering radius with which the virtual vehicle passes through the curve, thereby facilitating quick driving and passing through the curve on the virtual road.
[0005] When continuous curves exist on the virtual road, the virtual vehicle is prone to colliding with virtual roadside implements, which results in the virtual vehicle slowing down and the virtual vehicle's ability to negotiate the continuous curves needs to be improved. Summary of the Invention [Means for solving the problem]
[0006] The present application provides a virtual vehicle control method, device, equipment, and storage medium, and the technical solutions are as follows:
[0007] According to one aspect of the present application, there is provided a method for controlling a virtual vehicle, the method being executed by a terminal, the method comprising: displaying the virtual vehicle located in a virtual environment and in motion; a step of controlling the virtual vehicle to enter a drift state in response to a first steering operation in a direction control and a brake operation in a handbrake control, the first steering operation being used to control the virtual vehicle to steer to a first side in a speed direction, the head of the virtual vehicle facing in a first direction, and the first direction being located on the first side of the speed direction; a step of controlling the direction of the head of the virtual vehicle maintaining the drift state to turn in a second direction in response to a second steering operation in the direction control, the second steering operation being used to control the virtual vehicle to steer to a second side of the speed direction, the second direction being located on the first side of the speed direction, and a second included angle formed between the second direction and the speed direction being smaller than a first included angle formed between the first direction and the speed direction; and a step of controlling the direction of the head of the virtual vehicle that maintains the drift state to turn in a third direction in response to the brake operation in the handbrake control, the third direction being located on the second side of the speed direction.
[0008] According to another aspect of the present application, there is provided a control device for a virtual vehicle, the device comprising: a display module located in a virtual environment and adapted to display the virtual vehicle in motion; a control module used to control the virtual vehicle to enter a drift state in response to a first steering operation in a direction control and a brake operation in a handbrake control, the first steering operation being used to control the virtual vehicle to steer to a first side in a speed direction, the head of the virtual vehicle facing in a first direction, and the first direction being located on the first side of the speed direction; the control module is further adapted to control, in response to a second steering operation in the direction control, the direction of the head of the virtual vehicle maintaining the drift state to turn in a second direction, the second steering operation being adapted to control the virtual vehicle to steer to a second side of the speed direction, the second direction being located on the first side of the speed direction, and a second included angle formed between the second direction and the speed direction being smaller than a first included angle formed between the first direction and the speed direction; The control module is further used to control, in response to the brake operation in the handbrake control, the direction of the head of the virtual vehicle maintaining the drift state to turn in a third direction, the third direction being located on the second side of the speed direction.
[0009] According to another aspect of the present application, there is provided a computer device including a processor and a memory, wherein at least one instruction, at least one program, code set, or instruction set is stored in the memory, and the at least one instruction, the at least one program, the code set, or the instruction set is uploaded and executed by the processor to realize the virtual vehicle control method described in the aspect.
[0010] According to another aspect of the present application, there is provided a computer-readable storage medium having at least one instruction, at least one program, code set, or instruction set stored therein, the at least one instruction, the at least one program, the code set, or the instruction set being uploaded and executed by a processor to realize the virtual vehicle control method described in the aspect.
[0011] According to another aspect of the present application, there is provided a computer program product, the computer program product including computer instructions stored in a computer-readable storage medium, and a processor reading and executing the computer instructions from the computer-readable storage medium to realize the virtual vehicle control method described in the aspect.
[0012] The beneficial effects of the technical solutions provided by this application include at least the following:
[0013] By executing a second steering operation when the virtual vehicle is in a drift state, the direction of the head of the virtual vehicle is changed, and the drift state of the virtual vehicle is maintained by a braking operation. When the drift state is not interrupted, the direction of the head of the virtual vehicle is steered from the first side in the speed direction to the second side in the speed direction, thereby realizing the virtual vehicle to perform reverse drift, reducing the steering radius when the virtual vehicle passes through successive curves, and improving the ability of the virtual vehicle to pass through successive curves. [Brief explanation of the drawings]
[0014] [Figure 1] 1 is a structural schematic diagram of a terminal provided by an exemplary embodiment of the present application; [Figure 2] 1 is a structural block diagram of a computer system provided by one exemplary embodiment of the present application. [Figure 3] 1 is a schematic diagram of an interface for a virtual vehicle control method provided by one exemplary embodiment of the present application; [Figure 4] 1 is a schematic diagram of an interface for a virtual vehicle control method provided by one exemplary embodiment of the present application; [Figure 5] 1 is a flowchart of a method for controlling a virtual vehicle provided by one exemplary embodiment of the present application. [Figure 6] 1 is a flowchart of a method for controlling a virtual vehicle provided by one exemplary embodiment of the present application. [Figure 7] 1 is a schematic diagram of an interface for a virtual vehicle control method provided by one exemplary embodiment of the present application; [Figure 8] 1 is a flowchart of a method for controlling a virtual vehicle provided by one exemplary embodiment of the present application. [Figure 9] 1 is a schematic diagram of an interface for a virtual vehicle control method provided by one exemplary embodiment of the present application; [Figure 10] 1 is a schematic diagram of an interface for a virtual vehicle control method provided by one exemplary embodiment of the present application; [Figure 11] 1 is a flowchart of a method for controlling a virtual vehicle provided by one exemplary embodiment of the present application. [Figure 12] FIG. 1 is a schematic diagram of calculating the drift angle provided by one exemplary embodiment of the present application. [Figure 13] 1 is a flowchart of a method for controlling a virtual vehicle provided by one exemplary embodiment of the present application. [Figure 14] 1 is a flowchart of a method for controlling a virtual vehicle provided by one exemplary embodiment of the present application. [Figure 15] 1 is a flowchart of a method for controlling a virtual vehicle provided by one exemplary embodiment of the present application. [Figure 16] 1 is a flowchart of a method for controlling a virtual vehicle provided by one exemplary embodiment of the present application. [Figure 17] 1 is a flowchart of a method for controlling a virtual vehicle provided by one exemplary embodiment of the present application. [Figure 18] 1 is a flowchart of a method for controlling a virtual vehicle provided by one exemplary embodiment of the present application. [Figure 19] 1 is a schematic diagram of an interface for a virtual vehicle control method provided by one exemplary embodiment of the present application; [Figure 20] 1 is a structural block diagram of a control device of a virtual vehicle provided by one exemplary embodiment of the present application; [Figure 21] FIG. 2 is a structural block diagram of a terminal provided by one exemplary embodiment of the present application; DETAILED DESCRIPTION OF THE INVENTION
[0015] The method provided herein may be applied to an application program having a virtual environment and a virtual character. Exemplarily, an application program supporting a virtual environment is an application program in which a user can control the movement of a virtual character within the virtual environment. Exemplarily, the method provided herein may be applied to any one of a virtual reality (VR) application program, an augmented reality (AR) program, a 3D map program, a virtual reality game, an augmented reality game, a first-person shooter game (FPS), a third-person shooter game (TPS), a multiplayer online battle arena game (MOBA), and a simulation game (SLG).
[0016] For example, a game in a virtual environment may consist of one or more game world maps. The virtual environment in the game simulates a scene from the real world, and users can control virtual characters in the game to walk, run, jump, shoot, fight, drive, and perform other movements in the virtual environment, resulting in a relatively high level of interactivity. Additionally, multiple users may team up online to play competitive games.
[0017] In some embodiments, the application program may be a program for a shooting game, a racing game, a role-playing game, an adventure game, a sandbox game, a tactical game, or the like. The client may support at least one of the following operating systems: Windows, Apple, Android, iOS, and Linux. Clients of different operating systems may also be interconnected and communicate with each other. In some embodiments, the client is a program installed on a mobile terminal having a touchscreen. For example, a virtual vehicle control method provided by an embodiment of the present application may be applied to an application program supporting a racing game, allowing a player to control the virtual vehicle to participate in a virtual racing match. Furthermore, a virtual vehicle control method provided by an embodiment of the present application may be applied to an application program supporting a role-playing game, allowing a player to control the movement of the virtual vehicle in a virtual scene to satisfy the player's needs for sightseeing. In some embodiments, the client is an application program developed based on a 3D engine, for example, the Unity engine.
[0018] The terminal in this application may be a desktop computer, a laptop portable computer, a mobile phone, a tablet PC, an e-book reader, an MP3 (Moving Picture Experts Group Audio Layer III, a standard audio level 3 compression for moving picture experts) player, an MP4 (Moving Picture Experts Group Audio Layer IV, a standard audio level 4 compression for moving picture experts) player, etc. A client supporting a virtual environment, for example, an application program client supporting a 3D virtual environment, is installed and runs on the terminal. The application program may be any one of a battle royale (BR) game, a virtual reality application program, an augmented reality program, a 3D map program, a third-person shooter game, a first-person shooter game, and a multiplayer online battle arena game. Optionally, the application program may be a standalone application program, for example, a standalone 3D game program, or a network online application program.
[0019] FIG. 1 is a structural schematic diagram of a terminal provided by one exemplary embodiment of the present application, which includes a processor 101, a touch screen 102, and a memory 103.
[0020] The processor 101 may be at least one of a single-core processor, a multi-core processor, an embedded chip, and a processor having instruction operating energy. The touchscreen 102 includes a general touchscreen or a pressure-sensitive touchscreen. The general touchscreen can measure a pressing or sliding operation applied to the touchscreen 102, and the pressure-sensitive touchscreen can measure a pressing force applied to the touchscreen 102.
[0021] The memory 103 stores executable programs for the processor 101. Schematically, the memory 103 stores a virtual environment program A, an application program B, an application program C, a touch pressure sensing module 18, and an operating system kernel layer 19. Here, the virtual environment program A is an application program developed based on the 3D virtual environment module 17. Optionally, the virtual environment program A includes, but is not limited to, at least one of a game program, a virtual reality program, a 3D map program, and a 3D presentation program developed by the 3D virtual environment module (also referred to as the virtual environment module) 17. For example, when the operating system of the terminal is the Android operating system, the virtual environment program A is developed using the Java programming language and the C# language. For example, when the operating system of the terminal is the IOS operating system, the virtual environment program A is developed using the Object-C programming language and the C# language.
[0022] The 3D virtual environment module 17 is a module that supports multiple operating system platforms, and can be used for program development in various fields, such as game development, virtual reality (VR), and 3D maps. The embodiments of the present application do not limit the specific type of the 3D virtual environment module 17, and the following embodiments will be described by taking as an example a 3D virtual environment module 17 developed using the Unity engine.
[0023] The touch (and pressure) sensing module 18 is used to receive touch events (and pressure touch control events) reported by the touch screen driving program 191. Optionally, the touch sensing module does not have a pressure sensing function and does not receive pressure touch control events. A touch event includes a touch event type and a coordinate value. The touch event type includes, but is not limited to, a touch start event, a touch move event, and a touch drop event. A pressure touch control event includes a pressure value and a coordinate value of the pressure touch control event. The coordinate value is used to indicate the touch control position on the display screen for pressure touch control operation. Optionally, an abscissa axis is established in the horizontal direction of the display screen, and an ordinate axis is established in the vertical direction of the display screen to obtain a two-dimensional coordinate system.
[0024] Schematically, the kernel layer 19 includes a touchscreen driving program 191 and other driving programs 192. The touchscreen driving program 191 is a module used to detect a pressure touch control event, and after detecting the pressure touch control event, the touchscreen driving program 191 transmits the pressure touch control event to the pressure sensing module 18.
[0025] The other driver programs 192 may be a driver program associated with the processor 101, a driver program associated with the memory 103, a driver program associated with a network component, and a driver program associated with a sound component, etc. Those skilled in the art will recognize that the above is only a rough schematic diagram of the structure of the terminal. In different embodiments, the terminal may have more or fewer components. For example, the terminal may further include a gravity acceleration sensor, a gyro sensor, a power supply, etc.
[0026] FIG. 2 shows a structural block diagram of a computer system provided by one exemplary embodiment of the present application, where the computer system 200 includes a terminal 210 and a server cluster 220 .
[0027] A client 211 supporting a virtual environment is installed and operates on the terminal 210. The client 211 may be an application program supporting the virtual environment. When the client 211 operates on the terminal, the user interface of the client 211 is displayed on the screen of the terminal 210. The client may be any one of an FPS game, a TPS game, an MOBA game, a competitive game, and an SLG game. In this embodiment, the client is described as a racing game. The terminal 210 is used by a first user 212. The first user 212 uses the terminal 210 to control a first virtual character located in the virtual environment and perform an activity. The first virtual character can be referred to as the first virtual character of the first user 212. The activity of the first virtual character includes, but is not limited to, at least one of body posture adjustment, crawling, walking, running, cycling, flying, jumping, driving, picking up, shooting, attacking, and throwing. Schematically, the first virtual character is a first virtual character, such as a simulated human character or an animated human character.
[0028] The device type of the terminal 210 may include at least one of a smartphone, a tablet PC, an e-reader, an MP3 player, an MP4 player, a laptop portable computer, and a desktop computer. Although only one terminal is shown in FIG. 2 , in different embodiments, multiple other terminals 240 are present. In some embodiments, at least one other terminal 240 is also present, corresponding to a developer. A virtual environment client development and editing platform is installed on the other terminal 240. The developer can edit and update the client on the other terminal 240, and transmit the updated client installation packet to the server cluster 220 via a wired or wireless network. The terminal 210 can download the client installation packet from the server cluster 220 to update the client.
[0029] The terminal 210 and other terminals 240 are connected to the server cluster 220 via a wireless network or a wired network.
[0030] The server cluster 220 includes at least one of a single server, multiple servers, a cloud computing platform, and a virtualization center. The server cluster 220 is used to provide background services for clients supporting the 3D virtual environment. Optionally, the server cluster 220 undertakes primary computing tasks, and the terminals undertake secondary computing tasks; or the server cluster 220 undertakes secondary computing tasks, and the terminals undertake primary computing tasks; or a distributed computing architecture is adopted between the server cluster 220 and the terminals to perform collaborative computing.
[0031] Optionally, the terminal and server are both computer devices. In one exemplary embodiment, the server cluster 220 includes a server 221 and a server 226. The 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 is used to upload instructions stored in the server 221 and process data in the user account database 223 and the battle service module 224. The user account database 223 is used to store data on user accounts used by the terminal 210 and other terminals 240, such as the user account avatar, the user account nickname, the user account combat power index, and the service area to which the user account belongs. The battle service module 224 is used to provide multiple battle rooms for users to battle against each other, and the user-facing I / O interface 225 is used to establish communication with the terminal 210 via a wireless network or a wired network and exchange data.
[0032] Following the introduction to the virtual environment and the description of the implementation environment, the method for controlling a virtual vehicle provided by the embodiments of the present application will now be described. Schematically, the method for controlling a virtual vehicle provided by the present application may be implemented by operating a player's device, or by operating a steering wheel, console, or the like connected to the player's device.
[0033] Here, when implemented by operating a terminal, the relevant controls in the virtual vehicle control method provided by the embodiments of the present application can all be implemented as controls on the display interface of the terminal. When implemented by operating a steering wheel, console, etc. connected to the terminal, the relevant controls in the virtual vehicle control method provided by the embodiments of the present application can all be implemented as certain components of the steering wheel or console. For example, a direction control can be implemented as a movement button or rocker rod on the steering wheel, and further, for example, an accelerator control can be implemented as an accelerator pedal on the console, and the direction control can be displayed as a steering wheel on the console.
[0034] 3 shows a schematic diagram of an interface for the virtual vehicle control method provided by the present application, which is implemented by operating a player's terminal. Here, a virtual vehicle 320 is displayed on a display interface 310, and the virtual vehicle 320 drives in the virtual scene displayed on the display interface 310.
[0035] Schematically, the display interface 310 includes at least one of a brake control 301, an energy control 302, an accelerator control 303, a direction control 304, a handbrake control 305, and a reset control 306. Each control is described below.
[0036] Here, the brake control 301 is used to control the grip force of the virtual vehicle 320. The grip force of the virtual vehicle 320 refers to the friction force existing 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 controlled to decrease. As can be understood, the decrease in the speed of the virtual vehicle 320 is achieved by increasing the grip force of the virtual vehicle 320, and the amount of decrease in the speed of the virtual vehicle 320 can be set based on actual needs. For example, if the player single-clicks the brake control 301, in response to the single-click operation on the brake control 301, the friction force existing between the tires of the virtual vehicle 320 and the ground is increased, thereby increasing the grip force of the virtual vehicle, and the speed of the virtual vehicle 320 is decreased accordingly.
[0037] The energy control 302 is used to indicate the amount of acceleration energy reserved for the virtual vehicle 320, and in response to a trigger operation on the energy control 302, one unit of acceleration energy can be consumed to speed up the virtual vehicle 320. Optionally, an acceleration energy reserve control 01 is displayed around the energy control 302, and the reserve control 01 is used to indicate the amount of acceleration energy reserved for the virtual vehicle 320. For example, if the acceleration energy is nitrogen gas, the energy control 302 is used to indicate the amount of nitrogen gas reserved that can be used to speed up the virtual vehicle 320, for example, the energy control 302 is used to indicate the amount of one bottle of nitrogen gas reserved. Here, the reserve control 01 is used to indicate the number of nitrogen gas bottles corresponding to the virtual vehicle 320. In response to a trigger operation on the energy control 302, one bottle of nitrogen gas is consumed to provide acceleration service for the virtual vehicle 320, and a prompt information indicating the consumption of one bottle of nitrogen gas is displayed on the display interface 310.
[0038] 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. Here, the trigger operation on the accelerator control 303 may be at least one of a single click operation, a double click operation, a touch operation, and a continuous press operation. In the embodiment of the present application, in response to a trigger operation on the accelerator control 303, the accelerator corresponding to the virtual vehicle 320 automatically maintains a pressed state, so that the virtual vehicle 320 maintains a continuous acceleration state. For example, when the player single-clicks the accelerator control 303 and then releases it, the virtual vehicle 320 enters a continuous acceleration state. Optionally, when the virtual vehicle 320 is in the continuous acceleration state, the brake control 301 is further used to realize at least one of an acceleration stop, deceleration, and reverse function of the virtual vehicle 320.
[0039] Optionally, after the virtual vehicle has entered a sustained acceleration state, the virtual vehicle 320 is controlled to stop accelerating in response to a trigger operation on the brake control 301, thereby simulating a sudden accelerator lift. Here, if the trigger operation on the brake control 301 is a single click operation, the virtual vehicle 320 is controlled to stop accelerating and enter a constant speed state. If the trigger operation on the brake control 301 is a sustained press operation, the virtual vehicle 320 is controlled to stop accelerating and enter a sustained deceleration state. Optionally, when the virtual vehicle 320 is in the sustained deceleration state, if the speed of the virtual vehicle 320 decreases to 0 and the sustained press on the brake control 301 is still present, the virtual vehicle 320 is controlled to enter a reverse state.
[0040] In one alternative implementation, the brake control 301 and the accelerator control 303 cannot be used at the same time.
[0041] The direction control 304 is used to steer the virtual vehicle 320. Here, the direction control 304 includes a left steering control and a right steering control, and is used to steer the virtual vehicle 320 left and right. The handbrake control 305 is used to brake the virtual vehicle 320. In a flat run state, the speed of the virtual vehicle 320 is controlled to decrease in response to a trigger operation on the handbrake control 305. 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 a drift state, the head of the virtual vehicle 320 is controlled to turn inward in response to a trigger operation on the handbrake control 305. The decrease in the speed of the virtual vehicle 320 is greater than the decrease in the speed of the virtual vehicle 320 in a flat run state.
[0042] The reset control 306 is used to enable the virtual vehicle 320 to start moving again. In response to a trigger operation on the reset control 306, the reset control 306 controls the virtual vehicle 320 to be displayed on the surrounding road surface and controls the virtual vehicle 320 to start moving again. Here, the reset control 306 is usually used when the virtual vehicle 320 is in the process of escaping.
[0043] 4 shows a schematic diagram of an interface for a virtual vehicle control method provided by an exemplary embodiment of the present application. Similar to FIG. 3, a virtual vehicle 420 is displayed on a display interface 410. Here, the virtual vehicle 420 is in a drifting state on a curve, which may also be called a wagging state, and in the drifting state, the virtual vehicle 420 runs while skidding in an oversteer manner.
[0044] The method for controlling a virtual vehicle provided by the embodiment of the present application includes: a step of controlling the virtual vehicle to enter a drift state in response to a first steering operation in the direction control and a brake operation in the handbrake control, the first steering operation being used to control the virtual vehicle to steer to a first side in the speed direction, the head of the virtual vehicle facing in the first direction, and the first direction being located on the first side in the speed direction; a step of controlling the direction of the head of the virtual vehicle, which is maintaining the drift state, to turn in a second direction in response to a second steering operation in the direction control, the second steering operation being used to control the virtual vehicle to steer to a second side in the speed direction, the second direction being located on a first side in the speed direction, and a second included angle formed between the second direction and the speed direction being smaller than a first included angle formed between the first direction and the speed direction; and controlling the direction of the head of the virtual vehicle maintaining the drift state to turn in a third direction in response to a brake operation in the handbrake control, the third direction being located on the second side of the speed direction. For example, in the virtual vehicle control method provided herein, which is realized by operations on a player's terminal, as shown in Fig. 4, the brake control, energy control, and accelerator control can be displayed in the form of controls on a display interface 410. Here, a brake control 401, an energy control 402, an accelerator control 403, a left turn control 4041, a right turn control 4042, and a handbrake control 405 are displayed on the display interface 410, respectively.
[0045] Illustratively, in response to a first steering operation of the right turn control 4042 of the direction control and a braking operation of the handbrake control 405, the virtual vehicle 420 is controlled to enter a drift state. Illustratively, the display interface 410 displays a vehicle status display area 02, which is used to display the driving state of the virtual vehicle 420 and includes at least numerical information on the speed of the virtual vehicle 420 and / or a vehicle speed display bar. Illustratively, in response to a braking operation of the handbrake control 405, the virtual speed indicated by the numerical information on the speed of the virtual vehicle 420 and / or the vehicle speed display bar in the vehicle status display area 02 decreases.
[0046] For example, virtual vehicle 420 in a drifting state is displayed with virtual traces caused by tire friction on the virtual road. A first steering operation in right turn control 4042 of the direction control is used to control virtual vehicle 420 to steer to the right in the speed direction. The head of virtual vehicle 420 is facing a first direction 431, and first direction 431, which is the head direction of virtual vehicle 420, is located to the right of first speed direction 441. As can be understood, the head direction of virtual vehicle 420, i.e., first direction 431 and first speed direction 441, are not on the same line, and the drift angle of the virtual vehicle is the included angle formed by first direction 431 and first speed direction 441. First speed direction 441 is the speed direction of the virtual vehicle when the head of virtual vehicle 420 is facing first direction 431. For example, first speed direction 441 is a tangential direction at a position on the travel trajectory of the virtual vehicle where the direction of the head of the vehicle is in first direction 431. In response to a second steering operation in left turn control 4041 of the direction control, the direction of the head of virtual vehicle 420, which is maintained in a drift state, is controlled to turn in second direction 432. For example, the second steering operation of the left turn control 4041 of the direction control is used to control the virtual vehicle 420 to steer to the left in the speed direction. As the virtual vehicle 420 maintains a drift state, virtual traces caused by tire friction are displayed on the virtual road. The head direction of the virtual vehicle 420 turns in a second direction 432, and the second direction 432, which is the head direction of the virtual vehicle 420, is located to the right of the second speed direction 442. As can be seen, the head direction of the virtual vehicle 420, i.e., the second direction 432 and the second speed direction 442, are not on the same line. The second included angle formed by the second direction 432 and the second speed direction 442 is smaller than the first included angle formed by the first direction 431 and the first speed direction 441. The second speed direction 442 is the speed direction of the virtual vehicle when the head direction of the virtual vehicle 420 is in the second direction 432. In response to a brake operation on handbrake control 405, the direction of the head of virtual vehicle 420, which is maintaining the drift state, is controlled to turn in third direction 433. Illustratively, as virtual vehicle 420 maintains the drift state, virtual traces caused by tire friction are displayed on the virtual road.
[0047] For example, in the process of steering the virtual vehicle 420 to the left in the speed direction, the direction of the head of the virtual vehicle 420, which is maintaining the drift state, is controlled by a brake operation in the handbrake control 405 so that it turns in the third direction 433. For example, after a second steering operation in the left turn control 4041 in the direction control is performed, a brake operation in the handbrake control 405 is performed.
[0048] In one selectable embodiment, in response to a second steering operation in the left turn control 4041 of the direction control and a braking operation in the handbrake control 405, the heading of the virtual vehicle 420, which is maintaining a drift state, is controlled to turn in a third direction 433. That is, the second steering operation in the left turn control 4041 of the direction control and the braking operation in the handbrake control 405 are executed simultaneously. The heading of the virtual vehicle 420 turns in the third direction 433, and the third direction 433, which is the heading of the virtual vehicle 420, is located to the left of the third speed direction 443. As can be seen, the heading of the virtual vehicle 420, i.e., the third direction 433, and the third speed direction 443 are not on the same straight line.
[0049] A third speed direction 443 is the speed direction of the virtual vehicle when the head of the virtual vehicle 420 is facing in the third direction 433 .
[0050] For example, the velocity direction of the virtual vehicle described above can be iteratively calculated using the following equation: v(t+Δt) = grip force × (d(t+Δt)-v(t)) + v(t), v(t+2×Δt)=grip force×(d(t+2×Δt)-v(t+Δt))+v(t+Δt), …… v(t+n×Δt) = grip force × [d(t+n×Δt) - v(t+(n-1)×Δt)] + v(t+(n-1)×Δt) Here, the velocity direction of the virtual vehicle at the initial time t is v(t), the headway direction at the initial time t is d(t), and the unit time is Δt. Then, the drift angle of the virtual vehicle 420 at the initial time t is d(t)-v(t), that is, the drift angle is the included angle between the headway direction and the velocity direction. The velocity direction of the virtual vehicle 420 at time t+Δt is v(t+Δt), and the headway direction of the virtual vehicle 420 at time t+Δt is d(t+Δt). Then, the drift angle of the virtual vehicle 420 at time t+Δt can be calculated by d(t+Δt)-v(t+Δt). The remaining information can be inferred in this way.
[0051] Alternatively, the drift angle of the virtual vehicle at time i is the difference between the head direction of the virtual vehicle at time i and the velocity direction of the virtual vehicle at time i. For example, the drift angle of the virtual vehicle 420 at initial time t is d(t)-v(t).
[0052] For example, the speed direction of the virtual vehicle at the second time can be determined based on the grip force, the head direction at the second time, and the speed direction at the first time, where the second time is the time a unit time has elapsed since the first time, and the head direction of the virtual vehicle at the second time is the sum of the head direction of the virtual vehicle at the first time and the turning angle of the virtual vehicle within the unit time.
[0053] For example, the speed direction of the virtual vehicle at the second time is the sum of the difference between the direction of the vehicle head at the second time and the speed direction at the first time multiplied by the grip force, and then added to the speed direction at the first time. For example, the speed direction of the virtual vehicle 420 at time t + Δt is v(t + Δt), which can be calculated as v(t + Δt) = grip force × (d(t + Δt) - v(t)) + v(t).
[0054] Optionally, the unit time Δt can be one frame in the calculation, and the grip force is a fixed function.
[0055] For example, assuming that the grip force of virtual vehicle 420 is a constant 0.5, the starting direction of the headway of virtual vehicle 420 is straight ahead, d(t) = 90°, and the starting speed direction of virtual vehicle 420 is set as v(t) = 15°, the drift angle of virtual vehicle 420 at time t (which is the start time) is 90° - 15° = 75°. Thereafter, the headway of virtual vehicle 420 within time Δt turns 15° to the left, i.e., d(t + Δt) = 105°.
[0056] Based on the above formula and assuming Δt=1, the velocity direction of the virtual vehicle 420 can be calculated using the above formula to obtain v(t+Δt)=0.5×(105°−15°)+15°=60°, and the drift angle of the virtual vehicle 420 at time t+Δt is 105°−60°=45°.
[0057] Optionally, if the included angle between the heading direction of the virtual vehicle 420 and the speed direction is smaller than the drift release angle, it is determined that the virtual vehicle 420 has completed drift release and is released from the drift state, and then the virtual vehicle 420 is controlled to enter a flat run state. Here, the drift release angle can be set based on actual needs, for example, the drift release angle is 13 degrees.
[0058] 5 shows a flowchart of a virtual vehicle control method provided by an exemplary embodiment of the present application, which can be applied in a terminal supporting a virtual environment. The method includes the following steps 510 to 540.
[0059] Step 510: Display the virtual vehicle located in the virtual environment and in motion. Illustratively, the virtual environment is used to provide an environment in which a virtual vehicle can travel. For example, the virtual vehicle control method may be applied in an application program supporting a racing game, in which a player controls a virtual vehicle to play a virtual racing match in a virtual environment, or may be applied in an application program supporting a role-playing game, in which a player controls the movement of the virtual vehicle in the virtual environment to satisfy the player's travel needs.
[0060] Step 520: In response to a first steering operation in the direction control and a braking operation in the handbrake control, the virtual vehicle is controlled to enter a drift state. For example, the first steering operation is used to control the virtual vehicle to steer to a first side of the speed direction, where the first side is usually the left or right side, and the corresponding second side is the side opposite to the first side. The head of the virtual vehicle is oriented in the first direction, and the first direction is located on the first side of the speed direction. The speed direction is the speed direction corresponding to the head direction being in the first direction.
[0061] Illustratively, the drift state may be referred to as a tail-wagging state, and the virtual vehicle skids sideways in an oversteer manner in the drift state to facilitate the virtual vehicle exiting a curve. In this embodiment, the virtual vehicle is controlled to enter the drift state in response to a first steering operation on the directional control and a braking operation on the handbrake control. For example, the left turn control and the handbrake control on the directional control are simultaneously single-clicked to control the virtual vehicle to drift to the left. In another implementation, the left turn control and the handbrake control on the directional control are sequentially single-clicked to control the virtual vehicle to drift to the left.
[0062] Here, the directional control and handbrake control may be realized as controls on the display interface of the terminal, or as components on a steering wheel or console connected to the terminal. For example, the directional control and handbrake control may be realized as a directional control and handbrake control on the terminal, respectively. For example, the directional control may be realized as a movement button or a rocking rod on the steering wheel, and the handbrake control may be realized as a confirmation button on the steering wheel. For example, the directional control and handbrake control may be realized as a steering wheel and a brake hand stopper on the console, respectively.
[0063] For example, the handbrake control is used to brake the virtual vehicle and control the speed of the virtual vehicle to decrease.
[0064] Step 530: In response to a second steering operation in the direction control, the direction of the head of the virtual vehicle that is maintaining the drift state is controlled so as to turn in a second direction. The second steering operation is used to control the virtual vehicle to steer to a second side in the speed direction, the second side being the opposite side to the first side, for example, when the first side is the left side, the second side is the right side.
[0065] The second direction is located on the first side of the speed direction, and the speed direction corresponding to the second direction is the speed direction corresponding to the direction of the head of the vehicle in the second direction. Exemplarily, the speed direction is a tangential direction at a position on the travel trajectory of the virtual vehicle where the direction of the head of the vehicle is the second direction. The second included angle formed by the second direction and the speed direction is smaller than the first included angle formed by the first direction and the speed direction. Exemplarily, the virtual vehicle maintains a drift state while turning in the second direction.
[0066] Step 540: In response to a brake operation in the handbrake control, the direction of the head of the virtual vehicle that is maintaining the drift state is controlled so as to turn in a third direction. For example, the handbrake control is used to brake the virtual vehicle and reduce its speed. In one implementation, the braking operation in the handbrake control is a single click of the handbrake control, and the handbrake member is used to significantly reduce the virtual speed of the virtual vehicle within a short period of time. Compared with the footbrake control, the handbrake control reduces the virtual speed more rapidly within a unit time.
[0067] The third direction is located on the second side of the velocity direction, and exemplarily, the virtual vehicle switches from drifting toward the first side to drifting toward the second side, and exemplarily, the virtual vehicle maintains the drift state during the process of turning in the third direction.
[0068] As described above, the method provided by this embodiment changes the direction of the head of the virtual vehicle by performing a second steering operation when the virtual vehicle is in a drifting state, and maintains the drifting state of the virtual vehicle by performing a braking operation. If the drifting state is not interrupted, the direction of the head of the virtual vehicle is steered from the first side in the speed direction to the second side in the speed direction, thereby realizing the virtual vehicle to perform reverse drift, reducing the steering radius when the virtual vehicle passes through successive curves, and improving the virtual vehicle's ability to pass through successive curves.
[0069] 6 shows a flowchart of a virtual vehicle control method provided by an exemplary embodiment of the present application, which can be applied in a terminal supporting a virtual environment. That is, in the embodiment shown in FIG. 5, step 540 can be implemented as step 542.
[0070] Step 542: When the included angle between the direction of the head of the virtual vehicle and the speed direction of the virtual vehicle exceeds the drift threshold, the direction of the head of the virtual vehicle that maintains the drift state is controlled to turn in a third direction in response to a brake operation in the handbrake control. Illustratively, an included angle is formed between the velocity direction of the virtual vehicle and the heading direction of the virtual vehicle, and the included angle is less than 180 degrees. Illustratively, a drift threshold is used to determine whether the virtual vehicle is in a drift state, and if the included angle between the heading direction of the virtual vehicle and the velocity direction of the virtual vehicle exceeds the drift threshold, the virtual vehicle maintains the drift state. Illustratively, the drift threshold is 13 degrees. When the virtual vehicle maintains the drift state, the heading direction of the virtual vehicle turns in a third direction in response to a brake operation in the handbrake control.
[0071] Illustratively, the virtual vehicle switches from drifting to a first side to drifting to a second side.
[0072] Optionally, in one implementation, step 542 in the embodiment can be implemented as the following substeps:
[0073] When the included angle between the direction of the head of the virtual vehicle and the speed direction of the virtual vehicle exceeds a drift threshold, the direction of the head of the virtual vehicle that maintains the drift state is controlled to turn in a third direction in response to a brake operation in the handbrake control, and reverse drift skill release information is displayed. Illustratively, the reverse drift skill is used to instruct the virtual vehicle to switch from drifting toward the first side to drifting toward the second side. The release information for the reverse drift skill may be at least one of text information, a highlight special effect, a flash special effect, an aperture special effect, and a sound special effect. FIG. 7 shows a schematic interface diagram of a virtual vehicle control method provided by an exemplary embodiment of the present application. 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. The virtual vehicle 620 switches from drifting toward the first side to drifting toward the second side. That is, when the head of the virtual vehicle is facing a third direction, release information 632 for the reverse drift skill is displayed, and the release information 632 is used to instruct the user to trigger the reverse drift skill. Illustratively, when the reverse drift skill is triggered, at least one of virtual economic value, virtual experience value, and virtual task progress is increased.
[0074] As described above, the method provided by this embodiment determines the driving state of the virtual vehicle based on the drift threshold value; when the virtual vehicle is in a drift state, the virtual vehicle maintains the drift state by braking; when the drift state is not interrupted, the virtual vehicle performs reverse drift; this reduces the steering radius when the virtual vehicle passes through successive curves, and improves the virtual vehicle's ability to pass through successive curves.
[0075] Next, the braking operation after the second steering operation will be further explained.
[0076] After the virtual vehicle enters a drift state, it skids in an oversteer manner, also known as a tail-wagging state. After entering the drift state, the included angle between the virtual vehicle's head direction and its velocity direction must exceed a drift threshold to maintain the drift state. The steering directions indicated by the second steering operation and the first steering operation are opposite, and the second steering operation causes the included angle between the virtual vehicle's head direction and its velocity direction to decrease. The grip force between the virtual vehicle and the ground is reduced by applying a brake again, thereby controlling the vehicle to continue maintaining the drift state.
[0077] As should be explained, at least one of the grip force and the drift threshold can determine whether the virtual vehicle is in an offset state. For example, (1) if the angle between the virtual vehicle's head direction and the virtual vehicle's speed direction exceeds the drift threshold, the virtual vehicle maintains the drift state. (2) If the grip force between the virtual vehicle and the ground is smaller than the dynamic characteristic threshold, the virtual vehicle maintains the drift state. As can be understood, the dynamic characteristic threshold may be preset or determined based on the virtual weight of the virtual vehicle. (3) There is a correlation between the drift threshold and the grip force between the virtual vehicle and the ground. The drift threshold is an angle threshold, and the drift threshold decreases as the grip force decreases. In one example, as the grip force decreases, even if the virtual vehicle's head direction is the same as the speed direction of the virtual vehicle, the virtual vehicle still spins due to the small grip force, and the vehicle maintains the drift state. Determining whether the virtual vehicle is in an offset state based on at least one of the grip force and the drift threshold allows the virtual vehicle to be controlled in a virtual environment, approximating real-world driving principles, and achieving a pendulum-simulated vehicle drift.
[0078] 8 shows a flowchart of a virtual vehicle control method provided by an exemplary embodiment of the present application, which can be applied in a terminal supporting a virtual environment, i.e., based on the embodiment shown in FIG. 6, further includes step 552.
[0079] Step 552: If the included angle between the heading direction of the virtual vehicle and the speed direction of the virtual vehicle does not exceed the drift threshold, the virtual vehicle is controlled to release the drift state and enter a flat run state. Illustratively, the velocity direction of the virtual vehicle and the direction of the virtual vehicle's head constitute an included angle, and the included angle is less than 180 degrees. Illustratively, a drift threshold is used to determine whether the virtual vehicle is in a drift state. If the included angle between the direction of the virtual vehicle's head and the direction of the virtual vehicle's velocity does not exceed the drift threshold, the virtual vehicle exits the drift state and enters a flat-run state. Illustratively, the drift threshold is 13 degrees. Illustratively, the virtual vehicle does not skid in the flat-run state. As should be understood, in one example, the flat-run state is used to indicate that the direction of the virtual vehicle's head and the direction of the virtual vehicle's velocity are collinear. To avoid a delay in entering the flat-run state, the virtual vehicle enters the flat-run state if the included angle between the direction of the virtual vehicle's head and the direction of the virtual vehicle's velocity is less than the drift threshold.
[0080] As should be explained, when the virtual vehicle exits the drift state, this indicates that the drift state of the virtual vehicle has ended, and optionally, when the virtual vehicle is in the drift state, virtual traces caused by tire friction are displayed on the virtual road in the virtual environment.
[0081] 9 shows a schematic diagram of an interface for a virtual vehicle control method provided by an exemplary embodiment of the present application. A virtual vehicle 642 is displayed on a display interface 640, and the virtual vehicle 642 drives in a virtual scene displayed on the display interface 640. The position of the virtual vehicle 642 is at a fourth position point 646b.
[0082] There are two virtual traces of the virtual vehicle 642 on the virtual road, and the first virtual trace 644 is a trace left on the virtual road when the virtual vehicle 642 is in a first drift state. The virtual vehicle 642 enters the first drift state at a first position point 644a and releases the first drift state at a second position point 644b, and in the first drift state the virtual vehicle 642 drifts leftward.
[0083] At the second position point 644b, the virtual vehicle 642 enters a flat run state, and the virtual vehicle 642 between the second position point 644b and the third position point 646a maintains the flat run state. When the virtual vehicle 642 is in a flat run state, it leaves no trace on the virtual road. The second virtual trace 646 is a trace left on the virtual road when the virtual vehicle 642 is in a second drift state. The virtual vehicle 642 enters a second drift state at the third position point 646a, and in the second drift state, the virtual vehicle 642 drifts to the right. The virtual vehicle 642 between the third position point 646a and the fourth position point 646b maintains the second drift state.
[0084] 10 shows a schematic diagram of an interface for a virtual vehicle control method provided by an exemplary embodiment of the present application. A virtual vehicle 652 is displayed on a display interface 650, and the virtual vehicle 652 drives in a virtual scene displayed on the display interface 650. The position of the virtual vehicle 652 is at a third position point 654c.
[0085] A single virtual trace of the virtual vehicle 652 exists on the virtual road, and the continuous virtual trace 654 is a trace left on the virtual road when the virtual vehicle 652 is in a continuous drift state. The virtual vehicle 642 enters the continuous drift state at the first position point 654a, and the virtual vehicle 642 maintains the continuous drift state from the first position point 654a to the third position point 654c. In the continuous drift state, the virtual vehicle 642 first drifts leftward and then drifts rightward. Specifically, the virtual vehicle 642 maintains a leftward drift from the first position point 654a to the second position point 654b, and the virtual vehicle 642 maintains a rightward drift from the second position point 654b to the third position point 654c. In other words, the virtual vehicle 642 switches from a leftward drift to a rightward drift at the second position point 654b.
[0086] As described above, the method provided by this embodiment determines the driving state of the virtual vehicle based on the drift threshold value, and controls the virtual vehicle to exit the drift state and enter a flat-run state when the included angle between the direction of the virtual vehicle's head and the speed direction of the virtual vehicle does not exceed the drift threshold value, thereby enabling more flexible control of the driving state of the virtual vehicle and improving the maneuverability of the virtual vehicle. When the included angle does not exceed the drift threshold value, the virtual vehicle enters a flat-run state, which is closer to the driving principles of the real world.
[0087] 11 shows a flowchart of a virtual vehicle control method provided by an exemplary embodiment of the present application, which can be applied in a terminal supporting a virtual environment, i.e., based on the embodiment shown in FIG. 6, further includes step 535.
[0088] Step 535: Determine the velocity direction of the virtual vehicle based on the grip force of the virtual vehicle, the head direction of the virtual vehicle, and the historical velocity direction of the virtual vehicle. For example, the angle between the direction of the virtual vehicle's head and the direction of its speed is the drift angle. Here, the larger the drift angle, the greater the offset of the virtual vehicle's body, and the longer the time required for the virtual vehicle to stop drifting. The drift angle is also affected by the grip force of the virtual vehicle, and changes in grip force are achieved by triggering the brake control. As can be understood, when the virtual vehicle is in a flat run, the direction of the virtual vehicle's speed basically remains consistent with the direction of its head. In this case, the drift angle of the virtual vehicle can be determined to be 0 degrees. When the virtual vehicle is in a reverse state, the direction of the virtual vehicle's speed is opposite to the direction of its head, and the drift angle of the virtual vehicle can be determined to be 180 degrees.
[0089] When the virtual vehicle is in a drift state, the velocity direction of the virtual vehicle does not match the direction of the head of the vehicle. That is, the velocity direction of the virtual vehicle is a first direction, and the direction of the head of the vehicle is a second direction, and the first direction and the second direction are different directions. There is a predetermined deviation angle between the first direction and the second direction, and this deviation angle is the drift angle. Similarly, because there is a drift angle, the virtual vehicle assumes a drift body posture.
[0090] Schematically, the virtual vehicle's speed direction is gradually rotated to approach the direction of the vehicle head, thereby realizing a grip effect for the virtual vehicle, which ultimately allows the virtual vehicle to release the drift and recover to a flat-run state.
[0091] Taking the velocity direction of the virtual vehicle at the initial time t as v(t), the direction of the headway at the initial time t as d(t), and the unit time as Δt as an example, FIG. 12 shows a schematic diagram of calculating the drift angle provided by one exemplary embodiment of the present application.
[0092] For example, the velocity direction of the virtual vehicle can be iteratively calculated using the following equation: v(t+Δt) = grip force × (d(t+Δt)-v(t)) + v(t), v(t+2×Δt)=grip force×(d(t+2×Δt)-v(t+Δt))+v(t+Δt), …… v(t+n×Δt) = grip force × [d(t+n×Δt) - v(t+(n-1)×Δt)] + v(t+(n-1)×Δt) Here, the velocity direction of the virtual vehicle 420 at the initial time t is v(t), the direction of the head of the virtual vehicle 420 at the initial time t is d(t), and the unit time is Δt. Then, the drift angle of the virtual vehicle 420 at the 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 direction of the head of the virtual vehicle 420 at time t + Δt is d(t + Δt). Then, the drift angle of the virtual vehicle 420 at time t + Δt can be obtained by calculating d(t + Δt) - v(t + Δt). The remaining information can be inferred in this way.
[0093] Alternatively, the drift angle of the virtual vehicle at time i is the difference between the head direction of the virtual vehicle at time i and the velocity direction of the virtual vehicle at time i. For example, the drift angle of the virtual vehicle 420 at initial time t is d(t)-v(t).
[0094] Furthermore, the speed direction of the virtual vehicle at the second time can be determined based on the grip force, the direction of the head at the second time, and the speed direction at the first time. Here, the second time is the time when a unit time has elapsed since the first time, and the direction of the head of the virtual vehicle at the second time is the sum of the direction of the head of the virtual vehicle at the first time and the turning angle of the virtual vehicle within the unit time.
[0095] For example, the velocity direction of the virtual vehicle at the second time is the sum of the difference between the direction of the vehicle head at the second time and the velocity direction at the first time multiplied by the grip force, and then added to the velocity direction at the first time. For example, the velocity direction of the virtual vehicle 420 at time t+Δt is v(t+Δt), which can be calculated as v(t+Δt)=grip force×(d(t+Δt)-v(t))+v(t).
[0096] Optionally, the unit time Δt can be one frame in the calculation, and the grip force is a fixed function.
[0097] Based on the above equation, the drift angle of the virtual vehicle at the initial time t is d(t) - v(t), the speed direction of the virtual vehicle at time t + Δt is v(t + Δt), and the direction of the head of the virtual vehicle 420 at time t + Δt is d(t + Δt). The remaining information can be inferred in this way. For example, if the drift angle of the virtual vehicle 420 at the initial time t is d(t) - v(t) and the speed direction of the virtual vehicle 420 at time t + Δt is v(t + Δt), the drift angle of the virtual vehicle 420 at time t + Δt can be obtained by calculating d(t + Δt) - v(t + Δt).
[0098] Referring to FIG. 12, assuming that the grip force of the virtual vehicle is a constant 0.5, the initial direction of the head direction of the virtual vehicle is straight ahead, d(t) = 90°, and the initial speed direction of the virtual vehicle is set as v(t) = 15°. The drift angle of the virtual vehicle at time t (which is the start time) is 90° - 15° = 75°. After that, the head direction of the virtual vehicle within time Δt turns 15° to the left, i.e., d(t + Δt) = 105°. Based on the above formula, assuming Δt = 1, the speed direction of the virtual vehicle can be calculated using the above formula to obtain v(t + Δt) = 0.5 × (105° - 15°) + 15° = 60°, and 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 can be continuously calculated iteratively based on the above formula.
[0099] Based on the above, the first trigger operation in the brake control increases the grip force of the virtual vehicle, thereby affecting the change in the drift angle of the virtual vehicle. Here, increasing the grip force increases the speed at which the drift angle decreases, thereby enabling the virtual vehicle to exit the drift state and enter a flat run state more quickly.
[0100] As described above, the method provided by this embodiment determines the speed direction of the virtual vehicle by introducing grip force, establishes a connection between the speed direction, the head direction, and grip force, and ensures that the basis for determining the driving state of the virtual vehicle through iterative calculations is accurate, which is closer to the driving principles of the real world.
[0101] 13 shows a flowchart of a virtual vehicle control method provided by an exemplary embodiment of the present application, which can be applied in a terminal supporting a virtual environment. That is, in the embodiment shown in FIG. 5, step 540 can be implemented as step 544.
[0102] Step 544: In response to the continuous pressing operation on the direction control and the braking operation on the handbrake control, the direction of the head of the virtual vehicle that is maintaining the drift state is controlled so as to turn in a third direction. Illustratively, the second steering operation is a sustained pressing operation on the directional control. In this embodiment, in response to a simultaneous sustained pressing operation on the directional control and a brake operation, the direction of the head of the virtual vehicle, which is maintaining a drift state, is controlled to turn in a third direction. Illustratively, the brake operation on the handbrake control may be at least one of a single click operation, a double click operation, a touch operation, a single press operation, and a sustained pressing operation. For example, a player single-clicks the handbrake control to control the speed of the virtual vehicle to decrease. Illustratively, a sustained pressing operation on the directional control controls continuous steering of the virtual vehicle until it steers in the third direction. A brake operation on the handbrake control controls the virtual vehicle to maintain a drift state, preventing the virtual vehicle from releasing the drift state and entering a flat run state.
[0103] As described above, the method provided by this embodiment determines the first steering operation as a sustained pressure operation, so that when a sustained pressure operation in directional control and a braking operation are performed simultaneously, the virtual vehicle maintains a drift state and switches from drifting to the first side to drifting to the second side, thereby approaching the driving principles of the real world.
[0104] In one alternative implementation, in response to the vehicle entering a drift state and the end of a first steering operation, a first state timer is triggered to cause the first steering operation to accelerate the virtual vehicle toward a first side, and the acceleration decreases over time after the first steering operation is ended. Before the first state timer expires, the virtual vehicle is in the drift state, and after the first state time clock expires, the virtual vehicle exits the drift state. The timing length of the first state timer may be preset or may be determined based on the virtual weight of the virtual vehicle, for example, where the two are positively correlated. Optionally, the first state timer is re-triggered if the drift state is maintained, and the first state timer is re-timed when the first steering operation is ended.
[0105] Before the first state timer expires, the virtual vehicle, which is maintaining the drift state, is controlled to turn in a second direction in response to a second steering operation, and the virtual vehicle, which is maintaining the drift state, is controlled to turn in a third direction in response to a braking operation. During the process of turning in the third direction, the braking operation is used to control the virtual vehicle to maintain the drift state. For a detailed explanation of maintaining the drift state, please refer to the introduction of grip force and drift threshold above. The virtual vehicle turns in the third direction due to virtual inertia caused by the second turning operation.
[0106] Optionally, a second state timer is triggered in response to the vehicle maintaining the drift state and the end of a second steering operation, where the second steering operation causes the virtual vehicle to accelerate toward a second side, and after the second steering operation is ended, the acceleration decreases over time. Before the second state timer expires, in response to a braking operation, the virtual vehicle turns in a third direction, and after the second state timer expires, in response to a braking operation, the virtual vehicle stops steering. Similarly, the timing length of the second state timer may be preset or may be determined based on the virtual weight of the virtual vehicle. Similarly, the circumstances under which the second state time clock is retimed are similar to those for the first state timer.
[0107] As can be understood, the first state timer and the second state timer shown above may each constitute two embodiments, or may be used in combination in one embodiment to constitute a third embodiment. The present application is not limited thereto. Furthermore, the above-described embodiments can be combined with the embodiments corresponding to FIGS. 6 and 8, and the first state timer, the second state timer, and the drift threshold can be combined to jointly control the movement of the virtual vehicle, but the present application is not limited thereto.
[0108] In one embodiment, for example, corresponding to an embodiment including but not limited to a second state timer, there may be no timestamp where the second steering operation and the braking operation occur simultaneously, but this does not preclude the presence of at least one timestamp where the second steering operation and the braking operation occur simultaneously in another embodiment.
[0109] 14 shows a flowchart of a virtual vehicle control method provided by an exemplary embodiment of the present application, which can be applied in a terminal supporting a virtual environment, i.e., based on the embodiment shown in FIG. 5, further includes step 554.
[0110] Step 554: In response to a brake operation in the handbrake control, the virtual speed of the virtual vehicle is controlled to decrease. Illustratively, when controlling the virtual vehicle to enter a drift state, braking in the handbrake control is controlled to significantly reduce the virtual speed of the virtual vehicle within a short period of time. Illustratively, braking in the handbrake control 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 heading of the virtual vehicle and the velocity direction of the virtual vehicle.
[0111] Optionally, in one alternative implementation, after step 554, the method further includes at least one of the following two substeps:
[0112] Sub-step 1: When the included angle between the heading direction of the virtual vehicle and the speed direction of the virtual vehicle exceeds a drift threshold, the virtual vehicle is controlled to maintain a drift state. For example, an included angle is constructed using the velocity direction of the virtual vehicle and the head direction of the virtual vehicle as two sides, and the included angle is less than 180 degrees. For example, a drift threshold is used to determine whether the virtual vehicle is in a drift state, and if the included angle between the head direction of the virtual vehicle and the velocity direction of the virtual vehicle exceeds the drift threshold, the virtual vehicle will maintain the drift state. For example, the drift threshold is 13 degrees.
[0113] Sub-step 2: If the included angle between the heading direction of the virtual vehicle and the speed direction of the virtual vehicle does not exceed the drift threshold, the virtual vehicle is controlled to release from the drift state and enter a flat run state. For example, the drift threshold is used to determine whether the virtual vehicle is in a drift state, and if the included angle between the heading direction of the virtual vehicle and the velocity direction of the virtual vehicle does not exceed the drift threshold, the virtual vehicle will exit the drift state and enter a flat run state. For example, the drift threshold is 13 degrees.
[0114] As described above, the method provided by this embodiment controls the virtual speed of the virtual vehicle to decrease by performing a braking operation when the virtual vehicle is in a drifting state, provides a speed control method for the virtual vehicle in a drifting state, and controls the virtual vehicle through a braking operation to ensure a level of flexible control over the virtual vehicle in a drifting state.
[0115] 15 shows a flowchart of a virtual vehicle control method provided by an exemplary embodiment of the present application, which can be applied in a terminal supporting a virtual environment. That is, in the embodiment shown in FIG. 5, step 520 can be realized as step 522 and step 524.
[0116] Step 522: In response to a first steering operation in the direction control, the direction of the head of the virtual vehicle is controlled to turn in a first direction, the first direction being located on a first side of the speed direction. The first steering operation is used to control the virtual vehicle to steer to a first side in the speed direction, and the first steering operation in the direction control controls the continuous steering of the virtual vehicle until it is steered in the first direction.
[0117] Step 524: In response to a braking operation in the handbrake control, the virtual vehicle is controlled to enter a drift state.
[0118] For example, the drift state may be referred to as a tail-wagging state, and the virtual vehicle skids in an oversteer manner in the drift state, making it easier for the virtual vehicle to exit a curve. A braking operation in the handbrake control causes the virtual vehicle to exit the flat run state and enter a drift state, thereby controlling the virtual vehicle to drift to the first side. As described above, the method provided by this embodiment sequentially performs a first steering operation and a braking operation to steer the virtual vehicle and control it to enter a drift state, ensuring a level of flexible control over the virtual vehicle and improving the virtual vehicle's driving ability in a virtual environment.
[0119] 16 shows a flowchart of a virtual vehicle control method provided by an exemplary embodiment of the present application, which can be applied in a terminal supporting a virtual environment. That is, in the embodiment shown in FIG. 5, step 540 can be implemented as step 546 and further includes step 556.
[0120] Step 546: When the distance between the virtual vehicle and the virtual edge exceeds the drift threshold, the direction of the head of the virtual vehicle that is maintaining the drift state is controlled to turn in a third direction in response to a brake operation in the handbrake control. The virtual edge is an edge of a virtual road surface in a virtual environment, and for example, the edge of the virtual road surface may be an edge lane on the virtual road surface, an edge of a shoulder located outside a virtual road on the virtual road surface, or at least one boundary line on an open road surface along which a virtual vehicle cannot continue to travel. This embodiment does not impose any limitations thereon.
[0121] Optionally, when the virtual vehicle crosses or contacts a virtual edge, the virtual vehicle suffers a disadvantage in driving, such as destruction of the virtual vehicle, a reduction in at least one of the driving capabilities of the virtual vehicle among acceleration, steering, and braking, or a loss of at least one of virtual economy points, virtual experience points, and virtual task progress.
[0122] If the distance between the virtual vehicle and the virtual edge of the virtual road exceeds the drift threshold, the virtual vehicle switches from drifting toward the first side to drifting toward the second side in response to a braking operation in the handbrake control. Because the distance between the virtual vehicle and the virtual edge of the virtual road exceeds the drift threshold, there is no risk of the virtual vehicle colliding with or crossing the virtual edge. As should be understood, in step 546 of this embodiment, in response to a braking operation in the handbrake control, the virtual speed of the virtual vehicle is typically controlled to decrease. However, this does not exclude situations in which the virtual speed of the virtual vehicle is controlled to remain unchanged in response to a braking operation in the handbrake control.
[0123] Step 556: If the distance between the virtual vehicle and the virtual edge does not exceed the drift threshold, the virtual speed of the virtual vehicle that is maintaining the drift state is controlled to decrease in response to a brake operation in the handbrake control. When the distance between the virtual vehicle and the virtual edge of the virtual road does not exceed the drift threshold, the virtual speed of the virtual vehicle is reduced in response to a brake operation in the handbrake control. Because the distance between the virtual vehicle and the virtual edge of the virtual road does not exceed the drift threshold, there is a risk that the virtual vehicle will collide with or cross the virtual edge. Reducing the virtual speed of the virtual vehicle through a brake operation and delaying the time until the virtual vehicle collides with or crosses the virtual edge, thereby reserving a longer operation time, is advantageous in facilitating control of the running state of the virtual vehicle and avoiding any adverse effect on the running state of the virtual vehicle. As should be noted, in step 546 of this embodiment, when the virtual speed of the virtual vehicle is controlled to decrease in response to a brake operation in the handbrake control, the first deceleration rate of the virtual speed of the virtual vehicle is smaller 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 zero.
[0124] Here, the first deceleration rate is the rate at which the virtual speed of the virtual vehicle decreases in response to a brake operation in the handbrake control when the distance between the virtual vehicle and the virtual edge exceeds the drift threshold. The second deceleration rate is the rate at which the virtual speed of the virtual vehicle decreases in response to a brake operation in the handbrake control when the distance between the virtual vehicle and the virtual edge does not exceed the drift threshold. For example, the first deceleration rate is a decrease in the virtual speed of the virtual vehicle of 2 m / s per second, and the second deceleration rate is a decrease in the virtual speed of the virtual vehicle of 5 m / s per second. As can be understood, when the distance between the virtual vehicle and the virtual edge exceeds the drift threshold, the deceleration effect of the virtual vehicle within a unit time is inferior to the deceleration effect of the virtual vehicle when the distance between the virtual vehicle and the virtual edge does not exceed the drift threshold.
[0125] As described above, the method provided by this embodiment determines whether a driving risk exists based on the distance between the virtual vehicle and the virtual edge; if there is no driving risk, controls the virtual vehicle to switch from drifting toward the first side to drifting toward the second side, reduces the steering radius when the virtual vehicle passes through consecutive curves, and improves the virtual vehicle's ability to pass through consecutive curves; if there is a driving risk, controls the virtual speed of the virtual vehicle to decrease, extends the time during which the virtual vehicle generates a driving risk, ensures the virtual vehicle's safe driving, and prevents the virtual vehicle from being damaged by the driving risk.
[0126] 17 shows a flowchart of a virtual vehicle control method provided by an exemplary embodiment of the present application, which can be applied in a terminal supporting a virtual environment, i.e., based on the embodiment shown in FIG. 6, further includes step 558.
[0127] Step 558: Update the drift threshold based on the number of times the reverse drift skill is triggered in the continuous steering virtual road segment. Illustratively, a continuous steering virtual road section is a road section in which at least two direction change points exist on a virtual road in a virtual environment. In one example, when driving a virtual vehicle through a continuous steering virtual road section, the virtual vehicle must be controlled to first steer to a first side of the virtual vehicle's speed direction and then steer to a second side of the speed direction to avoid the virtual vehicle colliding with an edge of the virtual road surface. Furthermore, the number of times the reverse drift skill is triggered in the continuous steering virtual road section indicates a player's preference for the reverse drift skill when passing through the continuous steering virtual road section. A high number of triggers of the reverse drift skill indicates that the player prefers to trigger the reverse drift skill to pass through the continuous steering virtual road section. A low number of triggers of the reverse drift skill indicates that the player prefers to pass through the continuous steering virtual road section by steering or entering a drift state multiple times. Illustratively, the reverse drift skill instructs the virtual vehicle, which maintains a drift state, to switch from drifting to the first side to drifting to the second side.
[0128] Optionally, in one implementation, step 558 can be implemented as the following two sub-steps.
[0129] Sub-step 3: When the number of times that the reverse drift skill is triggered in the continuous steering virtual road section exceeds a number threshold, the drift threshold is updated to a first angle threshold, and the first angle threshold is smaller than the drift threshold. For example, the number of times the reverse drift skill is triggered exceeds the number threshold, indicating that the player prefers to trigger the reverse drift skill when the virtual vehicle passes through a continuous steering virtual road section. By updating the drift threshold to the first angle threshold and increasing the time that the virtual vehicle maintains a drift state, the player can easily trigger the reverse drift skill by performing a braking operation when the virtual vehicle is in a drift state and controlling the direction of the head of the virtual vehicle to turn in a third direction.
[0130] Sub-step 4: If the number of times the reverse drift skill is triggered in the continuous steering virtual road section does not exceed the number threshold, update the drift threshold to a second angle threshold, where the second angle threshold is greater than the drift threshold. For example, if the number of times the reverse drift skill is triggered does not exceed the count threshold, it indicates that the virtual vehicle prefers to steer or enter a drift state multiple times when passing through the continuous steering virtual road section. By updating the drift threshold to the second angle threshold and reducing the time the virtual vehicle maintains the drift state, the virtual vehicle can exit the drift state earlier, making it easier to steer or re-enter the drift state and pass through the continuous steering virtual road section. As described above, the method provided by this embodiment determines the virtual vehicle's preference for passing through the continuous steering virtual road section based on the count threshold. If the virtual vehicle prefers to trigger the reverse drift skill and pass through the continuous steering virtual road section, strict drift state termination conditions are set, extending the time the virtual vehicle remains in the drift state and providing advantageous conditions for triggering the reverse drift skill. When steering or entering a drift state multiple times to pass through a continuous steering virtual road section is preferred, it is advantageous to set a gradual drift state release condition, shorten the time the virtual vehicle is in a drift state, and quickly release the drift state to perform steering or entering a drift state multiple times.
[0131] 18 shows a flowchart of a virtual vehicle control method provided by an embodiment of the present application, which includes the following steps 702 to 730.
[0132] Step 702: In response to clicking the right steer control, the virtual vehicle steers right. Illustratively, in response to clicking the steer right control, the head of the virtual vehicle steers right.
[0133] Step 704: In response to clicking the handbrake control, trigger the virtual vehicle to enter a drift state and drift rightward. In response to clicking the handbrake control, the virtual vehicle's driving speed is rapidly reduced. Illustratively, the virtual vehicle enters a drift state because the included angle between the virtual vehicle's head direction and the virtual vehicle's speed direction exceeds a drift threshold, and because the virtual vehicle's head direction is rightward, the virtual vehicle drifts rightward.
[0134] Step 706: Whether to release the handbrake control, illustratively, to release the handbrake control, that is, to stop continuously pressing the handbrake control.
[0135] Step 708: The virtual vehicle maintains the drifting state and drifts to the right. When the handbrake control is released, the virtual vehicle maintains the drifting state and drifts to the right. The virtual vehicle is not affected by the handbrake control, and the running speed does not decrease rapidly.
[0136] Step 710: The virtual vehicle decelerates to a braking stop, and if the handbrake control is not released, the virtual vehicle decelerates to a braking stop. The virtual vehicle is continuously subjected to the handbrake control, and the driving speed decreases rapidly until the virtual vehicle brakes to a stop.
[0137] Step 712: Click the handbrake control again or not. Step 714: The virtual vehicle maintains the drift state and drifts to the right. If the handbrake control is not clicked again, the virtual vehicle maintains the drift state and drifts to the right. The virtual vehicle is not affected by the handbrake control and the driving speed does not decrease as quickly. If the handbrake control is clicked again, step 710 is executed and the virtual vehicle slows down to a brake stop.
[0138] Step 716: Left steering control clicked or not. Illustratively, in response to clicking the steer left control, the head of the virtual vehicle steers left. Step 718: The virtual vehicle steers left; if the left steering control is clicked, the head of the virtual vehicle steers left, and illustratively the virtual vehicle maintains a drift state.
[0139] Step 720: The virtual vehicle maintains the drift state and drifts to the right. If the left steering control is not clicked, the virtual vehicle maintains the drift state and drifts to the right. The virtual vehicle is not affected by the left steering control, and the direction of the virtual vehicle's head steers left without being affected by the left steering control.
[0140] Step 722: Click or not the handbrake control. In response to clicking the handbrake control, the virtual vehicle's driving speed is rapidly decreased.
[0141] Step 724: The virtual vehicle maintains the drifting state and drifts to the left. If the handbrake control is clicked, the virtual vehicle maintains the drifting state and drifts to the left. The direction of the head of the virtual vehicle changes from pointing to the right to pointing to the left, and the virtual vehicle drifts to the left.
[0142] Step 726: Determine whether the drift angle exceeds the drift threshold. If the handbrake control is not clicked, determine whether the drift angle exceeds the drift threshold. The drift angle is the included angle between the heading direction of the virtual vehicle and the speed direction of the virtual vehicle.
[0143] Step 728: The virtual vehicle maintains the drift state and drifts to the right. If the drift angle exceeds the drift threshold, the virtual vehicle maintains the drift state and drifts to the right.
[0144] Step 730: The virtual vehicle exits the drift state and enters the flat run state. If the drift angle does not exceed the drift threshold, the virtual vehicle exits the drift state and enters the flat run state.
[0145] For example, the virtual vehicle in this application may be a virtual vehicle realized by simulating the driving characteristics of a real-world automobile, and the virtual vehicle is not limited by its external shape. For example, in a virtual environment, a virtual driver drives on virtual clouds, and the appearance of the vehicle may have the appearance characteristics of virtual wings. However, the vehicle drives on the virtual clouds in accordance with the driving characteristics of an automobile, and does not change its pitch angle depending on lift or simulated lift. This also falls within the scope of the virtual vehicle described in this application. Furthermore, this application does not limit the control method of the virtual vehicle. The virtual vehicle can be controlled by a keyboard, a mouse, a steering wheel, or a steering wheel or pedals that simulate driving a vehicle, but this is not limited thereto. The virtual vehicle control method may be applied in a virtual vehicle racing application program, a virtual vehicle simulation driving application program, or other application programs with vehicle racing or vehicle simulation driving functions.
[0146] 19 is a schematic diagram of an interface for controlling a virtual vehicle provided by an exemplary embodiment of the present application, in which a brake control, an energy control, and an accelerator control can be displayed in the style of a control in a display interface 810. Here, a brake control 801, an energy control 802, an accelerator control 803, a left turn control 8041, a right turn control 8042, and a handbrake control 805 are displayed in the display interface 810.
[0147] A virtual vehicle 820 is displayed in a virtual environment in a running state, the virtual vehicle 820 running forward, and the speed direction of the virtual vehicle is the same as the direction of the head of the virtual vehicle. In response to a click operation on the right turn control 8042, the direction of the head of the virtual vehicle 820 is controlled to turn to the right. In response to a click operation on the right turn control 8042, the direction of the head of the vehicle is positioned to the right of the speed direction, and a click operation on the right turn control 8042 is used to control the virtual vehicle 820 to steer to the right of the speed direction. Illustratively, since the virtual vehicle 820 is in a flat run state, virtual traces caused by tire friction on the virtual road are not displayed.
[0148] In response to a brake operation on the handbrake control 805, the virtual vehicle is controlled to enter a drift state, with the head of the virtual vehicle facing in a first direction. Illustratively, the drift state may be referred to as a tail-swing state, and the virtual vehicle skids sideways in an oversteer manner in the drift state, making it easier for the virtual vehicle to exit a curve. By operating the brakes on the handbrake control 805, the virtual vehicle is controlled to exit the flat run state and enter a drift state, with the virtual vehicle drifting to the right.
[0149] In response to a click operation on the left turn control 8041, the direction of the head of the virtual vehicle, which is maintaining the drifting state, is controlled to turn in a second direction. The second included angle formed by the second direction and the speed direction is smaller than the first included angle formed by the first direction and the speed direction, and the virtual vehicle drifts to the right while maintaining the drifting state.
[0150] In response to a brake operation on the handbrake control 805, the direction of the head of the virtual vehicle, which is maintaining a drifting state, is controlled to turn in a third direction. The third direction is located to the left of the speed direction, and, for example, the virtual vehicle switches from drifting to the right to drifting to the left. Optionally, release information for the reverse drift skill is displayed. The reverse drift skill is used to instruct the virtual vehicle to switch from drifting to the right to drifting to the left, or to switch from drifting to the left to drifting to the right. The release information for the reverse drift skill may be at least one of text information, a highlight special effect, a flash special effect, an aperture special effect, and a sound special effect.
[0151] Furthermore, the display 803 also displays information about the release of the reverse drift skill. That is, after the virtual vehicle switches from a right-side drift to a left-side drift, a driving skill is connected to it by a control operation on the virtual vehicle. For example, the driving speed of the virtual vehicle is increased by triggering the exit curve escape skill in response to a trigger operation in the energy control 802.
[0152] In response to a click operation on the brake control 801, the grip force of the virtual vehicle is increased. In response to a trigger operation on the energy control 802, a bottle of nitrogen gas can be consumed to provide acceleration service for the virtual vehicle 820, and prompt information to consume a bottle of nitrogen gas can be displayed on the display interface 810, and a pressurized nitrogen gas curve escape skill is triggered.
[0153] For example, the brake control 801 may be further used to realize at least one of acceleration / stop, deceleration, and reverse functions of the virtual vehicle. For example, after the virtual vehicle has entered a sustained acceleration state, the brake control 801 may be controlled to stop acceleration and enter a natural deceleration state in response to a single click operation on the brake control 801. The natural deceleration state refers to a sustained deceleration state entered by the virtual vehicle due to resistance factors, which include at least one of road resistance, air resistance, and mechanical loss. Furthermore, for example, the brake control 801 may be controlled to stop acceleration and enter a sustained speed reduction state in response to a sustained pressing operation on the brake control 801. The sustained speed reduction state refers to an accumulated deceleration state entered by the virtual vehicle due to resistance factors and brake resistance, which include at least one of road resistance, air resistance, and mechanical loss. The brake resistance is generated based on the sustained pressing operation on the brake control 801.
[0154] Here, road resistance refers to the frictional force between the virtual vehicle's tires and the ground, air resistance refers to the air resistance experienced by the virtual vehicle during its travel, and mechanical loss refers to the kinetic energy loss in the virtual vehicle's powertrain. The magnitude of the braking resistance can be set based on actual needs. Optionally, when the virtual vehicle is in a sustained speed reduction state, if the speed of the virtual vehicle decreases to zero and the brake control 801 is still continuously pressed, the virtual vehicle is controlled to enter a reverse state. Illustratively, the handbrake control 805 is similar to the brake control 801 and is further used to realize at least one of the acceleration / stop, deceleration, and reverse functions of the virtual vehicle. The handbrake control 805 and the brake control 801 realize speed control of the virtual vehicle, especially deceleration control, which is closer to real-world driving principles.
[0155] As will be understood by those skilled in the art, the above embodiments may be implemented independently, or the above embodiments may be freely combined and new embodiments may be combined to realize the virtual vehicle control method of the present application.
[0156] FIG. 20 shows a block diagram of a virtual vehicle control system provided by one exemplary embodiment of the present application. A display module 910 used to perform step 510 in the embodiment of FIG. 5; a control module 920 used to perform step 520 in the embodiment of FIG. 5; The control module 920 is further used to perform step 530 in the embodiment of FIG. 5 ; The control module 920 is further used to perform step 540 in the embodiment of FIG.
[0157] In one alternative design of the present application, the control module 920 is further used to perform step 542 in the embodiment of FIG.
[0158] In one alternative design of the present application, the control module 920 is further used to control the head direction of the virtual vehicle, which maintains the drift state, to turn in the third direction in response to the brake operation in the handbrake control when the included angle between the head direction of the virtual vehicle and the speed direction of the virtual vehicle exceeds a drift threshold, and display reverse drift skill release information.
[0159] In one alternative design of the present application, the control module 920 is further used to perform step 552 in the embodiment of FIG.
[0160] In one alternative design of the present application, the device comprises: It further includes a decision module 930 that is used to perform step 535 in the embodiment of FIG.
[0161] In one alternative design of the present application, the second steering operation is a sustained press on the directional control, and the control module 920 is further used to perform step 544 in the embodiment of FIG.
[0162] In one alternative design of the present application, the control module 920 is further used to perform steps 522 and 524 in the embodiment of FIG.
[0163] In one alternative design of the present application, the control module 920 is further used to perform step 554 in the embodiment of FIG.
[0164] In one alternative design of the present application, the control module 920 is further used to control the virtual vehicle to maintain the drift state when the angle between the heading direction of the virtual vehicle and the velocity direction of the virtual vehicle exceeds a drift threshold, and to control the virtual vehicle to release the drift state and enter a flat run state when the angle between the heading direction of the virtual vehicle and the velocity direction of the virtual vehicle does not exceed the drift threshold.
[0165] In one alternative design of the present application, the control module 920 is further used to perform steps 546 and 556 in the embodiment of FIG.
[0166] In one alternative design of the present application, the apparatus further includes an update module 940 adapted to update the drift threshold based on the number of times the reverse drift skill is triggered in the continuous steering virtual road segment.
[0167] In one alternative design of the present application, the update module 940 further comprises: When the number of times that the reverse drift skill is triggered in the continuous steering virtual road section exceeds a number threshold, updating the drift threshold to a first angle threshold, where the first angle threshold is smaller than the drift threshold; If the number of times the reverse drift skill is triggered in the continuous steering virtual road section does not exceed a count threshold, the drift threshold is updated to a second angle threshold, and the second angle threshold is greater than the drift threshold.
[0168] It is necessary to point out that, when realizing its functions, the device provided in the above embodiments only lists and describes the division of each of the above functional modules. In actual applications, the distribution of the above functions can be completed by different functional modules based on actual needs, that is, by dividing the content structure of the device into different functional modules, all or part of the functions described above can be completed.
[0169] Regarding the device in the above embodiment, the specific manner in which each module performs the operation has already been described in detail in the embodiment related to the method. The technical effects achieved by each module performing the operation are the same as the technical effects in the embodiment related to the method, and therefore will not be described in detail here.
[0170] An embodiment of the present application further provides a computer device, which includes a processor and a memory, in which a computer program is stored, and which is used by the processor to execute the computer program in the memory to realize the virtual vehicle control method provided by each of the method embodiments.
[0171] 21 shows a structural block diagram of a terminal 1900 provided by one exemplary embodiment of the present application. The terminal 1900 may be a smartphone, a tablet PC, an MP3 player (Moving Picture Experts Group Audio Layer III, MPEG Audio Level 3), an MP4 (Moving Picture Experts Group Audio Layer IV, MPEG Audio Level 4) player, a notebook PC, or a desktop PC. The terminal 1900 may also be referred to by other names, such as user equipment, a portable terminal, a laptop terminal, and a desktop terminal.
[0172] Typically, the terminal 1900 includes a processor 1901 and a memory 1902. The processor 1901 may include one or more processing cores, such as a 4-core processor, an 8-core processor, etc. The processor 1901 may be implemented using at least one hardware form of a DSP (Digital Signal Processing), an FPGA (Field-Programmable Gate Array), and a PLA (Programmable Logic Array). The processor 1901 may include a main processor and a coprocessor. The main processor is a processor used to process data in a wake-up state and is also called a CPU (Central Processing Unit). The coprocessor is a low-power processor used to process data in a standby state. In some embodiments, the processor 1901 may integrate a GPU (Graphics Processing Unit), which is used to render and draw content that needs to be displayed on a display screen. In some embodiments, the processor 1901 may further include an AI (Artificial Intelligence) processor, which is used to process computational operations related to machine learning.
[0173] The memory 1902 may include one or more computer-readable storage media, which may be non-transitory. The memory 1902 may further include high-speed random access memory and non-volatile memory, such as one or more magnetic disk storage devices or flash storage devices. In some embodiments, the non-transitory computer-readable storage media in the memory 1902 may be used to store at least one instruction that, when executed by the processor 1901, may implement a method for controlling a virtual vehicle as provided by a method embodiment herein.
[0174] In some embodiments, the terminal 1900 optionally further includes a peripheral interface 1903 and at least one peripheral. The processor 1901, the memory 1902, and the peripheral interface 1903 may be coupled by a bus or signal lines. Each peripheral is coupled to the peripheral interface 1903 by a bus, signal lines, or circuit board. Specifically, the peripherals include at least one of a radio frequency circuit 1904, a touch display screen 1905, a camera component 1906, an audio circuit 1907, and a power supply 1908. The peripheral interface 1903 can be used to connect at least one peripheral associated with an I / O (Input / Output) to the processor 1901 and the memory 1902. In some embodiments, the processor 1901, memory 1902, and peripheral interface 1903 are integrated on the same chip or circuit board. In other embodiments, any one or two of the processor 1901, memory 1902, and peripheral interface 1903 can be implemented on separate chips or circuit boards, although this embodiment is not limited thereto. The radio frequency circuit 1904 is used to receive and transmit RF (Radio Frequency) signals, also known as electromagnetic signals. The radio frequency circuit 1904 communicates with communication networks and other communication devices via electromagnetic signals. The radio frequency circuit 1904 may further include circuitry related to NFC (Near Field Communication). The touch display screen 1905 is used to display a user interface (UI). The UI can include graphics, text, icons, video, and any combination thereof. The camera component 1906 is used to capture images or videos. Optionally, the camera component 1906 includes a front camera and a rear camera. 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 and convert the sound waves into electrical signals that are input to the processor 1901 for processing or to the radio frequency circuitry 1904 for voice communication. The power source 1908 is used to provide power to each component in the terminal 1900. The power source 1908 may be AC electricity, DC electricity, a disposable battery, or a rechargeable battery. 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 acceleration sensor 1910, a gyro sensor 1911, a pressure sensor 1912, an optical sensor 1913, and a proximity sensor 1914.
[0175] The acceleration sensor 1910 can detect the magnitude of acceleration on three coordinate axes of the coordinate system established by the terminal 1900. The pressure sensor 1912 can be installed on the side frame of the terminal 1900 and / or below the touch display screen 1905. It detects a user's grip signal on the terminal 1900 and / or controls operability controls on the UI interface based on the user's pressure operation on the touch display screen 1905. The optical sensor 1913 is used to collect ambient light intensity. The proximity sensor 1914, also known as a distance sensor, is usually installed on the front panel of the terminal 1900. The proximity sensor 1914 is used to collect the distance between the user and the front of the terminal 1900. As will be understood by those skilled in the art, the above structure does not constitute a limitation on the terminal 1900, and the terminal 1900 may include more or fewer components than those shown, may combine some components, or may have a different component arrangement.
[0176] In an exemplary embodiment, a chip is further provided, the chip including a programmable logic circuit and / or program instructions, and is used to realize the virtual vehicle control method described in the above aspect when the chip is operated on a computing device.
[0177] In an exemplary embodiment, a computer program product is further provided, the computer program product including computer instructions stored in a computer-readable storage medium, a processor of a computing device reading the computer instructions from the computer-readable storage medium, and the processor reading and executing the computer instructions from the computer-readable storage medium to realize the virtual vehicle control method provided in each of the above method embodiments.
[0178] In an exemplary embodiment, a computer-readable storage medium is further provided, storing a computer program therein. The computer program is uploaded and executed by a processor to implement the virtual vehicle control method provided by each of the above method embodiments. As can be understood by those skilled in the art, all or part of the steps for implementing the above embodiments can be achieved by hardware, or by a program instructing the relevant hardware. The program can be stored in a computer-readable storage medium, and the storage medium mentioned above can be a read-only memory, a magnetic disk, an optical disk, or the like. Those skilled in the art should recognize that in one or more of the above examples, the functions described in the embodiments of the present application can be implemented using hardware, software, firmware, or any combination thereof. When implemented using 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, including any medium that facilitates the transfer of a computer program from one place to another. A storage medium may be any available medium that can be accessed by a general purpose or special purpose computer.
Claims
1. A method for controlling a virtual vehicle, executed by a terminal, the method comprising: displaying the virtual vehicle located in a virtual environment and in motion; a step of controlling the virtual vehicle to enter a drift state in response to a first steering operation in a direction control and a brake operation in a handbrake control, the first steering operation being used to control the virtual vehicle to steer to a first side in a speed direction, the head of the virtual vehicle facing in a first direction, and the first direction being located on the first side in the speed direction; a step of controlling the direction of the head of the virtual vehicle maintaining the drift state to turn in a second direction in response to a second steering operation in the direction control, the second steering operation being used to control the virtual vehicle to steer to a second side of the speed direction that is opposite to the first side with respect to the speed direction, the second direction being located on the first side of the speed direction, and a second included angle formed between the second direction and the speed direction being smaller than a first included angle formed between the first direction and the speed direction; a step of controlling, when a reverse drift skill is triggered, in response to the brake operation in the handbrake control, the direction of the head of the virtual vehicle maintaining the drift state to turn in a third direction, the third direction being located on the second side of the velocity direction; A method of controlling a virtual vehicle, wherein the reverse drift skill is used to instruct the virtual vehicle to switch from drifting to the first side to drifting to the second side.
2. the step of controlling the direction of the head of the virtual vehicle that maintains the drift state to turn in a third direction in response to the brake operation in the handbrake control, 2. The method of claim 1, further comprising: controlling the direction of the head of the virtual vehicle, which maintains the drift state, to turn in the third direction in response to the brake operation in the handbrake control when an included angle between the direction of the head of the virtual vehicle and the speed direction of the virtual vehicle exceeds a drift threshold.
3. the step of controlling the direction of the head of the virtual vehicle, which maintains the drift state, to turn in the third direction in response to the brake operation in the handbrake control when an included angle between the direction of the head of the virtual vehicle and the speed direction of the virtual vehicle exceeds a drift threshold, 3. The method of claim 2, further comprising: a step of controlling the head direction of the virtual vehicle, which maintains the drift state, to turn in the third direction in response to the brake operation in the handbrake control when the included angle between the head direction of the virtual vehicle and the speed direction of the virtual vehicle exceeds a drift threshold, and displaying release information of the reverse drift skill, wherein the reverse drift skill is used to instruct the virtual vehicle to switch from drifting to the first side to drifting to the second side.
4. The method comprises:
3. The method of claim 2, further comprising the step of controlling the virtual vehicle to exit the drift state and enter a flat run state when an included angle between a heading direction of the virtual vehicle and a velocity direction of the virtual vehicle does not exceed the drift threshold.
5. The method comprises: The method according to any one of claims 2 to 4, further comprising determining a speed direction of the virtual vehicle based on a grip force of the virtual vehicle, a head orientation of the virtual vehicle, and a historical speed direction of the virtual vehicle.
6. the second steering operation is a continuous pressing operation on the direction control, the step of controlling the direction of the head of the virtual vehicle that maintains the drift state to turn in a third direction in response to the brake operation in the handbrake control, 2. The method of claim 1, further comprising: controlling the direction of the head of the virtual vehicle that maintains the drift state to turn in the third direction in response to the sustained pressing operation on the directional control and the braking operation on the handbrake control.
7. The step of controlling the virtual vehicle to enter a drift state in response to a first steering operation in a direction control and a brake operation in a handbrake control includes: a step of controlling the direction of the virtual vehicle to turn in the first direction in response to the first steering operation in the direction control, the first direction being located on the first side of the velocity direction; The method according to any one of claims 1 to 4, further comprising the step of controlling the virtual vehicle to enter the drift state in response to a braking operation on the handbrake control.
8. The method comprises: The method according to any one of claims 1 to 4, further comprising the step of controlling the virtual speed of the virtual vehicle to decrease in response to the braking operation in the handbrake control.
9. The method comprises: a step of controlling the virtual vehicle to maintain the drift state when an included angle between a direction of the head of the virtual vehicle and a speed direction of the virtual vehicle exceeds a drift threshold; 9. The method of claim 8, further comprising: controlling the virtual vehicle to exit the drift state and enter a flat run state when the included angle between the heading direction of the virtual vehicle and the velocity direction of the virtual vehicle does not exceed the drift threshold.
10. the step of controlling the direction of the head of the virtual vehicle that maintains the drift state to turn in a third direction in response to the brake operation in the handbrake control, a step of controlling, in response to the brake operation in the handbrake control, a direction of the head of the virtual vehicle that maintains the drift state to turn in the third direction when a distance between the virtual vehicle and a virtual edge exceeds a drift threshold, wherein the virtual edge is an edge of a virtual road surface in the virtual environment; The method comprises:
2. The method of claim 1, further comprising the step of controlling, in response to the braking operation in the handbrake control, a virtual speed of the virtual vehicle that maintains the drift state to decrease when the distance between the virtual vehicle and a virtual edge does not exceed a drift threshold.
11. The method comprises: The method of any one of claims 2 to 4, further comprising updating the drift threshold based on the number of times the reverse drift skill is triggered in a continuous steering virtual road section.
12. The step of updating the drift threshold based on the number of times the reverse drift skill is triggered in the continuous steering virtual road section includes: updating the drift threshold to a first angle threshold when the number of times the reverse drift skill is triggered in the continuous steering virtual road section exceeds a number threshold, the first angle threshold being smaller than the drift threshold; 12. The method of claim 11, further comprising: if the number of times the reverse drift skill is triggered in the continuous steering virtual road section does not exceed a number threshold, updating the drift threshold to a second angle threshold, the second angle threshold being greater than the drift threshold.
13. 1. A control device for a virtual vehicle, the device comprising: a display module located in a virtual environment and adapted to display the virtual vehicle in motion; a control module used to control the virtual vehicle to enter a drift state in response to a first steering operation in a direction control and a brake operation in a handbrake control, the first steering operation being used to control the virtual vehicle to steer to a first side in a speed direction, the head of the virtual vehicle facing in a first direction, and the first direction being located on the first side of the speed direction; The control module is further adapted to control, in response to a second steering operation in the direction control, the direction of the head of the virtual vehicle maintaining the drift state to turn in a second direction, the second steering operation being adapted to control the virtual vehicle to steer to a second side of the velocity direction, opposite to the first side with respect to the velocity direction, the second direction being located on the first side of the velocity direction, and a second included angle formed between the second direction and the velocity direction being smaller than a first included angle formed between the first direction and the velocity direction; The control module is further configured to, when a reverse drift skill is triggered, control the direction of the head of the virtual vehicle maintaining the drift state to turn in a third direction in response to the brake operation in the handbrake control, the third direction being located on the second side of the velocity direction; A virtual vehicle control device, wherein the reverse drift skill is used to instruct the virtual vehicle to switch from drifting to the first side to drifting to the second side.
14. A computer device including a processor and a memory, wherein at least one program is stored in the memory, and wherein the processor is used to realize the virtual vehicle control method described in claim 1 by executing the at least one program in the memory.
15. A computer program configured to implement the method for controlling a virtual vehicle according to claim 1 when executed by a processor.
Citation Information
Patent Citations
Scoring system of traveling condition
JP2007037796A
Movable body controller
JP2008256737A
Method and program for displaying user interface on head-mounted display
JP2016167219A
Method, apparatus and computer program for drifting a virtual vehicle in a virtual world
JP2021531133A
OBJECT CONTROL METHOD, OBJECT CONTROL DEVICE, COMPUTER PROGRAM, AND ELECTRONIC DEVICE
JP2022520699A