Virtual vehicle control method, device, electronic device, and computer program
By allowing players to control virtual vehicles through precise timing of steering, brake, and accelerator operations, the method and device improve flexibility and realism in performing inertial drifts, addressing the limitations of existing virtual vehicle control systems.
Patent Information
- Application Number
- JP2024532397
- Authority / Receiving Office
- JP · JP
- Patent Type
- Applications
- Current Assignee / Owner
- Priority Date
- 2022-05-20
- Filing Date
- 2023-05-12
- Publication Date
- 2024-11-08
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
Existing virtual vehicle control methods in racing simulation games lack flexibility and realism, particularly in performing inertial drift maneuvers, leading to poor player control and game experience.
A method and device that allows players to control virtual vehicles to perform inertial drift by sequentially operating the steering, brake, and accelerator sections within specific time durations, determining a target time based on operation triggers, and ensuring the vehicle's speed and state meet certain thresholds to execute the drift accurately.
Enhances player control over virtual vehicles, increases flexibility in gameplay, and improves the realism of drift maneuvers, aligning more closely with actual vehicle drift operations.
Smart Images

Figure 2024541612000001_ABST
Abstract
Description
[Technical field]
[0001] This application claims priority to a Chinese patent application filed on May 20, 2022, bearing application number 202210557452.4 and entitled "Virtual vehicle control method, device, apparatus and computer-readable storage medium," the entire contents of which are incorporated herein by reference.
[0002] FIELD OF THE DISCLOSURE The embodiments of the present invention relate to the field of Internet technology, and in particular to a method, apparatus, device and computer-readable storage medium for controlling a virtual vehicle. [Background technology]
[0003] With the development of network games and terminal technology, the number of game applications that can be installed on terminals is also increasing. Racing simulation games, as one type of competitive game, are gaining popularity due to their cool skills and super-fast experience. In these racing simulation games, players can not only drive left or right turns during the race, but also perform inertial drift driving.
[0004] In the related art, when a player needs to control the moving direction of a vehicle through an operation on a steering part and use an inertial drift skill, the player selects the steering part and simultaneously selects the drift driving part. If the time to select the drift driving part is within a period, the vehicle can be controlled to perform inertial drift driving in a direction corresponding to the steering part. Summary of the Invention
[0005] The embodiments of the present invention provide a method, device, apparatus, and computer-readable storage medium for controlling a virtual vehicle, which can solve the problems in the related art, such as the low control ability of a player over a vehicle, the insufficient flexibility of the vehicle control method, the poor game experience, and the low degree of matching with the operation method of inertial drift driving of a real vehicle.
[0006] In one aspect of an embodiment of the present invention, a method for controlling a virtual vehicle executed by a terminal device is provided, the method including the steps of: displaying a virtual vehicle in a virtual scene; when a first operation triggered by a first steering unit is received, and a second operation triggered by a foot brake unit and a third operation triggered by an accelerator unit are sequentially received within the duration of the first operation, determining a trigger time of the third operation and determining a target time based on the trigger time of the third operation; determining a running speed and running state of the virtual vehicle at the target time; and, when the running speed of the virtual vehicle at the target time is greater than a speed threshold and the running state of the virtual vehicle at the target time is a normal running state, controlling the virtual vehicle to perform inertial drift running in a direction indicated by the first steering unit, wherein the normal running state means that the virtual vehicle runs in a non-drift running state on a running surface in the virtual scene.
[0007] In another aspect of an embodiment of the present invention, a control device for a virtual vehicle is provided, the device including: a display module that displays a virtual vehicle in a virtual scene; a determination module that, when a first operation triggered by a first steering unit is received, and a second operation triggered by a foot brake unit and a third operation triggered by an accelerator unit are sequentially received within the duration of the first operation, determines a trigger time of the third operation, determines a target time based on the trigger time of the third operation, and determines a running speed and running state of the virtual vehicle at the target time; and a control module that, when the running speed of the virtual vehicle at the target time is greater than a speed threshold and the running state of the virtual vehicle at the target time is a normal running state, controls the virtual vehicle to perform inertial drift running in a direction indicated by the first steering unit, where the normal running state means that the virtual vehicle runs in a non-drift running state on a running surface in the virtual scene.
[0008] Another aspect of an embodiment of the present invention provides an electronic device including a processor and a memory having at least one program code stored therein, the at least one program code being loaded and executed by the processor to cause the electronic device to realize the above-mentioned virtual vehicle control method.
[0009] Another aspect of an embodiment of the present invention provides a non-transitory computer-readable storage medium having at least one program code stored thereon, the at least one program code being loaded and executed by a processor to cause a computer to implement the above-described method of controlling a virtual vehicle.
[0010] Another aspect of an embodiment of the present invention provides a computer program or computer program product having at least one computer instruction stored therein, the at least one computer instruction being loaded and executed by a processor to cause a computer to realize the above-mentioned method for controlling a virtual vehicle.
[0011] The technical solutions of the embodiments of the present invention can achieve at least the following advantageous effects:
[0012] According to the technology of the embodiment of the present invention, when controlling a virtual vehicle to perform inertial drift running, the player can control the virtual vehicle to perform inertial drift running simply by operating the steering unit, the foot brake unit, and the accelerator unit. Therefore, according to the method, the player's control over the vehicle is improved, the vehicle control method becomes more flexible, and the player's game experience is improved.
[0013] In addition, by controlling the virtual vehicle to perform inertial drift driving by operating the steering unit, accelerator unit, and foot brake unit, this is more in line with the operating method for inertial drift driving of an actual vehicle, thereby improving the sense of realism when controlling the virtual vehicle to perform inertial drift driving. [Brief description of the drawings]
[0014] [Figure 1] 1 is a schematic diagram of an environment for implementing a virtual vehicle control method according to an embodiment of the present invention; [Diagram 2] 4 is a flowchart of a method for controlling a virtual vehicle according to an embodiment of the present invention. [Diagram 3] FIG. 2 is a schematic diagram of a display of a first scene according to an embodiment of the present invention. [Figure 4] 2 is a schematic diagram of a display of a vehicle control interface according to an embodiment of the present invention. [Diagram 5] FIG. 2 is a schematic diagram of a display of a notification message according to an embodiment of the present invention; [Figure 6] FIG. 2 is a schematic diagram showing a current driving angle and head angle of a virtual vehicle according to an embodiment of the present invention. [Figure 7] 1 is a schematic diagram of a display when a virtual vehicle according to an embodiment of the present invention performs normal drift driving. [Figure 8] 1 is a schematic diagram of a display when a virtual vehicle according to an embodiment of the present invention performs inertial drift running. [Figure 9] 1 is a schematic diagram showing drift driving trajectories of normal drift driving and inertial drift driving according to an embodiment of the present invention; [Figure 10] 4 is a schematic diagram of a process for controlling a virtual vehicle to perform inertial drift running according to an embodiment of the present invention. FIG. [Figure 11] 4 is a flowchart of a method for controlling a virtual vehicle according to an embodiment of the present invention. [Figure 12] 1 is a schematic diagram of a configuration of a control device for a virtual vehicle according to an embodiment of the present invention. [Figure 13] 1 is a schematic diagram of a configuration of a terminal device according to an embodiment of the present invention. [Figure 14] FIG. 2 is a schematic diagram of a server configuration according to an embodiment of the present invention. DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS
[0015] In order to make the objectives, technical means and advantages of the present invention clearer, the following describes the embodiments of the present invention in more detail with reference to the drawings.
[0016] In order to facilitate understanding of the present invention, a description will first be given of terms related to the embodiments of the present invention.
[0017] Virtual scene: a virtual scene provided (or displayed) when an application program is executed on a terminal device. The virtual scene refers to a scene created for a virtual object to perform an action, such as a virtual vehicle. The virtual scene may be a 2D virtual scene, a 2.5D virtual scene, or a 3D virtual scene. The virtual scene may be a simulation scene of the real world, a semi-simulation scene of the real world, or a purely imaginary scene. For example, the virtual scene according to the embodiment of the present invention is a 3D virtual scene.
[0018] In the related art, when a player needs to control a virtual vehicle, the player operates a steering unit to control the moving direction of the virtual vehicle. When the player needs to use an inertial drift skill, the player selects the steering unit and at the same time selects the drift running unit. When the time to select the drift running unit is within a period, the vehicle can be controlled to perform inertial drift running in a direction corresponding to the steering unit.
[0019] However, the above method gives the player little control over the vehicle, and the flexibility of the vehicle control method is insufficient, resulting in a poor game experience for the player. In addition, since an actual vehicle does not have a drift driving unit, the method of controlling the inertial drift driving of the vehicle by selecting the steering unit and the drift driving unit in the above method does not match the operation method of the inertial drift driving of an actual vehicle.
[0020] Inertial drift running is a drift running technique with weak steering and small deceleration, and is applied when the virtual vehicle passes through a curve with a small arc. Inertial drift running means that the deceleration acceleration in the drift running state of the virtual vehicle is smaller than a first threshold value, and the curvature of the formed drift running trajectory is smaller than a second threshold value. The embodiment of the present invention is not limited to the first threshold value and the second threshold value. A small curvature means that the steering is weak and the arc degree is small, and a small deceleration acceleration means that the deceleration is small.
[0021] This inertial drift running is a drift running method different from normal drift running. Here, normal drift running is a drift running technique with strong steering and frequent deceleration, and is applied when the virtual vehicle passes through a curve with a large arc. Normal drift running means that the deceleration acceleration in the drift running state of the virtual vehicle is greater than the third threshold, and the curvature of the formed drift running track is greater than the fourth threshold. A large curvature means that the steering is strong and the deceleration is frequent, and a large deceleration acceleration means that the deceleration is frequent. For example, in the embodiment of the present invention, the values of the third threshold and the fourth threshold are not limited, and it is sufficient that the third threshold is greater than the first threshold and the fourth threshold is greater than the second threshold. That is, compared with the inertial drift running process, the normal drift running process has a larger deceleration acceleration and a faster deceleration. Compared with the drift running track formed in the inertial drift running process, the drift running track formed in the normal drift running process has a larger curvature, stronger steering, and a larger arc.
[0022] In the above description, the drifting state means that sliding friction occurs between the rear wheels of the virtual vehicle and the driving surface (the surface on which the virtual vehicle drives) in the virtual scene, whereas the non-drifting state means that rolling friction occurs between the rear wheels of the virtual vehicle and the driving surface, unlike the drifting state.
[0023] 1 is a schematic diagram of an implementation environment of a virtual vehicle control method according to an embodiment of the present invention. As shown in FIG. 1, the implementation environment includes a terminal device 101 and a server 102.
[0024] The terminal device 101 may be at least one of a smartphone, a game console, a desktop computer, a tablet computer, an e-book reader, and a laptop computer. The terminal device 101 executes the virtual vehicle control method according to the embodiment of the present invention.
[0025] The terminal device 101 generally means one of a plurality of terminal devices, and in this embodiment, a simple terminal device 101 is described as an example. The number of terminal devices 101 may be greater or less. The number of terminal devices 101 may be only one, or may be tens or hundreds, or more, and the embodiment of the present invention is not limited to the number and type of terminal devices.
[0026] The server 102 may be one server, a server cluster consisting of multiple servers, or a cloud computing platform or a virtualization center, but the embodiment of the present invention is not limited thereto. The server 102 and the terminal device 101 are communicatively connected via a wired network or a wireless network. The server 102 has a data receiving function, a data processing function, and a data transmitting function. The server 102 may have other functions, and the embodiment of the present invention is not limited thereto.
[0027] Based on the above implementation environment, an embodiment of the present invention provides a method for controlling a virtual vehicle. The flowchart of the method for controlling a virtual vehicle according to the embodiment of the present invention shown in Fig. 2 is taken as an example to describe the method. The method may be executed by the terminal device 101 in Fig. 1. As shown in Fig. 2, the method includes the following steps:
[0028] Step 201: Display a virtual vehicle in a virtual scene.
[0029] In an exemplary embodiment of the present invention, an application program for vehicle control is installed and executed on the terminal device, which is a race simulation type application program or a race sports type application program, but the embodiment of the present invention is not limited to this type of application program.
[0030] In response to a trigger operation on the application program by an interaction target, a first scene is displayed. The first scene is the first screen displayed when an application program is selected. A game start widget is displayed in the first scene. Note that other widgets may be displayed in the first scene, and the embodiment of the present invention is not limited thereto. The interaction target is a target using a terminal device. FIG. 3 is a schematic diagram of a display of the first scene according to an embodiment of the present invention. In FIG. 3, a game start widget 301 is displayed, and preferably, a virtual vehicle 302 may be displayed.
[0031] In response to a trigger operation on a game start widget by an interaction target, a virtual scene is displayed. A virtual vehicle is displayed in the virtual scene. Preferably, the virtual scene is a vehicle control interface, i.e., the vehicle control interface displays a virtual vehicle to be controlled. For example, the vehicle control interface may display a first steering unit, a foot brake unit, and an accelerator unit. Here, the first steering unit is used to adjust a running direction of the virtual vehicle, the accelerator unit is used to increase a running speed of the virtual vehicle, and the foot brake unit is used to decrease a running speed of the virtual vehicle.
[0032] Preferably, at least one of a second steering unit, a parking brake unit, a reset unit, and an acceleration unit may be displayed on the vehicle control interface, and the embodiment of the present invention is not limited thereto. Here, the second steering unit is used to adjust the running direction of the virtual vehicle, and the direction corresponding to the second steering unit is different from the direction corresponding to the first steering unit. For example, the direction corresponding to the second steering unit is opposite to the direction corresponding to the first steering unit. For example, the direction corresponding to the first steering unit is left, that is, the first steering unit controls the virtual vehicle to run left. For example, the direction corresponding to the second steering unit is right, that is, the second steering unit controls the virtual vehicle to run right. Alternatively, the direction corresponding to the first steering unit is right, that is, the first steering unit controls the virtual vehicle to run right. For example, the direction corresponding to the second steering unit is left, that is, the second steering unit controls the virtual vehicle to run left. The parking brake unit is used to reduce the running speed of the virtual vehicle.
[0033] The reset unit is used to transmit the virtual vehicle to a wide road to restart it. The reset unit is used to rescue a stuck virtual vehicle. For example, if the virtual vehicle is located on a narrow road and / or if the virtual vehicle cannot start, the virtual vehicle is stuck. The reset unit transmits the stuck virtual vehicle to a wide road to restart it, thereby making it possible to move the stuck virtual vehicle away from the narrow road, i.e., to rescue the stuck virtual vehicle.
[0034] The acceleration unit is used to increase the running speed of the virtual vehicle. When a fifth operation triggered by the acceleration unit is received, a fourth acceleration is acquired. The fourth acceleration is used to increase the running speed of the virtual vehicle. The fourth acceleration is greater than the first acceleration. The virtual vehicle is controlled to run at the fourth acceleration in the head direction of the virtual vehicle within the fourth period. The first acceleration is an acceleration acquired when a third operation triggered by the accelerator unit is received. The third operation and the first acceleration will be described later, but the description thereof will be omitted here. Here, the fourth period may be set based on experience or may be adjusted according to the implementation environment, and the embodiment of the present invention is not limited thereto. For example, the fourth period is 30 seconds. The fourth acceleration may be set based on experience or may be adjusted according to the implementation environment, and the embodiment of the present invention is not limited thereto. For example, the fourth acceleration is 40 m / s 2 (meters per second 2 The fifth operation triggered by the accelerator may be an operation of clicking the accelerator, or may be other operations, and the embodiment of the present invention is not limited thereto.
[0035] The acceleration section further includes an acceleration icon below which one or more acceleration gas cylinders are displayed. The number of gray acceleration gas cylinders represents the number of acceleration gas cylinders currently available for use by the virtual vehicle, the number of white acceleration gas cylinders represents the number of acceleration gas cylinders currently available for refilling by the virtual vehicle, or the number of white acceleration gas cylinders represents the number of acceleration gas cylinders that the virtual vehicle has already used and cannot reuse until refilling is completed. Each time the interaction target object clicks the acceleration section once, one gray acceleration gas cylinder of the acceleration icon changes to white, and accordingly, the virtual vehicle accelerates once. Accelerating once means that the virtual vehicle runs in the head direction of the virtual vehicle at a fourth acceleration within the above-mentioned fourth period. Note that the change in color of the acceleration icon from gray to white is merely an example and is not limited to the change in color of the acceleration icon. The gas in the acceleration gas cylinder may be nitrogen or other gas, and the acceleration effects of different gases may be the same or different, and the embodiment of the present invention is not limited thereto. For example, an acceleration effect being the same may mean that the acceleration period (e.g., the fourth period described above) and the acceleration (e.g., the fourth acceleration described above) are both the same, and an acceleration effect being different may mean that at least one of the acceleration period and the acceleration is different.
[0036] FIG. 4 is a schematic diagram of a display of a vehicle control interface according to an embodiment of the present invention. In FIG. 4, a virtual vehicle 401 to be controlled, a first steering unit 402, a second steering unit 403, a foot brake unit 404, an accelerator unit 405, a parking brake unit 406, and an acceleration unit 407 are displayed. Here, an acceleration icon included below the acceleration unit displays two gray acceleration gas cylinders and two white acceleration gas cylinders. For example, the acceleration icon displays a total of four acceleration gas cylinders, including two gray acceleration gas cylinders located on the left side and two white acceleration gas cylinders located on the right side. That is, the number of acceleration gas cylinders that the virtual vehicle can currently use is two, and the number of acceleration gas cylinders that the virtual vehicle can currently fill is two.
[0037] The above-mentioned first steering unit, parking brake unit, foot brake unit, accelerator unit, reset unit, acceleration unit, and second steering unit may be displayed on a vehicle control interface provided by a terminal device so that an interaction target controls a virtual vehicle in a virtual scene by operating each unit. Alternatively, each unit may be an independent unit that is not displayed on the vehicle control interface and can interact with a terminal device, and an interaction target may control a virtual vehicle in a virtual scene in a terminal device by operating the independent unit, but the embodiment of the present invention is not limited thereto. Preferably, the independent unit may interact with the terminal device via a wired network or a wireless network.
[0038] In one possible embodiment, when the head direction of the virtual vehicle is in a first direction and a third operation triggered on the accelerator unit is received, a first acceleration is acquired. The first acceleration is used to increase the running speed of the virtual vehicle. The virtual vehicle is controlled to run in the first direction at the first acceleration within a first period.
[0039] Here, the third operation triggered on the accelerator unit may be a click operation on the accelerator means or other operations, and the embodiment of the present invention is not limited thereto. Preferably, the first acceleration may be set based on experience or adjusted according to the implementation environment, and the embodiment of the present invention is not limited thereto. For example, the first acceleration may be 20 m / s 2The first period may be set based on experience or adjusted according to the implementation environment, and the embodiment of the present invention is not limited thereto. For example, the first period is 30 seconds. For example, when the third operation triggered on the accelerator unit is a click operation on the accelerator unit, or is an operation other than a click operation that requires a short time, the player can continue to accelerate the virtual vehicle within the first period by simply performing a short operation. Since the player does not need to continue to operate the accelerator unit, and does not need to operate the accelerator unit multiple times, the complexity of the player's operation can be reduced and the game experience of the player can be improved. In addition, since the terminal device does not need to continuously or frequently interact with the server according to the player's operation, the operating load of the server can be reduced.
[0040] For example, when the head direction of the virtual vehicle is forward and a click operation triggered on the accelerator is received, a first acceleration is acquired, and the first acceleration is 20 m / s 2 This allows the virtual vehicle to travel at a speed of 20 m / s within 30 seconds. 2 The vehicle is controlled so that it moves forward at an acceleration of .
[0041] Preferably, when the head direction of the virtual vehicle is a first direction, the running speed of the virtual vehicle satisfies the speed requirement, and a second operation triggered on the foot brake unit is received, a second acceleration is acquired. The second acceleration is used to reduce the running speed of the virtual vehicle. The virtual vehicle is controlled to run in the first direction at the second acceleration within a second period.
[0042] Here, the running speed of the virtual vehicle satisfying the speed requirement means that the running speed of the virtual vehicle is greater than 0. The second operation triggered on the foot brake unit may be a click operation on the foot brake unit or other operations, but the embodiment of the present invention is not limited thereto. The second acceleration may be set based on experience or adjusted according to the implementation environment, but the embodiment of the present invention is not limited thereto. For example, the second acceleration is 10 m / s 2The second period may be set based on experience or adjusted according to the implementation environment, and the embodiment of the present invention is not limited thereto. For example, the second period is 20 seconds.
[0043] For example, when the head direction of the virtual vehicle is forward, the running speed of the virtual vehicle satisfies the speed requirement, and a click operation triggered by the foot brake unit is received, a second acceleration is obtained, and the value of the second acceleration is −10 m / s 2 This means that the virtual vehicle will move at -10m / s within 20 seconds. 2 The vehicle is controlled to travel in the first direction at a travel speed of 100 rpm.
[0044] In one possible embodiment, when the head direction of the virtual vehicle is a first direction, the running speed of the virtual vehicle does not meet the speed requirement, and a first operation triggered on the foot brake unit is received, a third acceleration is obtained. The third acceleration is used to increase the running speed of the virtual vehicle. The virtual vehicle is controlled to run in a second direction at the third acceleration within a third period. The second direction is opposite to the first direction.
[0045] Here, the fact that the running speed of the virtual vehicle does not satisfy the speed requirement means that the running speed of the virtual vehicle is 0. The first operation triggered on the foot brake unit may be a long press operation on the foot brake unit or may be other, and the embodiment of the present invention is not limited thereto. The first operation triggered on the foot brake unit is different from the second operation triggered on the foot brake unit. The third acceleration may be set based on experience or adjusted according to the implementation environment, and the embodiment of the present invention is not limited thereto. For example, the third acceleration is 5 m / s 2 The third period may be set based on experience or adjusted according to the implementation environment, and the embodiment of the present invention is not limited thereto. For example, the third period is 15 seconds.
[0046] For example, when the head direction of the virtual vehicle is forward, the traveling speed of the virtual vehicle is 0, and a long press operation triggered on the foot brake unit is received, a third acceleration is acquired, and the third acceleration is 5 m / s 2 This allows the virtual vehicle to travel at a speed of 5 m / s within 15 seconds. 2 The vehicle is controlled so that it moves backwards at an acceleration of .
[0047] The accelerator and foot brake units described above allow the player to freely control the virtual vehicle to accelerate, decelerate, move backward, etc., providing high control flexibility. In addition, the system can meet the diverse needs of players in virtual scenes, such as competitions and roaming.
[0048] Preferably, when the running speed of the virtual vehicle satisfies the speed requirement and the first operation triggered by the foot brake unit is received, the running speed of the virtual vehicle within a fifth period is controlled to be adjusted to a target running speed. Here, the fifth period may be set based on experience or may be adjusted according to the implementation environment, and the embodiment of the present invention is not limited thereto. For example, the fifth period is 15 seconds. The target running speed may be set based on experience or may be adjusted according to the implementation environment, and the embodiment of the present invention is not limited thereto. For example, the target running speed is 0.
[0049] For example, when a virtual vehicle is traveling at a speed of 100 km (kilometer / hour, 1000 meters / hour) and a long press operation triggered by the foot brake unit means is received, the virtual vehicle's traveling speed is controlled to be reduced to 0 within 15 seconds.
[0050] Step 202: When a first operation triggered by a first steering unit is received, a virtual vehicle with a changed head direction is displayed.
[0051] Here, the first steering unit is used to adjust the running direction of the virtual vehicle. The first operation triggered by the first steering unit may be a long press operation on the first steering unit or other operations, but the embodiment of the present invention is not limited thereto.
[0052] Preferably, when a first operation triggered by the first steering unit is accepted, a virtual vehicle whose head direction has changed is displayed in the virtual scene, and the direction in which the head direction of the virtual vehicle has changed is the same as the direction corresponding to the first steering unit. Here, displaying a virtual vehicle whose head direction has changed means changing the head direction of the displayed virtual vehicle (i.e., the virtual vehicle displayed in step 201).
[0053] Step 203: A second operation triggered on the foot brake unit and a third operation triggered on the accelerator unit are sequentially accepted within the duration of the first operation, and if the running speed of the virtual vehicle at the target time is greater than the speed threshold and the running state of the virtual vehicle at the target time is a normal running state, the virtual vehicle is controlled to perform inertial drift running in a direction corresponding to the first steering unit.
[0054] Here, the direction corresponding to the first steering part may be understood to be the direction indicated by the first steering part, in other words, the direction specified by the first steering part, the direction determined by the first steering part, or the direction defined by the first steering part.
[0055] In other words, in steps 202 and 203, if a first operation triggered by the first steering unit is received, and a second operation triggered by the foot brake unit and a third operation triggered by the accelerator unit are sequentially received within the duration of the first operation, a trigger time point of the third operation is determined, and a target time point is determined based on the trigger time point of the third operation. Next, a running speed and a running state of the virtual vehicle at the target time point are determined. If the running speed of the virtual vehicle at the target time point is greater than the speed threshold value and the running state of the virtual vehicle at the target time point is a normal running state, the virtual vehicle is controlled to perform inertial drift running in the direction indicated by the first steering unit. The normal running state means that the virtual vehicle runs in a non-drift running state on the running surface in the virtual scene.
[0056] Both steps 202 and 203 are steps executed after the first operation triggered by the first steering unit is accepted. The head direction of the virtual vehicle may be changed within the duration of the first operation, regardless of whether or not inertial drift running is performed, and may be changed, for example, according to the direction indicated by the first steering unit. For example, if the first steering unit is a left direction key and the direction indicated by the first steering unit is left, when the first operation triggered by the left direction key is accepted, the head direction of the virtual vehicle may be changed within the duration of the first operation so that the virtual vehicle turns left.
[0057] In other words, in the embodiment of the present invention, when controlling the virtual vehicle to perform inertial drift running in a direction corresponding to the first steering unit, three conditions must be satisfied. That is, within the duration of the first operation, the second operation triggered by the foot brake unit and the third operation triggered by the accelerator unit are sequentially accepted, the running speed of the virtual vehicle at the target time point is greater than the threshold speed, and the running state of the virtual vehicle at the target time point is a normal running state. If the condition that the running speed of the virtual vehicle at the target time point is greater than the speed threshold is not satisfied, it means that the current running speed of the virtual vehicle is too low, and if the running speed is too low, it is often the case that inertial drift running cannot be realized. For this reason, it is necessary to satisfy the condition that the running speed of the virtual vehicle at the target time point is greater than the speed threshold. If the condition that the running state of the virtual vehicle at the target time point is a normal running state is not satisfied, it means that the current virtual vehicle is not in a normal running state. Since the normal driving state means that the virtual vehicle drives on the driving surface in the virtual scene in a non-drift driving state, not being in the normal driving state means that the virtual vehicle is away from the driving surface (i.e., the virtual vehicle flies in the air), or the virtual vehicle is on the driving surface but is already in a drift driving state (not away from the driving surface). In either case, inertial drift driving cannot be realized. Therefore, it is necessary to satisfy the condition that the driving state of the virtual vehicle at the target time is a normal driving state.
[0058] Here, the target time is determined based on the trigger time of the third operation. The difference between the target time and the trigger time of the third operation meets the difference requirement. Preferably, when the difference between the target time and the trigger time of the third operation is smaller than the difference threshold, it is determined that the difference between the target time and the trigger time of the third operation meets the difference requirement. For example, the difference threshold may be set based on experience or adjusted according to the implementation environment, and the embodiment of the present invention is not limited thereto. For example, the difference threshold is 5 seconds. The target time may be before the trigger time of the third operation or after the trigger time of the third operation, but the embodiment of the present invention is not limited thereto.
[0059] Preferably, the first operation triggered on the first steering unit may be a long press operation on the first steering unit, or may be another operation. The second operation triggered on the foot brake unit may be a click operation on the foot brake unit. The third operation triggered on the accelerator unit may be a click operation on the accelerator unit. The embodiment of the present invention is not limited to these. For example, when a selection operation on the foot brake unit is detected first and then a slide operation from the foot brake unit to the accelerator unit is detected, it may be determined that the second operation triggered on the foot brake unit and the third operation triggered on the accelerator unit have been accepted in sequence.
[0060] In an embodiment of the present invention, controlling the virtual vehicle to perform inertial drift running in a direction corresponding to the first steering unit may mean controlling the virtual vehicle to perform inertial drift running, and turning the virtual vehicle in the direction corresponding to the first steering unit during the inertial drift process. For example, if the direction corresponding to the first steering unit is left, controlling the virtual vehicle to perform inertial drift running to the left may mean controlling the virtual vehicle to perform inertial drift running, and turning the virtual vehicle to the left during the inertial drift process. In other words, it means performing inertial drift running in the process of a left curve, and forming an arc that turns left by the vehicle performing inertial drift running.
[0061] In one possible aspect, before controlling the virtual vehicle to perform inertial drift running in a direction corresponding to the first steering unit, it is necessary to first determine the running speed and running state of the virtual vehicle at the target time point. Therefore, it is necessary to first determine the target time point. The embodiment of the present invention is not limited to the method of determining the target time point. For example, since the target time point is determined based on the trigger time point of the third operation, in the embodiment of the present invention, when determining the target time point, the trigger time point of the third operation is first determined, and then the target time point is determined based on the trigger time point of the third operation. For example, the step of determining the trigger time point of the third operation and determining the target time point based on the trigger time point of the third operation includes the step of determining the trigger time point of the third operation, and the step of determining the target time point based on the trigger time point of the third operation and the difference threshold value such that the difference between the target time point and the trigger time point of the third operation is smaller than the difference threshold value.
[0062] In some aspects, determining the target time based on the trigger time of the third operation and the difference threshold includes determining a target period based on the difference threshold and the trigger time of the third operation, and randomly determining a time within the target period as the target time, thereby making the difference between the target time and the trigger time of the third operation smaller than the difference threshold.
[0063] For example, the lower limit of the target period is a value obtained by subtracting the difference threshold from the trigger time of the third operation, and the upper limit of the target period is a value obtained by adding the difference threshold to the trigger time of the third operation. In other words, the step of determining the target period based on the difference threshold and the trigger time of the third operation includes a step of setting the time obtained by subtracting the difference threshold from the trigger time of the third operation as the start time, setting the time obtained by adding the difference threshold to the trigger time of the third operation as the end time, and setting the period between the start time and the end time as the target period. For example, if the trigger time of the third operation is 16:57:10 and the difference threshold is 5 seconds, the determined target period is 16:57:05 to 16:57:15, and any time point within the target period is determined as the target time. For example, the target time point is 16:57:11.
[0064] In an exemplary aspect, a method for acquiring a driving speed and driving state of a virtual vehicle at a current time (i.e., a target time) includes acquiring a first image, the first image being an image of the virtual vehicle at the target time, and determining a driving speed and driving state of the virtual vehicle at the target time based on the first image.
[0065] Here, the first image may be acquired in at least the following two ways.
[0066] In the first method, a first image is obtained from a storage space of a terminal device.
[0067] Preferably, a plurality of images and a correspondence between each image and a time point are stored in the storage space of the terminal device. Each image is an image of the virtual vehicle at a corresponding time point. After determining the target time point, the terminal device sets an image of the plurality of images stored in the storage space of the terminal device at the same time point as the target time point as the first image.
[0068] In the second method, the terminal device obtains the first image through interaction with the server.
[0069] In one possible embodiment, the server stores a plurality of images and a correspondence between each image and a time point. Each image is an image of the virtual vehicle at a corresponding time point. After determining a target time point, the terminal device transmits an image acquisition request to the server. The image acquisition request carries the target time point, and the image acquisition request is used to acquire a first image of the virtual vehicle at the target time point. After receiving the image acquisition request, the server analyzes the image acquisition request and acquires the target time point. The server determines an image of the plurality of images at the same time point as the target time point as the first image. The server transmits the first image to the terminal device, i.e., the terminal device acquires the first image.
[0070] Any of the above methods for acquiring the first image may be selected, and the embodiment of the present invention is not limited thereto.
[0071] In an exemplary aspect, the step of determining the running speed and running state of the virtual vehicle at the target time point based on the first image includes a step of determining the running speed corresponding to the first image as the running speed of the virtual vehicle at the target time point. For example, if the running speed corresponding to the first image is displayed in the first image, the terminal device may determine the running speed displayed in the first image as the running speed of the virtual vehicle at the target time point. Also, for example, if the running speed corresponding to the first image is not displayed in the first image, the terminal device acquires the running speed corresponding to the first image from a storage space of the terminal device, or the terminal device acquires the running speed corresponding to the first image by interaction with a server. When the wheels of the virtual vehicle in the first image are not separated from the running surface and the virtual vehicle is not in a drifting running state, the running state of the virtual vehicle at the target time point is determined to be a normal running state, or when the wheels of the virtual vehicle in the first image are not separated from the running surface, the running state of the virtual vehicle at the target time point is determined to be a normal running state, or when the wheels of the virtual vehicle in the first image are not separated from the running surface and the virtual vehicle is in a drifting running state, the running state of the virtual vehicle at the target time point is determined to be a non-normal running state. For example, when the wheels of the virtual vehicle in the first image are not separated from the running surface, determining that the running state of the virtual vehicle at the target time point is a normal running state may be considered to be determining that the running state of the virtual vehicle at the target time point is a non-normal running state when the wheels of the virtual vehicle in the first image are separated from the running surface.
[0072] Here, the running surface may be the ground, the surface of a bridge, the surface of a building, or the surface of another object, but the embodiment of the present invention is not limited thereto. The normal running state is used to instruct the virtual vehicle to accelerate and run in a non-drift running state. Here, since the virtual vehicle is in the non-drift running state, the virtual vehicle is on the running surface, and the normal running state is used to instruct the virtual vehicle to accelerate and run forward on the running surface in a non-drift running state. Here, running forward while accelerating may mean running forward along the current running direction of the virtual vehicle, and is not limited to running in a specific forward direction. The running speed of the virtual vehicle in the normal running state is greater than the running speed of the virtual vehicle when performing inertial drift running. Preferably, the wheels of the virtual vehicle are not separated from the running surface means that at least one wheel of the virtual vehicle is not separated from the running surface.
[0073] Preferably, when the virtual vehicle is in a drifting state, the first image further includes first information. The first information indicates that the virtual vehicle is in a drifting state. When the first image does not include the first information, it means that the virtual vehicle is not in a drifting state. When the first image includes the first information, it means that the virtual vehicle is in a drifting state.
[0074] In one possible embodiment, the speed threshold may be empirically set or adjusted according to the implementation environment, and the embodiment of the present invention is not limited thereto. For example, the speed threshold is 100 km / h.
[0075] Preferably, the virtual vehicle may be controlled to perform inertial drift running in a direction corresponding to the first steering unit, and a notification message for indicating the running state of the virtual vehicle may be displayed. For example, the notification message may be displayed on a vehicle control interface.
[0076] Fig. 5 is a schematic diagram of a display of a notification message according to an embodiment of the present invention. In Fig. 5, the virtual vehicle is performing inertial drift running in a direction corresponding to the first steering unit. "Inertial drift running" displayed in Fig. 5 is a notification message, that is, the current running state of the virtual vehicle is an inertial drift running state. Preferably, Fig. 5 also displays the running speed of the virtual vehicle "158km / h".
[0077] After controlling the virtual vehicle to perform inertial drift driving in a direction corresponding to the first steering section, a drift driving angle of the virtual vehicle at the current time may be determined, and the driving state of the virtual vehicle may be adjusted based on the drift driving angle of the virtual vehicle at the current time.
[0078] Here, the step of determining the drift driving angle of the virtual vehicle at the current time includes, but is not limited to, a step of determining the driving angle and head angle of the virtual vehicle at the current time, and a step of determining the drift driving angle of the virtual vehicle at the current time based on the driving angle and head angle of the virtual vehicle at the current time. Preferably, the head angle is the interior angle between a line from the tail of the vehicle to the head of the vehicle and a coordinate line. The coordinate line may be set based on experience, or may be adjusted according to the implementation environment. For example, the coordinate line is a horizontal line. The absolute value of the difference between the driving angle and head angle of the virtual vehicle at the current time is set as the drift driving angle of the virtual vehicle at the current time.
[0079] When the virtual vehicle is traveling forward normally, the traveling direction of the virtual vehicle is substantially equal to the head direction, i.e., the traveling angle of the virtual vehicle is substantially equal to the head angle, so it is determined that the drift traveling angle of the virtual vehicle is approximately equal to 0 degrees. When the virtual vehicle is traveling backward, the traveling direction of the virtual vehicle is opposite to the head direction, i.e., the traveling angle of the virtual vehicle is 270 degrees and the head angle of the virtual vehicle is 90 degrees, so it is determined that the drift traveling angle of the virtual vehicle is 180 degrees.
[0080] Fig. 6 is a schematic diagram of a display of a driving angle and a head angle of a virtual vehicle at a current time according to an embodiment of the present invention. In Fig. 6, ∠1 is the head angle of the virtual vehicle at a current time, ∠1 is the angle between the vertical upward arrow and the coordinate line in Fig. 6, ∠2 is the driving angle of the virtual vehicle at a current time, ∠2 is the angle between the arrow inclined to the upper right direction and the coordinate line in Fig. 6, and the dashed lines are the coordinate lines.
[0081] For example, since the head angle of the virtual vehicle at the current time is 30 degrees and the driving angle is 10 degrees, the drift driving angle of the virtual vehicle at the current time is determined to be 20 degrees.
[0082] The embodiment of the present invention is not limited to a manner of determining the driving angle and head angle of the virtual vehicle at the current time. Preferably, a second image is acquired. The second image is an image of the virtual vehicle at the current time. The head angle of the virtual vehicle at the current time is determined based on the second image. The driving angle of the virtual vehicle at a first time point is acquired. The first time point is a time point adjacent to and prior to the current time point. The driving angle of the virtual vehicle at the current time point is determined based on the head angle of the virtual vehicle at the current time point and the driving angle of the virtual vehicle at the first time point.
[0083] Preferably, the running angle of the virtual vehicle at the current time is determined based on the head angle of the virtual vehicle at the current time and the running angle of the virtual vehicle at the first time with reference to the grip force of the virtual vehicle. For example, the angle difference between the head angle of the virtual vehicle at the current time and the running angle of the virtual vehicle at the first time is determined, the product of the angle difference and the grip force of the virtual vehicle is determined, and the sum of the product and the running angle of the virtual vehicle at the first time is determined as the running angle of the virtual vehicle at the current time. In other words, the running angle of the virtual vehicle at the current time is determined according to the following formula (1).
[0084] V_i=S*(d_i-V_t)+V_t Equation (1) In formula (1), V_i is the running angle of the virtual vehicle at the current time, S is the grip force, d_i is the head angle of the virtual vehicle at the current time, and V_t is the running angle of the virtual vehicle at the first time. The grip force may be set based on experience or adjusted according to the implementation environment, and the embodiment of the present invention is not limited thereto. For example, the grip force is 0.5.
[0085] For example, the head angle of the virtual vehicle at the current time is 105 degrees, the running angle of the virtual vehicle at the first time is 15 degrees, the grip force is 0.5, and the running angle of the virtual vehicle at the current time determined according to the above formula (1) is 0.5*(105-15)+15=60 degrees. And the determined drift running angle of the virtual vehicle at the current time is 45 degrees.
[0086] Preferably, the process of adjusting the driving state of the virtual vehicle according to the current drift driving angle of the virtual vehicle includes the following three situations:
[0087] Situation 1: When the current drift angle of the virtual vehicle is smaller than the first angle, the virtual vehicle is controlled to travel in a normal driving state in a direction instructed by the first steering unit.
[0088] Preferably, the running speed of the virtual vehicle in the normal running state is greater than the running speed of the virtual vehicle in the inertial drift running. Here, the first angle may be set based on experience or may be adjusted according to the implementation environment, and the embodiment of the present invention is not limited thereto. For example, the first angle is 13 degrees.
[0089] For example, the current drift driving angle of the virtual vehicle is 12 degrees, the first angle is 13 degrees, and since the current drift driving angle of the virtual vehicle is smaller than the first angle, the virtual vehicle is controlled to drive in a normal driving state in the direction corresponding to the first steering section.
[0090] Situation 2: When the current drift angle of the virtual vehicle is greater than the second angle, the virtual vehicle is controlled to perform normal drift driving, which is different from inertial drift driving, in the direction indicated by the first steering unit.
[0091] Preferably, the running speed of the virtual vehicle when performing normal drift running is smaller than the running speed of the virtual vehicle when performing inertial drift running, and the second angle is larger than the first angle. The first angle is used to control the virtual vehicle to run in a normal running state in a direction indicated by the first steering unit. In other words, when the virtual vehicle performs normal drift running, the running speed decreases quickly and the deceleration acceleration is large, but when the virtual vehicle performs inertial drift running, the running speed decreases slowly and the deceleration acceleration is small. Here, the second angle may be set based on experience or may be adjusted according to the implementation environment, and the embodiment of the present invention is not limited thereto. For example, the second angle is 30 degrees.
[0092] For example, the current drift angle of the virtual vehicle is 33 degrees and the second angle is 30 degrees. Since the current drift angle of the virtual vehicle is greater than the second angle, the virtual vehicle is controlled to perform normal drift in the direction corresponding to the first steering section.
[0093] Situation 3: When the current drift angle of the virtual vehicle is equal to or greater than a first angle and equal to or less than a second angle, the virtual vehicle is controlled to perform inertial drift in a direction indicated by a first steering unit, where the second angle is greater than the first angle.
[0094] For example, the current drift angle of the virtual vehicle is 20 degrees, the first angle is 13 degrees, and the second angle is 30 degrees. Because the current drift angle of the virtual vehicle is equal to or greater than the first angle and equal to or less than the second angle, the virtual vehicle is controlled to perform inertial drift in a direction corresponding to the first steering unit.
[0095] Preferably, the vehicle control interface may further display a parking brake unit, and the parking brake unit is used to adjust the running speed of the virtual vehicle. When a fourth operation triggered by the parking brake unit is received after the virtual vehicle is controlled to perform inertial drift running in a direction indicated by the first steering unit, the virtual vehicle is controlled to perform normal drift running different from the inertial drift running in a direction indicated by the first steering unit. The running speed of the virtual vehicle when performing normal drift running is lower than the running speed of the virtual vehicle when performing inertial drift running. The fourth operation triggered by the parking brake unit may be a click operation on the parking brake unit or another operation, and the embodiment of the present invention is not limited thereto.
[0096] Preferably, when the virtual vehicle is controlled to perform normal drift running in the direction corresponding to the first steering part, a notification message may be displayed to indicate the running state of the virtual vehicle. The display process of this notification message is similar to the display process when the virtual vehicle is controlled to perform inertial drift running in the direction corresponding to the first steering part, and the description thereof will be omitted here.
[0097] Fig. 7 is a schematic diagram of a display when a virtual vehicle according to an embodiment of the present invention performs normal drift driving. At 701 in Fig. 7, the virtual vehicle is in a normal driving state, and the virtual vehicle's running speed is 220km / h. At 702 in Fig. 7, the virtual vehicle is in a normal drift driving state, and the virtual vehicle's running speed is 185km / h. At 703 in Fig. 7, the virtual vehicle is in a normal drift driving state, and the virtual vehicle's running speed is 157km / h. After starting normal drift driving, the virtual vehicle's running speed rapidly drops to 157km / h within 2 seconds and is maintained at that speed.
[0098] Fig. 8 is a schematic diagram of a display when a virtual vehicle according to an embodiment of the present invention performs inertial drift running. At 801 in Fig. 8, the virtual vehicle is in a normal running state, and the running speed of the virtual vehicle is 219 km / h. At 802 in Fig. 8, the virtual vehicle is in an inertial drift running state, and the running speed of the virtual vehicle is 199 km / h. At 803 in Fig. 8, the virtual vehicle is in an inertial drift running state, and the running speed of the virtual vehicle is 196 km / h. After starting inertial drift running, the running speed of the virtual vehicle rapidly drops to 196 km / h within one second and is maintained at that speed.
[0099] 9 is a schematic diagram showing the drift driving trajectories of normal drift driving and inertial drift driving according to an embodiment of the present invention. Here, the drift driving trajectory shown by the dashed line is the drift driving trajectory of inertial drift driving, and the drift driving trajectory shown by the solid line is the drift driving trajectory of normal drift driving. As can be seen from FIG. 9, inertial drift driving is suitable for large and gentle curves, or the virtual vehicle only turns weakly during the inertial drift driving process, and inertial drift driving is more suitable for curves with small radii.
[0100] According to the above method, when controlling the virtual vehicle to perform inertial drift running, the player can control the virtual vehicle to perform inertial drift running simply by operating the steering unit, the foot brake unit, and the accelerator unit. Therefore, according to the method, the player's control over the vehicle is improved, the vehicle control method becomes more flexible, and the player's game experience is improved.
[0101] In addition, by controlling the virtual vehicle to perform inertial drift driving by operating the steering unit, accelerator unit, and foot brake unit, this is more in line with the operating method for inertial drift driving of an actual vehicle, thereby improving the sense of realism when controlling the virtual vehicle to perform inertial drift driving.
[0102] FIG. 10 is a schematic diagram of a process for controlling a virtual vehicle to perform inertial drift driving according to an embodiment of the present invention. In 1001 in FIG. 10, when the virtual vehicle is going to pass a curve with a long inner arc and a gentle curve, if the vehicle uses normal drift driving, the vehicle path does not fit the curve and the curve speed is slow. In 1001 in FIG. 10, the running speed of the virtual vehicle is 168 km / h. In 1002 in FIG. 10, the interaction target clicks the right steering part to adjust the head direction of the virtual vehicle. In 1003 in FIG. 10, the interaction target presses the right steering unit without releasing it, clicks the foot brake unit, clicks the accelerator unit, and determines the running speed and running state when the accelerator unit of the virtual vehicle is clicked. If the running speed when the accelerator unit of the virtual vehicle is clicked is greater than the speed threshold and the running state is a normal running state, the virtual vehicle is controlled to perform inertial drift running to the right, and the vehicle passes through the curve in a state where it fits the curve while skidding at a small angle, and a notification message is displayed to indicate to the interaction target that the virtual vehicle is in an inertial drift running state. In 1004 in FIG. 10, the interaction target controls the drift running angle of the virtual vehicle between a first angle and a second angle, and repeatedly adjusts the steering unit to maintain the inertial drift running state of the virtual vehicle. In 1005 in FIG. 10, if the interaction target wants to stop the inertial drift running, the interaction target may trigger the left steering unit to make the drift running angle smaller than the first angle. In this case, the virtual vehicle ends the inertial drift running and runs in a normal running state.
[0103] FIG. 11 is a flowchart of a control method for a virtual vehicle according to an embodiment of the present invention. In FIG. 11, when a first operation triggered by a first steering unit is received, and a second operation triggered by a foot brake unit and a third operation triggered by an accelerator unit are received, it is determined whether or not the running information of the virtual vehicle (the target vehicle shown in FIG. 11) at the target time satisfies the drift running condition. If the running information of the virtual vehicle at the target time satisfies the drift running condition, the virtual vehicle is controlled to perform inertial drift running in a direction corresponding to the first steering unit. Here, the running information of the virtual vehicle at the target time satisfies the drift running condition means that the running speed of the virtual vehicle at the target time is greater than a speed threshold value and the running state of the virtual vehicle at the target time is a normal running state.
[0104] It is determined whether the drift angle of the virtual vehicle is equal to or less than the second angle and equal to or more than the first angle. If the drift angle of the virtual vehicle is equal to or less than the second angle and equal to or more than the first angle, the virtual vehicle is controlled to perform inertial drift running in a direction corresponding to the first steering unit. If an operation triggered by the parking brake unit is accepted, the virtual vehicle is controlled to perform normal drift running (i.e., parking brake drift running shown in FIG. 11) in a direction corresponding to the first steering unit.
[0105] If the drift driving angle of the virtual vehicle is not between the first angle and the second angle, it is determined whether the drift driving angle of the virtual vehicle is smaller than the first angle. If the drift driving angle of the virtual vehicle is smaller than the first angle, the virtual vehicle is controlled to drive in a normal driving state in a direction corresponding to the first steering unit. If the drift driving angle of the virtual vehicle is equal to or larger than the first angle (i.e., the drift driving angle of the virtual vehicle is larger than the second angle), the virtual vehicle is controlled to perform normal drift driving in a direction corresponding to the first steering unit.
[0106] 12 is a schematic diagram of the configuration of a vehicle control device (i.e., a control device for a virtual vehicle) according to an embodiment of the present invention. As shown in FIG. 12, the device includes the following modules:
[0107] The display module 1201 displays the virtual vehicle in the virtual scene.
[0108] When the display module 1201 receives a first operation triggered by the first steering unit, it displays the virtual vehicle whose head direction has changed, that is, it changes the head direction of the displayed virtual vehicle.
[0109] When the control module 1202 receives a second operation triggered by the foot brake unit and a third operation triggered by the accelerator unit in sequence within the duration of the first operation, if the running speed of the virtual vehicle at the target time point is greater than the speed threshold and the running state of the virtual vehicle at the target time point is a normal running state, the control module 1202 controls the virtual vehicle to perform inertial drift running in a direction corresponding to the first steering unit. The target time point is determined based on the trigger time point of the third operation.
[0110] For example, the device according to the embodiment of the present invention may further include a determination module, and some or all of the operations performed by the display module 1201 may be executed by the determination module. For example, when the determination module receives a first operation triggered by a first steering unit, and sequentially receives a second operation triggered by a foot brake unit and a third operation triggered by an accelerator unit within the duration of the first operation, the determination module determines a trigger time of the third operation, determines a target time based on the trigger time of the third operation, and determines a running speed and a running state of the virtual vehicle at the target time. In response, when the running speed of the virtual vehicle at the target time is greater than a speed threshold and the running state of the virtual vehicle at the target time is a normal running state, the control module 1202 controls the virtual vehicle to perform inertial drift running in a direction indicated by the first steering unit. The normal running state means that the virtual vehicle runs on a running surface in a virtual scene in a non-drift running state.
[0111] In one possible embodiment, the device further comprises the following modules:
[0112] When the determination module receives a third operation triggered by the accelerator section, it acquires a first image, the first image being an image of the virtual vehicle at a target time point, and determines a running speed and a running state of the virtual vehicle at the target time point based on the first image.
[0113] In one possible aspect, the determination module determines the driving speed corresponding to the first image as the driving speed of the virtual vehicle at the target time point, for example, determines the driving speed displayed in the first image as the driving speed of the virtual vehicle at the target time point, and if the wheels of the virtual vehicle in the first image have not left the driving surface and the virtual vehicle is not in a drifting state, determines that the driving state of the virtual vehicle at the target time point is the normal driving state, or if the wheels of the virtual vehicle in the first image have not left the driving surface (are away from the driving surface), determines that the driving state of the virtual vehicle at the target time point is a non-normal driving state, or if the wheels of the virtual vehicle in the first image have not left the driving surface and the virtual vehicle is in the drifting state, determines that the driving state of the virtual vehicle at the target time point is a non-normal driving state.
[0114] In one possible aspect, the control module 1202 controls the virtual vehicle to drive in a normal driving state in a direction indicated by the first steering unit when the current drift driving angle of the virtual vehicle is smaller than a first angle, and the driving speed of the virtual vehicle when in the normal driving state is greater than the driving speed of the virtual vehicle when performing inertial drift driving.
[0115] In one possible aspect, the determination module determines a current driving angle and head angle of the virtual vehicle, and determines a current drift driving angle of the virtual vehicle based on the current driving angle and head angle of the virtual vehicle.
[0116] In one possible embodiment, the control module 1202 controls the virtual vehicle to perform normal drift driving, which is different from inertial drift driving, in a direction instructed by the first steering unit when the drift driving angle of the virtual vehicle at the current time is larger than the second angle, the running speed of the virtual vehicle when performing normal drift driving is smaller than the running speed of the virtual vehicle when performing inertial drift driving, and the second angle is larger than the first angle. Here, the first angle is used to control the virtual vehicle to run in a normal driving state in a direction instructed by the first steering unit.
[0117] In one possible aspect, the control module 1202 controls the virtual vehicle to perform inertial drift in a direction indicated by the first steering unit when the current drift angle of the virtual vehicle is greater than or equal to a first angle and less than or equal to a second angle.
[0118] In one possible aspect, the determination module acquires a second image, the second image being an image of the virtual vehicle at a current time, determines a head angle of the virtual vehicle at a current time based on the second image, acquires a driving angle of the virtual vehicle at a first time point, the first time point being adjacent to and prior to the current time, and determines a driving angle of the virtual vehicle at a current time based on the head angle of the virtual vehicle at the current time and the driving angle of the virtual vehicle at the first time point.
[0119] In one possible aspect, the determination module determines an angle difference between the head angle of the virtual vehicle at the current time and the driving angle of the virtual vehicle at the first time, determines a product of the angle difference and the grip force of the virtual vehicle, and determines the sum of the product and the driving angle of the virtual vehicle at the first time as the driving angle of the virtual vehicle at the current time.
[0120] In one possible aspect, when the control module 1202 receives a fourth operation triggered by the parking brake unit, it controls the virtual vehicle to perform normal drift driving, which is different from inertial drift driving, in a direction indicated by the first steering unit, and the running speed of the virtual vehicle when performing normal drift driving is smaller than the running speed of the virtual vehicle when performing inertial drift driving, and the parking brake unit is used to adjust the running speed of the virtual vehicle.
[0121] In one possible embodiment, the display module 1201 displays a notification message to indicate (or indicate) the current driving state of the virtual vehicle.
[0122] In one possible embodiment, the device further comprises the following modules:
[0123] When the head direction of the virtual vehicle is in a first direction and a third operation triggered by the accelerator section is received, the acquisition module acquires a first acceleration, and the first acceleration is used to increase the traveling speed of the virtual vehicle.
[0124] The control module 1202 controls the virtual vehicle to travel in a first direction at a first acceleration within a first period of time.
[0125] In one possible aspect, when the head direction of the virtual vehicle is in a first direction, the running speed of the virtual vehicle satisfies the speed requirement, and a second operation triggered to the foot brake unit is received, the acquisition module acquires a second acceleration, and the second acceleration is used to reduce the running speed of the virtual vehicle.
[0126] The control module 1202 controls the virtual vehicle to travel in a first direction at a second acceleration within a second period of time.
[0127] In one possible aspect, when the head direction of the virtual vehicle is in a first direction, the running speed of the virtual vehicle does not meet the speed requirement, and a first operation triggered to the foot brake unit is received, the acquisition module acquires a third acceleration, and the third acceleration is used to increase the running speed of the virtual vehicle.
[0128] The control module 1202 controls the virtual vehicle to travel at the third acceleration in a second direction within a third time period, the second direction being opposite to the first direction.
[0129] In one possible aspect, when the acquisition module receives a fifth operation triggered by the acceleration unit, it acquires a fourth acceleration, the fourth acceleration is used to increase the running speed of the virtual vehicle, the fourth acceleration is greater than the first acceleration, and the acceleration unit is used to adjust the running speed of the virtual vehicle.
[0130] The control module 1202 controls the virtual vehicle to travel in a head direction of the virtual vehicle at a fourth acceleration within a fourth period.
[0131] According to the technology of the embodiment of the present invention, when controlling a virtual vehicle to perform inertial drift running, the player can control the virtual vehicle to perform inertial drift running simply by operating the steering unit, the foot brake unit, and the accelerator unit. This improves the player's control over the vehicle, makes the vehicle control method more flexible, and improves the player's gaming experience.
[0132] In addition, by controlling the virtual vehicle to perform inertial drift driving by operating the steering unit, accelerator unit, and foot brake unit, this is more in line with the operating method for inertial drift driving of an actual vehicle, thereby improving the sense of realism when controlling the virtual vehicle to perform inertial drift driving.
[0133] In addition, the above-mentioned device is described by simply exemplifying the division of each of the above-mentioned functional blocks when realizing its functions, but in actual application, the above-mentioned functions are performed by different functional blocks as necessary, that is, the internal structure of the device is divided into different functional blocks to complete all or part of the above-mentioned functions. In addition, the device according to the above-mentioned embodiment belongs to the same concept as the method embodiment, and the specific realization method thereof may refer to the details of the method embodiment, and the description thereof will be omitted here.
[0134] 13 is a block diagram of a configuration of a terminal device 1300 according to an embodiment of the present invention. The terminal device 1300 may be a portable mobile terminal, such as a smartphone, a tablet computer, a Moving Picture Experts Group Audio Layer III (MP3) player, a Moving Picture Experts Group Audio Layer IV (MP4) player, a notebook computer, or a desktop computer. The terminal device 1300 may also be called a user device, a portable terminal, a laptop terminal, a desktop terminal, or other names.
[0135] Generally, the terminal device 1300 includes a processor 1301 and a memory 1302 .
[0136] The processor 1301 may include one or more processing cores, such as a 4-core processor, an 8-core processor, etc. The processor 1301 may be implemented in at least one hardware form of a DSP (Digital Signal Processing), an FPGA (Field Programmable Gate Array), and a PLA (Programmable Logic Array). The processor 1301 may include a main processor and a co-processor. The main processor is a processor used to process data in an awake state, also referred to as a CPU (Central Processing Unit). The co-processor is a low-power processor used to process data in a standby state. In some embodiments, the processor 1301 may be integrated with a GPU (Graphics Processing Unit), which is used to render and draw content that needs to be displayed on a display. In some embodiments, the processor 1301 may further include an AI (Artificial Intelligence) processor, which is used to process computational operations related to machine learning.
[0137] The memory 1302 may include one or more computer readable storage media, which may be non-transitory. The non-transitory computer readable storage medium may also be referred to as a non-transitory computer readable storage medium. The memory 1302 may further include high speed random access memory and non-volatile memory, such as one or more magnetic disk storage devices or flash memory storage devices. In some embodiments, the non-transitory computer readable storage medium in the memory 1302 is used to store at least one instruction, which is executed by the processor 1301 to implement a method for controlling a virtual vehicle according to an embodiment of the present invention.
[0138] In some aspects, the terminal device 1300 may further include a display 1305. For example, virtual vehicles, notification messages, etc. may be displayed via the display 1305.
[0139] The display 1305 is used to display a user interface (UI). The UI may include graphics, text, icons, videos, and any combination thereof. If the display 1305 is a touch display, the display 1305 may further have the ability to collect touch signals on or at the surface of the display 1305. The touch signals may be input as control signals to the processor 1301 for processing. In this case, the display 1305 may further be used to provide virtual buttons and / or virtual keyboards, i.e., soft buttons and / or soft keyboards. In some embodiments, the display 1305 is a single display disposed on the front panel of the terminal 1300. In another embodiment, the display 1305 is at least two displays disposed on different surfaces of the terminal 1300, or designed to fold. In another embodiment, the display 1305 is a flexible display disposed on a curved or folded surface of the terminal 1300. Furthermore, the display 1305 may be configured as a non-rectangular irregular shape, i.e., an irregular screen. The display 1305 is made of materials such as LCD (Liquid Crystal Display) and OLED (Organic Light-Emitting Diode).
[0140] Those skilled in the art will appreciate that the structure of terminal device 1300 is not limited to that shown in FIG. 13, but may include more or fewer components than those shown, combine some components, or employ a different arrangement of components.
[0141] FIG. 14 is a schematic diagram of a server configuration according to an embodiment of the present invention. The server 1400 may include one or more processors (Central Processing Units: CPU) 1401 and one or more memories 1402, although there are relatively large differences depending on the configuration or performance. Here, at least one program code is stored in the one or more memories 1402. The at least one program code is loaded and executed by the one or more processors 1401 so as to realize the virtual vehicle control method according to the embodiments of the above methods. The server 1400 may further include a wired or wireless network interface for input and output, a keyboard, an input and output interface, etc. The server 1400 may further include other members for realizing the functions of the device, but the description thereof will be omitted here.
[0142] In an exemplary embodiment, the present invention further provides a non-transitory computer-readable storage medium having at least one program code stored thereon, the at least one program code being loaded and executed by a processor to cause a computer to implement any of the above-described methods for controlling a virtual vehicle.
[0143] The above non-transitory 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 flexible disk, an optical data storage device, etc.
[0144] In an exemplary embodiment, the present invention further provides a computer program or computer program product having at least one computer instruction stored thereon, the at least one computer instruction being loaded and executed by a processor to cause a computer to implement any of the above-mentioned methods for controlling a virtual vehicle.
[0145] Furthermore, the information (including but not limited to user device information, user personal information, etc.), data (including but not limited to analysis data, storage data, presentation data, etc.) and signals related to the present invention are all obtained with the authorization of the user or sufficient authorization of each party, and the collection, use and processing of related data must comply with the relevant laws, regulations and standards of the relevant countries and regions. For example, the images related to the present invention have been obtained with sufficient authorization.
[0146] In this specification, "plurality" means two or more. "And / or" describes the relationship between related objects and indicates that there are three possible relationships. For example, "A and / or B" refers to three cases: A exists alone, A and B exist simultaneously, and B exists alone. The symbol " / " usually indicates that the related objects are in an "or" relationship.
[0147] The numbers of the above embodiments of the present invention are merely for the purpose of explanation and do not represent the superiority or inferiority of the embodiments.
[0148] The above embodiments are merely illustrative examples of the present invention and are not intended to limit the present invention. Any modifications, equivalent replacements, improvements, etc. made within the spirit of the present invention are included in the scope of protection of the present invention.
Claims
1. A method for controlling a virtual vehicle executed by a terminal device, comprising: displaying a virtual vehicle in a virtual scene; a step of determining a trigger time point of the third operation when a first operation triggered by a first steering unit is received and a second operation triggered by a foot brake unit and a third operation triggered by an accelerator unit are sequentially received within a duration of the first operation, and determining a target time point based on the trigger time point of the third operation; determining a running speed and a running state of the virtual vehicle at the target time point; and a step of controlling the virtual vehicle to perform inertial drift running in a direction indicated by the first steering unit when the running speed of the virtual vehicle at the target time point is greater than a speed threshold and the running state of the virtual vehicle at the target time point is a normal running state, wherein the normal running state means that the virtual vehicle runs in a non-drift running state on a running surface in the virtual scene.
2. The step of determining a running speed and a running state of the virtual vehicle at the target time point includes: acquiring a first image when a third operation triggered by the accelerator unit is received, the first image being an image of the virtual vehicle at the target time point; and determining a driving speed and driving state of the virtual vehicle at the target time based on the first image.
3. The step of determining a traveling speed and a traveling state of the virtual vehicle at the target time point based on the first image includes: determining a travel speed corresponding to the first image as a travel speed of the virtual vehicle at a target time point; 3. The method of claim 2, comprising the steps of: determining that the driving state of the virtual vehicle at the target time point is the normal driving state if the wheels of the virtual vehicle in the first image have not left the driving surface and the virtual vehicle is not in a drifting driving state; or determining that the driving state of the virtual vehicle at the target time point is the non-normal driving state if the wheels of the virtual vehicle in the first image have left the driving surface; or determining that the driving state of the virtual vehicle at the target time point is the non-normal driving state if the wheels of the virtual vehicle in the first image have not left the driving surface and the virtual vehicle is in the drifting driving state.
4. After controlling the virtual vehicle to perform inertial drift running in a direction indicated by the first steering unit, 2. The method according to claim 1, further comprising: a step of controlling the virtual vehicle to travel in the normal driving state in a direction indicated by the first steering unit when a current drift driving angle of the virtual vehicle is smaller than a first angle, wherein the driving speed of the virtual vehicle when in the normal driving state is greater than the driving speed of the virtual vehicle when performing inertial drift driving.
5. After controlling the virtual vehicle to perform inertial drift running in a direction indicated by the first steering unit, 2. The method of claim 1, further comprising: a step of controlling the virtual vehicle to perform normal drift driving, different from the inertial drift driving, in a direction indicated by the first steering unit when the current drift driving angle of the virtual vehicle is greater than a second angle, wherein the driving speed of the virtual vehicle when performing normal drift driving is smaller than the driving speed of the virtual vehicle when performing inertial drift driving, the second angle is greater than a first angle, and the first angle is used to control the virtual vehicle to run in the normal driving state in the direction indicated by the first steering unit.
6. After controlling the virtual vehicle to perform inertial drift running in a direction indicated by the first steering unit, 2. The method of claim 1, further comprising: a step of controlling the virtual vehicle to perform inertial drift driving in a direction indicated by the first steering unit when a current drift driving angle of the virtual vehicle is greater than or equal to a first angle and less than or equal to a second angle, wherein the second angle is greater than the first angle, and the first angle is used to control the virtual vehicle to drive under the normal driving condition in the direction indicated by the first steering unit.
7. determining a current trajectory angle and headway angle of the virtual vehicle; The method of claim 4 , further comprising: determining a current drift angle of the virtual vehicle based on a current driving angle and a head angle of the virtual vehicle.
8. The step of determining a current running angle and a headway angle of the virtual vehicle includes: acquiring a second image, the second image being a current image of the virtual vehicle; determining a current head angle of the virtual vehicle based on the second image; acquiring a traveling angle of the virtual vehicle at a first time point, the first time point being adjacent to the current time point and preceding the current time point; determining a current driving angle of the virtual vehicle based on a current head angle of the virtual vehicle and a driving angle of the virtual vehicle at the first time.
9. The step of determining a traveling angle of the virtual vehicle at a current time point based on a head angle of the virtual vehicle at a current time point and a traveling angle of the virtual vehicle at the first time point includes: determining an angle difference between a head angle of the virtual vehicle at a current time and a driving angle of the virtual vehicle at a first time, and determining a product of the angle difference and a grip force of the virtual vehicle; determining a sum of said product and a driving angle of said virtual vehicle at a first time as a current driving angle of said virtual vehicle.
10. After controlling the virtual vehicle to perform inertial drift running in a direction indicated by the first steering unit, 2. The method of claim 1, further comprising: a step of controlling the virtual vehicle to perform normal drift driving, different from the inertial drift driving, in a direction indicated by the first steering unit when a fourth operation triggered by a parking brake unit is received, wherein a driving speed of the virtual vehicle when performing normal drift driving is smaller than a driving speed of the virtual vehicle when performing inertial drift driving, and the parking brake unit is used to adjust the driving speed of the virtual vehicle.
11. The method of claim 1 , further comprising the step of displaying a notification message to indicate a current driving status of the virtual vehicle.
12. after displaying a virtual vehicle in the virtual scene; a step of acquiring a first acceleration when a vehicle head direction of the virtual vehicle is a first direction and a third operation triggered by the accelerator unit is received, the first acceleration being used to increase a traveling speed of the virtual vehicle; The method of claim 1 , further comprising: controlling the virtual vehicle to travel in the first direction at the first acceleration within a first time period.
13. after displaying a virtual vehicle in the virtual scene; a step of acquiring a second acceleration when a head direction of the virtual vehicle is a first direction, a running speed of the virtual vehicle satisfies a speed requirement, and a second operation triggered by the foot brake unit is received, the second acceleration being used to reduce the running speed of the virtual vehicle; The method of claim 1 , further comprising: controlling the virtual vehicle to travel in the first direction at the second acceleration within a second time period.
14. after displaying a virtual vehicle in the virtual scene; a step of acquiring a third acceleration when a head direction of the virtual vehicle is a first direction, a running speed of the virtual vehicle does not satisfy a speed requirement, and a first operation triggered by the foot brake unit is received, the third acceleration being used to increase the running speed of the virtual vehicle; 2. The method of claim 1, further comprising the step of controlling the virtual vehicle to travel in a second direction at the third acceleration during a third time period, the second direction being opposite to the first direction.
15. acquiring a fourth acceleration when a fifth operation triggered by an acceleration unit is received, the fourth acceleration being used to increase a running speed of the virtual vehicle, the fourth acceleration being greater than the first acceleration, and the acceleration unit being used to adjust the running speed of the virtual vehicle; The method of claim 1 , further comprising: controlling the virtual vehicle to travel at the fourth acceleration in a head direction of the virtual vehicle within a fourth period of time.
16. A control device for a virtual vehicle, comprising: a display module for displaying a virtual vehicle in a virtual scene; a determination module that, when a first operation triggered by a first steering unit is received and a second operation triggered by a foot brake unit and a third operation triggered by an accelerator unit are sequentially received within a duration of the first operation, determines a trigger time of the third operation, determines a target time based on the trigger time of the third operation, and determines a running speed and a running state of the virtual vehicle at the target time; a control module that controls the virtual vehicle to perform inertial drift running in a direction indicated by the first steering unit when the running speed of the virtual vehicle at the target time point is greater than a speed threshold and the running state of the virtual vehicle at the target time point is a normal running state, wherein the normal running state means that the virtual vehicle runs in a non-drift running state on a running surface in the virtual scene.
17. 16. An electronic device comprising a processor and a memory having at least one program code stored therein, the at least one program code being loaded and executed by the processor to cause the electronic device to implement a method for controlling a virtual vehicle according to any one of claims 1 to 15.
18. A computer program having at least one program instruction stored therein, the at least one program instruction being loaded and executed by a processor so as to cause the computer to implement a method for controlling a virtual vehicle according to any one of claims 1 to 15.
Citation Information
Patent Citations
Scoring system of traveling condition
JP2007037796A
Method, apparatus and computer program for drifting a virtual vehicle in a virtual world
JP2021531133A
OBJECT CONTROL METHOD, OBJECT CONTROL DEVICE, COMPUTER PROGRAM, AND ELECTRONIC DEVICE
JP2022520699A
