Method, device, and computer program for controlling a virtual vehicle
By controlling virtual vehicles to enter a drift state through strategic steering and brake operations, the method enhances maneuverability and reduces collision risks when navigating continuous curves in simulated environments.
Patent Information
- Application Number
- JP2024532536
- Authority / Receiving Office
- JP · JP
- Patent Type
- Applications
- Current Assignee / Owner
- Priority Date
- 2022-05-20
- Filing Date
- 2023-04-17
- Publication Date
- 2024-11-26
- Estimated Expiration
- 2043-04-17
AI Technical Summary
Virtual vehicles in simulated environments often collide with roadside objects when navigating continuous curves, reducing their ability to pass through smoothly.
A method and device for controlling virtual vehicles to enter a drift state through specific steering and brake operations, adjusting the vehicle's heading direction to reduce the steering radius and enhance maneuverability through continuous curves.
The method improves the virtual vehicle's ability to navigate continuous curves by reducing the steering radius and maintaining a drift state, enhancing maneuverability and reducing collision risks.
Smart Images

Figure 2024543979000001_ABST
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 bearing application number 202210555869.7, filed on May 20, 2022, 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 involving a virtual environment, it is usually necessary to control a virtual object so that it performs a virtual action in the virtual environment. Take a virtual vehicle for example, it is necessary to control the virtual vehicle so that it performs a virtual run in the virtual environment.
[0004] In the related technology, a virtual road in a virtual environment has curves, and the virtual vehicle is controlled to enter a drift state, and the steering radius of the virtual vehicle passing through the curve is reduced, thereby facilitating the virtual vehicle to drive quickly and pass through the curves on the virtual road.
[0005] When continuous curves exist in 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 thereof 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 of a speed direction, the head direction of the virtual vehicle being 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 toward 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, in response to the brake operation in the handbrake control, a 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.
[0008] According to another aspect of the present application, there is provided a control device for a virtual vehicle, the control device comprising: a display module adapted to display the virtual vehicle in a virtual environment and in a running state; a control module adapted 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 adapted to control the virtual vehicle to steer to a first side in a speed direction, the head direction of the virtual vehicle being in a first direction, and the first direction being located on the first side of the speed direction; The control module is further used to control, in response to a second steering operation in the direction control, a direction of the head of the virtual vehicle maintaining the drift state to turn in a second direction, the second steering operation is used to control the virtual vehicle to steer to a second side of the speed direction, the second direction is located on the first side of the speed direction, and a second included angle formed by the second direction and the speed direction is smaller than a first included angle formed by 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 heading direction 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, code set, or 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, in which at least one instruction, at least one program, code set, or instruction set is stored, and the at least one instruction, the at least one program, code set, or instruction set is uploaded and executed by a processor to realize the virtual vehicle control method described in the above aspect.
[0011] According to another aspect of the present application, there is provided a computer program product, the computer program product including computer instructions, the computer instructions being 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 the present 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 a first side in the speed direction to a 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 description of the drawings]
[0014] [Figure 1] FIG. 2 is a structural schematic diagram of a terminal provided by an exemplary embodiment of the present application; [Diagram 2] FIG. 2 is a structural block diagram of a computer system provided by one exemplary embodiment of the present application. [Diagram 3] 2 is a schematic diagram of an interface of a virtual vehicle control method provided by one exemplary embodiment of the present application; [Figure 4] 2 is a schematic diagram of an interface of a virtual vehicle control method provided by one exemplary embodiment of the present application; [Diagram 5] 2 is a flowchart of a method for controlling a virtual vehicle provided by an exemplary embodiment of the present application. [Figure 6] 2 is a flowchart of a method for controlling a virtual vehicle provided by an exemplary embodiment of the present application. [Figure 7] 2 is a schematic diagram of an interface of a virtual vehicle control method provided by one exemplary embodiment of the present application; [Figure 8] 2 is a flowchart of a method for controlling a virtual vehicle provided by an exemplary embodiment of the present application. [Figure 9] 2 is a schematic diagram of an interface of a virtual vehicle control method provided by one exemplary embodiment of the present application; [Figure 10] 2 is a schematic diagram of an interface of a virtual vehicle control method provided by one exemplary embodiment of the present application; [Figure 11] 2 is a flowchart of a method for controlling a virtual vehicle provided by an exemplary embodiment of the present application. [Figure 12] FIG. 2 is a schematic diagram of calculating a drift angle provided by one exemplary embodiment of the present application; [Figure 13] 2 is a flowchart of a method for controlling a virtual vehicle provided by an exemplary embodiment of the present application. [Figure 14] 2 is a flowchart of a method for controlling a virtual vehicle provided by an exemplary embodiment of the present application. [Figure 15] 2 is a flowchart of a method for controlling a virtual vehicle provided by an exemplary embodiment of the present application. [Figure 16] 2 is a flowchart of a method for controlling a virtual vehicle provided by an exemplary embodiment of the present application. [Figure 17] 2 is a flowchart of a method for controlling a virtual vehicle provided by an exemplary embodiment of the present application. [Figure 18] 2 is a flowchart of a method for controlling a virtual vehicle provided by an exemplary embodiment of the present application. [Figure 19] 2 is a schematic diagram of an interface of a virtual vehicle control method provided by one exemplary embodiment of the present application; [Figure 20] FIG. 2 is a structural block diagram of a control device for a virtual vehicle provided by an exemplary embodiment of the present application. [Figure 21] FIG. 2 is a structural block diagram of a terminal provided by an exemplary embodiment of the present application; DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS
[0015] The method provided herein can be applied to an application program having a virtual environment and a virtual character. Exemplarily, the application program supporting the virtual environment is an application program in which a user can control the movement of a virtual character in the virtual environment. Exemplarily, the method provided herein can 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 Shooting Game (FPS), a Third-Person Shooting Game (TPS), a Multiplayer Online Battle Arena Game (MOBA), and a Simulation Game (SLG).
[0016] For example, a game in a virtual environment is composed of one or more game world maps. The virtual environment in the game simulates a scene in the real world, and a user can control a virtual character in the game to walk, run, jump, shoot, fight, drive, and other movements in the virtual environment, which has a relatively strong interactivity. In addition, multiple users can form a team online to play a competitive game.
[0017] In some embodiments, the application program may be a program such as a shooting game, a racing game, a role-playing game, an adventure game, a sandbox game, or a tactical competition game. The client may support at least one of the following operating systems: a Windows operating system, an Apple operating system, an Android operating system, an IOS operating system, and a LINUX operating system. In addition, clients of different operating systems may be interconnected and communicate with each other. In some embodiments, the client is a program applied on a mobile terminal having a touch screen. For example, the virtual vehicle control method provided by the embodiments of the present application may be applied in an application program supporting a racing game, and a player may control the virtual vehicle to play a virtual racing match. Furthermore, for example, the virtual vehicle control method provided by the embodiments of the present application may be applied in an application program supporting a role-playing game, and a player may control the movement of the virtual vehicle in the virtual scene to meet the needs of the player's travel. In some embodiments, the client is an application program developed based on a three-dimensional engine, and the three-dimensional engine is, 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 computer, an e-book reader, an MP3 (Moving Picture Experts Group Audio Layer III, a moving picture experts compressed standard audio level 3) player, and an MP4 (Moving Picture Experts Group Audio Layer IV, a moving picture experts compressed standard audio level 4) player, etc. A client supporting a virtual environment, for example, an application program client supporting a 3D virtual environment, is installed and operated in 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 version of the application program, for example, a standalone version of a 3D game program, or a network online version of the application program.
[0019] FIG. 1 is a structural schematic diagram of a terminal provided by an 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 touch screen 102 includes a general touch screen or a pressure-sensitive touch screen. The general touch screen can measure a pressing or sliding operation applied on the touch screen 102, and the pressure-sensitive touch screen can measure a pressing force applied on the touch screen 102.
[0021] The memory 103 stores the executable program of 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 a kernel layer 19 of an operating system. Here, the virtual environment program A is an application program developed based on the three-dimensional 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 three-dimensional map program, and a three-dimensional presentation program developed by the three-dimensional virtual environment module (also called the virtual environment module) 17. For example, when the operating system of the terminal adopts the Android operating system, the virtual environment program A is developed by adopting the Java programming language and the C# language; further, for example, when the operating system of the terminal adopts the IOS operating system, the virtual environment program A is developed by adopting the Object-C programming language and the C# language.
[0022] The 3D virtual environment module 17 is a module that supports multiple types of operating system platforms, and typically, the 3D virtual environment module can be used in program development in a wide range of fields, such as game development, virtual reality (VR), and 3D map fields. The embodiments of the present application do not limit the specific type of the 3D virtual environment module 17, and in the following embodiments, the 3D virtual environment module 17 is described as a module 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. The touch event includes a type and a coordinate value of the touch event, and the type of the touch event includes, but is not limited to, a touch start event, a touch move event, and a touch drop event. The 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 of the 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 for detecting 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 driving programs 192 may be a driving program associated with the processor 101, a driving program associated with the memory 103, a driving program associated with a network component, and a driving program associated with a sound component, etc. Those skilled in the art can know that the above is only a rough schematic for the structure of the terminal. In different embodiments, the terminal may have more or less 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 an 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 a 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, a MOBA game, a competitive game, and an SLG game. In this embodiment, the client is a racing game. The terminal 210 is a terminal used by a first user 212, and the first user 212 uses the terminal 210 to control a first virtual character located in a virtual environment to perform an activity, and the first virtual character can be called the first virtual character of the first user 212. The activity of the first virtual character includes at least one of body posture adjustment, crawling, walking, running, cycling, flying, jumping, driving, picking up, shooting, attacking, and throwing, but is not limited to these. Schematically, the first virtual character is a first virtual character, for example, a simulation human character or an animation human character.
[0028] The device type of the terminal 210 includes at least one of a smart phone, a tablet computer, 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, there are multiple other terminals 240 in different embodiments. In some embodiments, there is further at least one other terminal 240, which is a terminal corresponding to a developer, and a virtual environment client development and editing platform is installed on the other terminal 240, and 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 realize the update to 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 server, multiple servers, a cloud computing platform, and a virtualization center. The server cluster 220 is used to provide background services for clients supporting a three-dimensional virtual environment. Optionally, the server cluster 220 undertakes main computing tasks, and the terminal undertakes secondary computing tasks, or the server cluster 220 undertakes secondary computing tasks, and the terminal undertakes main computing tasks, or a distributed computing architecture is adopted between the server cluster 220 and the terminal to perform collaborative computing.
[0031] Optionally, the terminal and the server are both computer devices. In one schematic example, the server cluster 220 includes a server 221 and a server 226, and 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. Here, 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 of user accounts used by the terminal 210 and other terminals 240, such as the avatar of the user account, the nickname of the user account, the combat power index of the user account, 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, and the user-facing I / O interface 225 is used to establish communication with the terminal 210 through a wireless network or a wired network to exchange data.
[0032] Following the introduction of the virtual environment and the description of the implementation environment, the method for controlling a virtual vehicle provided by the embodiment of the present application will be described below. Schematically, the method for controlling a virtual vehicle provided by the present application may be realized by operating a player's terminal, or may be realized by operating a steering wheel, console, etc. connected to the player's terminal.
[0033] Here, when the control method for controlling a virtual vehicle provided by the embodiment of the present application is realized by operating a terminal, the relevant controls in the control method for controlling a virtual vehicle provided by the embodiment of the present application can be realized as controls in a display interface of the terminal. When the control method for controlling a virtual vehicle provided by the embodiment of the present application is realized by operating a steering wheel, console, etc. connected to the terminal, the relevant controls in the control method for controlling a virtual vehicle provided by the embodiment of the present application can be realized as a certain component of the steering wheel or console. For example, the direction control can be realized as a movement button or a rocking rod on the steering wheel, and further, for example, the accelerator control can be realized as an accelerator pedal on the console, and the direction control can be displayed as a steering wheel on the console.
[0034] Taking the virtual vehicle control method provided by the present application as an example, which is realized by operating a player's terminal, Figure 3 shows a schematic interface diagram of the virtual vehicle control method provided by an exemplary embodiment of the present application, in which a virtual vehicle 320 is displayed on a display interface 310, and the virtual vehicle 320 runs 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. A description of each control follows:
[0036] Here, the brake control 301 is used to realize control over 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 the trigger operation on the brake control 301, the vehicle speed of the virtual vehicle 320 is controlled to be reduced. As can be understood, the reduction in the vehicle speed of the virtual vehicle 320 is realized by strengthening the grip force of the virtual vehicle 320, and the reduction range of the vehicle speed of the virtual vehicle 320 can be set based on actual needs. Take the player's single-click on the brake control 301 as an example, 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, and the grip force of the virtual vehicle is strengthened accordingly, so that the vehicle speed of the virtual vehicle 320 is reduced accordingly.
[0037] The energy control 302 is used to indicate the amount of acceleration energy held by 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 provide a speed-up service for the virtual vehicle 320. Optionally, an acceleration energy storage control 01 is displayed around the energy control 302, and the storage control 01 is used to indicate the amount of acceleration energy stored corresponding to 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 held 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 held. Here, the storage 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 an acceleration service for the virtual vehicle 320, and a prompt information of consuming one bottle of nitrogen gas is displayed on the display interface 310.
[0038] The accelerator control 303 is used to realize an increase in the vehicle speed of the virtual vehicle 320. In response to a trigger operation on the accelerator control 303, the accelerator control 303 controls the virtual vehicle 320 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 pressing 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 releases the accelerator control 303 after single clicking, the virtual vehicle 320 enters a continuous acceleration state. Optionally, when the virtual vehicle 320 is in a continuous acceleration state, the brake control 301 is further used to realize at least one of an acceleration stop, a deceleration, and a reverse function of the virtual vehicle 320.
[0039] Optionally, after the virtual vehicle enters the sustained acceleration state, in response to a trigger operation on the brake control 301, the virtual vehicle 320 is controlled to stop accelerating, to simulate the state of a jump on the accelerator. 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 running state. If the trigger operation on the brake control 301 is a sustained pressing 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 pressing on the brake control 301 still exists, 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 realize steering of the virtual vehicle 320. Here, the direction control 304 includes a left steering control and a right steering control, and is used to realize left and right steering of the virtual vehicle 320. The handbrake control 305 is used to realize braking of the virtual vehicle 320. In a flat run state, in response to a trigger operation on the handbrake control 305, the vehicle speed of the virtual vehicle 320 is controlled to be reduced. Selectably, 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 the curve. Selectably, in the drift state, in response to a trigger operation on the handbrake control 305, the head of the virtual vehicle 320 is controlled to turn inward. The reduction in the vehicle speed of the virtual vehicle 320 is greater than the reduction in the vehicle speed of the virtual vehicle 320 in a flat run state.
[0042] The reset control 306 is used to realize the virtual vehicle 320 starting 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 wide road surface, and controls the virtual vehicle 320 to start again. Here, the reset control 306 is usually used in the process of the virtual vehicle 32 exiting.
[0043] 4 shows a schematic diagram of an interface of a control method for a virtual vehicle 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 drift state on a curve, which may be called a wagging state, and in the drift state, the virtual vehicle 420 runs in a skidding manner in an oversteer manner.
[0044] A method for controlling a virtual vehicle according to an 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 toward a first side in a speed direction, the orientation of the head of the virtual vehicle being 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 toward 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 by the second direction and the speed direction being smaller than a first included angle formed by the first direction and the speed direction; and 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. For example, the method of controlling a virtual vehicle provided by the present application is realized by the operation on the player's terminal. As shown in FIG. 4, the brake control, the energy control, and the accelerator control can be displayed in the style of a control in the display interface 410. Here, the brake control 401, the energy control 402, the accelerator control 403, the left turn control 4041, the right turn control 4042, and the handbrake control 405 are displayed in the display interface 410, respectively.
[0045] Exemplarily, in response to a first steering operation in the right turn control 4042 of the direction control and a brake operation in the handbrake control 405, the virtual vehicle 420 is controlled to enter a drift state. Exemplarily, a vehicle status display area 02 is displayed in the display interface 410, which is used to display the driving state of the virtual vehicle 420 and includes at least numerical information of the vehicle speed of the virtual vehicle 420 and / or a vehicle speed display bar. Exemplarily, in response to a brake operation in the handbrake control 405, the virtual speed indicated by the numerical information of the vehicle speed of the virtual vehicle 420 in the vehicle status display area 02 and / or the vehicle speed display bar decreases.
[0046] For example, the virtual vehicle 420 in the drift state is displayed with a virtual trace caused by tire friction on the virtual road. The first steering operation in the right turn control 4042 in the direction control is used to control the virtual vehicle 420 to steer to the right of the speed direction. The head of the virtual vehicle 420 is oriented in a first direction 431, and the first direction 431, which is the head direction of the virtual vehicle 420, is located to the right of the first speed direction 441. As can be seen, the head direction of the virtual vehicle 420, i.e., the first direction 431 and the first speed direction 441, are not on the same line, and the drift angle of the virtual vehicle is the included angle formed by the first direction 431 and the first speed direction 441. The first speed direction 441 is the speed direction of the virtual vehicle when the head direction of the virtual vehicle 420 is the first direction 431. For example, the first speed direction 441 is a tangent direction at a position on the travel trajectory of the virtual vehicle where the direction of the vehicle head is in the first direction 431. In response to a second steering operation in the left turn control 4041 of the direction control, the direction of the vehicle head of the virtual vehicle 420 that maintains the drift state is controlled to turn in the second direction 432. Exemplarily, the second steering operation in 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. Since the virtual vehicle 420 maintains a drift state, a virtual trace caused by tire friction is displayed on the virtual road. The head direction of the virtual vehicle 420 turns in the 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 the handbrake control 405, the direction of the head of the virtual vehicle 420 maintaining the drift state is controlled to turn in a third direction 433. Illustratively, as the 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 maintains the drift state, is controlled to turn in a third direction 433 by a brake operation in the handbrake control 405. 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 direction of the head of the virtual vehicle 420 that maintains the 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 performed simultaneously. The direction of the head of the virtual vehicle 420 turns in the third direction 433, and the third direction 433, which is the direction of the head of the virtual vehicle 420, is located to the left of the third speed direction 443. As can be seen, the direction of the head of the virtual vehicle 420, i.e., the third direction 433 and the third speed direction 443, are not collinear.
[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, iterative calculations can be performed on the velocity direction of the virtual vehicle described above 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 speed direction of the virtual vehicle at the initial time t is v(t), the head 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 head direction and the speed direction. The speed direction of the virtual vehicle 420 at the time t+Δt is v(t+Δt), and the head direction of the virtual vehicle 420 at the time t+Δt is d(t+Δt), and then, by calculating d(t+Δt)-v(t+Δt), the drift angle of the virtual vehicle 420 at the time t+Δt can be obtained. The remaining information can be inferred in this way.
[0051] Alternatively, the drift angle of the virtual vehicle at the i-th time is the difference between the head direction of the virtual vehicle at the i-th time and the velocity direction of the virtual vehicle at the i-th time. For example, the drift angle of the virtual vehicle 420 at the 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 a time when 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 and the grip force multiplied by the product, and then the speed direction at the first time added. 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 the virtual vehicle 420 is a constant 0.5, the starting direction of the head orientation of the virtual vehicle 420 is straight ahead, d(t)=90°, and the starting speed direction of the virtual vehicle 420 is set as v(t)=15°, the drift angle of the virtual vehicle 420 at time t (which is the starting time) is 90°-15°=75°. After that, the head orientation of the 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 speed 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, when the included angle between the head 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 the drift release and is released from the drift state, and then the virtual vehicle 420 is controlled to enter the flat run state. Here, the drift release angle can be set according to 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 a virtual vehicle located and in motion in a virtual environment. Illustratively, the virtual environment is used to provide an environment in which a virtual vehicle can travel. For example, the virtual vehicle control method is 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 is 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 directional control and a braking operation in the handbrake control, the virtual vehicle is controlled to enter a drift state. Illustratively, the first steering operation is used to control the virtual vehicle to steer to a first side of the speed direction, the first side is usually the left side or the right side, and the corresponding second side is the side opposite to the first side. The head of the virtual vehicle is oriented in a 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 in the drift state, the virtual vehicle skids in an oversteer manner to facilitate the virtual vehicle exiting the curve. In this embodiment, the virtual vehicle is controlled to enter the drift state in response to a first steering operation in the directional control and a braking operation in the handbrake control. For example, the left turn control and the handbrake control in 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 in the directional control are sequentially single clicked to control the virtual vehicle to drift to the left.
[0062] Here, the directional control and the handbrake control may be realized as controls in a display interface of the terminal, or as a component on a handle or console connected to the terminal. For example, the directional control and the handbrake control may be realized as a directional control and a handbrake control on the terminal, respectively. For further example, the directional control may be realized as a movement button or a rocking rod on the handle, and the handbrake control may be realized as a confirmation button on the handle. For further example, the directional control and the handbrake control may be realized as a steering wheel and a brake hand stopper on the console, respectively.
[0063] Illustratively, the handbrake control is used to realize braking of 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 directional control, the heading direction of the virtual vehicle 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 opposite 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 head direction of the vehicle in the second direction. Exemplarily, the speed direction is a tangent direction at a position where the head direction is the second direction on the travel trajectory of the virtual vehicle. 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 exemplarily, the virtual vehicle maintains a drift state in the process of turning in the second direction.
[0066] Step 540: In response to a brake operation in the handbrake control, the heading direction 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 realize the braking of the virtual vehicle and control the vehicle speed of the virtual vehicle to be reduced. In one implementation, the brake operation in the handbrake control is a single click of the handbrake control, and the handbrake member is used to greatly reduce the virtual speed of the virtual vehicle in a short time. Compared with the footbrake control, the virtual speed reduced by the handbrake control in a unit time is greater than that of the footbrake control.
[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. Exemplarily, the virtual vehicle maintains the drift state in 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. When 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 ability of the virtual vehicle to pass through successive curves.
[0069] 6 shows a flow chart of a method for controlling a virtual vehicle provided by an exemplary embodiment of the present application, which can be applied in a terminal supporting a virtual environment, i.e., in the embodiment shown in FIG. 5, step 540 can be realized as step 542.
[0070] Step 542: When the included angle between the heading direction of the virtual vehicle and the speed direction of the virtual vehicle exceeds a drift threshold, in response to a brake operation in the handbrake control, the heading direction of the virtual vehicle, which maintains the drift state, is controlled to turn in a third direction. Exemplarily, an included angle is formed between the speed direction of the virtual vehicle and the head direction of the virtual vehicle as two sides, and the included angle is smaller than 180 degrees. Exemplarily, a drift threshold is used to determine whether the virtual vehicle is in a drift state, and when the included angle between the head direction of the virtual vehicle and the speed direction of the virtual vehicle exceeds the drift threshold, the virtual vehicle maintains the drift state. Exemplarily, the drift threshold is 13 degrees. When the virtual vehicle maintains the drift state, the head 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 sub-steps.
[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, which 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 to the first side to drifting to the second side. The release information of the reverse drift skill may be at least one of text information, highlight special effect, flash special effect, aperture special effect, and sound special effect. FIG. 7 shows a schematic diagram of an interface of a control method for a virtual vehicle provided by one illustrative embodiment of the present application. A virtual vehicle 620 is displayed in a display interface 610, and the virtual vehicle 620 runs in a virtual scene displayed in the display interface 610. The virtual vehicle 620 switches from drifting to the first side to drifting to the second side. That is, when the head direction of the virtual vehicle is in a third direction, the release information 632 of the reverse drift skill is displayed, and the release information 632 is used to instruct the reverse drift skill to be triggered. Illustratively, when the reverse drift skill is triggered, at least one of a virtual economic value, a virtual experience value, and a virtual task progress is increased.
[0074] As described above, the method provided by this embodiment determines the driving state of the virtual vehicle according to 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; the steering radius when the virtual vehicle passes through successive curves is reduced; and the ability of the virtual vehicle to pass through successive curves is improved.
[0075] Next, the braking operation after the second steering operation will be further explained.
[0076] After the virtual vehicle enters the drift state, the virtual vehicle runs in a skid in an oversteer manner, which is also called a tail wagging state. After entering the drift state, the included angle between the head direction of the virtual vehicle and the speed direction of the virtual vehicle 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 to each other, and the second steering operation causes the included angle between the head direction of the virtual vehicle and the speed direction of the virtual vehicle to decrease. The grip force between the virtual vehicle and the ground is decreased by performing a brake operation again, thereby controlling the vehicle to continue to maintain the drift state.
[0077] As needs to 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 included angle between the orientation of the head of the virtual vehicle and the speed direction of the virtual vehicle exceeds the drift threshold, the drift state is maintained. (2) if the grip force between the virtual vehicle and the ground is smaller than the dynamic feature threshold, the drift state is maintained. As can be understood, the dynamic feature 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 with the decrease of the grip force. In one example, with the decrease of the grip force, even if the orientation of the head of the virtual vehicle 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. At least one of the grip force and the drift threshold determines whether the virtual vehicle is in an offset state, and approaches the driving principle of the real world, controls the virtual vehicle in a virtual environment, and realizes a vehicle drift simulating a pendulum.
[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., on the basis of the embodiment shown in FIG.
[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. Exemplarily, the speed direction of the virtual vehicle and the direction of the head of the virtual vehicle form an included angle as two sides, and the included angle is smaller than 180 degrees. Exemplarily, the drift threshold is used to determine whether the virtual vehicle is in a drift state, and when the included angle between the direction of the head of the virtual vehicle and the speed direction of the virtual vehicle does not exceed the drift threshold, the virtual vehicle releases the drift state and enters a flat run state. Exemplarily, the drift threshold is 13 degrees. Exemplarily, the virtual vehicle does not skid in the flat run state. As should be explained, in one example, the flat run state is used to indicate that the direction of the head of the virtual vehicle and the speed direction of the virtual vehicle are on the same straight line. In order to avoid a delay in entering the flat run state, when the included angle between the direction of the head of the virtual vehicle and the speed direction of the virtual vehicle is smaller than the drift threshold, the virtual vehicle enters the flat run state.
[0080] As should be explained, when the virtual vehicle releases 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 of the virtual environment.
[0081] 9 shows a schematic diagram of an interface of a method for controlling a virtual vehicle 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 runs 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 the 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 the second drift state. The virtual vehicle 642 enters the second drift state at the third position point 646a, and in the second drift state, the virtual vehicle 642 drifts to the right. 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 method for controlling a virtual vehicle 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] There is a virtual trace of the virtual vehicle 652 on the virtual road, and the continuous virtual trace 654 is a trace brought about 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 the leftward drift from the first position point 654a to the second position point 654b, and the virtual vehicle 642 maintains the rightward drift from the second position point 654b to the third position point 654c. That is, the virtual vehicle 642 switches from the leftward drift to the rightward drift at the second position point 654b.
[0086] As described above, the method provided by this embodiment determines the running state of the virtual vehicle according to the drift threshold, 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 head of the virtual vehicle and the speed direction of the virtual vehicle does not exceed the drift threshold, thereby making it possible to control the running state of the virtual vehicle more flexibly and improve the maneuverability of the virtual vehicle, and to enter the flat-run state when the included angle does not exceed the drift threshold, which is closer to the driving principles of the real world.
[0087] 11 shows a flowchart of a virtual vehicle control method provided in an exemplary embodiment of the present application, which can be applied in a terminal supporting a virtual environment, i.e., on the basis of the embodiment shown in FIG. 6, the method 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 orientation of the virtual vehicle, and the historical velocity direction of the virtual vehicle. For example, the included angle between the direction of the head of the virtual vehicle and the speed direction of the virtual vehicle is the drift angle. Here, the larger the drift angle, the higher the offset degree of the body of the virtual vehicle, and the longer the time required for the virtual vehicle to release the drift state. In addition, the drift angle is affected by the grip force of the virtual vehicle, and the change of the grip force is realized by the trigger operation in the brake control. As can be understood, when the virtual vehicle is in a flat run state, the speed direction of the virtual vehicle basically maintains a state that coincides with the direction of the head. At this time, the drift angle of the virtual vehicle can be determined to be 0 degrees. When the virtual vehicle is in a reverse state, the speed direction of the virtual vehicle is opposite to the direction of the head, and at this time, 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 speed direction of the virtual vehicle does not match the direction of the head of the vehicle. That is, the speed 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 certain deviation angle between the first direction and the second direction, and the deviation angle is the drift angle. Similarly, since there is a drift angle, the virtual vehicle takes a drift body posture.
[0090] Schematically, the grip effect of the virtual vehicle is realized by gradually rotating the speed direction of the virtual vehicle to approach the direction of the vehicle head, which ultimately allows the virtual vehicle to release the drift and recover to a flat-run state.
[0091] Taking the velocity direction of a virtual vehicle at an initial time t as v(t), the direction of the head of the vehicle 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 iterative calculation of the velocity direction of the virtual vehicle can be performed by the following formula: 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 speed 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 speed 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 manner.
[0093] Alternatively, the drift angle of the virtual vehicle at the i-th time is the difference between the head direction of the virtual vehicle at the i-th time and the velocity direction of the virtual vehicle at the i-th time. For example, the drift angle of the virtual vehicle 420 at the 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 a 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 a unit time.
[0095] 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).
[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 formula, 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 head direction of the virtual vehicle 420 at time t+Δt is d(t+Δt). The remaining information can be inferred in this way. Take the example that 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 calculated by d(t+Δt)-v(t+Δt).
[0098] As shown in FIG. 12, if we assume that the grip force of the virtual vehicle is a constant 0.5, the starting direction of the head direction of the virtual vehicle is straight ahead, d(t)=90°, and the starting speed direction of the virtual vehicle is set as v(t)=15°, then the drift angle of the virtual vehicle at time t (which is the starting time) is 90°-15°=75°. After that, the head direction of the virtual vehicle in time Δt turns leftward by 15°, that is, d(t+Δt)=105°. Based on the above formula, if we assume that Δt=1, the speed direction of the virtual vehicle can be calculated by 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 grip force of the virtual vehicle is increased by the first trigger operation in the brake control, thereby affecting the change in the drift angle of the virtual vehicle. Here, by increasing the grip force, the speed at which the drift angle is reduced is increased, thereby enabling the virtual vehicle to quickly enter a flat run state by releasing the drift from the drift state.
[0100] As described above, the method provided by this embodiment determines the speed direction of a virtual vehicle by introducing grip force, establishes a connection between the speed direction, the head direction, and the grip force, and ensures that the basis for determining the driving state of the virtual vehicle through iterative calculations is accurate, thereby approaching the driving principles of the real world.
[0101] 13 shows a flow chart of a method for controlling a virtual vehicle provided by an exemplary embodiment of the present application, which can be applied in a terminal supporting a virtual environment, i.e., in the embodiment shown in FIG. 5, step 540 can be realized as step 544.
[0102] Step 544: In response to a sustained pressing operation on the directional control and a braking operation on the handbrake control, the heading direction of the virtual vehicle that is maintaining the drift state is controlled so as to turn in a third direction. Exemplarily, the second steering operation is a sustained pressing operation in the direction control, and in this embodiment, in response to a simultaneous sustained pressing operation in the direction control and a brake operation, the direction of the head of the virtual vehicle that maintains the drift state is controlled to turn in a third direction. Exemplarily, the brake operation in the handbrake control may be at least one of a single click operation, a double click operation, a touch operation, a single pressing operation, and a sustained pressing operation. For example, the player single clicks the handbrake control to control the vehicle speed of the virtual vehicle to decrease. Exemplarily, the sustained pressing operation in the direction control controls the continuous steering of the virtual vehicle until the virtual vehicle is steered in the third direction. The brake operation in the handbrake control controls the virtual vehicle to maintain the drift state, thereby avoiding 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 the drift state and terminating the first steering operation, a first state timer is triggered to cause the first steering operation to accelerate the virtual vehicle toward the first side, and the acceleration decreases over time after terminating the first steering operation. 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 leaves 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, the two being positively correlated. Optionally, the first state timer is re-triggered if the drift state is maintained, and the first state timer is timed again when the first steering operation is terminated.
[0105] Before the first state timer expires, the direction of the head of the virtual vehicle maintaining the drift state is controlled to turn in a second direction in response to a second steering operation, and the direction of the head of the virtual vehicle maintaining the drift state is controlled to turn in a third direction in response to a braking operation. In 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 the grip force and drift threshold above. The virtual vehicle turns in the third direction due to the 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, the second steering operation causing the virtual vehicle to accelerate toward the 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 timed again are similar to 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, and may be used in combination in one embodiment to constitute a third embodiment, and the present application is not limited thereto. Furthermore, the embodiments shown above can be combined with the embodiments corresponding to Fig. 6 and Fig. 8, and by combining at least one of the first state timer and the second state timer with the drift threshold, the virtual vehicle can be jointly controlled to move, but the present application is not limited thereto.
[0108] In one embodiment, for example, corresponding to but not limited to a second state timer, there may be no timestamp of the second steering operation and the braking operation simultaneously, but this does not preclude the presence of at least one timestamp of the second steering operation and the braking operation simultaneously in other embodiments.
[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.
[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, the handbrake control brakes the virtual vehicle to reduce the virtual speed of the virtual vehicle significantly within a short period of time. Illustratively, the handbrake control brakes do not directly affect whether the virtual vehicle is in a drift state. Whether the virtual vehicle is in a drift state is not related to whether step 554 is executed. Optionally, whether the virtual vehicle is in a drift state is determined by the included angle between the heading direction of the virtual vehicle and the speed 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. Exemplarily, the speed direction of the virtual vehicle and the head direction of the virtual vehicle are used as two sides to construct an included angle, and the included angle is smaller than 180 degrees. Exemplarily, a drift threshold is used to judge whether the virtual vehicle is in a drift state, and when the included angle between the head direction of the virtual vehicle and the speed direction of the virtual vehicle exceeds the drift threshold, the virtual vehicle maintains the drift state. Exemplarily, the drift threshold is 13 degrees.
[0113] Sub-step 2: If the angle between the heading direction of the virtual vehicle and the speed direction of the virtual vehicle does not exceed a drift threshold, the virtual vehicle is controlled to release the drift state and enter a flat-run state. Exemplarily, 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 speed 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. Exemplarily, 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 flow chart of a method for controlling a virtual vehicle provided by an exemplary embodiment of the present application, which can be applied in a terminal supporting a virtual environment, i.e., 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 heading direction 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 toward a first side in the speed direction, and the first steering operation in the directional control controls continuous steering of the virtual vehicle until the virtual vehicle is steered in the first direction.
[0117] Step 524: In response to a brake operation in the handbrake control, the virtual vehicle is controlled to enter a drift state.
[0118] Exemplarily, the drift state may be referred to as a tail-wagging state, and in the drift state, the virtual vehicle skids in an oversteer manner to facilitate the virtual vehicle to exit the curve. A brake operation in the handbrake control controls the virtual vehicle to leave the flat run state and enter the drift state, and controls 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 brake operation to control the virtual vehicle to steer and enter the drift state, ensuring a level of flexible control over the virtual vehicle and improving the driving ability of the virtual vehicle in the virtual environment.
[0119] 16 shows a flow chart of a method for controlling a virtual vehicle 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 realized 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, in response to a brake operation in the handbrake control, the heading direction of the virtual vehicle maintaining the drift state is controlled to turn in a third direction. 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 where a virtual vehicle cannot continue to travel. This embodiment does not make any limitations thereto.
[0121] Optionally, when the virtual vehicle crosses or touches a virtual edge, the virtual vehicle is put in a disadvantageous state for driving, such as destruction of the virtual vehicle, a decrease in at least one of the driving capabilities of the virtual vehicle among acceleration, steering, and braking, and a loss of at least one of virtual economy points, virtual experience points, and virtual task progress.
[0122] In response to the braking operation in the handbrake control, the virtual vehicle switches from drifting to the first side to drifting to the second side when the distance between the virtual vehicle and the virtual edge of the virtual road exceeds the drift threshold. Since 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 explained, in step 546 of this embodiment, in response to the braking operation in the handbrake control, the virtual speed of the virtual vehicle is usually controlled to decrease. However, it is not excluded that there may be a situation in which the virtual speed of the virtual vehicle is controlled not to change in response to the 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 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 the brake operation in the handbrake control. Since 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. By reducing the virtual speed of the virtual vehicle by the brake operation and delaying the time when the virtual vehicle will collide with or cross the virtual edge to reserve a longer operation time, it is advantageous in facilitating the control of the running state of the virtual vehicle and avoiding affecting the running state of the virtual vehicle. As should be explained, in step 546 of this embodiment, when the virtual speed of the virtual vehicle is controlled to decrease in response to the 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 0.
[0124] Here, the first deceleration rate is a 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 a 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 that the virtual speed of the virtual vehicle decreases by 2 m / s per second, and the second deceleration rate is that the virtual speed of the virtual vehicle decreases by 5 m / s per second. As can be understood, in a unit time, when the distance between the virtual vehicle and the virtual edge exceeds the drift threshold, the deceleration effect of the virtual vehicle 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 judges whether a driving risk exists based on the distance between the virtual vehicle and the virtual edge, and when 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 ability of the virtual vehicle to pass through consecutive curves; and when 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 safe driving of the virtual vehicle, and avoids damage to the virtual vehicle due to the driving risk.
[0126] 17 shows a flowchart of a virtual vehicle control method provided in an exemplary embodiment of the present application, which can be applied in a terminal supporting a virtual environment, i.e., on the basis of 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 on the continuous steering virtual road segment. Illustratively, the continuous steering virtual road section is a road section in which there are at least two direction change points on a virtual road in a virtual environment. In one example, when driving a virtual vehicle to pass through a continuous steering virtual road section, it is necessary to control the virtual vehicle to first steer to a first side of the speed direction of the virtual vehicle 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 preference for the reverse drift skill when the player is passing through the continuous steering virtual road section. When the number of times the reverse drift skill is triggered is high, it indicates that the player prefers to trigger the reverse drift skill to pass through the continuous steering virtual road section. When the number of times the reverse drift skill is triggered is low, it 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 that maintains the 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 indicates that the player prefers to trigger the reverse drift skill when the virtual vehicle passes through the continuous steering virtual road section. By updating the drift threshold to the first angle threshold and increasing the time that the virtual vehicle maintains the drift state, the player can easily trigger the reverse drift skill by performing a brake 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. Illustratively, the fact that the number of times the reverse drift skill is triggered does not exceed the number threshold indicates that the virtual vehicle prefers to steer or enter a drift state multiple times when passing through the continuous steering virtual road section. The drift threshold is updated to the second angle threshold, and the time that the virtual vehicle maintains the drift state is reduced, so that the virtual vehicle can easily pass through the continuous steering virtual road section by releasing the drift state early and steering or entering the drift state again. As described above, the method provided by this embodiment judges the virtual vehicle's preference for passing through the continuous steering virtual road section by the number threshold, and when it is preferred to trigger the reverse drift skill and pass through the continuous steering virtual road section, sets a strict drift state release condition, extends the time that the virtual vehicle is in the drift state, and provides an advantageous condition for extending the time to trigger 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 in one embodiment of the present application. The virtual vehicle control method includes the following steps 702 to 730.
[0132] Step 702: In response to clicking on the right steering control, the virtual vehicle steers right. Illustratively, in response to clicking on the steer right control, the head position 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 driving speed of the virtual vehicle is rapidly decreased. 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 to the right, the virtual vehicle drifts to the right.
[0134] Step 706: Whether or not to release the handbrake control. For example, release the handbrake control, that is, stop pressing the handbrake control continuously.
[0135] Step 708: The virtual vehicle maintains the drift state and drifts to the right, and when the handbrake control is released, the virtual vehicle maintains the drift state and drifts to the right. The virtual vehicle is not affected by the handbrake control, and the running speed does not decrease as quickly.
[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 continues to be subject 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 does not reduce its running speed as quickly. If the handbrake control is clicked again, step 710 is executed and the virtual vehicle decelerates to a braking stop.
[0138] Step 716: Left steering control clicked or not. Illustratively, in response to clicking the steer left control, the head position of the virtual vehicle steers left. Step 718: The virtual vehicle steers left; if the steer left control is clicked, the head direction 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 heading of the virtual vehicle steers to the 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 leftward, if the handbrake control is clicked, the virtual vehicle maintains the drifting state and drifts leftward. The heading of the virtual vehicle changes from pointing to the right to pointing to the leftward, and drifts leftward.
[0142] Step 726: Determine whether the drift angle exceeds a drift threshold. If the handbrake control is not clicked, determine whether the drift angle exceeds a drift threshold, where 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 a flat run state. If the drift angle does not exceed the drift threshold, the virtual vehicle exits the drift state and enters a flat run state.
[0145] For example, the virtual vehicle in the present application may be a virtual vehicle realized by simulating the driving characteristics of a car in the real world, and the virtual vehicle is not limited by its external shape. For example, in a virtual environment, a virtual driver runs on a virtual cloud, and the appearance of the running machine has the appearance characteristics of a virtual wing, but the running machine runs on the virtual cloud in accordance with the driving characteristics of a car, and does not change the pitch angle depending on the lift or simulated lift, but this should also belong to the scope of the virtual vehicle shown in the present application. Furthermore, the present application does not limit the control method of the virtual vehicle, and the virtual vehicle can be controlled by a keyboard, a mouse, a handle, or a steering wheel and pedals that simulate the driving of a vehicle, but the present application is not limited thereto. The control method of the virtual vehicle may be applied in a racing application program for a virtual vehicle, or in a virtual vehicle simulation driving application program, and may also be applied to other application programs having vehicle racing and vehicle simulation driving functions.
[0146] In the interface schematic diagram of a control method for a virtual vehicle provided by one exemplary embodiment of the present application shown in Fig. 19, a brake control, an energy control, and an accelerator control can be displayed in the style of controls 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 hand brake 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 heading direction 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 located to the right of the speed direction, and the 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, and the head of the virtual vehicle is oriented in a first direction. Illustratively, the drift state may be referred to as a tail-wagging state, and in the drift state, the virtual vehicle skids sideways in an oversteer manner, making it easier for the virtual vehicle to exit a curve. By braking the handbrake control 805, the virtual vehicle is controlled to leave the flat run state and enter a drift state, and the virtual vehicle is controlled to drift 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 maintaining the drift 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 maintains the drift state and drifts to the right.
[0150] In response to a brake operation on the handbrake control 805, the direction of the head of the virtual vehicle that maintains the drift 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 a drift to the right to a drift to the left. Selectably, release information of the reverse drift skill is displayed. The reverse drift skill is used to instruct the virtual vehicle to switch from a drift to the right to a drift to the left, or the virtual vehicle to switch from a drift to the left to a drift to the right. The release information of 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] In addition, the release information of the reverse drift skill is displayed. That is, after the virtual vehicle switches from drifting to the right to drifting to the left, the driving skill is connected thereto by the control operation on the virtual vehicle. For example, the running speed of the virtual vehicle is increased by triggering the exit curve escape skill in response to the 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 an 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] Exemplarily, the brake control 801 is further used to realize at least one of acceleration stop, deceleration, and reverse functions of the virtual vehicle. For example, after the virtual vehicle enters a sustained acceleration state, in response to a single click operation on the brake control 801, the virtual vehicle is controlled to stop acceleration and enter a natural deceleration state. The natural deceleration state refers to a sustained deceleration state that the virtual vehicle enters due to a resistance factor, and the resistance factor includes at least one of road resistance, air resistance, and mechanical loss. For example, in response to a sustained pressing operation on the brake control 801, the virtual vehicle is controlled to stop acceleration and enter a sustained speed reduction state. The sustained speed reduction state refers to an accumulated deceleration state that the virtual vehicle enters due to a resistance factor and brake braking resistance, and the resistance factor includes at least one of road resistance, air resistance, and mechanical loss, and the brake braking resistance is generated based on a sustained pressing operation on the brake control 801.
[0154] Here, the road resistance refers to the friction force between the tires of the virtual vehicle and the ground, the air resistance refers to the air resistance experienced by the virtual vehicle during the running process, and the mechanical loss refers to the kinetic energy loss in the transmission of the virtual vehicle, and the magnitude of the brake resistance can be set according to actual needs. Optionally, when the virtual vehicle is in a sustained speed reduction state, if the speed of the virtual vehicle is reduced to 0 and the sustained pressure on the brake control 801 still exists, 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 the speed control, especially the deceleration control, of the virtual vehicle, which is closer to the driving principle of the real world.
[0155] As can 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 control method for a virtual vehicle 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 execute 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 execute 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 optional 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 action 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 optional 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 speed 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 speed 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 section.
[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, the drift threshold is updated to a first angle threshold, and the first angle threshold is smaller than the drift threshold; When the number of times the reverse drift skill is triggered in the continuous steering virtual road section does not exceed a number threshold, the drift threshold is updated to a second angle threshold, the second angle threshold being greater than the drift threshold.
[0168] It is necessary to explain 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, and in actual applications, the distribution of the above functions can be completed by different functional modules based on actual needs, that is, all or part of the functions described above can be completed by dividing the content structure of the device into different functional modules.
[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 obtained by each module performing the operation are the same as the technical effects in the embodiment related to the method, and will not be described in detail here.
[0170] An embodiment of the present application further provides a computer device, the computer device including a processor and a memory, in which a computer program is stored, the processor being used to execute the computer program in the memory to realize the virtual vehicle control method provided by each of the method embodiments.
[0171] Figure 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 computer, an MP3 player (Moving Picture Experts Group Audio Layer III, MPEG Audio Level 3), an MP4 player (Moving Picture Experts Group Audio Layer IV, MPEG Audio Level 4), a notebook computer, or a desktop computer. The terminal 1900 may also be called 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 by adopting at least one hardware form of DSP (Digital Signal Processing), FPGA (Field-Programmable Gate Array), and PLA (Programmable Logic Array). The processor 1901 may also include a main processor and a coprocessor, where the main processor is a processor used to process data in a wake-up state and is also called a CPU (Central Processing Unit), and the coprocessor is a low-power consumption 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, flash storage devices, etc. In some embodiments, the non-transitory computer readable storage media in the memory 1902 may be used to store at least one instruction that is executed by the processor 1901 to implement the method of controlling a virtual vehicle provided by the method embodiments herein.
[0174] In some embodiments, the terminal 1900 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 a circuit board. Specifically, the peripheral includes 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, and in some 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, and this embodiment is not limited thereto. The radio frequency circuit 1904 is used to receive and transmit RF (Radio Frequency) signals, also called electromagnetic signals. The radio frequency circuit 1904 communicates with communication networks and other communication devices by electromagnetic signals. The radio frequency circuit 1904 can further include circuitry related to NFC (Near Field Communication). The touch display screen 1905 is used to display a UI (User Interface). The UI can include graphics, text, icons, videos, and any combination thereof. The camera component 1906 is used to collect images or videos. Optionally, the camera component 1906 includes a front camera and a rear camera. The audio circuitry 1907 can include a microphone and a speaker.The microphone is used to collect sound waves of the user and the environment, and convert the sound waves into electrical signals to be input to the processor 1901 for processing, or to the radio frequency circuit 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 on the lower layer of the touch display screen 1905. It detects a grip signal of the user on the terminal 1900 and / or realizes controlling an operability control 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 is also called a distance sensor and 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 can be understood by those skilled in the art, the above structure does not constitute a limitation on the terminal 1900, and may include more or less components than those shown, may combine some components, or may adopt 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 operates on a computing device.
[0177] In an exemplary embodiment, a computer program product is further provided, the computer program product including computer instructions, the computer instructions being 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, thereby realizing the method for controlling a virtual vehicle provided in each of the above method embodiments.
[0178] In an exemplary embodiment, a computer-readable storage medium is further provided, in which a computer program is stored, and the computer program is uploaded and executed by a processor to realize 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 realizing the above embodiments may be completed by hardware, or may be completed by instructing the relevant hardware by a program, and the program may be stored in a computer-readable storage medium, and the above-mentioned storage medium may be a read-only memory, a magnetic disk, an optical disk, etc. Those skilled in the art should be able to recognize that the functions described in the embodiments of the present application in one or more examples above can be realized using hardware, software, firmware, or any combination thereof. When realized using software, these functions can be stored in a computer-readable medium or transmitted as one or more instructions or codes on a computer-readable medium. The computer-readable medium includes a computer storage medium and a communication medium, where the communication medium includes any medium that facilitates the transfer of a computer program from one place to another. A storage media may be any available media 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 of a speed direction, the head direction of the virtual vehicle being in a first direction, and the first direction being located on the first side of the speed direction; a step of controlling, in response to a second steering operation in the direction control, a direction of a head of the virtual vehicle maintaining the drift state to turn in a second direction, the second steering operation being used to control the virtual vehicle to steer toward 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, in response to the brake operation in the handbrake control, a direction of a head of the virtual vehicle that maintains the drift state to turn in a third direction, the third direction being located on the second side of the speed direction.
2. The step of controlling 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 includes:
2. The method of claim 1, further comprising the step of controlling the heading 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 heading of the virtual vehicle and the speed direction of the virtual vehicle exceeds a drift threshold.
3. a 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 value, the step including:
3. The method according to 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, thereby displaying reverse drift skill release information.
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 the step of 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 directional control, The step of controlling 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 includes:
2. The method of claim 1, further comprising the step of controlling a heading direction 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 a direction of a head 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 speed direction; A 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: controlling the virtual vehicle to maintain the drift state when an included angle between a heading direction 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 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.
10. The step of displaying the direction of the head of the virtual vehicle maintaining the drift state turning in a third direction in response to the brake operation of the handbrake control includes: a step of controlling a direction of a head of the virtual vehicle maintaining the drift state to turn in the third direction in response to the brake operation in the handbrake control when a distance between the virtual vehicle and a virtual edge exceeds a drift threshold, the virtual edge being 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 a virtual speed of the virtual vehicle maintaining the drift state to decrease in response to the brake operation in the handbrake control when a 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 a number of times a 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. A control device for a virtual vehicle, the device comprising: a display module adapted to display the virtual vehicle in a virtual environment and in a running state; a control module adapted 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 adapted to control the virtual vehicle to steer to a first side of a speed direction, the head direction of the virtual vehicle being in a first direction, the first direction being located on the first side of the speed direction; The control module is further used to control, in response to a second steering operation in the direction control, a direction of the head of the virtual vehicle maintaining the drift state to turn in a second direction, the second steering operation being used to control the virtual vehicle to steer toward 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 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 speed direction.
14. A computer device including a processor and a memory, at least one program being stored in the memory, and the processor being used to realize the virtual vehicle control method described in any one of claims 1 to 12 by executing the at least one program in the memory.
15. A computer-readable storage medium having executable instructions stored therein, the executable instructions being uploaded and executed by a processor to realize the method for controlling a virtual vehicle according to any one of claims 1 to 12.
16. A computer program product, the computer program product including computer instructions, the computer instructions being stored in a computer-readable storage medium, the computer program product realizing the method for controlling a virtual vehicle according to any one of claims 1 to 12 by a processor reading and executing the computer instructions from the computer-readable storage medium.
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
