Virtual vehicle control method, device and equipment and computer readable storage medium
By introducing throttle and foot brake components into the virtual vehicle control system, players can control the acceleration and speed of the virtual vehicle by operating these components, solving the problems of insufficient control power and poor gaming experience in the prior art, and achieving a more flexible and real vehicle control experience.
Patent Information
- Application Number
- CN202510409858.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2022-05-20
- Publication Date
- 2025-05-30
AI Technical Summary
In the prior art, players have low control over virtual vehicles, their vehicle control methods are not flexible enough, their gaming experience is poor, and their inertial drifting is low in compliance with the way of operating real vehicles.
By displaying the throttle parts and foot brake parts of the virtual vehicle, players can control the acceleration and speed of the virtual vehicle by operating these parts to achieve control of inertial drift. Specifically, the throttle component is used to increase the driving speed of the virtual vehicle, the foot brake component is used to reduce the driving speed, and to achieve flexible control of the vehicle by acquiring and controlling acceleration.
It improves players' control over virtual vehicles, makes the vehicle control method more flexible, improves the gaming experience, and increases the authenticity of controlling virtual vehicles for inertial drift.
Smart Images

Figure CN120053962A_ABST
Abstract
Description
[0001] This application is a divisional application of a Chinese application with the application number 202210557452.4, the application date of May 20, 2022, and the invention title of "Control Method, Device, Equipment and Computer Readable Storage Medium for Virtual Vehicle". Technical Field
[0002] The embodiments of this application relate to the field of Internet technologies, and particularly relate to a control method, device, equipment and computer readable storage medium for a virtual vehicle. Background Art
[0003] With the continuous development of online games and terminal technologies, there are more and more game applications that can be installed on terminals. As a competitive game, racing games are sought after by more and more players because of their cool skills and super fast speed experience. Summary of the Invention
[0004] The embodiments of this application provide a control method, device, equipment and computer readable storage medium for a virtual vehicle, which can be used to solve the problems in the related technologies that the player's control over the vehicle is relatively low, the vehicle control method is not flexible enough, the game experience is poor, and the consistency with the method of inertial drift when operating a real vehicle is relatively low. The technical solutions are as follows:
[0005] On the one hand, the embodiments of this application provide a control method for a virtual vehicle, and the method includes:
[0006] Display a virtual vehicle, an accelerator component and a foot brake component in a virtual scene, where the accelerator component is used to increase the driving speed of the virtual vehicle, the foot brake component is used to decrease the driving speed of the virtual vehicle, and the front direction of the virtual vehicle is the first direction;
[0007] In response to receiving an operation triggered on the accelerator component, obtain a first acceleration, where the first acceleration is used to increase the driving speed of the virtual vehicle; control the virtual vehicle to travel in the first direction according to the first acceleration;
[0008] In response to receiving an operation triggered on the foot brake component, control the driving speed of the virtual vehicle.
[0009] On the other hand, the embodiments of this application provide a control device for a virtual vehicle, and the device includes:
[0010] A display module, configured to display a virtual vehicle, an accelerator component and a foot brake component in a virtual scene, where the accelerator component is used to increase the driving speed of the virtual vehicle, the foot brake component is used to decrease the driving speed of the virtual vehicle, and the front direction of the virtual vehicle is the first direction;
[0011] An acquisition module, configured to acquire a first acceleration in response to an operation triggered on the throttle component, where the first acceleration is used to increase the driving speed of the virtual vehicle;
[0012] A control module, configured to control the virtual vehicle to travel in the first direction according to the first acceleration;
[0013] The control module is further configured to control the driving speed of the virtual vehicle in response to an operation triggered on the foot brake component.
[0014] In a possible implementation, the control module is configured to, in response to an operation triggered on the foot brake component, acquire a second acceleration for reducing the driving speed of the virtual vehicle when the driving speed of the virtual vehicle meets the speed requirement; and control the virtual vehicle to travel in the first direction according to the second acceleration.
[0015] In a possible implementation, the control module is configured to, in response to an operation triggered on the foot brake component, acquire a third acceleration for increasing the driving speed of the virtual vehicle when the driving speed of the virtual vehicle does not meet the speed requirement; and control the virtual vehicle to travel in a second direction opposite to the first direction according to the third acceleration.
[0016] In a possible implementation, the control module is configured to, in response to an operation triggered on the foot brake component, adjust the driving speed of the virtual vehicle to a target driving speed when the driving speed of the virtual vehicle meets the speed requirement.
[0017] In a possible implementation, an acceleration component is further displayed in the virtual scene, and the acceleration component is used to adjust the driving speed of the virtual vehicle;
[0018] The acquisition module is further configured to acquire a fourth acceleration for increasing the driving speed of the virtual vehicle in response to an operation triggered on the acceleration component, where the fourth acceleration is greater than the first acceleration, and the acceleration component is used to adjust the driving speed of the virtual vehicle;
[0019] The control module is further configured to control the virtual vehicle to travel in the first direction according to the fourth acceleration.
[0020] In a possible implementation, an acceleration icon is displayed below the acceleration component, and multiple acceleration gas bottles are displayed in the acceleration icon. The number of acceleration gas bottles of the first color is the number of acceleration gas bottles currently available for the virtual vehicle, and the number of acceleration gas bottles of the second color is the number of acceleration gas bottles that the virtual vehicle can currently store.
[0021] In a possible implementation, a first direction component and a second direction component are also displayed in the virtual scene. The first direction component and the second direction component are used to adjust the driving direction of the virtual vehicle, and the direction corresponding to the first direction component is opposite to the direction corresponding to the second direction component.
[0022] In a possible implementation, a handbrake component is also displayed in the virtual scene. The handbrake component is used to adjust the driving speed of the virtual vehicle;
[0023] The control module is further configured to, when the virtual vehicle performs inertial drift in the direction corresponding to the first direction component, in response to receiving an operation triggered on the handbrake component, control the virtual vehicle to perform normal drift in the direction corresponding to the first direction component. The driving speed of the virtual vehicle during normal drift is less than the driving speed of the virtual vehicle during inertial drift.
[0024] In a possible implementation, a first direction component is also displayed in the virtual scene. The first direction component is used to adjust the driving direction of the virtual vehicle;
[0025] The control module is further configured to, in response to receiving a first operation triggered on the first direction component, sequentially receive a second operation triggered on the foot brake component, a third operation triggered on the direction component, the driving speed of the virtual vehicle at the target time point being greater than the speed threshold, and the driving state of the virtual vehicle being a flat running state at the target time point during the duration of the first operation, and control the virtual vehicle to perform inertial drift in the direction corresponding to the first direction component;
[0026] Wherein, the target time point is determined based on the trigger moment of the third operation.
[0027] In a possible implementation, the acquisition module is further configured to, in response to receiving a third operation triggered on the accelerator component, acquire a first image, where the first image is an image of the virtual vehicle at the target time point;
[0028] The device further includes:
[0029] A determination module, configured to determine the driving speed and driving state of the virtual vehicle at the target time point based on the first image.
[0030] In a possible implementation, the determining module is configured to determine the driving speed shown in the first image as the driving speed of the virtual vehicle at the target time point; based on the fact that the wheels of the virtual vehicle in the first image do not leave the carrier surface and the virtual vehicle is not in a drifting state, determine that the driving state of the virtual vehicle at the target time point is the flat-running state; or, based on the fact that the wheels of the virtual vehicle in the first image do not leave the carrier surface, determine that the driving state of the virtual vehicle at the target time point is a non-flat-running state; or, based on the fact that the wheels of the virtual vehicle in the first image do not leave the carrier surface and the virtual vehicle is in the drifting state, determine that the driving state of the virtual vehicle at the target time point is the non-flat-running state.
[0031] In a possible implementation, the control module is further configured to control the virtual vehicle to drive in the direction corresponding to the first direction component in the flat-running state based on the fact that the drifting angle of the virtual vehicle at the current moment is less than the first angle, and the driving speed of the virtual vehicle in the flat-running state is greater than the driving speed of the virtual vehicle during inertial drifting.
[0032] In a possible implementation, the determining module is further configured to determine the driving angle and the head angle of the virtual vehicle at the current moment; and determine the drifting angle of the virtual vehicle at the current moment according to the driving angle and the head angle of the virtual vehicle at the current moment.
[0033] In a possible implementation, the determining module is configured to obtain a second image, where the second image is an image of the virtual vehicle at the current moment; determine the head angle of the virtual vehicle at the current moment according to the second image; obtain the driving angle of the virtual vehicle at a first moment, where the first moment is adjacent to and earlier than the current moment; and determine the driving angle of the virtual vehicle at the current moment according to the head angle of the virtual vehicle at the current moment and the driving angle of the virtual vehicle at the first moment.
[0034] In a possible implementation, the display module is further configured to display a notification message for informing the current driving state of the virtual vehicle.
[0035] In a possible implementation, the control module is further configured to control the virtual vehicle to perform ordinary drifting in the direction corresponding to the first direction component based on the fact that the drifting angle of the virtual vehicle at the current moment is greater than the second angle, the driving speed of the virtual vehicle during ordinary drifting is less than the driving speed of the virtual vehicle during inertial drifting, and the second angle is greater than the first angle.
[0036] In a possible implementation, the control module is further configured to control the virtual vehicle to perform inertial drift in the direction corresponding to the first direction component based on the drift angle of the virtual vehicle at the current moment being not less than the first angle and not greater than the second angle, where the second angle is greater than the first angle.
[0037] On the other hand, an embodiment of the present application provides an electronic device, which includes a processor and a memory. At least one program code is stored in the memory, and the at least one program code is loaded and executed by the processor to enable the electronic device to implement the control method of the virtual vehicle described in any one of the above.
[0038] On the other hand, a computer-readable storage medium is also provided. At least one program code is stored in the computer-readable storage medium, and the at least one program code is loaded and executed by a processor to enable a computer to implement the control method of the virtual vehicle described in any one of the above.
[0039] On the other hand, a computer program or a computer program product is also provided. At least one computer instruction is stored in the computer program or the computer program product, and the at least one computer instruction is loaded and executed by a processor to enable a computer to implement any one of the above control methods of the virtual vehicle.
[0040] The technical solution provided by the embodiment of the present application at least brings the following beneficial effects:
[0041] When the technical solution provided by the embodiment of the present application controls the virtual vehicle to perform inertial drift, the player only needs to operate the direction component, the foot brake component, and the throttle component to control the virtual vehicle to perform inertial drift. Therefore, this method improves the player's control over the vehicle, makes the vehicle control method more flexible, and further improves the player's gaming experience.
[0042] Moreover, controlling the virtual vehicle to perform inertial drift by operating the direction component, the throttle component, and the foot brake component is more in line with the way of operating a real vehicle to perform inertial drift, making the authenticity of controlling the virtual vehicle to perform inertial drift relatively high. BRIEF DESCRIPTION OF THE DRAWINGS
[0043] To more clearly illustrate the technical solutions in the embodiments of the present application, the following will briefly introduce the drawings required for the description of the embodiments. Obviously, the following drawings are only some embodiments of the present application. For those of ordinary skill in the art, other drawings can be obtained based on these drawings without creative efforts.
[0044] Figure 1 It is a schematic diagram of the implementation environment of a control method for a virtual vehicle provided by an embodiment of the present application;
[0045] Figure 2 It is a flowchart of a method for controlling a virtual vehicle provided by an embodiment of the present application;
[0046] Figure 3 It is a schematic diagram showing a first scenario provided by an embodiment of the present application;
[0047] Figure 4 It is a schematic diagram showing a vehicle control interface provided by an embodiment of the present application;
[0048] Figure 5 It is a schematic diagram showing a notification message provided by an embodiment of the present application;
[0049] Figure 6 It is a schematic diagram showing the speed angle and the front head angle of a virtual vehicle at the current moment provided by an embodiment of the present application;
[0050] Figure 7 It is a schematic diagram showing a virtual vehicle performing a normal drift provided by an embodiment of the present application;
[0051] Figure 8 It is a schematic diagram showing a virtual vehicle performing an inertial drift provided by an embodiment of the present application;
[0052] Figure 9 It is a schematic diagram showing the drift trajectories of a normal drift and an inertial drift provided by an embodiment of the present application;
[0053] Figure 10 It is a schematic diagram showing the process of controlling a virtual vehicle to perform an inertial drift provided by an embodiment of the present application;
[0054] Figure 11 It is a flowchart of a method for controlling a virtual vehicle provided by an embodiment of the present application;
[0055] Figure 12 It is a schematic structural diagram of a control device for a virtual vehicle provided by an embodiment of the present application;
[0056] Figure 13 It is a schematic structural diagram of a terminal device provided by an embodiment of the present application;
[0057] Figure 14 It is a schematic structural diagram of a server provided by an embodiment of the present application. Detailed implementation manners
[0058] To make the objectives, technical solutions, and advantages of the present application clearer, the following will further describe the embodiments of the present application in detail with reference to the accompanying drawings.
[0059] For ease of understanding, several terms involved in the embodiments of the present application are first explained as follows:
[0060] Virtual scene: refers to the scene provided (or displayed) when the application program runs on the terminal device. The virtual scene is a scene created for virtual objects to move in. The virtual scene can be a two-dimensional virtual scene, a 2.5D virtual scene, or a three-dimensional virtual scene, etc. The virtual scene can be a simulation of the real world, a semi-simulation of the real world, or a purely fictional scene. Exemplarily, the virtual scene involved in the embodiments of the present application is a three-dimensional virtual scene.
[0061] Figure 1 FIG. is a schematic diagram of the implementation environment of a control method for a virtual vehicle provided by an embodiment of the present application. As Figure 1 shown, the implementation environment includes: a terminal device 101 and a server 102.
[0062] The terminal device 101 can be at least one of a smart phone, a game console, a desktop computer, a tablet computer, an e-book reader, and a laptop computer. The terminal device 101 is used to execute the control method for the virtual vehicle provided by the embodiments of the present application.
[0063] The terminal device 101 can generally refer to one of multiple terminal devices. Only the terminal device 101 is used as an example in this embodiment. Those skilled in the art can know that the number of the above terminal devices 101 can be more or less. For example, the above terminal device 101 can be only one, or the above terminal device 101 can be dozens or hundreds, or more. The embodiments of the present application do not limit the number and type of the terminal devices.
[0064] The server 102 is a single server, or a server cluster composed of multiple servers, or any one of a cloud computing platform and a virtualization center. The embodiments of the present application do not limit this. The server 102 is communicatively connected to the terminal device 101 through a wired network or a wireless network. The server 102 has a data receiving function, a data processing function, and a data sending function. Of course, the server 102 can also have other functions. The embodiments of the present application do not limit this.
[0065] Based on the above implementation environment, the embodiments of the present application provide a control method for a virtual vehicle. Taking Figure 2 the flowchart of a control method for a virtual vehicle provided by the embodiments of the present application shown as an example, this method can be executed by Figure 1 the terminal device 101 in. As Figure 2 shown, this method includes the following steps:
[0066] In step 201, display the virtual vehicle in the virtual scene.
[0067] In an exemplary embodiment of the present application, an application program for vehicle control is installed and run in a terminal device. The application program is a racing application or a competitive sports application. The type of the application program is not limited in the embodiments of the present application.
[0068] In response to a triggering operation of an interaction object on the application program, a first scene is displayed. The first scene is the first screen displayed when the application program is selected. A start game control is displayed in the first scene. Of course, other controls may also be displayed in the first scene, which is not limited in the embodiments of the present application. The interaction object is the object using the terminal device. As Figure 3 shown is a schematic diagram of the display of a first scene provided by an embodiment of the present application. In Figure 3 a start game control 301 is displayed. Optionally, a virtual vehicle 302 may also be displayed.
[0069] In response to a triggering operation of the interaction object on the start game control, a virtual scene is displayed. A virtual vehicle is displayed in the virtual scene. Optionally, the virtual scene is a vehicle control interface, that is, a virtual vehicle to be controlled is displayed in the vehicle control interface. Exemplarily, a first direction component, a foot brake component, and an accelerator component may also be displayed in the vehicle control interface. Among them, the first direction component is used to adjust the driving direction of the virtual vehicle, the accelerator component is used to increase the driving speed of the virtual vehicle, and the foot brake component is used to decrease the driving speed of the virtual vehicle.
[0070] Optionally, at least one of a second direction component, a handbrake component, a reset component, and an acceleration component may also be displayed in the vehicle control interface, which is not limited in the embodiments of the present application. Among them, the second direction component is used to adjust the driving direction of the virtual vehicle, and the direction corresponding to the second direction component is opposite to the direction corresponding to the first direction component. Exemplarily, the direction corresponding to the first direction component is left, that is, the first direction component is used to control the virtual vehicle to drive left; the direction corresponding to the second direction component is right, that is, the second direction component is used to control the virtual vehicle to drive right. Or, the direction corresponding to the first direction component is right, that is, the first direction component is used to control the virtual vehicle to drive right; the direction corresponding to the second direction component is left, that is, the second direction component is used to control the virtual vehicle to drive left. The handbrake component is used to reduce the driving speed of the virtual vehicle. The reset component is used to transfer the virtual vehicle to an open road surface and restart, and the reset component is used for the virtual vehicle to get out of trouble. The acceleration component is used to increase the driving speed of the virtual vehicle. In response to receiving a fifth operation triggered on the acceleration component, a fourth acceleration is obtained. The fourth acceleration is used to increase the driving speed of the virtual vehicle, and the fourth acceleration is greater than the first acceleration. The virtual vehicle is controlled to drive in the direction of the head of the virtual vehicle at the fourth acceleration within a fourth time period. Among them, the fourth time period can be set based on experience or adjusted according to the implementation environment, which is not limited in the embodiments of the present application. Exemplarily, the fourth time period is 30 seconds. The fourth acceleration is set based on experience or adjusted according to the implementation environment, which is also not limited in the embodiments of the present application. Exemplarily, the fourth acceleration is 40m / s 2 (meters per second 2 ). The fifth operation triggered on the acceleration component may be an operation of clicking the acceleration component, or other operations, which is not limited in the embodiments of the present application.
[0071] Below the acceleration component, there is also an acceleration icon, in which a plurality of acceleration gas bottles are displayed. Among them, the number of gray acceleration gas bottles represents the number of acceleration gas bottles that the virtual vehicle can currently use, and the number of white acceleration gas bottles represents the number of acceleration gas bottles that the virtual vehicle can currently store. Each time the interaction object clicks the acceleration component, one gray acceleration gas bottle in the acceleration icon will turn white. The gas in the acceleration gas bottle can be nitrogen or other gases, which is not limited in the embodiments of the present application.
[0072] As Figure 4 shown is a schematic display diagram of a vehicle control interface provided by an embodiment of the present application. In Figure 4It shows a virtual vehicle 401 to be controlled, a first direction component 402, a second direction component 403, a foot brake component 404, an accelerator component 405, a hand brake component 406, and an acceleration component 407. Among them, in the acceleration icon included under the acceleration component, there are 2 gray acceleration gas cylinders and 2 white acceleration gas cylinders shown, that is, the number of acceleration gas cylinders that the virtual vehicle can currently use is 2, and the number of acceleration gas cylinders that the virtual vehicle can currently store is 2.
[0073] It should be noted that the above-mentioned first direction component, hand brake component, foot brake component, accelerator component, reset component, acceleration component, and second direction component can be displayed in the vehicle control interface, so that the interaction object can control the virtual vehicle in the virtual scene by operating the components. It can also be an independent component capable of interacting with the terminal device, so that the interaction object can control the virtual vehicle in the virtual scene in the terminal device by operating the independent component. The embodiments of the present application do not limit this. Optionally, the independent component can interact with the terminal device through a wired network or a wireless network.
[0074] In a possible implementation manner, based on the front direction of the virtual vehicle being the first direction, and receiving a third operation triggered on the accelerator component, a first acceleration is obtained. The first acceleration is used to increase the driving speed of the virtual vehicle, and the virtual vehicle is controlled to travel in the first direction at the first acceleration within the first duration.
[0075] Among them, the third operation triggered on the accelerator component can be a click operation on the accelerator component, or other operations. The embodiments of the present application do not limit this. Optionally, the first acceleration is set based on experience, or adjusted according to the implementation environment. The embodiments of the present application do not limit this. Exemplarily, the first acceleration is 20m / s 2 . The first duration is set based on experience, or adjusted according to the implementation environment. The embodiments of the present application also do not limit this. Exemplarily, the first duration is 30 seconds.
[0076] Exemplarily, the front direction of the virtual vehicle is forward. When a click operation triggered on the accelerator component is received, a first acceleration is obtained. The first acceleration is 20m / s 2 , therefore, within 30 seconds, the virtual vehicle is controlled to travel forward at an acceleration of 20m / s 2 .
[0077] Optionally, based on the front direction of the virtual vehicle being the first direction, when the driving speed of the virtual vehicle meets the speed requirement, and receiving a second operation triggered on the foot brake component, a second acceleration is obtained. The second acceleration is used to reduce the driving speed of the virtual vehicle, and the virtual vehicle is controlled to travel in the first direction at the second acceleration within the second duration.
[0078] Among them, that the driving speed of the virtual vehicle meets the speed requirement means that the driving speed of the virtual vehicle is greater than 0. The second operation triggered on the foot brake component can be a single click operation on the foot brake component, or other operations, which are not limited in the embodiments of the present application. The second acceleration is set based on experience or adjusted according to the implementation environment, which is not limited in the embodiments of the present application. Exemplarily, the second acceleration is 10m / s 2 , and the second duration is set based on experience or adjusted according to the implementation environment, which is also not limited in the embodiments of the present application. Exemplarily, the second duration is 20 seconds.
[0079] Exemplarily, when the front direction of the virtual vehicle is forward, the driving speed of the virtual vehicle meets the speed requirement, and a click operation triggered on the foot brake component is received, the second acceleration is obtained, and the value of the second acceleration is -10m / s 2 , therefore, within 20 seconds, the virtual vehicle is controlled to travel in the first direction at a driving speed of -10m / s 2 .
[0080] In a possible implementation manner, based on the front direction of the virtual vehicle being the first direction, the driving speed of the virtual vehicle does not meet the speed requirement, and a first operation triggered on the foot brake component is received, the third acceleration is obtained, and the third acceleration is used to increase the driving speed of the virtual vehicle. The virtual vehicle is controlled to travel in the second direction opposite to the first direction at the third acceleration within the third duration.
[0081] Among them, that the driving speed of the virtual vehicle does not meet the speed requirement means that the driving speed of the virtual vehicle is 0. The first operation triggered on the foot brake component can be a long press operation on the foot brake component, or others, which are not limited in the embodiments of the present application. The first operation triggered on the foot brake component is different from the second operation triggered on the foot brake component. The third acceleration is set based on experience or adjusted according to the implementation environment, which is not limited in the embodiments of the present application. Exemplarily, the third acceleration is 5m / s 2 . The third duration is set based on experience or adjusted according to the implementation environment, which is also not limited in the embodiments of the present application. Exemplarily, the third duration is 15 seconds.
[0082] Exemplarily, when the front direction of the virtual vehicle is forward and the driving speed of the virtual vehicle is 0, when a long press operation triggered on the foot brake component is received, the third acceleration is obtained, and the third acceleration is 5m / s 2 , therefore, within 15 seconds, the virtual vehicle is controlled to travel backward at an acceleration of 5m / s 2 .
[0083] Optionally, based on the driving speed of the virtual vehicle meeting the speed requirement and receiving the first operation triggered on the foot brake component, control the driving speed of the virtual vehicle to be adjusted to the target driving speed within the fifth time period. The fifth time period is set based on experience or adjusted according to the implementation environment, which is not limited in the embodiments of the present application. Exemplarily, the fifth time period is 15 seconds. The target driving speed is set based on experience or adjusted according to the implementation environment, which is not limited in the embodiments of the present application. Exemplarily, the target driving speed is 0.
[0084] Exemplarily, when the virtual vehicle is driving at a speed of 100 km / h and a long press operation is triggered on the foot brake component, control the driving speed of the virtual vehicle to drop to 0 within 15 seconds.
[0085] In step 202, in response to receiving the first operation triggered on the first direction component, display the virtual vehicle with the changed head direction.
[0086] The first direction component is used to adjust the driving direction of the virtual vehicle. The first operation triggered on the first direction component can be a long press operation on the first direction component or other operations, which is not limited in the embodiments of the present application.
[0087] Optionally, when the first operation triggered on the first direction component is received, display the virtual vehicle with the changed head direction in the virtual scene, and the changing direction of the head direction of the virtual vehicle is the same as the direction corresponding to the first direction component.
[0088] In step 203, in response to receiving the second operation triggered on the foot brake component and the third operation triggered on the accelerator component in sequence during the duration of the first operation, the driving speed of the virtual vehicle at the target time point being greater than the speed threshold, and the driving state of the virtual vehicle at the target time point being a flat running state, control the virtual vehicle to perform an inertial drift in the direction corresponding to the first direction component.
[0089] The target time point is determined based on the triggering moment of the third operation. The difference between the target time point and the triggering moment of the third operation meets the difference requirement. Optionally, when the difference between the target time point and the triggering moment of the third operation is less than the difference threshold, it is determined that the difference between the target time point and the triggering moment of the third operation meets the difference requirement. Exemplarily, the difference threshold is set based on experience or adjusted according to the implementation environment, which is not limited in the embodiments of the present application. For example, the difference threshold is 5 seconds. The target time point can be before the triggering moment of the third operation or after the triggering moment of the third operation, which is also not limited in the embodiments of the present application.
[0090] Optionally, the first operation triggered on the first direction component may be a long press operation on the first direction component or other operations. The second operation triggered on the foot brake component may be a click operation on the foot brake component, and the third operation triggered on the throttle component may be a click operation on the throttle component. The embodiments of the present application do not limit this.
[0091] In a possible implementation manner, before controlling the virtual vehicle to perform inertial drift in the direction corresponding to the first direction component, it is necessary to first determine the driving speed and driving state of the virtual vehicle at the target time point. Therefore, it is necessary to first determine the target time point. The embodiments of the present application do not limit the determination method of the target time point. Exemplarily, determine the trigger moment of the third operation; based on the difference threshold and the trigger moment of the third operation, determine the target time period; randomly determine a time in the target time period as the target time point.
[0092] Exemplarily, the trigger moment of the third operation is 16:57:10, and the difference threshold is 5 seconds. Then the determined target time period is 16:57:05 - 16:57:15, and a time point is randomly determined in the target time period as the target time point. For example, 16:57:11 is the target time point.
[0093] The methods for obtaining the driving speed and driving state of the virtual vehicle at the current time point include: obtaining a first image, where the first image is an image of the virtual vehicle at the target time point; based on the first image, determining the driving speed and driving state of the virtual vehicle at the target time point.
[0094] Among them, there are the following two ways to obtain the first image.
[0095] The first way is to obtain the first image from the storage space of the terminal device.
[0096] Optionally, the storage space of the terminal device stores multiple images and the corresponding relationship between each image and the time point. Each image is an image of the virtual vehicle at the corresponding time point. After the terminal device determines the target time point, the image in the multiple images stored in the storage space of the terminal device with the same time point as the target time point is used as the first image.
[0097] The second way is that the terminal device obtains the first image through interaction with the server.
[0098] In a possible implementation, the server stores multiple images and the corresponding relationships between each image and a time point. Each image is an image of a virtual vehicle at the corresponding time point. After the terminal device determines the target time point, it sends an image acquisition request to the server. The image acquisition request carries the target time point and is used to acquire the first image of the virtual vehicle at the target time point. After receiving the image acquisition request, the server parses the image acquisition request to obtain the target time point. Furthermore, the server uses the image among the multiple images whose time point is the same as the target time point as the first image. The server sends the first image to the terminal device, that is, the terminal device acquires the first image.
[0099] It should be noted that any of the above implementation manners can be selected to acquire the first image, and the embodiments of the present application do not limit this.
[0100] The process of determining the driving speed and driving state of the virtual vehicle at the target time point based on the first image includes: determining the driving speed shown in the first image as the driving speed of the virtual vehicle at the target time point. Based on the fact that the wheels of the virtual vehicle in the first image do not leave the surface of the carrier and the virtual vehicle is not in a drifting state, it is determined that the driving state of the virtual vehicle at the target time point is a flat-running state; or, based on the fact that the wheels of the virtual vehicle in the first image do not leave the surface of the carrier, it is determined that the driving state of the virtual vehicle at the target time point is a non-flat-running state; or, based on the fact that the wheels of the virtual vehicle in the first image do not leave the surface of the carrier and the virtual vehicle is in a drifting state, it is determined that the driving state of the virtual vehicle at the target time point is a non-flat-running state.
[0101] Among them, the surface of the carrier can be the ground, the surface of a bridge, the surface of a house, or the surface of other objects, and the embodiments of the present application do not limit this. The flat-running state is used to indicate that the virtual vehicle accelerates forward on the surface of the carrier in a non-drifting state, and the driving speed of the virtual vehicle in the flat-running state is greater than the driving speed of the virtual vehicle during inertial drifting. Optionally, the fact that the wheels of the virtual vehicle do not leave the surface of the carrier means that at least one wheel of the virtual vehicle does not leave the surface of the carrier.
[0102] Optionally, when the virtual vehicle is in a drifting state, the first image further includes first information, and the first information is used to indicate that the virtual vehicle is in a drifting state. In response to the first image not including the first information, it indicates that the virtual vehicle is not in a drifting state; in response to the first image including the first information, it indicates that the virtual vehicle is in a drifting state.
[0103] In a possible implementation, the speed threshold can be set based on experience or adjusted according to the implementation environment, and the embodiments of the present application do not limit this. Exemplarily, the speed threshold is 100 km / h.
[0104] Optionally, while controlling the virtual vehicle to perform an inertial drift in the direction corresponding to the first direction component, a notification message can also be displayed, and the notification message is used to indicate the driving state of the virtual vehicle. Exemplarily, the notification message can be displayed in the vehicle control interface.
[0105] As Figure 5 shown is a schematic diagram of the display of a notification message provided by an embodiment of the present application. In Figure 5 , the virtual vehicle is performing an inertial drift in the direction corresponding to the first direction component, Figure 5 and the "inertial drift" shown in Figure 5 is the notification message, that is, the current driving state of the virtual vehicle is the inertial drift state. Optionally,
[0106] After controlling the virtual vehicle to perform an inertial drift in the direction corresponding to the first direction component, the drift angle of the virtual vehicle at the current moment can also be determined; based on the drift angle of the virtual vehicle at the current moment, the driving state of the virtual vehicle is adjusted.
[0107] Among them, the process of determining the drift angle of the virtual vehicle at the current moment includes: determining the driving angle and the front head angle of the virtual vehicle at the current moment; according to the driving angle and the front head angle of the virtual vehicle at the current moment, determining the drift angle of the virtual vehicle at the current moment. Optionally, the front head angle refers to the interior angle between the line pointing from the rear of the vehicle to the front of the vehicle and the coordinate line, and the coordinate line is set based on experience or adjusted according to the implementation environment. Exemplarily, the coordinate line is a horizontal line. The absolute value of the difference between the driving angle and the front head angle of the virtual vehicle at the current moment is used as the drift angle of the virtual vehicle at the current moment.
[0108] When the virtual vehicle is driving forward normally, since the speed direction of the virtual vehicle is basically equal to the front head direction, that is, the speed angle of the virtual vehicle is basically equal to the front head angle, therefore, the determined drift angle of the virtual vehicle is approximately equal to 0 degrees. When the virtual vehicle is reversing, since the speed direction of the virtual vehicle is opposite to the front head direction, that is, the speed angle of the virtual vehicle is 270 degrees, and the front head angle of the virtual vehicle is 90 degrees, therefore, the determined drift angle of the virtual vehicle is 180 degrees.
[0109] As Figure 6 shown is a schematic diagram of the display of the speed angle and the front head angle of a virtual vehicle at the current moment provided by an embodiment of the present application. In Figure 6 , ∠1 is the front head angle of the virtual vehicle at the current moment, ∠2 is the speed angle of the virtual vehicle at the current moment, and the dashed line is the coordinate line.
[0110] Exemplarily, the front angle of the virtual vehicle at the current moment is 30 degrees, and the driving angle is 10 degrees. Therefore, it is determined that the drift angle of the virtual vehicle at the current moment is 20 degrees.
[0111] The embodiments of the present application do not limit the manner of determining the driving angle and the front angle of the virtual vehicle at the current moment. Optionally, a second image is obtained, and the second image is an image of the virtual vehicle at the current moment; according to the second image, the front angle of the virtual vehicle at the current moment is determined; the driving angle of the virtual vehicle at the first moment is obtained, the first moment is adjacent to the current moment and earlier than the current moment; according to the front angle of the virtual vehicle at the current moment and the driving angle of the virtual vehicle at the first moment, the driving angle of the virtual vehicle at the current moment is determined.
[0112] Optionally, according to the front angle of the virtual vehicle at the current moment and the driving angle of the virtual vehicle at the first moment, the driving angle of the virtual vehicle at the current moment is determined according to the following formula (1).
[0113] V i =S*(d i -V t )+V t Formula (1)
[0114] In the above formula (1), V u is the driving angle of the virtual vehicle at the current moment, S is the grip, d i is the front angle of the virtual vehicle at the current moment, V t is the driving angle of the virtual vehicle at the first moment. The grip is set based on experience or adjusted according to the implementation environment, and the embodiments of the present application do not limit this. For example, the grip is 0.5.
[0115] Exemplarily, the front angle of the virtual vehicle at the current moment is 105 degrees, the driving angle of the virtual vehicle at the first moment is 15 degrees, and the grip is 0.5. Based on the above formula (1), it is determined that the driving angle of the virtual vehicle at the current moment is 0.5*(105 - 15)+15 = 60 degrees. Further, it is determined that the drift angle of the virtual vehicle at the current moment is 45 degrees.
[0116] Optionally, the process of adjusting the driving state of the virtual vehicle based on the drift angle of the virtual vehicle at the current moment includes the following three situations.
[0117] Situation 1: Based on the drift angle of the virtual vehicle at the current moment being less than the first angle, control the virtual vehicle to travel in a flat - running state in the direction corresponding to the first direction component.
[0118] Optionally, the driving speed of the virtual vehicle when in a flat running state is greater than the driving speed of the virtual vehicle when performing inertial drifting. The first angle can be set based on experience or adjusted according to the implementation environment, and the embodiments of the present application do not limit this. Exemplarily, the first angle is 13 degrees.
[0119] Exemplarily, the drifting angle of the virtual vehicle at the current moment is 12 degrees, and the first angle is 13 degrees. Since the drifting angle of the virtual vehicle at the current moment is less than the first angle, the virtual vehicle is controlled to travel in the direction corresponding to the first direction component in a flat running state.
[0120] Case 2: Based on the drifting angle of the virtual vehicle at the current moment being greater than the second angle, the virtual vehicle is controlled to perform ordinary drifting in the direction corresponding to the first direction component.
[0121] Optionally, the driving speed of the virtual vehicle when performing ordinary drifting is less than the driving speed of the virtual vehicle when performing inertial drifting, and the second angle is greater than the first angle. The second angle is set based on experience or adjusted according to the implementation environment, and the embodiments of the present application do not limit this. Exemplarily, the second angle is 30 degrees.
[0122] Exemplarily, the drifting angle of the virtual vehicle at the current moment is 33 degrees, and the second angle is 30 degrees. Since the drifting angle of the virtual vehicle at the current moment is greater than the second angle, the virtual vehicle is controlled to perform ordinary drifting in the direction corresponding to the first direction component.
[0123] Case 3: Based on the drifting angle of the virtual vehicle at the current moment being not less than the first angle and not greater than the second angle, the virtual vehicle is controlled to perform inertial drifting in the direction corresponding to the first direction component. The second angle is greater than the first angle.
[0124] Exemplarily, the drifting angle of the virtual vehicle at the current moment is 20 degrees, the first angle is 13 degrees, and the second angle is 30 degrees. Since the drifting angle of the virtual vehicle at the current moment is not less than the first angle and not greater than the second angle, the virtual vehicle is controlled to perform inertial drifting in the direction corresponding to the first direction component.
[0125] Optionally, a handbrake component can also be displayed on the vehicle control interface. The handbrake component is used to adjust the driving speed of the virtual vehicle. After controlling the virtual vehicle to perform inertial drifting in the direction corresponding to the first direction component, in response to receiving a fourth operation triggered on the handbrake component, the virtual vehicle is controlled to perform ordinary drifting in the direction corresponding to the first direction component, and the driving speed of the virtual vehicle when performing ordinary drifting is less than the driving speed of the virtual vehicle when performing inertial drifting. The fourth operation triggered on the handbrake component can be a click operation on the handbrake component or other operations, and the embodiments of the present application do not limit this.
[0126] Optionally, when controlling the virtual vehicle to perform normal drifting in the direction corresponding to the first direction component, a notification message may also be displayed. The notification message is used to indicate the driving state of the virtual vehicle. The display process of the notification message is similar to the display process when controlling the virtual vehicle to perform inertial drifting in the direction corresponding to the first direction component, and will not be elaborated here.
[0127] As Figure 7 shown is a display schematic diagram of a virtual vehicle performing normal drifting provided by an embodiment of the present application. In Figure 7 701, the virtual vehicle is in a flat running state, and the driving speed of the virtual vehicle is 220 km / h; Figure 7 In 702, the virtual vehicle is in a normal drifting state, and the driving speed of the virtual vehicle is 185 km / h; Figure 7 In 703, the virtual vehicle is in a normal drifting state, and the driving speed of the virtual vehicle is 157 km / h. After starting normal drifting, the driving speed of the virtual vehicle quickly drops to 157 km / h within 2 seconds and remains.
[0128] As Figure 8 shown is a display schematic diagram of a virtual vehicle performing inertial drifting provided by an embodiment of the present application. In Figure 8 801, the virtual vehicle is in a flat running state, and the driving speed of the virtual vehicle is 219 km / h; Figure 8 In 802, the virtual vehicle is in an inertial drifting state, and the driving speed of the virtual vehicle is 199 km / h; Figure 8 In 803, the virtual vehicle is in an inertial drifting state, and the driving speed of the virtual vehicle is 196 km / h. After starting inertial drifting, the driving speed of the virtual vehicle quickly drops to 196 km / h within 1 second and remains.
[0129] As Figure 9 shown is a display schematic diagram of the drifting trajectories of normal drifting and inertial drifting provided by an embodiment of the present application. Among them, the dotted drifting trajectory is the drifting trajectory of inertial drifting, and the solid drifting trajectory is the drifting trajectory of normal drifting. From Figure 9 it can be seen that inertial drifting is suitable for large and gentle curves.
[0130] When the above method controls the virtual vehicle to perform inertial drifting, the player only needs to operate the direction component, the foot brake component, and the accelerator component to control the virtual vehicle to perform inertial drifting. Therefore, this method improves the player's control over the vehicle, makes the vehicle control method more flexible, and thus can improve the player's gaming experience.
[0131] Moreover, controlling the virtual vehicle to perform inertial drift by operating the direction component, the throttle component, and the foot brake component is more in line with the way of operating a real vehicle to perform inertial drift, making the authenticity of controlling the virtual vehicle to perform inertial drift relatively high.
[0132] Figure 10 It is a schematic diagram of a process for controlling a virtual vehicle to perform inertial drift provided by an embodiment of the present application. In Figure 10 1001 in, the virtual vehicle is preparing to pass through a gentle curve with a longer inner arc. Using ordinary drift may cause the vehicle route not to fit the curve and the cornering speed to be slow. Figure 10 The driving speed of the virtual vehicle in 1001 in is 168 km / h. Figure 10 In 1002 in, the interaction object clicks the right direction component to adjust the front direction of the virtual vehicle. Figure 10 In 1003 in, the interaction object holds the right direction component and does not release it, clicks the foot brake component, clicks the throttle component, determines the driving speed and driving state of the virtual vehicle when clicking the throttle component. Based on the driving speed of the virtual vehicle being greater than the speed threshold when clicking the throttle component and the driving state being the flat running state, control the virtual vehicle to perform inertial drift to the right, so that the vehicle passes through with a small-angle side slip and fits the curve, and display a notification message to prompt the interaction object that the virtual vehicle is in the inertial drift state. Figure 10 In 1004 in, the interaction object repeatedly adjusts the direction component to control the drift angle of the virtual vehicle between the first angle and the second angle, and maintains the inertial drift state of the virtual vehicle. Figure 10 In 1005 in, when the interaction object wants to stop inertial drift, the left direction component can be triggered to make the drift angle less than the first angle. At this time, the virtual vehicle will exit the inertial drift and drive in the flat running state.
[0133] Figure 11 It is a flowchart of a control method for a virtual vehicle provided by an embodiment of the present application. In Figure 11 Upon receiving a first operation triggered on the first direction component, a second operation triggered on the foot brake component, and a third operation triggered on the throttle component, determine whether the driving information of the virtual vehicle at the target time point meets the drift condition. Based on the driving information of the virtual vehicle at the target time point meeting the drift condition, control the virtual vehicle to perform inertial drift in the direction corresponding to the first direction component. Wherein, the driving information of the virtual vehicle at the target time point meeting the drift condition means that the driving speed of the virtual vehicle at the target time point is greater than the speed threshold and the driving state of the virtual vehicle at the target time point is the flat running state.
[0134] Determine whether the drift angle of the virtual vehicle is not greater than the second angle and not less than the first angle. Based on the drift angle of the virtual vehicle being not greater than the second angle and not less than the first angle, control the virtual vehicle to perform inertial drift in the direction corresponding to the first direction component. In response to receiving an operation triggered on the handbrake component, control the virtual vehicle to perform normal drift in the direction corresponding to the first direction component.
[0135] Based on the drift angle of the virtual vehicle not being between the first angle and the second angle, determine whether the drift angle of the virtual vehicle is less than the first angle. Based on the drift angle of the virtual vehicle being less than the first angle, control the virtual vehicle to travel in the direction corresponding to the first direction component in a flat running state. Based on the drift angle of the virtual vehicle not being less than the first angle (that is, the drift angle of the virtual vehicle being greater than the second angle), control the virtual vehicle to perform normal drift in the direction corresponding to the first direction component.
[0136] Figure 12 The following is a schematic structural diagram of a vehicle control device provided by an embodiment of the present application, as Figure 12 shown, the device includes:
[0137] A display module 1201, configured to display a virtual vehicle in a virtual scene;
[0138] The display module 1201 is further configured to, in response to receiving a first operation triggered on the first direction component, display a virtual vehicle with a changed vehicle head direction;
[0139] A control module 1202, configured to, in response to sequentially receiving a second operation triggered on the foot brake component and a third operation triggered on the accelerator component within the duration of the first operation, the traveling speed of the virtual vehicle at the target time point being greater than the speed threshold, and the traveling state of the virtual vehicle at the target time point being a flat running state, control the virtual vehicle to perform inertial drift in the direction corresponding to the first direction component; wherein, the target time point is determined based on the triggering moment of the third operation.
[0140] In a possible implementation manner, the device further includes:
[0141] A determination module, configured to, in response to receiving a third operation triggered on the accelerator component, acquire a first image, where the first image is an image of the virtual vehicle at the target time point; based on the first image, determine the traveling speed and traveling state of the virtual vehicle at the target time point.
[0142] In a possible implementation, a determination module is configured to determine the driving speed shown in the first image as the driving speed of the virtual vehicle at the target time point; based on the fact that the wheels of the virtual vehicle in the first image do not leave the carrier surface and the virtual vehicle is not in a drifting state, determine that the driving state of the virtual vehicle at the target time point is a flat-running state; or, based on the fact that the wheels of the virtual vehicle in the first image do not leave the carrier surface, determine that the driving state of the virtual vehicle at the target time point is a non-flat-running state; or, based on the fact that the wheels of the virtual vehicle in the first image do not leave the carrier surface and the virtual vehicle is in a drifting state, determine that the driving state of the virtual vehicle at the target time point is a non-flat-running state.
[0143] In a possible implementation, the control module 1202 is further configured to control the virtual vehicle to travel in the direction corresponding to the first direction component in a flat-running state based on the fact that the drifting angle of the virtual vehicle at the current moment is less than the first angle, and the driving speed of the virtual vehicle in the flat-running state is greater than the driving speed of the virtual vehicle during inertial drifting.
[0144] In a possible implementation, the determination module is further configured to determine the driving angle and the head angle of the virtual vehicle at the current moment; and determine the drifting angle of the virtual vehicle at the current moment according to the driving angle and the head angle of the virtual vehicle at the current moment.
[0145] In a possible implementation, the control module 1202 is further configured to control the virtual vehicle to perform ordinary drifting in the direction corresponding to the first direction component based on the fact that the drifting angle of the virtual vehicle at the current moment is greater than the second angle, and the driving speed of the virtual vehicle during ordinary drifting is less than the driving speed of the virtual vehicle during inertial drifting, where the second angle is greater than the first angle.
[0146] In a possible implementation, the control module 1202 is further configured to control the virtual vehicle to perform inertial drifting in the direction corresponding to the first direction component based on the fact that the drifting angle of the virtual vehicle at the current moment is not less than the first angle and not greater than the second angle, where the second angle is greater than the first angle.
[0147] In a possible implementation, the determination module is configured to obtain a second image, where the second image is an image of the virtual vehicle at the current moment; determine the head angle of the virtual vehicle at the current moment according to the second image; obtain the driving angle of the virtual vehicle at the first moment, where the first moment is adjacent to and earlier than the current moment; and determine the driving angle of the virtual vehicle at the current moment according to the head angle of the virtual vehicle at the current moment and the driving angle of the virtual vehicle at the first moment.
[0148] In a possible implementation, the control module 1202 is further configured to control the virtual vehicle to perform a normal drift in the direction corresponding to the first direction component in response to receiving a fourth operation triggered on the handbrake component. The driving speed of the virtual vehicle during normal drift is less than the driving speed of the virtual vehicle during inertial drift. The handbrake component is used to adjust the driving speed of the virtual vehicle.
[0149] In a possible implementation, the display module 1201 is further configured to display a notification message, and the notification message is used to inform the current driving state of the virtual vehicle.
[0150] In a possible implementation, the device further includes:
[0151] An acquisition module, configured to obtain a first acceleration based on that the front direction of the virtual vehicle is the first direction and a third operation triggered on the throttle component is received. The first acceleration is used to increase the driving speed of the virtual vehicle;
[0152] The control module 1202 is further configured to control the virtual vehicle to travel in the first direction at the first acceleration within a first duration.
[0153] In a possible implementation, the acquisition module is further configured to obtain a second acceleration based on that the front direction of the virtual vehicle is the first direction, the driving speed of the virtual vehicle meets the speed requirement, and a second operation triggered on the foot brake component is received. The second acceleration is used to decrease the driving speed of the virtual vehicle;
[0154] The control module 1202 is further configured to control the virtual vehicle to travel in the first direction at the second acceleration within a second duration.
[0155] In a possible implementation, the acquisition module is further configured to obtain a third acceleration based on that the front direction of the virtual vehicle is the first direction, the driving speed of the virtual vehicle does not meet the speed requirement, and a first operation triggered on the foot brake component is received. The third acceleration is used to increase the driving speed of the virtual vehicle;
[0156] The control module 1202 is further configured to control the virtual vehicle to travel in the second direction opposite to the first direction at the third acceleration within a third duration.
[0157] In a possible implementation, the acquisition module is further configured to obtain a fourth acceleration in response to receiving a fifth operation triggered on the acceleration component. The fourth acceleration is used to increase the driving speed of the virtual vehicle. The fourth acceleration is greater than the first acceleration. The acceleration component is used to adjust the driving speed of the virtual vehicle;
[0158] The control module 1202 is further configured to control the virtual vehicle to travel in the front direction of the virtual vehicle at the fourth acceleration within a fourth duration.
[0159] When the above device controls the virtual vehicle to perform an inertial drift, the player only needs to operate the direction component, the foot brake component, and the accelerator component to control the virtual vehicle to perform an inertial drift, which improves the player's control over the vehicle, makes the vehicle control method more flexible, and thus can improve the player's gaming experience.
[0160] Moreover, controlling the virtual vehicle to perform an inertial drift by operating the direction component, the accelerator component, and the foot brake component is more in line with the way of operating a real vehicle to perform an inertial drift, making the authenticity of controlling the virtual vehicle to perform an inertial drift relatively high.
[0161] It should be understood that when the above-provided device realizes its functions, only the above division of each functional module is used for illustration. In actual applications, the above functions can be allocated to different functional modules according to needs, that is, the internal structure of the device is divided into different functional modules to complete all or part of the functions described above. In addition, the device provided in the above embodiment and the method embodiment belong to the same concept, and the specific implementation process can be seen in the method embodiment, which will not be elaborated here.
[0162] Figure 13 The structural block diagram of a terminal device 1300 provided by an exemplary embodiment of the present application is shown. The terminal device 1300 can be a portable mobile terminal, such as: a smart phone, a tablet computer, an MP3 player (Moving Picture Experts Group Audio Layer III), an MP4 (Moving Picture Experts Group Audio Layer IV) player, a notebook computer, or a desktop computer. The terminal device 1300 may also be referred to by other names such as user equipment, portable terminal, laptop terminal, desktop terminal, etc.
[0163] Generally, the terminal device 1300 includes: a processor 1301 and a memory 1302.
[0164] The processor 1301 may include one or more processing cores, such as a quad-core processor, an octa-core processor, etc. The processor 1301 may be implemented in at least one hardware form of DSP (Digital Signal Processing), FPGA (Field-Programmable Gate Array), or PLA (Programmable Logic Array). The processor 1301 may also include a main processor and a coprocessor. The main processor is a processor for processing data in the wake state, also known as the CPU (Central Processing Unit); the coprocessor is a low-power processor for processing data in the standby state. In some embodiments, the processor 1301 may be integrated with a GPU (Graphics Processing Unit), and the GPU is responsible for rendering and drawing the content to be displayed on the display screen. In some embodiments, the processor 1301 may further include an AI (Artificial Intelligence) processor, and the AI processor is used to process computational operations related to machine learning.
[0165] The memory 1302 may include one or more computer-readable storage media, and the computer-readable storage media may be non-transitory. The memory 1302 may also include high-speed random access memory and non-volatile memory, such as one or more disk storage devices and flash storage devices. In some embodiments, the non-transitory computer-readable storage media in the memory 1302 is used to store at least one instruction, and the at least one instruction is used to be executed by the processor 1301 to implement the control method of the virtual vehicle provided in the method embodiments of the present application.
[0166] In some embodiments, the terminal device 1300 may further optionally include: a peripheral device interface 1303 and at least one peripheral device. The processor 1301, the memory 1302, and the peripheral device interface 1303 may be connected by a bus or signal lines. Each peripheral device may be connected to the peripheral device interface 1303 through a bus, signal lines, or a circuit board. Specifically, the peripheral devices include at least one of a radio frequency circuit 1304, a display screen 1305, a camera assembly 1306, an audio circuit 1307, and a power supply 1309.
[0167] The peripheral device interface 1303 can be used to connect at least one I / O (Input / Output) related peripheral device to the processor 1301 and the memory 1302. In some embodiments, the processor 1301, the memory 1302, and the peripheral device interface 1303 are integrated on the same chip or circuit board; in some other embodiments, any one or two of the processor 1301, the memory 1302, and the peripheral device interface 1303 can be implemented on a separate chip or circuit board, and this embodiment does not limit this.
[0168] The radio frequency circuit 1304 is used to receive and transmit RF (Radio Frequency) signals, also known as electromagnetic signals. The radio frequency circuit 1304 communicates with a communication network and other communication devices through electromagnetic signals. The radio frequency circuit 1304 converts an electrical signal into an electromagnetic signal for transmission, or converts the received electromagnetic signal into an electrical signal. Optionally, the radio frequency circuit 1304 includes: an antenna system, an RF transceiver, one or more amplifiers, a tuner, an oscillator, a digital signal processor, a codec chipset, a user identity module card, and so on. The radio frequency circuit 1304 can communicate with other terminal devices through at least one wireless communication protocol. The wireless communication protocol includes but is not limited to: the World Wide Web, a metropolitan area network, an intranet, each generation of mobile communication network (2G, 3G, 4G, and 5G), a wireless local area network, and / or a WiFi (Wireless Fidelity) network. In some embodiments, the radio frequency circuit 1304 may further include a circuit related to NFC (Near Field Communication), and this application does not limit this.
[0169] The display screen 1305 is used to display the UI (User Interface). The UI may include graphics, text, icons, videos, and any combination thereof. When the display screen 1305 is a touch display screen, the display screen 1305 also has the ability to collect touch signals on or above the surface of the display screen 1305. The touch signals can be input to the processor 1301 as control signals for processing. At this time, the display screen 1305 can also be used to provide virtual buttons and / or virtual keyboards, also known as soft buttons and / or soft keyboards. In some embodiments, there may be one display screen 1305, which is disposed on the front panel of the terminal device 1300; in other embodiments, there may be at least two display screens 1305, which are respectively disposed on different surfaces of the terminal device 1300 or are in a folding design; in other embodiments, the display screen 1305 may be a flexible display screen, which is disposed on the curved surface or the folding surface of the terminal device 1300. Even, the display screen 1305 can also be set to an irregular non-rectangular shape, that is, a special-shaped screen. The display screen 1305 can be prepared from materials such as LCD (Liquid Crystal Display) and OLED (Organic Light-Emitting Diode).
[0170] The camera module 1306 is used to collect images or videos. Optionally, the camera module 1306 includes a front camera and a rear camera. Generally, the front camera is disposed on the front panel of the terminal device 1300, and the rear camera is disposed on the back of the terminal device 1300. In some embodiments, there are at least two rear cameras, which are any one of a main camera, a depth-of-field camera, a wide-angle camera, and a telephoto camera, so as to implement the function of background blurring by fusing the main camera and the depth-of-field camera, the function of panoramic shooting and VR (Virtual Reality) shooting by fusing the main camera and the wide-angle camera, or other fusion shooting functions. In some embodiments, the camera module 1306 may further include a flash. The flash can be a single-color-temperature flash or a two-color-temperature flash. The two-color-temperature flash refers to the combination of a warm-light flash and a cold-light flash, which can be used for light compensation under different color temperatures.
[0171] The audio circuit 1307 may 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 for input to the processor 1301 for processing, or input to the radio frequency circuit 1304 to achieve voice communication. For the purpose of stereo collection or noise reduction, there may be multiple microphones, which are respectively arranged at different parts of the terminal device 1300. The microphone may also be an array microphone or an omnidirectional collection microphone. The speaker is used to convert the electrical signal from the processor 1301 or the radio frequency circuit 1304 into sound waves. The speaker may be a traditional thin film speaker or a piezoelectric ceramic speaker. When the speaker is a piezoelectric ceramic speaker, it can not only convert the electrical signal into sound waves audible to humans, but also convert the electrical signal into sound waves inaudible to humans for uses such as ranging. In some embodiments, the audio circuit 1307 may also include a headphone jack.
[0172] The power supply 1309 is used to supply power to each component in the terminal device 1300. The power supply 1309 may be alternating current, direct current, a disposable battery or a rechargeable battery. When the power supply 1309 includes a rechargeable battery, the rechargeable battery may be a wired rechargeable battery or a wireless rechargeable battery. A wired rechargeable battery is a battery charged through a wired line, and a wireless rechargeable battery is a battery charged through a wireless coil. The rechargeable battery can also be used to support fast charging technology.
[0173] In some embodiments, the terminal device 1300 further includes one or more sensors 1310. The one or more sensors 1310 include but are not limited to: an acceleration sensor 1311, a gyroscope sensor 1312, a pressure sensor 1313, an optical sensor 1315, and a proximity sensor 1316.
[0174] The acceleration sensor 1311 can detect the magnitude of acceleration on the three coordinate axes of the coordinate system established with the terminal device 1300. For example, the acceleration sensor 1311 can be used to detect the components of the gravitational acceleration on the three coordinate axes. The processor 1301 can control the display screen 1305 to display the user interface in a horizontal view or a vertical view according to the gravitational acceleration signal collected by the acceleration sensor 1311. The acceleration sensor 1311 can also be used for collecting game or user's motion data.
[0175] The gyroscope sensor 1312 can detect the body direction and rotation angle of the terminal device 1300. The gyroscope sensor 1312 can cooperate with the acceleration sensor 1311 to collect the 3D actions of the user on the terminal device 1300. Based on the data collected by the gyroscope sensor 1312, the processor 1301 can achieve the following functions: motion sensing (such as changing the UI according to the user's tilt operation), image stabilization during shooting, game control, and inertial navigation.
[0176] The pressure sensor 1313 can be disposed on the side frame of the terminal device 1300 and / or the lower layer of the display screen 1305. When the pressure sensor 1313 is disposed on the side frame of the terminal device 1300, it can detect the holding signal of the user on the terminal device 1300, and the processor 1301 can perform left / right hand recognition or quick operation according to the holding signal collected by the pressure sensor 1313. When the pressure sensor 1313 is disposed on the lower layer of the display screen 1305, the processor 1301 can control the operable controls on the UI interface according to the pressure operation of the user on the display screen 1305. The operable controls include at least one of a button control, a scroll bar control, an icon control, and a menu control.
[0177] The optical sensor 1315 is used to collect the ambient light intensity. In one embodiment, the processor 1301 can control the display brightness of the display screen 1305 according to the ambient light intensity collected by the optical sensor 1315. Specifically, when the ambient light intensity is high, the display brightness of the display screen 1305 is increased; when the ambient light intensity is low, the display brightness of the display screen 1305 is decreased. In another embodiment, the processor 1301 can also dynamically adjust the shooting parameters of the camera assembly 1306 according to the ambient light intensity collected by the optical sensor 1315.
[0178] The proximity sensor 1316, also known as a distance sensor, is usually disposed on the front panel of the terminal device 1300. The proximity sensor 1316 is used to collect the distance between the user and the front of the terminal device 1300. In one embodiment, when the proximity sensor 1316 detects that the distance between the user and the front of the terminal device 1300 is gradually decreasing, the processor 1301 controls the display screen 1305 to switch from the lit state to the off state; when the proximity sensor 1316 detects that the distance between the user and the front of the terminal device 1300 is gradually increasing, the processor 1301 controls the display screen 1305 to switch from the off state to the lit state.
[0179] Those skilled in the art can understand that Figure 13 the structure shown in does not limit the terminal device 1300, and it may include more or fewer components than shown in the figure, or combine some components, or adopt a different component layout.
[0180] Figure 14A structural schematic diagram of the server provided by an embodiment of the present application. The server 1400 may vary greatly due to different configurations or performances, and may include one or more processors (Central Processing Units, CPUs) 1401 and one or more memories 1402. Among them, at least one program code is stored in the one or more memories 1402, and the at least one program code is loaded and executed by the one or more processors 1401 to implement the control method of the virtual vehicle provided by each of the above method embodiments. Of course, the server 1400 may also have components such as a wired or wireless network interface, a keyboard, and an input / output interface for input / output. The server 1400 may also include other components for implementing the functions of the device, which will not be elaborated here.
[0181] In an exemplary embodiment, a computer-readable storage medium is also provided. At least one program code is stored in the storage medium, and the at least one program code is loaded and executed by a processor to enable a computer to implement any one of the above control methods of the virtual vehicle.
[0182] Optionally, the above computer-readable storage medium may be a Read-Only Memory (ROM), a Random Access Memory (RAM), a Compact Disc Read-Only Memory (CD-ROM), a magnetic tape, a floppy disk, an optical data storage device, etc.
[0183] In an exemplary embodiment, a computer program or a computer program product is also provided. At least one computer instruction is stored in the computer program or the computer program product, and the at least one computer instruction is loaded and executed by a processor to enable a computer to implement any one of the above control methods of the virtual vehicle.
[0184] It should be noted that the information (including but not limited to user device information, user personal information, etc.), data (including but not limited to data for analysis, stored data, displayed data, etc.), and signals involved in the present application are all authorized by the user or fully authorized by all parties, and the collection, use, and processing of relevant data need to comply with relevant laws, regulations, and standards of relevant countries and regions. For example, the images involved in the present application are obtained under full authorization.
[0185] It should be understood that "a plurality of" mentioned herein means two or more. "And / or" describes the association relationship of associated objects and indicates that three relationships may exist. For example, A and / or B may represent: A exists alone, A and B exist simultaneously, and B exists alone. The character " / " generally represents an "or" relationship between the associated objects before and after.
[0186] The serial numbers of the embodiments of the present application above are only for description and do not represent the advantages or disadvantages of the embodiments.
[0187] The above are only exemplary embodiments of the present application and are not intended to limit the present application. Any modifications, equivalent replacements, improvements, etc. made within the principles of the present application shall be included within the protection scope of the present application.
Claims
1. A control method for a virtual vehicle, characterized in that, the method includes: display a virtual vehicle, an accelerator component, and a foot brake component in a virtual scene, where the accelerator component is used to increase the driving speed of the virtual vehicle, the foot brake component is used to decrease the driving speed of the virtual vehicle, and the front direction of the virtual vehicle is the first direction; in response to receiving an operation triggered on the accelerator component, obtain a first acceleration, where the first acceleration is used to increase the driving speed of the virtual vehicle; control the virtual vehicle to travel in the first direction at the first acceleration; in response to receiving an operation triggered on the foot brake component, control the driving speed of the virtual vehicle.
2. The method according to claim 1, characterized in that, the controlling the driving speed of the virtual vehicle in response to receiving an operation triggered on the foot brake component includes: in response to receiving an operation triggered on the foot brake component, when the driving speed of the virtual vehicle meets the speed requirement, obtain a second acceleration, where the second acceleration is used to decrease the driving speed of the virtual vehicle; control the virtual vehicle to travel in the first direction at the second acceleration.
3. The method according to claim 1, characterized in that, the controlling the driving speed of the virtual vehicle in response to receiving an operation triggered on the foot brake component includes: in response to receiving an operation triggered on the foot brake component, when the driving speed of the virtual vehicle does not meet the speed requirement, obtain a third acceleration, where the third acceleration is used to increase the driving speed of the virtual vehicle; control the virtual vehicle to travel in a second direction at the third acceleration, and the second direction is opposite to the first direction.
4. The method according to claim 1, characterized in that, the controlling the driving speed of the virtual vehicle in response to receiving an operation triggered on the foot brake component includes: in response to receiving an operation triggered on the foot brake component, when the driving speed of the virtual vehicle meets the speed requirement, control the driving speed of the virtual vehicle to be adjusted to a target driving speed.
5. The method according to claim 1, characterized in that, an acceleration component is also displayed in the virtual scene, and the acceleration component is used to adjust the driving speed of the virtual vehicle; the method further includes: in response to receiving an operation triggered on the acceleration component, obtain a fourth acceleration, where the fourth acceleration is used to increase the driving speed of the virtual vehicle, the fourth acceleration is greater than the first acceleration, and the acceleration component is used to adjust the driving speed of the virtual vehicle; control the virtual vehicle to travel in the first direction at the fourth acceleration.
6. The method according to claim 5, characterized in that, an acceleration icon is displayed below the acceleration component, and multiple acceleration gas bottles are displayed in the acceleration icon. The number of acceleration gas bottles of the first color is the number of acceleration gas bottles that the virtual vehicle can currently use, and the number of acceleration gas bottles of the second color is the number of acceleration gas bottles that the virtual vehicle can currently store.
7. The method according to any one of claims 1 to 6, wherein, a first direction component and a second direction component are further displayed in the virtual scene, the first direction component and the second direction component are used to adjust the driving direction of the virtual vehicle, and the direction corresponding to the first direction component is opposite to the direction corresponding to the second direction component.
8. The method according to any one of claims 1 to 6, wherein, a handbrake component is further displayed in the virtual scene, and the handbrake component is used to adjust the driving speed of the virtual vehicle; the method further includes: when the virtual vehicle performs inertial drifting in the direction corresponding to the first direction component, in response to receiving an operation triggered on the handbrake component, controlling the virtual vehicle to perform normal drifting in the direction corresponding to the first direction component, and the driving speed of the virtual vehicle during normal drifting is less than the driving speed of the virtual vehicle during inertial drifting.
9. The method according to any one of claims 1 to 6, wherein, a first direction component is further displayed in the virtual scene, and the first direction component is used to adjust the driving direction of the virtual vehicle; after displaying the virtual vehicle, the throttle component and the foot brake component in the virtual scene, the method further includes: in response to receiving a first operation triggered on the first direction component, and sequentially receiving a second operation triggered on the foot brake component, a third operation triggered on the direction component, the driving speed of the virtual vehicle at the target time point being greater than the speed threshold, and the driving state of the virtual vehicle at the target time point being a flat running state during the duration of the first operation, controlling the virtual vehicle to perform inertial drifting in the direction corresponding to the first direction component; wherein, the target time point is determined based on the triggering moment of the third operation.
10. The method according to claim 9, wherein, before controlling the virtual vehicle to perform inertial drifting in the direction corresponding to the first direction component, the method further includes: in response to receiving a third operation triggered on the throttle component, acquiring a first image, where the first image is an image of the virtual vehicle at the target time point; based on the first image, determining the driving speed and driving state of the virtual vehicle at the target time point.
11. The method according to claim 10, wherein, the determining the driving speed and driving state of the virtual vehicle at the target time point based on the first image includes: determining the driving speed displayed in the first image as the driving speed of the virtual vehicle at the target time point; Based on the fact that the wheels of the virtual vehicle in the first image do not leave the carrier surface and the virtual vehicle is not in a drifting state, determine that the driving state of the virtual vehicle at the target time point is the flat running state; or, based on the fact that the wheels of the virtual vehicle in the first image do not leave the carrier surface, determine that the driving state of the virtual vehicle at the target time point is a non-flat running state; or, based on the fact that the wheels of the virtual vehicle in the first image do not leave the carrier surface and the virtual vehicle is in the drifting state, determine that the driving state of the virtual vehicle at the target time point is the non-flat running state.
12. The method according to claim 9, wherein, after controlling the virtual vehicle to perform inertial drifting in the direction corresponding to the first direction component, the method further includes: Based on the fact that the drifting angle of the virtual vehicle at the current moment is less than the first angle, control the virtual vehicle to travel in the direction corresponding to the first direction component in the flat running state, and the traveling speed of the virtual vehicle in the flat running state is greater than the traveling speed of the virtual vehicle during inertial drifting.
13. The method according to claim 12, wherein, before controlling the virtual vehicle to travel in the direction corresponding to the first direction component in the flat running state based on the fact that the drifting angle of the virtual vehicle at the current moment is less than the first angle, the method further includes: Determine the traveling angle and the front head angle of the virtual vehicle at the current moment; Based on the traveling angle and the front head angle of the virtual vehicle at the current moment, determine the drifting angle of the virtual vehicle at the current moment.
14. The method according to claim 13, wherein, the determining the traveling angle and the front head angle of the virtual vehicle at the current moment includes: Obtain a second image, where the second image is an image of the virtual vehicle at the current moment; Based on the second image, determine the front head angle of the virtual vehicle at the current moment; Obtain the traveling angle of the virtual vehicle at a first moment, where the first moment is adjacent to the current moment and earlier than the current moment; Based on the front head angle of the virtual vehicle at the current moment and the traveling angle of the virtual vehicle at the first moment, determine the traveling angle of the virtual vehicle at the current moment.
15. The method according to claim 9, wherein, after controlling the virtual vehicle to perform ordinary drifting in the direction corresponding to the first direction component, the method further includes: Display a notification message for informing the current driving state of the virtual vehicle.
16. The method according to claim 9, wherein, the method further includes: Based on the fact that the drifting angle of the virtual vehicle at the current moment is greater than the second angle, control the virtual vehicle to perform ordinary drifting in the direction corresponding to the first direction component, and the traveling speed of the virtual vehicle during ordinary drifting is less than the traveling speed of the virtual vehicle during inertial drifting, and the second angle is greater than the first angle.
17. The method according to claim 9, wherein, the method further includes: Based on that the drift angle of the virtual vehicle at the current moment is not less than the first angle and not greater than the second angle, control the virtual vehicle to perform inertial drift in the direction corresponding to the first direction component, where the second angle is greater than the first angle.
18. A control device for a virtual vehicle, characterized in that the device includes: a display module for displaying a virtual vehicle, an accelerator component, and a foot brake component in a virtual scene, where the accelerator component is used to increase the driving speed of the virtual vehicle, the foot brake component is used to decrease the driving speed of the virtual vehicle, and the head direction of the virtual vehicle is the first direction; an acquisition module for acquiring a first acceleration in response to receiving an operation triggered on the accelerator component, where the first acceleration is used to increase the driving speed of the virtual vehicle; a control module for controlling the virtual vehicle to travel in the first direction according to the first acceleration; the control module is further configured to control the driving speed of the virtual vehicle in response to receiving an operation triggered on the foot brake component.
19. An electronic device, characterized in that the electronic device includes a processor and a memory, and at least one program code is stored in the memory and is loaded and executed by the processor to enable the electronic device to implement the control method of the virtual vehicle according to any one of claims 1 to 17.
20. A computer-readable storage medium, characterized in that at least one program code is stored in the computer-readable storage medium and is loaded and executed by a processor to enable a computer to implement the control method of the virtual vehicle according to any one of claims 1 to 17.
21. A computer program product, characterized in that at least one computer instruction is stored in the computer program product and is loaded and executed by a processor to enable a computer to implement the control method of the virtual vehicle according to any one of claims 1 to 17.