WO2023221695A1 - 虚拟车辆的控制方法、装置、设备及存储介质 - Google Patents

虚拟车辆的控制方法、装置、设备及存储介质 Download PDF

Info

Publication number
WO2023221695A1
WO2023221695A1 PCT/CN2023/087825 CN2023087825W WO2023221695A1 WO 2023221695 A1 WO2023221695 A1 WO 2023221695A1 CN 2023087825 W CN2023087825 W CN 2023087825W WO 2023221695 A1 WO2023221695 A1 WO 2023221695A1
Authority
WO
WIPO (PCT)
Prior art keywords
virtual vehicle
control
drift
vehicle
state
Prior art date
Application number
PCT/CN2023/087825
Other languages
English (en)
French (fr)
Inventor
薛皓晟
涂金龙
罗志鹏
Original Assignee
腾讯科技(深圳)有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 腾讯科技(深圳)有限公司 filed Critical 腾讯科技(深圳)有限公司
Publication of WO2023221695A1 publication Critical patent/WO2023221695A1/zh

Links

Classifications

    • AHUMAN NECESSITIES
    • A63SPORTS; GAMES; AMUSEMENTS
    • A63FCARD, BOARD, OR ROULETTE GAMES; INDOOR GAMES USING SMALL MOVING PLAYING BODIES; VIDEO GAMES; GAMES NOT OTHERWISE PROVIDED FOR
    • A63F13/00Video games, i.e. games using an electronically generated display having two or more dimensions
    • A63F13/40Processing input control signals of video game devices, e.g. signals generated by the player or derived from the environment
    • A63F13/42Processing input control signals of video game devices, e.g. signals generated by the player or derived from the environment by mapping the input signals into game commands, e.g. mapping the displacement of a stylus on a touch screen to the steering angle of a virtual vehicle
    • A63F13/422Processing input control signals of video game devices, e.g. signals generated by the player or derived from the environment by mapping the input signals into game commands, e.g. mapping the displacement of a stylus on a touch screen to the steering angle of a virtual vehicle automatically for the purpose of assisting the player, e.g. automatic braking in a driving game
    • AHUMAN NECESSITIES
    • A63SPORTS; GAMES; AMUSEMENTS
    • A63FCARD, BOARD, OR ROULETTE GAMES; INDOOR GAMES USING SMALL MOVING PLAYING BODIES; VIDEO GAMES; GAMES NOT OTHERWISE PROVIDED FOR
    • A63F13/00Video games, i.e. games using an electronically generated display having two or more dimensions
    • A63F13/50Controlling the output signals based on the game progress
    • A63F13/53Controlling the output signals based on the game progress involving additional visual information provided to the game scene, e.g. by overlay to simulate a head-up display [HUD] or displaying a laser sight in a shooting game
    • A63F13/533Controlling the output signals based on the game progress involving additional visual information provided to the game scene, e.g. by overlay to simulate a head-up display [HUD] or displaying a laser sight in a shooting game for prompting the player, e.g. by displaying a game menu
    • AHUMAN NECESSITIES
    • A63SPORTS; GAMES; AMUSEMENTS
    • A63FCARD, BOARD, OR ROULETTE GAMES; INDOOR GAMES USING SMALL MOVING PLAYING BODIES; VIDEO GAMES; GAMES NOT OTHERWISE PROVIDED FOR
    • A63F13/00Video games, i.e. games using an electronically generated display having two or more dimensions
    • A63F13/55Controlling game characters or game objects based on the game progress
    • A63F13/57Simulating properties, behaviour or motion of objects in the game world, e.g. computing tyre load in a car race game
    • AHUMAN NECESSITIES
    • A63SPORTS; GAMES; AMUSEMENTS
    • A63FCARD, BOARD, OR ROULETTE GAMES; INDOOR GAMES USING SMALL MOVING PLAYING BODIES; VIDEO GAMES; GAMES NOT OTHERWISE PROVIDED FOR
    • A63F13/00Video games, i.e. games using an electronically generated display having two or more dimensions
    • A63F13/80Special adaptations for executing a specific game genre or game mode
    • A63F13/803Driving vehicles or craft, e.g. cars, airplanes, ships, robots or tanks
    • AHUMAN NECESSITIES
    • A63SPORTS; GAMES; AMUSEMENTS
    • A63FCARD, BOARD, OR ROULETTE GAMES; INDOOR GAMES USING SMALL MOVING PLAYING BODIES; VIDEO GAMES; GAMES NOT OTHERWISE PROVIDED FOR
    • A63F2300/00Features of games using an electronically generated display having two or more dimensions, e.g. on a television screen, showing representations related to the game
    • A63F2300/60Methods for processing data by generating or executing the game program
    • A63F2300/64Methods for processing data by generating or executing the game program for computing dynamical parameters of game objects, e.g. motion determination or computation of frictional forces for a virtual car
    • AHUMAN NECESSITIES
    • A63SPORTS; GAMES; AMUSEMENTS
    • A63FCARD, BOARD, OR ROULETTE GAMES; INDOOR GAMES USING SMALL MOVING PLAYING BODIES; VIDEO GAMES; GAMES NOT OTHERWISE PROVIDED FOR
    • A63F2300/00Features of games using an electronically generated display having two or more dimensions, e.g. on a television screen, showing representations related to the game
    • A63F2300/80Features of games using an electronically generated display having two or more dimensions, e.g. on a television screen, showing representations related to the game specially adapted for executing a specific type of game
    • A63F2300/8017Driving on land or water; Flying

Definitions

  • This application relates to the fields of computer and Internet technologies, and in particular to a control method, device, equipment and storage medium for a virtual vehicle.
  • a direction adjustment control, a throttle control and a drift control are displayed in the user interface.
  • adjust the moving direction of the virtual vehicle through the direction adjustment control control the virtual vehicle to keep accelerating by pressing and holding the accelerator control, control the virtual vehicle to stop accelerating by releasing the accelerator control, and control the virtual vehicle through the drift control.
  • the vehicle enters a drift state.
  • the user continuously adjusts the moving direction of the virtual vehicle through the direction adjustment control to exit the drift state.
  • Embodiments of the present application provide a control method, device, equipment and storage medium for a virtual vehicle, which can simplify user operations and improve the dedrift efficiency of virtual vehicles.
  • the technical solution is as follows.
  • a method for controlling a virtual vehicle is provided.
  • the method is executed by a terminal device.
  • the method includes the following steps:
  • the drift state is a state in which the drift angle of the virtual vehicle is greater than a first threshold, and the drift angle is the difference between the moving direction of the virtual vehicle and the direction of the front of the virtual vehicle. the angle between;
  • the virtual vehicle is controlled to exit the drift state.
  • a control device for a virtual vehicle includes the following modules:
  • a vehicle drift module used to display a virtual vehicle in a drift state; wherein the drift state is a state in which the drift angle of the virtual vehicle is greater than a first threshold, and the drift angle is the moving direction of the virtual vehicle consistent with the The angle between the head directions of virtual vehicles;
  • a vehicle control module configured to control the drift angle of the virtual vehicle to gradually decrease in response to the operation of the first brake control
  • an acceleration and de-drifting module configured to respond to the first operation of the throttle control, control the acceleration movement of the virtual vehicle, and accelerate the reduction speed of the drift angle of the virtual vehicle;
  • a vehicle de-drift module configured to control the virtual vehicle to exit the drift state when the drift angle of the virtual vehicle is less than the first threshold.
  • the embodiment of the present application provides a terminal device, the terminal device includes A processor and a memory, a computer program is stored in the memory, and the computer program is loaded and executed by the processor to implement the above control method of the virtual vehicle.
  • the embodiments of the present application provide a computer-readable storage medium.
  • a computer program is stored in the readable storage medium.
  • the computer program is loaded and executed by a processor to implement the above-mentioned virtual vehicle. control method.
  • a computer program product or a computer program is provided, the computer program product or the computer program including computer instructions, and the computer instructions are stored in a computer-readable storage medium.
  • the processor of the terminal device reads the computer instruction from the computer-readable storage medium, and the processor executes the computer instruction, so that the terminal device executes the above-mentioned control method of the virtual vehicle.
  • the first brake control is used to control the drift angle of the virtual vehicle to decrease.
  • the drift angle of the virtual vehicle is reduced to less than the threshold, the virtual vehicle is controlled to exit the drift state, thereby realizing the automation of exiting from the drift state without requiring the user to pass the direction.
  • the adjustment control frequently adjusts the moving direction or front direction of the virtual vehicle to simplify user operations; the throttle control is used to speed up the reduction of the drift angle of the virtual vehicle, speed up the virtual vehicle's exit from the drift state, and improve the de-drift efficiency of the virtual vehicle.
  • the control controls the acceleration of the virtual vehicle, providing a movement method of drift acceleration, making the movement methods of the virtual vehicle richer.
  • Figure 1 is a schematic diagram of a virtual vehicle control system provided by an embodiment of the present application.
  • Figure 2 exemplarily shows a schematic diagram of a user interface
  • Figure 3 is a flow chart of a virtual vehicle control method provided by an embodiment of the present application.
  • Figure 4 exemplarily shows a schematic diagram of a user interface
  • Figure 5 exemplarily shows a schematic diagram of a drift angle change manner
  • Figure 6 is a flow chart of a virtual vehicle control method provided by another embodiment of the present application.
  • Figure 7 is a flow chart of a virtual vehicle control method provided by another embodiment of the present application.
  • Figures 8 to 12 exemplarily show schematic diagrams of user interfaces
  • Figure 13 exemplarily shows a schematic diagram of a control method of a virtual vehicle
  • Figure 14 is a flow chart of a virtual vehicle control method provided by another embodiment of the present application.
  • Figure 15 exemplarily shows a schematic diagram of user control of virtual car linkage
  • Figure 16 is a block diagram of a virtual vehicle control device provided by an embodiment of the present application.
  • Figure 17 is a block diagram of a virtual vehicle control device provided by another embodiment of the present application.
  • Figure 18 is a structural block diagram of a terminal device provided by an embodiment of the present application.
  • FIG. 1 shows a schematic diagram of a virtual vehicle control system provided by an embodiment of the present application.
  • the control system of the virtual vehicle may include: a terminal device 10 and a server 20 .
  • the terminal device 10 may be an electronic device such as a mobile phone, a tablet computer, a game console, an e-book reader, a multimedia player, a wearable device, a PC (Personal Computer), etc., which are not limited in the embodiments of the present application.
  • the terminal device 10 includes a client of the application program.
  • the application program may be an application program that needs to be downloaded and installed, or may be a click-and-use application program, which is not limited in the embodiments of the present application.
  • the above-mentioned application program refers to any application program that can control the movement of a virtual vehicle in a virtual environment.
  • the application may be a racing game, MOBA (Multiplayer Online Battle Arena, etc.) online tactical competition) games, TPS (Third-Personal Shooting Game, third-person shooting game), FPS (First-Person Shooting Game, first-person shooting game), multiplayer gun battle survival games, augmented reality (Augmented Reality, AR) Application-like applications, 3D map programs, social applications, interactive entertainment applications, etc.
  • the virtual vehicles provided by them will also have different forms, which can be configured in advance according to actual needs. This is not limited in the embodiments of the present application.
  • the same application program can also provide users with multiple virtual vehicles in different forms, which is not limited in the embodiments of the present application.
  • the above-mentioned virtual vehicle refers to a movable virtual item controlled by the user in the application.
  • the virtual vehicle can be displayed in a three-dimensional form, a two-dimensional form, or a 2.5-dimensional form, which is not limited in the embodiments of the present application.
  • a virtual vehicle may also be called a virtual vehicle.
  • the virtual vehicle in a racing game, the virtual vehicle is a vehicle controlled by the user during the racing process; in a shooting game, the virtual vehicle can be a virtual vehicle that the user searches for in the virtual environment; in a MOBA game , the virtual vehicle can be a virtual vehicle summoned by the user's control of the virtual character; etc., the embodiments of the present application are not limited to this.
  • the server 20 is used to provide background services for the terminal device 10 .
  • the server 20 may be one server, a server cluster composed of multiple servers, or a cloud computing service center.
  • the server 20 may be a backend server for clients of the above-mentioned application programs.
  • the server 20 provides background services for multiple terminal devices 10 .
  • Data transmission is performed between the terminal device 10 and the server 20 through the network.
  • the user can control the virtual vehicle in the above application program to move flexibly.
  • a virtual vehicle 21 and operation controls for controlling the virtual vehicle 21 are displayed in the user interface of the terminal device 10 .
  • the operating controls include a direction adjustment control 22 , a throttle control 23 , a first brake control 24 and a second brake control 25 .
  • the direction adjustment control 22 is used to control the front direction of the virtual vehicle 21 .
  • the user controls and adjusts the front direction of the virtual vehicle 21 by operating the direction adjustment control 22 .
  • the direction adjustment control 22 includes multiple sub-controls, and different sub-controls correspond to different adjustment directions.
  • the direction adjustment control 22 includes a slider, and the user adjusts the front direction of the virtual vehicle by sliding the slider, and different sliding directions correspond to different adjustment directions.
  • the throttle control 23 is used to control the acceleration movement of the virtual vehicle 21 .
  • the user controls the virtual vehicle 21 to accelerate by operating the throttle control 23 .
  • the first brake control 24 is used to control the virtual vehicle 21 to decelerate or reverse. While the virtual vehicle 21 is accelerating, the user controls the virtual vehicle 21 to move slowly by clicking on the first brake control 24; or, the user controls the virtual vehicle 21 to move quickly by continuously pressing the first brake control 24. When the speed of the virtual vehicle 21 is reduced to zero, if the continuous pressing operation does not disappear, the virtual vehicle 21 will continue to be controlled to reverse.
  • the second brake control 25 is used to control the virtual vehicle 21 to decelerate and move.
  • the second brake control 25 is another control different from the above-mentioned first brake control 24 .
  • the first brake control 24 can be understood as a foot brake control
  • the second brake control 25 can be understood as a hand brake control.
  • the user controls the virtual vehicle 21 to enter the drift state by operating the direction adjustment control 22 and a click operation on the second brake control 25, and then controls the virtual vehicle 21 to decrease rapidly through a second click operation on the second brake control 25. Move until speed is zero.
  • slow deceleration movement refers to three different deceleration methods of the virtual vehicle.
  • the deceleration efficiency of slow deceleration movement is lower than the deceleration efficiency of fast deceleration movement
  • the deceleration efficiency of fast deceleration movement is lower than the deceleration efficiency of rapid deceleration movement.
  • the above-mentioned operating controls also include a nitrogen control 26 and a reset control 27 .
  • the nitrogen control 26 is used to control the virtual vehicle 21 to accelerate according to the accumulated nitrogen resources.
  • the user controls the virtual vehicle 21 to consume the accumulated nitrogen resources to accelerate.
  • a nitrogen indicator icon is also displayed in the user interface.
  • the nitrogen indication icon includes multiple sub-icons, and the sub-icons correspond to The first display style and the second display style. The number of nitrogen resources accumulated by the virtual vehicle 21 is positively correlated with the number of sub-icons displayed in the first display style.
  • the nitrogen indicator icon displays a transformation process from the second display style to the first display style to represent the accumulation of nitrogen resources; during the nitrogen resource consumption process, the nitrogen indicator icon displays The transformation process of the sub-icon from the first display style to the second display style represents the consumption of nitrogen resources.
  • the reset control 27 is used to control the virtual vehicle 21 to get out of the stuck state or the uncontrollable state. During the movement of the virtual vehicle 21, if the virtual vehicle 21 is uncontrollable due to the movement of the virtual vehicle 21 to a special location, the virtual vehicle 21 is controlled to leave the special location and reset to the nearest non-special location through the operation of the reset control 27. , so that the virtual vehicle 21 can continue to move from this non-special location.
  • the above introduction to the operation controls is exemplary and explanatory.
  • the functions of the operation controls can be flexibly set and adjusted, which is not limited in the embodiments of the present application.
  • first brake control when the virtual vehicle accelerates and moves, the user can control the virtual vehicle to decelerate through the first brake control; when the virtual vehicle is in a drifting state, the user can control the virtual vehicle through the first brake control. The vehicle's drift angle is reduced.
  • FIG. 3 shows a flow chart of a virtual vehicle control method provided by an embodiment of the present application.
  • the method is executed by the terminal device 10 of the virtual vehicle control system shown in FIG. 1 .
  • the execution subject of each step may be the client of the application program in the terminal device 10 .
  • the method may include at least one of the following steps (301-304):
  • Step 301 Display the virtual vehicle in a drifting state.
  • the drift state is a state of motion in which the moving direction of the virtual vehicle is inconsistent with the direction of the front of the vehicle; that is, when the virtual vehicle is in a drift state, there is an angle between the moving direction of the virtual vehicle and the direction of the front of the vehicle.
  • the front direction of the vehicle refers to the direction from the rear of the virtual vehicle to the front of the vehicle.
  • the drift state is a state in which the drift angle of the virtual vehicle is greater than the first threshold.
  • the drift angle is the angle between the moving direction of the virtual vehicle and the front direction of the virtual vehicle.
  • the above-mentioned first threshold can be any value, such as 0°, 10°, 13°, 15°, etc.
  • the first threshold can be flexibly set according to the actual situation, which is not limited in the embodiments of the present application. .
  • the above-mentioned first threshold is 0°.
  • the above-mentioned first threshold is not 0° (that is, the first threshold is greater than 0°).
  • the client determines that the virtual vehicle is in a drifting state; that is, the client controls the drift angle of the virtual vehicle to increase to a certain value to control the virtual vehicle to enter Drift state.
  • the client displays a virtual vehicle, and then after the virtual vehicle enters the drift state, the client displays the virtual vehicle in the drift state.
  • the virtual vehicle has a corresponding representational orientation and a logical orientation.
  • the performance orientation corresponds to the above-mentioned vehicle head orientation and is used to display the user's control expectations for the virtual vehicle;
  • the logical orientation corresponds to the above-mentioned movement direction and is used to represent the actual feedback of the virtual vehicle's physical system for control expectations.
  • the client controls the head direction of the virtual vehicle through the expressive direction and controls the moving direction of the virtual vehicle through the logical direction.
  • the client determines the apparent orientation of the virtual vehicle based on the user's operation of the direction adjustment control, then obtains the calculation parameters and calculation rules, determines the logical orientation of the virtual vehicle based on the expressed orientation, and further, in the current image frame, based on The expressive direction controls the front direction of the virtual vehicle, and the moving direction of the virtual vehicle is controlled based on the logical direction.
  • the logical direction is to show a delayed response.
  • the client determines the apparent orientation of the virtual vehicle based on the user's operation of the orientation adjustment control, and determines the historical expressed orientation of the virtual vehicle.
  • the head direction of the virtual vehicle is controlled based on the expressed orientation
  • the moving direction of the virtual vehicle is controlled based on the logical orientation.
  • the historical performance orientation refers to the performance orientation of the virtual vehicle in the previous image frame.
  • Step 302 In response to the operation of the first brake control, control the drift angle of the virtual vehicle to gradually decrease.
  • a first brake control is displayed in the client.
  • the first brake control is used to control the virtual vehicle to slow down or reverse.
  • the client after displaying the first brake control, the client detects the first brake control.
  • the drift angle of the virtual vehicle is controlled to gradually decrease.
  • the above-mentioned operation on the first brake control is a click operation.
  • the click operation refers to an instantaneous touch operation or pressing operation on a certain action point.
  • the client detects a touch operation or pressing on a certain action point. If the operation disappears immediately after it appears, it is determined that the click operation on the action point is detected.
  • the action point can be any point within the trigger area of the first brake control.
  • the client determines A click was detected for this action point.
  • the first duration threshold can be 0.3 seconds, 0.5 seconds, 0.7 seconds, etc.
  • the specific value of the first duration threshold can be set by relevant technical personnel according to the actual situation. The embodiments of this application do not make any reference to this. Specific limitations.
  • the above-mentioned operations for the first brake control can be flexibly set and adjusted according to the actual situation, such as sliding operations, dragging operations, corresponding key pressing operations, etc., but this is not the case in the embodiments of the present application. limited.
  • the client controls the drift angle of the virtual vehicle to decrease by increasing the grip of the virtual vehicle.
  • Grip is used to characterize the resistance between the virtual vehicle and the ground. Among them, there is a negative correlation between grip and drift angle. That is, the larger the drift angle, the smaller the grip; the smaller the drift angle, the greater the grip.
  • the drift angle of the virtual vehicle in the drift state, the drift angle of the virtual vehicle increases and the grip of the virtual vehicle decreases. At this time, the resistance between the virtual vehicle and the ground is small, and the virtual vehicle slips, so that the drift angle of the virtual vehicle decreases. Further increases and the grip further decreases; after that, when the operation of the first brake control is detected, the virtual vehicle begins to prepare to exit the drift state and increases the grip of the virtual vehicle.
  • the grip force may be the friction force between the virtual vehicle and the ground, or it may be a force directly related to the friction force.
  • increasing the grip force can accelerate the reduction of the drift angle of the virtual vehicle, thereby reducing the time required to exit the drift state.
  • the client when the client detects an operation on the first brake control, it controls the drift angle of the virtual vehicle to gradually decrease, and controls the virtual vehicle to decelerate and move. In some embodiments, the client controls the virtual vehicle to decelerate based on the second base acceleration while controlling the drift angle of the virtual vehicle to decrease.
  • the second basic acceleration refers to the acceleration corresponding to the above-mentioned operation of the first brake control.
  • Step 303 In response to the first operation on the throttle control, control the virtual vehicle to accelerate and move, and accelerate the reduction speed of the drift angle of the virtual vehicle.
  • throttle controls are displayed in the client.
  • the throttle control is used to control the acceleration movement of the virtual vehicle.
  • the client after displaying the above-mentioned throttle control, the client detects the throttle control, and when detecting the first operation on the throttle control, controls the virtual vehicle to accelerate and move, and accelerates the drift angle of the virtual vehicle. decrease speed.
  • the above-mentioned first operation on the throttle control is a click operation
  • the click operation refers to a momentary pressing operation on any action point in the trigger area of the throttle control.
  • the above-mentioned first operation for the throttle control can be flexibly set and adjusted according to the actual situation, such as sliding operation, dragging operation, pressing operation of the corresponding key, etc., the embodiment of the present application is Not limited.
  • the client speeds up the reduction of the drift angle of the virtual vehicle by increasing the grip of the virtual vehicle.
  • the grip force has a positive correlation with the decreasing speed of the drift angle; that is, the greater the grip force, the decreasing speed of the drift angle The faster you go, the less grip you have and the faster the drift angle decreases.
  • the grip of the virtual vehicle is increased based on the current grip of the virtual vehicle.
  • the resistance between the virtual vehicle and the ground is increased based on the original grip.
  • the drift angle of the virtual vehicle decreases faster.
  • the client when the client detects an operation on the throttle control, the client superimposes an additional first acceleration on the first basic acceleration of the virtual vehicle to obtain the first target acceleration of the virtual vehicle, and then based on the first target Acceleration controls the virtual vehicle to accelerate and move.
  • the first basic acceleration refers to the acceleration corresponding to the first operation of the throttle control.
  • the first acceleration is superimposed through the throttle control, so that the acceleration mode of the virtual vehicle is closer to the acceleration mode in real life, improving the authenticity of the virtual vehicle control process, thereby making it easier for the user to become familiar with the control mode of the virtual vehicle, and reducing The user spends time and energy learning to control the operation of the virtual vehicle and improves the user's control experience.
  • Step 304 When the drift angle of the virtual vehicle is less than the first threshold, control the virtual vehicle to exit the drift state.
  • the client detects the drift angle, and controls the virtual vehicle to exit the drift state when the drift angle of the virtual vehicle is less than the first threshold.
  • the above-mentioned first threshold is 0°.
  • the client controls the virtual vehicle to exit the drift state after determining that there is no angle between the virtual vehicle's front direction and its moving direction.
  • the above-mentioned first threshold is not 0°.
  • the virtual vehicle enters the flat running state after exiting the drift state.
  • the flat running state refers to the state in which the virtual vehicle moves forward (such as accelerating, driving at a constant speed, or decelerating) without taking off, drifting, or using nitrogen resources.
  • non-airborne virtual vehicle refers to a state in which all tires of the virtual vehicle are on the ground; if one or more tires of the virtual vehicle are not on the ground, the virtual vehicle can be considered to be in a non-flat running state.
  • the process of reducing the drift angle can also be called the de-drift process (that is, the process of exiting the drift).
  • the client detects the first When the brake control is operated, it is determined that the de-drift process has started. When the first operation of the throttle control is detected, it is determined that the accelerated de-drift has started. When the drift angle is less than or equal to the first threshold, the de-drift process is determined. Finish.
  • the first brake control is used to control the drift angle of the virtual vehicle to decrease.
  • the drift angle of the virtual vehicle is reduced to less than or equal to the threshold, the virtual vehicle is controlled.
  • Exiting the drift state realizes the automation of exiting from the drift state. It does not require the user to frequently adjust the moving direction or the direction of the front of the virtual vehicle through the direction adjustment control, simplifying user operations; using the throttle control to speed up the reduction of the drift angle of the virtual vehicle, speeding up the virtual vehicle The vehicle exits the drift state, which improves the de-drift efficiency of the virtual vehicle.
  • the acceleration of the virtual vehicle is controlled through the throttle control, which provides a drift-accelerated movement method, making the virtual vehicle's movement methods richer.
  • the grip is related to the decreasing speed of the drift angle, and the decreasing speed of the drift angle is increased by increasing the grip.
  • Specific parameters are used to control the virtual vehicle. Compared with the automatic animation, the virtual vehicle is drifting back. Movement during the process behaves more realistically.
  • an additional first acceleration is superimposed on the first basic acceleration corresponding to the first operation of the throttle control to control the accelerated movement of the virtual vehicle.
  • specific parameters are used to control the virtual vehicle.
  • the virtual vehicle is drifting back. The movement performance during the process is more realistic.
  • a drift-accelerated movement method is provided before the virtual vehicle exits the drift state, which enriches the movement method of the virtual vehicle.
  • step 302 includes at least one of the following steps:
  • the timestamp is used to indicate the moment the image frame was displayed.
  • the previous timestamp is used to indicate the display moment of the previous image frame
  • the current timestamp is used to indicate the display moment of the current image frame
  • the next timestamp is used to indicate the display moment of the subsequent image frame.
  • the time interval between two adjacent timestamps is the unit time
  • the unit time is the time interval between two adjacent image frames.
  • the unit time can be any value, such as 0.025s (second, second), 0.033s, 0.050s, etc.
  • the unit time can be flexibly set and adjusted according to actual conditions, and this is not limited in the embodiments of this application.
  • the client when the client controls the drift angle of the virtual vehicle to gradually decrease, it obtains the target head direction of the virtual vehicle at the next timestamp.
  • the client can determine the target vehicle head direction based on the operation of the direction adjustment control, or can also determine the virtual vehicle's head direction based on the historical vehicle head direction of the virtual vehicle.
  • the historical vehicle head direction refers to the vehicle head direction of the virtual vehicle at the current timestamp.
  • the client determines the target vehicle head direction based on the operation of the direction adjustment control. In some embodiments, during the process of reducing the drift angle, when the client detects an operation on the direction adjustment control, it determines the target vehicle head direction based on the operation on the direction adjustment control; or, if the client does not detect the operation on the direction adjustment control, When an operation on the direction adjustment control is detected, the target vehicle head direction is determined based on the most recently detected operation on the direction adjustment control.
  • the client determines the head direction of the virtual vehicle based on the historical head direction of the virtual vehicle. In some embodiments, during the process of reducing the drift angle, the client obtains the head direction of the virtual vehicle at the current timestamp as the target head direction.
  • the acquisition method of the target vehicle front direction can be flexibly set and adjusted according to the actual situation.
  • the application examples do not limit this.
  • the user can adjust the head direction of the virtual vehicle through the direction adjustment control.
  • the client detects an operation on the direction adjustment control, it determines where the virtual vehicle is based on the operation.
  • the target head direction of a timestamp When the client does not detect an operation on the direction adjustment control, the client determines the head direction of the virtual vehicle at the current timestamp as the above target head direction.
  • the client determines the target moving direction of the virtual vehicle at the next timestamp based on the target vehicle head direction. It should be noted that in this embodiment of the present application, the angle between the target moving direction and the target vehicle head direction is smaller than the angle between the movement direction of the current timestamp and the vehicle head direction.
  • the client when obtaining the above-mentioned target movement direction, determines the angular change in the movement direction based on the grip and movement direction of the virtual vehicle at the current timestamp, as well as the direction of the target vehicle front. Among them, the grip force is positively correlated with the angular change in the moving direction per unit time. Afterwards, the client determines the target moving direction of the virtual vehicle at the next timestamp based on the moving direction of the current timestamp and the angular change in the moving direction.
  • the client controls the virtual vehicle to move according to the target movement direction at the next timestamp, and the head direction displayed by the virtual vehicle is the target vehicle head direction.
  • the target movement direction is determined by the target vehicle head direction, and the vehicle head direction is associated with the movement direction.
  • the user does not need to control the vehicle head direction while controlling the movement direction, simplifying the user's control of the virtual vehicle.
  • the operation improves the user's control efficiency for the virtual vehicle; moreover, based on the grip and moving direction of the virtual vehicle at the current timestamp, and the target head direction of the virtual vehicle at the next timestamp, the angle change in the moving direction is determined, and then the The target movement direction realizes frame-by-frame changes of the virtual vehicle, and the change of the subsequent image frame depends on the parameters in the current image frame, making the changes of the virtual vehicle more realistic and coherent.
  • step 302 the way the drift angle changes in step 302 is also applicable to the way the drift angle changes in step 303.
  • the iterative formula for the target moving direction of the virtual vehicle is as follows:
  • v(t+2* ⁇ t) Fz*(d(t+2* ⁇ t)-v(t+ ⁇ t))+v(t+ ⁇ t);
  • v(t+n* ⁇ t) Fz*[d(t+n* ⁇ t)-v(t+(n-1)* ⁇ t)]+v(t+(n-1)* ⁇ t);
  • the client when the client detects an operation on the first brake control, it controls the drift angle of the virtual vehicle to gradually decrease.
  • the drift angle of the virtual vehicle is controlled to rapidly decrease.
  • the virtual vehicle after exiting the drift state, keeps moving at an accelerated speed.
  • the acceleration movement method of the virtual vehicle after exiting the drift state is introduced.
  • the above step 304 also includes the following sub-step: controlling the virtual vehicle to accelerate movement within the first period of time from the exit moment of the drift state.
  • the client controls the virtual vehicle to accelerate movement within the first period of time from the exit moment of the drift state.
  • an additional second acceleration is superimposed on the first basic acceleration of the virtual vehicle to obtain the second target acceleration of the virtual vehicle, and then at the exit moment of the drift state Within the first period of time, the virtual vehicle is controlled to accelerate and move based on the second target acceleration.
  • the accelerated movement of the virtual vehicle is controlled through acceleration superposition. Since the first basic acceleration is generally not the same in different situations, the second target acceleration after superimposing the same second acceleration will also be different each time. , thus avoiding the more rigid acceleration method where the acceleration is the same every time, and improving the diversity of virtual vehicle acceleration after exiting drift, thus improving the user experience.
  • the above-mentioned second acceleration and the above-mentioned first acceleration may be the same or different, and the embodiments of the present application do not limit this;
  • the above-mentioned first duration may be any duration, such as 0.2s, 0.3s, 0.4s, etc., depending on the actual situation
  • the first duration can be flexibly set and adjusted, and this is not limited in the embodiments of the present application.
  • the client controls the virtual vehicle to accelerate movement based on the above-mentioned first base acceleration.
  • the virtual vehicle is automatically controlled to accelerate and move after the drift is completed, which simplifies user operations.
  • step 304 also includes at least one of the following sub-steps:
  • the client after determining that the virtual vehicle exits the drift state, the client detects the accelerator control, and when a second operation for the accelerator control is detected, controls the acceleration of the virtual vehicle within the duration of the second operation. move.
  • the above-mentioned second operation for the throttle control is a continuous pressing operation.
  • the continuous pressing operation refers to an operation in which the duration of continuous pressing for a certain point of action exceeds the second duration threshold.
  • the action point can be any point within the trigger area of the throttle operation control.
  • the second duration threshold can be 0.5 seconds, 0.7 seconds, 1 second, 1.5 seconds, 2 seconds, etc.
  • the specific value of the second duration threshold can be set by relevant technical personnel according to the actual situation. The application examples do not specifically limit this.
  • an additional third acceleration is superimposed on the first basic acceleration of the virtual vehicle to obtain the third target acceleration of the virtual vehicle, and then during the continuation of the second operation During the period, the virtual vehicle is controlled to accelerate and move based on the third target acceleration.
  • the above-mentioned third acceleration and the above-mentioned second acceleration may be the same or different, and are not limited in this embodiment of the present application.
  • the detection time of the above-mentioned second operation is the time when the virtual vehicle exits the drift state.
  • the user's trigger time for the second operation may be at a point where the drift angle is determined to decrease rapidly. time, and any time between the time when the virtual vehicle is determined to exit the drift state, this is not limited in the embodiment of the present application.
  • the client after detecting the above-mentioned second operation, the client counts the duration of the second operation. From the exit moment of the drift state, if the duration of the second operation reaches the maximum response value (such as the above second duration threshold), the first prompt information is displayed.
  • the first prompt information is prompt information used to indicate that the full throttle technique is triggered.
  • the first prompt information can also be understood as indicating that the duration of the second operation reaches the above-mentioned maximum response value.
  • the full-throttle technique means that after the duration of the second operation of the accelerator reaches the maximum response value, the acceleration effect of accelerating the vehicle through the accelerator control has reached its peak and the virtual vehicle cannot be further accelerated.
  • the above-mentioned maximum response value refers to the maximum response time of the above-mentioned second operation from the exit moment of the drift state.
  • the client controls the virtual vehicle to accelerate movement based on the above-mentioned first base acceleration.
  • the acceleration duration of the virtual vehicle is determined based on the duration of the second operation.
  • the user can select the acceleration duration of the virtual vehicle according to the actual situation, thereby improving the flexibility of the user's operation.
  • the first prompt information is displayed to indicate that the duration of the second operation reaches the maximum response value to prevent the user from continuing to trigger the second operation during the non-response period.
  • step 304 further includes at least one of the following sub-steps:
  • the detection time of the above-mentioned second operation is the end time of the first duration
  • the user's trigger time for the second operation can be any time between the moment when the drift angle is determined to decrease rapidly and the end time of the first duration. , the embodiment of the present application does not limit this.
  • the virtual vehicle is automatically controlled to accelerate and then move, and then the acceleration movement duration of the virtual vehicle is extended according to the duration of the second operation, which simplifies user operations while , providing users with a flexible way to choose the duration of accelerated movement.
  • FIG. 6 shows a flow chart of a virtual vehicle control method provided by another embodiment of the present application.
  • the method is executed by the terminal device 10 of the virtual vehicle control system shown in FIG. 1 .
  • the execution subject of each step may be the client of the application program in the terminal device 10 .
  • the method may include at least one of the following steps (601-604):
  • Step 601 Display the virtual vehicle in a drifting state.
  • Step 602 In response to the operation of the first brake control, control the drift angle of the virtual vehicle to gradually decrease.
  • steps 601 and 602 are similar to 301 and 302 in the embodiment of FIG. 3. Please refer to the embodiment of FIG. 3 for details, which will not be described again here.
  • Step 603 In response to the first operation on the throttle control, determine the movement mode of the virtual vehicle according to the drift angle of the virtual vehicle.
  • the client when the client detects the first operation on the throttle control, if the drift angle of the virtual vehicle is less than the second threshold, the client controls the virtual vehicle to accelerate and move, and accelerates the reduction of the drift angle of the virtual vehicle. speed.
  • second prompt information is displayed, and the second prompt information is prompt information for indicating that the ejection exiting skill is triggered.
  • the second prompt information can also be understood as being used to instruct the virtual vehicle to enter the target de-drift state.
  • the target de-drift state refers to the movement mode in which the speed of the virtual vehicle increases and the drift angle decreases.
  • the target de-drifting state may also be called a fast de-drifting state, or an accelerated de-drifting state, or an ejection out-of-curve state, or an accelerated out-of-curve state.
  • the user is informed in a timely manner that the virtual vehicle's ejection and cornering skills are triggered and subsequent operations can be performed, thereby improving the user's operating efficiency.
  • the client when the client detects the first operation on the throttle control, if the drift angle of the virtual vehicle is greater than the third threshold, the client determines that the virtual vehicle is in an out-of-control state. Among them, in the out-of-control state, the grip of the virtual vehicle approaches zero. From the above iterative formula, it can be seen that when the grip of the virtual vehicle approaches zero, the moving direction of the virtual vehicle cannot be adjusted. At this time, the client needs to control the virtual vehicle to switch from an out-of-control state to a road-restoring state.
  • the client controls the virtual vehicle to exit the out-of-control state by controlling the grip of the virtual vehicle to increase; and, when a first operation on the throttle control is detected and the drift angle of the virtual vehicle is greater than a third threshold
  • the client displays the third prompt information, which is the prompt information used to indicate that the ground grip recovery technique is triggered.
  • the third prompt information can also be understood as being used to instruct the virtual vehicle to enter the road-holding recovery state.
  • the virtual vehicle in the out-of-control state can be restored to a controllable recovery state, thereby minimizing the time the virtual vehicle is in an out-of-control state and maintaining the user's confidence in the virtual vehicle.
  • the prompt information reminds the user that the ground grip has been restored, preventing the user from continuing to perform operations for restoring the ground grip, reducing unnecessary operations, and improving the user's operating efficiency.
  • restoring the grip state means restoring the grip of the virtual vehicle to bring the virtual vehicle out of an out-of-control state and back to a controllable state.
  • the grip force of the virtual vehicle approaches zero, which means that the grip force of the virtual vehicle is less than or equal to the fourth threshold.
  • the specific value of the fourth threshold can be set by relevant technical personnel according to the actual situation. The application examples do not specifically limit this.
  • the drift angle of the virtual vehicle when the client detects the first operation on the throttle control, if the drift angle of the virtual vehicle is greater than the second threshold and less than the third threshold, the drift angle of the virtual vehicle is controlled to continue to gradually decrease, and controlling the accelerated movement of the virtual vehicle based on the first basic acceleration of the virtual vehicle.
  • the above-mentioned second threshold and the above-mentioned third threshold can be any value.
  • the second threshold can be 40°, 45°, 50°, etc.
  • the third threshold can be 65°, 67°, 80°, etc.
  • the second threshold can be The specific value of the third threshold can be set by relevant technical personnel according to the actual situation, and this is not limited in the embodiments of the present application.
  • the second threshold is smaller than the third threshold.
  • Step 604 When the drift angle of the virtual vehicle is less than the first threshold, control the virtual vehicle to exit the drift state.
  • step 604 is similar to step 304 in the embodiment of FIG. 3.
  • step 304 in the embodiment of FIG. 3.
  • the first brake control and the throttle control during the drift process of the virtual vehicle, different movement modes are provided for the virtual vehicle under different drift angles. It enriches the movement mode of the virtual vehicle; moreover, when the drift angle of the virtual vehicle is large, the virtual vehicle is controlled by the first brake control and the accelerator control to recover from the out-of-control state to the road-restoring state.
  • the drift angle of the virtual vehicle is relatively large, When the drift angle is small, the first brake control and throttle control are used to control the virtual vehicle to quickly de-drift.
  • the drift angle of the virtual vehicle is centered, the drift angle is stably maintained to decrease. By setting different drift angles, the virtual vehicle moves It is more realistic and helps provide users with an immersive experience.
  • FIG. 7 shows a flow chart of a virtual vehicle control method provided by another embodiment of the present application.
  • the method is executed by the terminal device 10 of the virtual vehicle control system shown in FIG. 1 .
  • the execution subject of each step may be the client of the application program in the terminal device 10 .
  • the method may include at least one of the following steps (701-706):
  • Step 701 When it is detected that the direction adjustment control and the second brake control are both in a triggered state, control the virtual The simulated vehicle enters a drift state.
  • a direction adjustment control is displayed on the client, and the direction adjustment control is used to adjust the head direction of the virtual vehicle.
  • the direction adjustment control includes multiple sub-controls, and different sub-controls correspond to different adjustment directions.
  • the user controls different adjustment directions through different sub-controls.
  • the client detects an operation on the target sub-control, it controls the front of the virtual vehicle to move toward the direction indicated by the target sub-control based on the attribute information of the operation. Orientation adjustment.
  • the attribute information includes the number of clicks, and the number of clicks is positively correlated with the orientation adjustment range, that is, the greater the number of clicks, the greater the orientation adjustment range, and the smaller the number of clicks, the smaller the orientation adjustment range; alternatively, the attribute information includes press The duration, and there is a positive correlation between the pressing duration and the orientation adjustment range, that is, the longer the pressing duration, the greater the orientation adjustment range, the smaller the number of clicks, and the shorter the pressing duration.
  • the direction adjustment control includes a slider, and the user adjusts the front direction of the virtual vehicle by sliding the slider, and different sliding directions correspond to different adjustment directions.
  • the client when the client detects a sliding operation on the slider, the client controls and adjusts the front direction of the virtual vehicle based on the attribute information of the sliding operation.
  • the attribute information includes a sliding direction and a sliding distance. The client determines the adjustment direction for the vehicle front orientation based on the sliding direction, and determines the adjustment angle for the vehicle front orientation based on the sliding distance.
  • the client when the client detects that both the direction adjustment control and the second brake control are in a triggered state, the client controls the virtual vehicle to enter the drift state.
  • the direction adjustment control and the second brake control are both in a triggered state, which means that there is a certain moment when the user triggers the direction adjustment control and the second brake control at the same time. Whether the triggering start time and triggering end time of the two operation controls are the same or different. , the embodiment of the present application does not limit this.
  • the second brake control is another control different from the first brake control.
  • the second brake control can be understood as a handbrake control, through which the virtual vehicle can be controlled to decelerate to zero and then enter a tire lock state;
  • the first brake control can be understood as a footbrake control, through which the virtual vehicle can be controlled to Control the virtual vehicle to decelerate to zero and start reversing.
  • the virtual vehicle when it is detected that the direction adjustment control and the second brake control are both in the triggered state, the virtual vehicle is controlled to enter the drift state, so that the drift of the virtual vehicle is similar to the real situation, and the realism of controlling the virtual vehicle is improved. and operating experience.
  • Step 702 In response to the operation of the second brake control, control the virtual vehicle to decelerate until the speed reaches zero.
  • the virtual vehicle when the virtual vehicle is in a drifting state, if the client detects an operation on the second brake control, the virtual vehicle is controlled to decelerate until the speed reaches zero.
  • the deceleration of the virtual vehicle is controlled by braking, so that the deceleration method of the virtual vehicle is similar to the real situation, thereby improving the realism of controlling the virtual vehicle.
  • the virtual vehicle may enter a tire-locked state, that is, the virtual vehicle stops moving.
  • Step 703 If no operation on the second brake control is detected, control to display the virtual vehicle in a drifting state.
  • Step 704 In response to the operation of the first brake control, control the drift angle of the virtual vehicle to gradually decrease.
  • Step 705 In response to the first operation on the throttle control, control the virtual vehicle to accelerate and move, and accelerate the reduction speed of the drift angle of the virtual vehicle.
  • Step 706 When the drift angle of the virtual vehicle is less than the first threshold, control the virtual vehicle to exit the drift state.
  • steps 703-706 are similar to steps 301-304 in the embodiment of Figure 3.
  • steps 703-706 are similar to steps 301-304 in the embodiment of Figure 3.
  • the drift state and the movement mode of the virtual vehicle after exiting the drift state are introduced.
  • the virtual vehicle 81 is in a flat running state.
  • the virtual vehicle 81 is controlled to enter the drift state.
  • FIG. 10 when the virtual vehicle 81 is in a drift state, when an operation for the first brake control 84 is detected, the drift angle of the virtual vehicle 81 is controlled to decrease, and the control of the virtual vehicle 81 begins. Back drift. Afterwards, as shown in FIG.
  • the virtual vehicle 81 when the virtual vehicle 81 is in a drifting state and a click operation on the accelerator control 85 is detected, if If the drift angle of the virtual vehicle 81 is less than the second threshold, the drift angle of the virtual vehicle 81 is controlled to decrease faster and the virtual vehicle 81 is controlled to move faster. At the same time, the second prompt message 86 is displayed to indicate that the virtual vehicle 81 enters the ejection exit state. Afterwards, when the drift angle of the virtual vehicle 81 is less than the first threshold, the virtual vehicle 81 exits the drift state and re-enters the flat running state, and automatically controls the virtual vehicle 81 to continue to accelerate for 0.3 seconds.
  • the virtual vehicle is controlled to enter the drift state through the direction adjustment control in conjunction with the second handbrake control, and then the virtual vehicle is controlled to stop moving through the second handbrake control again, without setting a new
  • the drift control can control the virtual vehicle to enter the drift state, improving the simplicity of the user interface.
  • Step 1301 When it is detected that the direction adjustment control and the second brake control are triggered at the same time, display the virtual vehicle in a drifting state.
  • Step 1302 When an operation on the first brake control is detected, control the drift angle of the virtual vehicle to gradually decrease.
  • Step 1303 When the first operation on the throttle control is detected, obtain the drift angle of the virtual vehicle.
  • Step 1304 Determine whether the drift angle of the virtual vehicle is less than the first threshold. If the drift angle of the virtual vehicle is less than the first threshold, step 1305 is executed; if the drift angle of the virtual vehicle is not less than the first threshold, step 1306 is executed.
  • Step 1305 Control the drift angle of the virtual vehicle to accelerate and decrease, and control the virtual vehicle to accelerate and move.
  • Step 1306 Determine whether the drift angle of the virtual vehicle is greater than the second threshold. If the drift angle of the virtual vehicle is greater than the second threshold, step 1307 is executed; if the drift angle of the virtual vehicle is not greater than the second threshold, step 1308 is executed.
  • Step 1307 Increase the grip of the virtual vehicle to control the virtual vehicle to switch from an out-of-control state to a grip-restoring state.
  • Step 1308 Control the drift angle of the virtual vehicle to continue to decrease.
  • Step 1309 When the drift angle of the virtual vehicle is less than the first threshold, it is determined that the virtual vehicle exits the drift state.
  • Step 1310 Determine whether a second operation on the throttle control is detected. If the second operation on the throttle control is detected, step 1312 is executed; if the second operation on the throttle control is not detected, step 1311 is executed.
  • Step 1311 Control the virtual vehicle to accelerate movement within a first period of time.
  • Step 1312 Control the virtual vehicle to accelerate movement within the duration of the second operation.
  • Step 1313 determine whether the duration of the second operation reaches the maximum response value. If the duration of the second operation reaches the maximum response value, step 1314 is executed; if the duration of the second operation does not reach the maximum response value, step 1312 is continued.
  • Step 1314 Display the first prompt information.
  • FIG. 14 shows a flow chart of a virtual vehicle control method provided by another embodiment of the present application.
  • the method is executed by the terminal device 10 of the virtual vehicle control system shown in FIG. 1 .
  • the execution subject of each step may be the client of the application program in the terminal device 10 .
  • the method may include at least one of the following steps (1401-1402):
  • Step 1401 In response to a click operation on the throttle control, control the virtual vehicle to accelerate.
  • the throttle control is used to control the acceleration movement of the virtual vehicle.
  • the client when the client detects a click operation on the accelerator control, it controls the virtual vehicle to accelerate.
  • the throttle control corresponds to a first basic acceleration, and the client controls the virtual vehicle to accelerate and move based on the first basic acceleration.
  • the direction of the first basic acceleration is the same as the moving direction of the virtual vehicle.
  • Step 1402 In response to the operation of the first brake control, control the virtual vehicle to decelerate and move.
  • the first brake control is used to control the virtual vehicle to slow down or reverse.
  • the client when the client detects an operation on the first brake control, it controls the virtual vehicle to decelerate and move.
  • the above operation is a click operation.
  • the client detects a click operation on the first brake control, it controls the virtual vehicle to decelerate until the speed reaches zero.
  • the first brake control corresponds to a second basic acceleration, and the client controls the virtual vehicle to decelerate based on the second basic acceleration.
  • the direction of the second basic acceleration is opposite to the moving direction of the virtual vehicle.
  • the above operation is a continuous pressing operation.
  • the client when the client detects a continuous pressing operation on the first brake control, it controls the virtual vehicle to decelerate; further, when the speed of the virtual vehicle is reduced to zero, and the continuous pressing operation does not disappear In this case, control the virtual vehicle to reverse.
  • the first braking control corresponds to a second basic acceleration and a fourth acceleration.
  • the fourth acceleration is superimposed on the second basic acceleration to obtain a fourth target acceleration, and then the client controls the virtual machine based on the fourth target acceleration. The vehicle slows down and moves.
  • the direction of the fourth target acceleration is opposite to the moving direction of the virtual vehicle.
  • the virtual vehicle is controlled to accelerate and move by clicking on the throttle control, and the virtual vehicle can be kept accelerating without pressing the throttle control all the time, which simplifies user operations and reduces
  • the detection overhead of the terminal device can control the virtual vehicle to reduce movement or reverse through the first brake control, which enriches the movement mode of the virtual vehicle and makes the speed adjustment of the virtual vehicle more flexible.
  • control method of the virtual vehicle is introduced from the perspective of human-computer interaction. details as follows:
  • the user clicks the accelerator control, and the client controls the virtual vehicle to accelerate based on the first basic acceleration; the user clicks the first brake control, and the client controls the virtual vehicle to decelerate based on the second basic acceleration; the user continues to press the first brake control , the client controls the virtual vehicle to decelerate and move based on the second acceleration superimposed on the fourth acceleration.
  • the client increases the grip to control the virtual vehicle to switch from the out-of-control state to the recovery state.
  • the client controls the virtual vehicle.
  • the drift angle continues to decrease.
  • the client controls the drift angle of the virtual vehicle to rapidly decrease, and controls the virtual vehicle to accelerate and move based on the first base acceleration superimposed on the first acceleration.
  • the client automatically controls the virtual vehicle to accelerate within the first period of time based on the first basic acceleration superimposed on the second acceleration; the user continues to press the accelerator control, and the client continues to press the accelerator during the duration of the operation.
  • the virtual vehicle is controlled to accelerate and move based on the first basic acceleration superimposed on the third acceleration; then, when the duration of the continuous pressing operation reaches the maximum response value, the client controls the virtual vehicle to accelerate and move based on the first basic acceleration.
  • FIG. 16 shows a block diagram of a control device for a virtual vehicle provided by an embodiment of the present application.
  • the device has the function of realizing the above-mentioned control method of the virtual vehicle. This function can be realized by hardware, or can also be realized by hardware executing corresponding software.
  • the device may be a terminal device or may be set in a terminal device.
  • the device 1600 may include: a vehicle drift module 1610, a vehicle control module 1620, an acceleration de-drift module 1630 and a vehicle de-drift module 1640.
  • the vehicle drift module 1610 is used to display a virtual vehicle in a drift state; wherein the drift state is a state in which the drift angle of the virtual vehicle is greater than a first threshold, and the drift angle is the moving direction of the virtual vehicle. The angle between the virtual vehicle and the front direction of the virtual vehicle.
  • the vehicle control module 1620 is configured to control the drift angle of the virtual vehicle to gradually decrease in response to the operation of the first brake control.
  • the acceleration and de-drifting module 1630 is configured to control the acceleration movement of the virtual vehicle in response to the first operation of the throttle control, and accelerate the reduction speed of the drift angle of the virtual vehicle.
  • the vehicle de-drift module 1640 is configured to control the virtual vehicle to exit the drift state when the drift angle of the virtual vehicle is less than the first threshold.
  • the acceleration de-drift module 1630 is also used to increase the grip of the virtual vehicle, and the grip is positively correlated with the decreasing speed of the drift angle.
  • the accelerated de-drift module 1630 is also used to:
  • the virtual vehicle is controlled to move at an accelerated speed based on the first target acceleration.
  • the vehicle control module 1620 includes: an orientation acquisition unit, a movement determination unit, and a movement control unit.
  • the orientation acquisition unit is used to acquire the target head orientation of the virtual vehicle at the next timestamp, and the time interval between two adjacent timestamps is unit time.
  • the movement determination unit is configured to determine the target movement direction of the virtual vehicle at the next timestamp according to the target vehicle head direction; wherein the angle between the target movement direction and the target vehicle head direction is , which is smaller than the angle between the moving direction of the current timestamp and the direction of the vehicle head.
  • the movement control unit is used to control the virtual vehicle to move according to the target movement direction at the next time stamp.
  • the movement determination unit is used for:
  • the angular change amount of the movement direction is determined; wherein, the angular change amount of the grip force and the movement direction per unit time is determined There is a positive correlation between quantity;
  • the target movement direction of the virtual vehicle at the next time stamp is determined based on the movement direction of the current timestamp and the angular change amount of the movement direction.
  • the device 1600 further includes: a vehicle acceleration module 1650.
  • the vehicle acceleration module 1650 is configured to control the acceleration movement of the virtual vehicle within the first duration from the exit moment of the drift state.
  • the vehicle acceleration module 1650 is also used to:
  • the virtual vehicle is controlled to accelerate based on the second target acceleration.
  • the device 1600 further includes: an information display module 1660.
  • the vehicle acceleration module 1650 is also configured to control the acceleration movement of the virtual vehicle within the duration of the second operation when a second operation on the throttle control is detected.
  • the information display module 1660 is configured to display first prompt information from the exit moment of the drift state, if the duration of the second operation reaches the maximum response value, and the first prompt information is used to indicate that the The duration of the second operation reaches the maximum response value.
  • the acceleration de-drift module 1630 is further configured to, in response to the first operation of the throttle control, perform the steps when the drift angle of the virtual vehicle is less than a second threshold. The step of controlling the accelerated movement of the virtual vehicle and accelerating the reduction speed of the drift angle of the virtual vehicle.
  • the information display module 1660 is also used to display the second prompt information,
  • the second prompt information is used to indicate that the virtual vehicle enters the target de-drift state.
  • the device 1600 further includes: a state determination module 1670 and a state switching module 1680.
  • the state determination module 1670 is configured to determine that the virtual vehicle is in an out-of-control state in response to the first operation of the throttle control when the drift angle of the virtual vehicle is greater than a third threshold; wherein, In the out-of-control state, the grip of the virtual vehicle approaches zero, and the moving direction of the virtual vehicle cannot be adjusted.
  • the state switching module 1680 is used to control the virtual vehicle to switch from the out-of-control state to the road-gripping recovery state.
  • the state switching module 1680 is also used to:
  • the third prompt information is displayed, and the third prompt information is used to instruct the virtual vehicle to enter the road-gripping recovery state.
  • the vehicle control module 1620 is further configured to respond to the first operation of the throttle control when the drift angle of the virtual vehicle is greater than a second threshold and less than a third threshold. Next, the drift angle of the virtual vehicle is controlled to continue to gradually decrease, and the virtual vehicle is controlled to accelerate and move based on the first basic acceleration of the virtual vehicle.
  • the vehicle drift module 1610 is also used to control the virtual vehicle to enter the desired state when it is detected that the direction adjustment control and the second brake control are both in a triggered state.
  • the device 1600 further includes: a vehicle deceleration module 1690.
  • the vehicle deceleration module 1690 is configured to control the virtual vehicle to decelerate until the speed reaches zero in response to the operation of the second brake control.
  • the vehicle acceleration module 1650 is further configured to control the acceleration movement of the virtual vehicle in response to a click operation on the throttle control.
  • the vehicle deceleration module 1690 is further configured to control the deceleration movement of the virtual vehicle in response to the operation of the first brake control.
  • the vehicle deceleration module 1690 is also used to:
  • the virtual vehicle In response to the continuous pressing operation on the first brake control, the virtual vehicle is controlled to decelerate and move; when the speed of the virtual vehicle is reduced to zero and the continuous pressing operation does not disappear, the virtual vehicle is controlled Reversing.
  • the first brake control is used to control the drift angle of the virtual vehicle to decrease.
  • the virtual vehicle is controlled to exit the drift. state, to realize the automation of exiting from the drift state. It does not require the user to frequently adjust the moving direction or head direction of the virtual vehicle through the direction adjustment control, simplifying user operations; using the throttle control to speed up the reduction of the drift angle of the virtual vehicle, speeding up the virtual vehicle exit
  • the drift state improves the de-drift efficiency of the virtual vehicle.
  • the acceleration of the virtual vehicle is controlled through the throttle control, which provides a drift-accelerated movement method, making the virtual vehicle's movement methods richer.
  • the terminal device 1800 may be a mobile phone, a tablet computer, a game console, an e-book reader, a multimedia playback device, a wearable device, a PC, etc.
  • the terminal device 1800 is used to implement the functions of the above virtual vehicle control method. Specifically:
  • the terminal device 1800 includes: a processor 1801 and a memory 1802.
  • the processor 1801 may include one or more processing cores, such as a 4-core processor, an 8-core processor, etc.
  • the processor 1801 can be implemented using at least one hardware form among DSP (Digital Signal Processing, digital signal processing), FPGA (Field Programmable Gate Array, field programmable gate array), and PLA (Programmable Logic Array, programmable logic array).
  • the processor 1801 can also include a main processor and a co-processor.
  • the main processor is a processor used to process data in the wake-up state, also called CPU (Central Processing Unit, central processing unit); the co-processor is A low-power processor used to process data in standby mode.
  • the processor 1801 may be integrated with a GPU (Graphics Processing Unit, image processor), and the GPU is responsible for rendering and drawing content that needs to be displayed on the display screen.
  • the processor 1801 may also include an AI (Artificial Intelligence, artificial intelligence) processor, which is used to process computing operations related to machine learning.
  • AI Artificial Intelligence, artificial intelligence
  • Memory 1802 may include one or more computer-readable storage media, which may be non-transitory. Memory 1802 may also include high-speed random access memory, and non-volatile memory, such as one or more disk storage devices, flash memory storage devices. In some embodiments, the non-transitory computer-readable storage medium in memory 1802 is used to store at least one instruction, at least one program, code set, or instruction set, the at least one instruction, at least one program, code set, or instruction set Set, and configured to be executed by one or more processors to implement the above interface display method.
  • the terminal device 1800 optionally further includes: a peripheral device interface 1803 and at least one peripheral device.
  • the processor 1801, the memory 1802 and the peripheral device interface 1803 may be connected through a bus or a signal line.
  • Each peripheral device can be connected to the peripheral device interface 1803 through a bus, a signal line, or a circuit board.
  • the peripheral device includes: at least one of a radio frequency circuit 1804, a display screen 1805, a camera assembly 1806, an audio circuit 1807, and a power supply 1808.
  • Figure 18 does not constitute a limitation on the terminal device 1800, and may include more or fewer components than shown, or combine certain components, or adopt different component arrangements.
  • a computer-readable storage medium is also provided, and a computer program is stored in the storage medium.
  • the computer program when executed by a processor, implements the above control method of a virtual vehicle.
  • the computer-readable storage medium may include: ROM (Read Only Memory), RAM (Random Access Memory), SSD (Solid State Drives, solid state drive) or optical disk wait.
  • random access memory can include ReRAM (Resistance Random Access Memory, resistive random access memory) and DRAM (Dynamic Random Access Memory, dynamic random access memory).
  • a computer program product including computer instructions stored in a computer-readable storage medium.
  • the processor of the terminal device reads the computer instruction from the computer-readable storage medium, and the processor executes the computer instruction, so that the terminal device executes the above-mentioned control method of the virtual vehicle.

Landscapes

  • Engineering & Computer Science (AREA)
  • Multimedia (AREA)
  • Human Computer Interaction (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • Optics & Photonics (AREA)
  • User Interface Of Digital Computer (AREA)

Abstract

本申请公开了一种虚拟车辆的控制方法、装置、设备及存储介质,属于计算机与互联网技术领域。所述方法包括:显示处于漂移状态的虚拟车辆(301);响应于针对第一刹车控件的操作,控制虚拟车辆的漂移角逐渐减小(302);响应于针对油门控件的第一操作,控制虚拟车辆加速移动,以及加快虚拟车辆的漂移角的减小速度(303);在虚拟车辆的漂移角小于第一阈值的情况下,控制虚拟车辆退出漂移状态(304)。本申请实现从漂移状态退出的自动化,简化了用户操作,提高虚拟车辆的退漂效率,提供了一种漂移加速的移动方式,使得虚拟车辆的移动方式更加丰富。

Description

虚拟车辆的控制方法、装置、设备及存储介质
本申请要求于2022年05月20日提交的、申请号为202210555884.1、发明名称为“虚拟车辆的控制方法、装置、设备及存储介质”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。
技术领域
本申请涉及计算机与互联网技术领域,特别涉及一种虚拟车辆的控制方法、装置、设备及存储介质。
背景技术
用户可以控制虚拟车辆在虚拟环境中移动。
在相关技术中,用户界面中显示有方向调整控件、油门控件和漂移控件。在虚拟车辆的移动过程中,通过方向调整控件对虚拟车辆的移动方向进行调整,通过长按油门控件控制虚拟车辆保持加速移动,通过松开油门控件控制虚拟车辆停止加速移动,通过漂移控件控制虚拟车辆进入漂移状态。而且,在虚拟车辆的漂移过程中,用户通过方向调整控件不断调整虚拟车辆的移动方向以退出漂移状态。
然而,在上述相关技术中,在控制虚拟车辆退出漂移状态时用户操作繁琐。
发明内容
本申请实施例提供了一种虚拟车辆的控制方法、装置、设备及存储介质,能够简化用户操作,提高虚拟车辆的退漂效率。所述技术方案如下。
根据本申请实施例的一个方面,提供了一种虚拟车辆的控制方法,所述方法由终端设备执行,所述方法包括以下步骤:
显示处于漂移状态的虚拟车辆;其中,所述漂移状态是所述虚拟车辆的漂移角大于第一阈值的状态,所述漂移角是所述虚拟车辆的移动方向与所述虚拟车辆的车头朝向之间的夹角;
响应于针对第一刹车控件的操作,控制所述虚拟车辆的漂移角逐渐减小;
响应于针对油门控件的第一操作,控制所述虚拟车辆加速移动,以及加快所述虚拟车辆的漂移角的减小速度;
在所述虚拟车辆的漂移角小于所述第一阈值的情况下,控制所述虚拟车辆退出所述漂移状态。
根据本申请实施例的一个方面,提供了一种虚拟车辆的控制装置,所述装置包括以下模块:
车辆漂移模块,用于显示处于漂移状态的虚拟车辆;其中,所述漂移状态是所述虚拟车辆的漂移角大于第一阈值的状态,所述漂移角是所述虚拟车辆的移动方向与所述虚拟车辆的车头朝向之间的夹角;
车辆控制模块,用于响应于针对第一刹车控件的操作,控制所述虚拟车辆的漂移角逐渐减小;
加速退漂模块,用于响应于针对油门控件的第一操作,控制所述虚拟车辆加速移动,以及加快所述虚拟车辆的漂移角的减小速度;
车辆退漂模块,用于在所述虚拟车辆的漂移角小于所述第一阈值的情况下,控制所述虚拟车辆退出所述漂移状态。
根据本申请实施例的一个方面,本申请实施例提供了一种终端设备,所述终端设备包括 处理器和存储器,所述存储器中存储有计算机程序,所述计算机程序由所述处理器加载并执行以实现上述虚拟车辆的控制方法。
根据本申请实施例的一个方面,本申请实施例提供了一种计算机可读存储介质,所述可读存储介质中存储有计算机程序,所述计算机程序由处理器加载并执行以实现上述虚拟车辆的控制方法。
根据本申请实施例的一个方面,提供了一种计算机程序产品或计算机程序,该计算机程序产品或计算机程序包括计算机指令,该计算机指令存储在计算机可读存储介质中。终端设备的处理器从计算机可读存储介质读取该计算机指令,处理器执行该计算机指令,使得该终端设备执行上述虚拟车辆的控制方法。
本申请实施例提供的技术方案可以带来如下有益效果:
通过第一刹车控件控制虚拟车辆的漂移角减小,在虚拟车辆的漂移角减小至小于阈值的情况下,即控制虚拟车辆退出漂移状态,实现从漂移状态退出的自动化,不需要用户通过方向调整控件频繁调整虚拟车辆的移动方向或车头朝向,简化用户操作;通过油门控件加快虚拟车辆的漂移角的减小速度,加快虚拟车辆退出漂移状态,提高虚拟车辆的退漂效率,而且,通过油门控件控制虚拟车辆加速,提供了一种漂移加速的移动方式,使得虚拟车辆的移动方式更加丰富。
附图说明
图1是本申请一个实施例提供的虚拟车辆的控制系统的示意图;
图2示例性示出了一种用户界面的示意图;
图3是本申请一个实施例提供的虚拟车辆的控制方法的流程图;
图4示例性示出了一种用户界面的示意图;
图5示例性示出了一种漂移角变化方式的示意图;
图6是本申请另一个实施例提供的虚拟车辆的控制方法的流程图;
图7是本申请另一个实施例提供的虚拟车辆的控制方法的流程图;
图8至图12示例性示出了用户界面的示意图;
图13示例性示出了一种虚拟车辆的控制方式的示意图;
图14是本申请另一个实施例提供的虚拟车辆的控制方法的流程图;
图15示例性示出了用户控制虚拟车联的示意图;
图16是本申请一个实施例提供的虚拟车辆的控制装置的框图;
图17是本申请另一个实施例提供的虚拟车辆的控制装置的框图;
图18是本申请一个实施例提供的终端设备的结构框图。
具体实施方式
为使本申请的目的、技术方案和优点更加清楚,下面将结合附图对本申请实施方式作进一步地详细描述。
请参考图1,其示出了本申请一个实施例提供的虚拟车辆的控制系统的示意图。该虚拟车辆的控制系统可以包括:终端设备10和服务器20。
终端设备10可以为诸如手机、平板电脑、游戏主机、电子书阅读器、多媒体播放设备、可穿戴设备、PC(Personal Computer,个人计算机)等电子设备,本申请实施例对此不作限定。在一些实施例中,终端设备10中包括应用程序的客户端。其中,该应用程序可以为需要下载安装的应用程序,也可以为即点即用的应用程序,本申请实施例对此不作限定。
在本申请实施例中,上述应用程序是指能够控制虚拟车辆在虚拟环境中移动的任意应用程序。示例性地,该应用程序可以是竞速游戏、MOBA(Multiplayer Online Battle Arena,多 人在线战术竞技)游戏、TPS(Third-Personal Shooting Game,第三人称射击游戏)、FPS(First-Person Shooting Game,第一人称射击游戏)、多人枪战类生存游戏、增强现实(Augmented Reality,AR)类应用应用程序、三维地图程序、社交类应用程序、互动娱乐类应用程序,等等。另外,对于不同的应用程序来说,其所提供的虚拟车辆的形态也会有所不同,可以根据实际需求预先进行配置,本申请实施例对此不作限定。当然,在示例性实施例中,同一应用程序也可以为用户提供具有不同形态的多种虚拟车辆,本申请实施例对此不作限定。
上述虚拟车辆是指用户在应用程序中控制的能够移动的虚拟物品。其中,该虚拟车辆可以三维形式展示,也可以二维形式展示,还可以以2.5维形式展示,本申请实施例对此不作限定。在一些实施例中,虚拟车辆也可以称为虚拟载具。示例性地,在竞速游戏中,虚拟车辆即为用户在竞速过程中所控制的车辆;在射击游戏中,虚拟车辆可以为用户在虚拟环境中搜索得到的虚拟载具;在MOBA游戏中,虚拟车辆可以为用户控制虚拟角色所召唤出的虚拟载具;等等,本申请实施例对此不作限定。
服务器20用于为终端设备10提供后台服务。服务器20可以是一台服务器,也可以是由多台服务器组成的服务器集群,或者是一个云计算服务中心。在一些实施例中,服务器20可以是上述应用程序的客户端的后台服务器。在示例性实施例中,服务器20为多个终端设备10提供后台服务。
上述终端设备10与上述服务器20之间通过网络进行数据传输。
在本申请实施例中,用户可以控制上述应用程序中的虚拟车辆进行灵活移动。示例性地,如图2所示,终端设备10的用户界面中显示有虚拟车辆21,以及用于控制该虚拟车辆21的操作控件。其中,操作控件包括方向调整控件22、油门控件23、第一刹车控件24和第二刹车控件25。
方向调整控件22用于控制虚拟车辆21的车头朝向。用户通过针对方向调整控件22的操作控制虚拟车辆21的车头朝向进行调整。在一种可能的实施方式中,方向调整控件22中包括多个子控件,不同的子控件对应不同的调整方向。在另一种可能的实施方式中,方向调整控件22包括滑块,用户通过针对滑块的滑动操作来调整虚拟车辆的车头朝向,不同的滑动方向对应不同的调整方向。
油门控件23用于控制虚拟车辆21加速移动。用户通过针对油门控件23的操作控制虚拟车辆21加速移动。
第一刹车控件24用于控制虚拟车辆21减速或倒车。在虚拟车辆21加速移动的过程中,用户通过针对第一刹车控件24的点击操作,控制虚拟车辆21缓慢减速移动;或者,用户通过针对第一刹车控件24的持续按压操作,控制虚拟车辆21快速减速移动,并在虚拟车辆21的速度减小至零的情况下,若上述持续按压操作未消失,则继续控制虚拟车辆21倒车。
第二刹车控件25用于控制虚拟车辆21减速移动。其中,第二刹车控件25是不同于上述第一刹车控件24的另一控件。示例性地,第一刹车控件24可以理解为脚刹控件,第二刹车控件25可以理解为手刹控件。用户通过针对方向调整控件22的操作和针对第二刹车控件25的一次点击操作,控制虚拟车辆21进入漂移状态,之后,通过针对第二刹车控件25的二次点击操作,控制虚拟车辆21急速减少移动直至速度为零。
需要说明的一点是,上述缓慢减速移动、快速减速移动和急速减少移动是指虚拟车辆的三种不同减速方式。示例性地,缓慢减速移动的减速效率小于快速减速移动的减速效率,快速减速移动的减速效率小于急速减少移动的减速效率。
在一些实施例中,上述操作控件还包括氮气控件26和复位控件27。
氮气控件26用于控制虚拟车辆21依据已积攒的氮气资源进行加速。用户通过针对氮气控件26的操作,控制虚拟车辆21消耗已积攒的氮气资源进行加速。在一些实施例中,用户界面中还显示有氮气指示图标。其中,该氮气指示图标中包括多个子图标,该子图标对应有 第一显示样式和第二显示样式。虚拟车辆21已积攒的氮气资源的数量,与以第一显示样式显示的子图标的数量呈正相关关系。在氮气资源积攒的过程中,氮气指示图标中显示子图标从第二显示样式变换为第一显示样式的变换过程,以表征氮气资源的积攒;在氮气资源消耗的过程中,氮气指示图标中显示子图标从第一显示样式变换为第二显示样式的变换过程,以表征氮气资源被消耗。
复位控件27用于控制虚拟车辆21脱离卡死状态或不可控状态。在虚拟车辆21移动的过程中,若由于虚拟车辆21移动至特殊地点导致虚拟车辆21不可控制,则通过针对复位控件27的操作,控制虚拟车辆21脱离该特殊地点重置到最近的非特殊地点,使得虚拟车辆21可以从该非特殊地点开始继续移动。
需要说明的一点是,上述对操作控件的介绍示例性和解释性的,在示例性实施例,可以对操作控件的功能进行灵活设置和调整,本申请实施例对此不作限定。以上述第一刹车控件为例,在虚拟车辆加速移动的过程中,用户可以通过第一刹车控件控制虚拟车辆减速移动;在虚拟车辆处于漂移状态的情况下,用户可以通过第一刹车控件控制虚拟车辆的漂移角减小。
请参考图3,其示出了本申请一个实施例提供的虚拟车辆的控制方法的流程图。该方法由图1所示的虚拟车辆的控制系统的终端设备10执行,如各步骤的执行主体可以是终端设备10中的应用程序的客户端。该方法可以包括以下几个步骤(301~304)中的至少一个步骤:
步骤301,显示处于漂移状态的虚拟车辆。
漂移状态是虚拟车辆的移动方向与车头朝向不一致的运动状态;即在虚拟车辆处于漂移状态的情况下,虚拟车辆的移动方向与车头朝向之间存在夹角。其中,车头朝向是指由虚拟车辆的车尾指向车头的方向。示例性地,如图4所示,在虚拟车辆41处于漂移状态的情况下,虚拟车辆的车头朝向与移动方向之间存在夹角。在本申请实施例中,漂移状态是虚拟车辆的漂移角大于第一阈值的状态。其中,漂移角是虚拟车辆的移动方向与虚拟车辆的车头朝向之间的夹角。
在一些实施例中,上述第一阈值可以是任意数值,如0°、10°、13°、15°等,根据实际情况可以对该第一阈值进行灵活设置,本申请实施例对此不作限定。在一种可能的实施方式中,为了提高漂移状态的真实性,上述第一阈值为0°。在虚拟车辆的移动过程中,若虚拟车辆存在漂移角,客户端则判定虚拟车辆处于漂移状态;也就是说,客户端控制虚拟车辆的漂移角从无到有,以控制虚拟车辆进入漂移状态。在另一种可能的实施方式中,为了提高漂移状态的展示效果以便于用户感知虚拟车辆进入漂移状态,上述第一阈值不为0°(即第一阈值大于0°)。在虚拟车辆的移动过程中,若虚拟车辆的漂移角大于一定数值,客户端则判定虚拟车辆处于漂移状态;也就是说,客户端控制虚拟车辆的漂移角增加到一定数值,以控制虚拟车辆进入漂移状态。
在本申请实施例中,客户端显示有虚拟车辆,进而在虚拟车辆进入漂移状态之后,客户端显示处于漂移状态的虚拟车辆。在一些实施例中,虚拟车辆对应有表现朝向和逻辑朝向。其中,表现朝向与上述车头朝向相对应,用于展示用户针对虚拟车辆的控制预期;逻辑朝向与上述移动方向相对应,用于表征虚拟车辆的物理系统针对控制预期的实际反馈。在本申请实施例中,客户端通过表现朝向控制虚拟车辆的车头朝向,通过逻辑朝向控制虚拟车辆的移动方向。
在一种可能的实施方式中,逻辑朝向与表现朝向之间存在计算规则。在一些实施例中,客户端基于用户针对方向调整控件的操作确定虚拟车辆的表现朝向,进而获取计算参数和计算规则,基于表现朝向确定虚拟车辆的逻辑朝向,进一步地,在当前图像帧中基于表现朝向控制虚拟车辆的车头朝向,基于逻辑朝向控制虚拟车辆的移动方向。
在另一种可能的实施方式中,逻辑朝向是表现朝向滞后反应。在一些实施例中,客户端基于用户针对方向调整控件的操作确定虚车辆的表现朝向,将虚拟车辆的历史表现朝向确定 为虚拟车辆的逻辑朝向,进一步地,在当前图像帧中基于表现朝向控制虚拟车辆的车头朝向,基于逻辑朝向控制虚拟车辆的移动方向。其中,历史表现朝向是指虚拟车辆在前一图像帧中的表现朝向。
步骤302,响应于针对第一刹车控件的操作,控制虚拟车辆的漂移角逐渐减小。
在一些实施例中,客户端中显示有第一刹车控件。其中,第一刹车控件用于控制虚拟车辆减速移动或倒车。
在本申请实施例中,客户端在显示上述第一刹车控件之后,对该第一刹车控件进行检测,在检测到针对第一刹车控件的操作的情况下,控制虚拟车辆的漂移角逐渐减少。示例性地,上述针对第一刹车控件的操作为点击操作,点击操作是指针对某个作用点的瞬时触碰操作或按压操作,客户端在检测到针对某个作用点的触碰操作或按压操作出现后立刻消失,则确定检测到针对该作用点的点击操作,在本申请实施例中,该作用点可以为第一刹车控件的触发区域内的任意一点。在一些实施例中,客户端在检测到针对某个作用点的触碰操作或按压操作后,又发现该触碰操作或按压操作很快消失(如在第一时长阈值内消失),则确定检测到针对该作用点的点击操作。在一些实施例中,第一时长阈值可以是0.3秒、0.5秒、0.7秒等等,第一时长阈值的具体取值可以由相关技术人员根据实际情况进行设定,本申请实施例对此不作具体限定。当然,在示例性实施例中,根据实际情况可以对上述针对第一刹车控件的操作进行灵活设置和调整,如滑动操作、拖拽操作、对应键位按压操作等,本申请实施例对此不作限定。
在一些实施例中,客户端通过增加虚拟车辆的抓地力,以控制虚拟车辆的漂移角减小。抓地力用于表征虚拟车辆与地面之间的阻力。其中,抓地力与漂移角之间呈负相关关系。即漂移角越大,抓地力越小;漂移角越小,抓地力越大。在一些实施例中,在漂移状态中,虚拟车辆的漂移角增大,虚拟车辆的抓地力减小,此时,虚拟车辆与地面之间的阻力小,虚拟车辆打滑,使得虚拟车辆的漂移角进一步增大,抓地力进一步减小;之后,在检测到针对第一刹车控件的操作的情况下,虚拟车辆开始准备退出漂移状态,增加虚拟车辆的抓地力,此时,虚拟车辆与地面之间的阻力增大,虚拟车辆打滑减弱,虚拟车辆的漂移角减小,使得虚拟车辆的抓地力进一步增加。在一些实施例中,抓地力可以是虚拟车辆与地面之间的摩擦力,也可以是与该摩擦力正相关的一个力。该实施例中,由于抓地力与漂移角的减小速度呈正相关关系,通过增加抓地力可以实现加快减小虚拟车辆的漂移角,从而缩减退出漂移状态所需的时长。
在本申请实施例中,客户端在检测到针对第一刹车控件的操作的情况下,控制虚拟车辆的漂移角逐渐减小,以及控制虚拟车辆减速移动。在一些实施例中,客户端在控制虚拟车辆的漂移角减小的同时,基于第二基础加速度控制虚拟车辆减速移动。其中,第二基础加速度是指上述针对第一刹车控件的操作所对应的加速度。
步骤303,响应于针对油门控件的第一操作,控制虚拟车辆加速移动,以及加快虚拟车辆的漂移角的减小速度。
在一些实施例中,客户端中显示有油门控件。其中,油门控件用于控制虚拟车辆加速移动。
在本申请实施例中,客户端在显示上述油门控件之后,对该油门控件进行检测,在检测到针对油门控件的第一操作的情况下,控制虚拟车辆加速移动,以及加快虚拟车辆的漂移角的减小速度。示例性地,上述针对油门控件的第一操作为点击操作,该点击操作是指针对油门控件的触发区域中的任一作用点的瞬时按压操作。当然,在示例性实施例中,根据实际情况可以对上述针对油门控件的第一操作进行灵活设置和调整,如滑动操作、拖拽操作、对应键位的按压操作等,本申请实施例对此不作限定。
在一些实施例中,客户端通过增加虚拟车辆的抓地力,以加快虚拟车辆的漂移角的减小速度。其中,抓地力与漂移角的减小速度呈正相关关系;即抓地力越大,漂移角的减小速度 越快,抓地力越小,漂移角的减小速度越大。示例性地,在检测到针对油门操作控件的第一操作的情况下,在虚拟车辆的当前抓地力的基础上增加虚拟车辆的抓地力,此时,虚拟车辆与地面之间的阻力在原有基础上进一步增大,使得虚拟车辆的漂移角减小速度加快。
在一些实施例中,客户端在检测到针对油门控件的操作的情况下,在虚拟车辆的第一基础加速度上叠加额外的第一加速度,得到虚拟车辆的第一目标加速度,进而基于第一目标加速度控制虚拟车辆加速移动。其中,第一基础加速度是指上述针对油门控件的第一操作所对应的加速度。在该实施例中,通过油门控件叠加第一加速度,从而使得虚拟车辆的加速方式更贴近现实生活中的加速方式,提升虚拟车辆控制过程的真实性,从而便于用户熟悉虚拟车辆的控制方式、减少用户学习控制虚拟车辆的操作的时间和精力,提升用户的控制体验。
步骤304,在虚拟车辆的漂移角小于第一阈值的情况下,控制虚拟车辆退出漂移状态。
在本申请实施例中,在漂移角逐渐减少的过程中,客户端对漂移角进行检测,在虚拟车辆的漂移角小于第一阈值的情况下,控制虚拟车辆退出漂移状态。在一种可能的实施方式中,上述第一阈值为0°。客户端在确定虚拟车辆的车头朝向和移动方向之间不存在夹角的情况下,控制虚拟车辆退出漂移状态。在另一种可能的实施方式中,上述第一阈值不为0°。客户端在确定虚拟车辆的车头朝向和移动方向之间的夹角小于一定数值的情况下,即控制虚拟车辆退出漂移状态,避免从漂移状态到退出漂移状态之间拖沓。
在一些实施例中,虚拟车辆在退出漂移状态之后,进入平跑状态。其中,平跑状态是指虚拟车辆非腾空、非漂移、不使用氮气资源的情况下向前行驶(如加速行驶、匀速行驶、减速行驶)的状态。在一些实施例中,虚拟车辆非腾空是指虚拟车辆的轮胎都着地的状态;若虚拟车辆存在一个或多个轮胎不着地,则可以认为虚拟车辆处于非平跑状态。
需要说明的一点是,在本申请实施例中,漂移角减小的过程也可以称为退漂过程(即退出漂移的过程),对于处于漂移状态的虚拟车辆,客户端在检测到针对第一刹车控件的操作的情况下,确定退漂过程开始,在检测到针对油门控件的第一操作的情况下,确定加速退漂,在漂移角小于或等于第一阈值的情况下,确定退漂过程结束。
综上所述,本申请实施例提供的技术方案中,通过第一刹车控件控制虚拟车辆的漂移角减小,在虚拟车辆的漂移角减小至小于或等于阈值的情况下,即控制虚拟车辆退出漂移状态,实现从漂移状态退出的自动化,不需要用户通过方向调整控件频繁调整虚拟车辆的移动方向或车头朝向,简化用户操作;通过油门控件加快虚拟车辆的漂移角的减小速度,加快虚拟车辆退出漂移状态,提高虚拟车辆的退漂效率,而且,通过油门控件控制虚拟车辆加速,提供了一种漂移加速的移动方式,使得虚拟车辆的移动方式更加丰富。
另外,将抓地力与漂移角的减小速度相关联,通过增加抓地力来提高漂移角的减小速度,采用具体的参数对虚拟车辆进行控制,与自动播放动画相比,虚拟车辆在退漂过程中的移动表现更加真实。
另外,在针对油门控件的第一操作所对应的第一基础加速度上叠加额外的第一加速度,以控制虚拟车辆加速移动,一方面,采用具体的参数对虚拟车辆进行控制,虚拟车辆在退漂过程中的移动表现更加真实,另一方面,通过加速度叠加的方式,在虚拟车辆退出漂移状态之前,提供了一种漂移加速的移动方式,丰富了虚拟车辆的移动方式。
下面,对上述漂移角的减小方式进行介绍。
在示例性实施例中,上述步骤302包括以下至少一个步骤:
1、获取虚拟车辆在下一时间戳的目标车头朝向。
时间戳用于指示图像帧的显示时刻。在一些实施例中,上一时间戳用于指示前一图像帧的显示时刻,当前时间戳用于指示当前图像帧的显示时刻,下一时间戳用于指示后一图像帧的显示时刻。其中,相邻两个时间戳之间的时间间隔为单位时间,该单位时间即为相邻两个图像帧之间的时间间隔。示例性地,该单位时间可以为任意数值,如0.025s(second,秒)、 0.033s、0.050s等,根据实际情况可以对该单位时间进行灵活设置和调整,本申请实施例对此不作限定。
在本申请实施例中,客户端在控制虚拟车辆的漂移角逐渐减小时,获取虚拟车辆在下一时间戳的目标车头朝向。在一些实施例中,客户端可以根据针对方向调整控件的操作确定目标车头朝向,也可以根据虚拟车辆的历史车头朝向确定虚拟车辆的车头朝向。其中,历史车头朝向是指虚拟车辆在当前时间戳的车头朝向。
在一种可能的实施方式中,客户端根据针对方向调整控件的操作确定目标车头朝向。在一些实施例中,在漂移角减小的过程中,客户端在检测到针对方向调整控件的操作的情况下,基于该针对方向调整控件的操作确定上述目标车头朝向;或者,客户端在未检测到针对方向调整控件的操作的情况下,基于最近一次检测到的针对方向调整控件的操作确定目标车头朝向。
在另一种可能的实施方式中,客户端根据虚拟车辆的历史车头朝向确定虚拟车辆的车头朝向。在一些实施例中,在漂移角减小的过程中,客户端获取虚拟车辆在当前时间戳的车头朝向作为上述目标车头朝向。
需要说明的一点是,上述对目标车头朝向的获取方式的介绍只是示例性和解释性的,在示例性实施例中,根据实际情况可以对该目标车头朝向的获取方式进行灵活设置和调整,本申请实施例对此不作限定。示例性地,在漂移角减小的过程中,用户可以通过方向调整控件对虚拟车辆的车头朝向进行调整,客户端在检测到针对方向调整控件的操作的情况下,根据该操作确定虚拟车辆在下一时间戳的目标车头朝向,客户端在未检测到针对方向调整控件的操作的情况下,将虚拟车辆在当前时间戳的车头朝向确定为上述目标车头朝向。
2、根据目标车头朝向,确定虚拟车辆在下一时间戳的目标移动方向。
在本申请实施例中,目标车头朝向与目标移动方向之间具有关联关系,客户端在确定上述目标车头朝向之后,根据目标车头朝向,确定虚拟车辆在下一时间戳的目标移动方向。需要说明的一点是,在本申请实施例中,目标移动方向与目标车头朝向之间的夹角,小于当前时间戳的移动方向与车头朝向之间的夹角。
在一些实施例中,客户端在获取上述目标移动方向时,根据虚拟车辆在当前时间戳的抓地力和移动方向,以及目标车头朝向,确定移动方向的角度变化量。其中,抓地力与单位时间内移动方向的角度变化量呈正相关关系。之后,客户端根据当前时间戳的移动方向和移动方向的角度变化量,确定虚拟车辆在下一时间戳的目标移动方向。
3、控制虚拟车辆在下一时间戳根据目标移动方向进行移动。
在本申请实施例中,客户端在确定上述目标车头朝向和上述目标移动方向之后,控制虚拟车辆在下一时间戳根据目标移动方向进行移动,且虚拟车辆所显示的车头朝向为上述目标车头朝向。
综上所述,本申请实施例提供的技术方案中,通过目标车头朝向确定目标移动方向,将车头朝向和移动方向相关联,不需要用户一边控制车头朝向一边控制移动方向,简化用户针对虚拟车辆的操作,提高用户针对虚拟车辆的控制效率;而且,根据虚拟车辆在当前时间戳的抓地力和移动方向,以及虚拟车辆在下一时间戳的目标车头朝向,确定移动方向的角度变化量,进而确定目标移动方向,实现了虚拟车辆的逐帧变化,且后一图像帧的变化依赖于当前图像帧中的参数,使得虚拟车辆的变化更加真实连贯。
需要说明的一点是,上述步骤302中漂移角的变化方式,同样适用于步骤303中漂移角的变化方式。
示例性地,假设虚拟车辆的车头朝向为d(t),移动方向为v(t),抓地力为Fz,单位时间为Δt,则虚拟车辆的目标移动方向的迭代公式如下:
v(t+Δt)=Fz*(d(t+Δt)-v(t))+v(t);
v(t+2*Δt)=Fz*(d(t+2*Δt)-v(t+Δt))+v(t+Δt);
……
v(t+n*Δt)=Fz*[d(t+n*Δt)-v(t+(n-1)*Δt)]+v(t+(n-1)*Δt);
抓地力与漂移角之间呈负相关关系。客户端在检测到针对第一刹车控件的操作的情况下,增加虚拟车辆的抓地力,基于上述迭代公式可知,在这一过程中,虚拟车辆的移动方向逐渐向车头朝向靠近,虚拟车辆的漂移角逐渐减小;进一步地,在检测到针对油门控件的操作的情况下,在原有的基础上继续增加虚拟车辆的抓地力,基于上述迭代公式可知,在这一过程中,虚拟车辆的移动方向加快向车头朝向靠近,虚拟车辆的漂移角加快减小。
示例性地,结合参考图5,以虚拟车辆的起始车头方向为90°为例,客户端在检测到针对第一刹车控件的操作的情况下,控制虚拟车辆的漂移角逐渐减小,在检测到针对油门控件的操作的情况下,控制虚拟车辆的漂移角快速减小。
在一些实施例中,在退出漂移状态之后,虚拟车辆保持加速移动。下面,对虚拟车辆退出漂移状态之后的加速移动方式进行介绍。
在一种可能的实施方式中,上述步骤304之后还包括以下子步骤:在漂移状态的退出时刻起的第一时长内,控制虚拟车辆加速移动。
在本申请实施例中,客户端在确定虚拟车辆退出漂移状态之后,在漂移状态的退出时刻起的第一时长内,控制虚拟车辆加速移动。
在一些实施例中,客户端在控制虚拟车辆加速移动时,在虚拟车辆的第一基础加速度的基础上叠加额外的第二加速度,得到虚拟车辆的第二目标加速度,进而在漂移状态的退出时刻起的第一时长内,基于第二目标加速度控制虚拟车辆加速移动。在该实施例中,通过加速度叠加来控制虚拟车辆加速移动,由于第一基础加速度在不同情况下一般并不相同,叠加上相同的第二加速度之后的第二目标加速度每次也会有所不同,从而避免了每次加速度都相同的较为死板的加速方式,提升了退出漂移后虚拟车辆加速的多样性,从而提升用户体验。其中,上述第二加速度与上述第一加速度可以相同,也可以不同,本申请实施例对此不作限定;上述第一时长可以是任意时长,如0.2s、0.3s、0.4s等,根据实际情况可以对该第一时长进行灵活设置和调整,本申请实施例对此不作限定。
在一些实施例中,在第一时长之后,客户端基于上述第一基础加速度控制虚拟车辆加速移动。
综上所述,本申请实施例提供的技术方案中,漂移结束后自动控制虚拟车辆加速移动,简化了用户操作。
在另一种可能的实施方式中,上述步骤304之后还包括以下至少一个子步骤:
1、在检测到针对油门控件的第二操作的情况下,在第二操作的持续时段内控制虚拟车辆加速移动。
在本申请实施例中,客户端在确定虚拟车辆退出漂移状态之后,对油门控件进行检测,在检测到针对油门控件的第二操作的情况下,在第二操作的持续时段内控制虚拟车辆加速移动。示例性地,上述针对油门控件的第二操作为持续按压操作,持续按压操作是指针对某个作用点的持续按压时长超过时长第二时长阈值的操作,客户端在检测到针对某个作用点的按压操作出现并持续一段时间后消失,则确定检测到针对该作用点的持续按压操作,在本申请实施例中,该作用点可以为油门操作控件的触发区域内的任意一点。在一些实施例中,第二时长阈值可以是0.5秒、0.7秒、1秒、1.5秒、2秒等等,第二时长阈值的具体取值可以由相关技术人员根据实际情况进行设定,本申请实施例对此不作具体限定。
在一些实施例中,客户端在控制虚拟车辆加速移动时,在虚拟车辆的第一基础加速度的基础上叠加额外的第三加速度,得到虚拟车辆的第三目标加速度,进而在第二操作的持续时段内,基于第三目标加速度控制虚拟车辆加速移动。其中,上述第三加速度与上述第二加速度可以相同,也可以不同,本申请实施例对此不作限定。
需要说明的一点是,在本申请实施例中,上述第二操作的检测时刻为虚拟车辆退出漂移状态的时刻,但是,用户对于该第二操作的触发时刻可以为位于确定漂移角快速减小的时刻,与确定虚拟车辆退出漂移状态的时刻之间的任意时刻,本申请实施例对此不作限定。
2、从漂移状态的退出时刻起,若第二操作的持续时长达到最大响应值,则显示第一提示信息。
在本申请实施例中,客户端在检测到上述第二操作之后,对该第二操作的持续时长进行计时,从漂移状态的退出时刻起,若第二操作的持续时长达到最大响应值(如上述第二时长阈值),则显示第一提示信息。其中,第一提示信息是用于指示油门全开技巧被触发的提示信息。示例性地,第一提示信息也可理解为用于指示第二操作的持续时长达到上述最大响应值。在一些实施例中,油门全开技巧是指针对油门的第二操作的持续时长达到最大响应值后,通过油门控件对车辆进行加速的加速效果已经达到顶峰、无法进一步加速虚拟车辆了。
上述最大响应值是指从漂移状态的退出时刻起,上述第二操作的最大响应时长。在第二操作的持续时长达到最大响应值的情况下,即使用户继续触发该第二操作,客户端也不再响应该第二操作。在一些实施例中,在第二操作的持续时长达到最大响应值之后,客户端基于上述第一基础加速度控制虚拟车辆加速移动。
综上所述,本申请实施例提供的技术方案中,根据第二操作的持续时长确定虚拟车辆的加速时长,用户根据实际情况可以对虚拟车辆的加速时长进行选择,提高用户操作的灵活性,在第二操作的持续时长达到最大响应值之后,显示第一提示信息以指示第二操作的持续时长达到最大响应值,避免在非响应时段内用户继续触发第二操作。
在再一种可能的实施方式中,上述步骤304之后还包括以下至少一个子步骤:
1、在漂移状态的退出时刻起的第一时长内,控制虚拟车辆加速移动。
2、从第一时长的结束时刻起,在检测到针对油门控件的第二操作的情况下,在第二操作的持续时段内继续控制虚拟车辆加速移动。
其中,上述第二操作的检测时刻为第一时长的结束时刻,用户对于该第二操作的触发时刻可以为位于确定漂移角快速减小的时刻,与第一时长的结束时刻之间的任意时刻,本申请实施例对此不作限定。
3、从第一时长的结束时刻起,若第二操作的持续时长达到最大响应值,则显示第一提示信息。
综上所述,本申请实施例提供的技术方案中,在漂移结束后先自动控制虚拟车辆加速移动,进而根据第二操作的持续时长,延长虚拟车辆的加速移动时长,在简化用户操作的同时,为用户提供了灵活选择加速移动时长的方式。
请参考图6,其示出了本申请另一个实施例提供的虚拟车辆的控制方法的流程图。该方法由图1所示的虚拟车辆的控制系统的终端设备10执行,如各步骤的执行主体可以是终端设备10中的应用程序的客户端。该方法可以包括以下几个步骤(601~604)中的至少一个步骤:
步骤601,显示处于漂移状态的虚拟车辆。
步骤602,响应于针对第一刹车控件的操作,控制虚拟车辆的漂移角逐渐减小。
上述步骤601与602与图3实施例中的301与302相似,具体参见图3实施例,在此不作赘述。
步骤603,响应于针对油门控件的第一操作,根据虚拟车辆的漂移角确定虚拟车辆的移动方式。
在一些实施例中,客户端在检测到针对油门控件的第一操作的情况下,若虚拟车辆的漂移角小于第二阈值,则控制虚拟车辆加速移动,以及加快虚拟车辆的漂移角的减小速度。而且,显示第二提示信息,该第二提示信息是用于指示弹射出弯技巧被触发的提示信息。示例性地,该第二提示信息也可以理解为用于指示虚拟车辆进入目标退漂状态。其中,目标退漂状态是指虚拟车辆的速度加快和漂移角的减小速度加快的移动方式。示例性地,该目标退漂状态也可以称为快速退漂状态,或加快退漂状态,或弹射出弯状态,或加速出弯状态。在该实施例中,通过显示提示信息,使得用户及时知晓虚拟车辆弹射出弯技巧被触发、可以进行后续操作了,从而提升用户的操作效率。
在一些实施例中,客户端在检测到针对油门控件的第一操作的情况下,若虚拟车辆的漂移角大于第三阈值,则确定虚拟车辆处于失控状态。其中,在失控状态下,虚拟车辆的抓地力趋近于零,由上述迭代公式可知,在虚拟车辆的抓地力趋近于零的情况下,虚拟车辆的移动方向无法调整。此时,客户端需要控制虚拟车辆从失控状态切换至恢复抓地状态。在一些实施例中,客户端通过控制虚拟车辆的抓地力增加,以控制虚拟车辆退出失控状态;以及,在检测到针对油门控件的第一操作,且虚拟车辆的漂移角大于第三阈值的情况下,客户端显示第三提示信息,该第三提示信息是用于指示恢复抓地技巧被触发的提示信息。示例性地,该第三提示信息也可以理解为用于指示虚拟车辆进入恢复抓地状态。在该实施例中,通过针对油门的第一操作,就能够将失控状态下的虚拟车辆恢复到可控的恢复抓地状态,从而尽可能减少虚拟车辆处于失控状态的时长,维护用户对虚拟车辆的掌控感和控制体验。并且,通过提示信息,提示用户已恢复抓地,避免用户继续执行用于恢复抓地的操作,减少不必要的操作,提升用户的操作效率。
在一些实施例中,恢复抓地状态,是指通过恢复虚拟车辆的抓地力,使得虚拟车辆出失控状态、恢复到可控状态。
在一些实施例中,虚拟车辆的抓地力趋近于零,是指虚拟车辆的抓地力小于或等于第四阈值,第四阈值的具体取值可以由相关技术人员根据实际情况进行设定,本申请实施例对此不作具体限定。
在一些实施例中,客户端在检测到针对油门控件的第一操作的情况下,若虚拟车辆的漂移角大于第二阈值且小于第三阈值,则控制虚拟车辆的漂移角继续逐渐减小,以及基于虚拟车辆的第一基础加速度控制虚拟车辆加速移动。
其实,上述第二阈值和上述第三阈值可以为任意数值,如第二阈值可以为40°、45°、50°等,第三阈值可以为65°、67°、80°等,第二阈值可第三阈值的具体取值可以由相关技术人员根据实际情况进行设定,本申请实施例对此不作限定。其中,第二阈值小于第三阈值。
步骤604,在虚拟车辆的漂移角小于第一阈值的情况下,控制虚拟车辆退出漂移状态。
上述步骤604与图3实施例中的304相似,具体参见图3实施例,在此不作赘述。
综上所述,本申请实施例提供的技术方案中,通过第一刹车控件和油门控件相结合,在虚拟车辆漂移的过程中,在漂移角不同的情况下为虚拟车辆提供不同的移动方式,丰富了虚拟车辆的移动方式;而且,在虚拟车辆的漂移角较大的情况下,通过第一刹车控件和油门控件控制虚拟车辆由失控状态恢复至恢复抓地状态,在虚拟车辆的漂移角较小的情况下,通过第一刹车控件和油门控件控制虚拟车辆快速退漂,在虚拟车辆的漂移角居中的情况下,稳定维持漂移角减小,通过不同漂移角的设置,使得虚拟车辆的移动更加真实,有利于给用户提供身临其境的体验。
请参考图7,其示出了本申请另一个实施例提供的虚拟车辆的控制方法的流程图。该方法由图1所示的虚拟车辆的控制系统的终端设备10执行,如各步骤的执行主体可以是终端设备10中的应用程序的客户端。该方法可以包括以下几个步骤(701~706)中的至少一个步骤:
步骤701,在检测到方向调整控件和第二刹车控件均处于被触发状态的情况下,控制虚 拟车辆进入漂移状态。
在一些实施例中,客户端中显示有方向调整控件,该方向调整控件用于对虚拟车辆的车头朝向进行调整。
在一种可能的实施方式中,方向调整控件中包括多个子控件,不同的子控件对应不同的调整方向。在一些实施例中,用户通过不同子控件控制不同的调整方向,客户端在检测到针对目标子控件的操作的情况下,基于该操作的属性信息控制虚拟车辆的车头朝向目标子控件所指示的方向调整。示例性地,属性信息包括点击次数,且点击次数与朝向调整幅度呈正相关关系,即点击次数越大,朝向调整幅度越大,点击次数越小,朝向调整幅度越小;或者,属性信息包括按压时长,且按压时长与朝向调整幅度呈正相关关系,即按压时长越长,朝向调整幅度越大,点击次数越小,按压时长越短。
在另一种可能的实施方式中,向调整控件包括滑块,用户通过针对滑块的滑动操作来调整虚拟车辆的车头朝向,不同的滑动方向对应不同的调整方向。在一些实施例中,客户端在检测到针对该滑块的滑动操作的情况下,基于该滑动操作的属性信息控制虚拟车辆的车头朝向进行调整。示例性地,属性信息包括滑动方向和滑动距离,客户端基于该滑动方向确定针对车头朝向的调整方向,基于该滑动距离确定针对车头朝向的调整角度。
在本申请实施例中,客户端在检测到方向调整控件和第二刹车控件均处于被触发状态的情况下,控制虚拟车辆进入漂移状态。其中,方向调整控件和第二刹车控件均处于被触发状态是指存在某个时刻用户同时触发方向调整控件和第二刹车控件,对于两个操作控件的触发开始时刻和触发结束时刻是否相同或不同,本申请实施例对此不作限定。
需要说明的一点是,在本申请实施例中,第二刹车控件是不同于第一刹车控件的另一个控件。示例性地,第二刹车控件可以理解为手刹控件,通过该手刹控件能够控制虚拟车辆减速至零后进入轮胎锁死的状态;第一刹车控件可以理解为脚刹控件,通过该脚刹控件能够控制虚拟车辆减速至零后开始倒车。
在上述实施例中,检测到方向调整控件和第二刹车控件均处于被触发状态的情况下,控制虚拟车辆进入漂移状态,从而使得虚拟车辆的漂移与真实情况相近,提升操控虚拟车辆的真实感和操作体验。
步骤702,响应于针对第二刹车控件的操作,控制虚拟车辆减速移动,直至速度为零。
在本申请实施例中,在虚拟车辆处于漂移状态的情况下,若客户端检测到针对第二刹车控件的操作,则控制虚拟车辆减速移动,直至速度为零。通过刹车控制虚拟车辆减速,使得虚拟车辆的减速方式与真实情况相近,从而提升操控虚拟车辆的真实感。在一些实施例中,在虚拟车辆的速度减小至零后,虚拟车辆可以进入轮胎锁死的状态,即虚拟车辆停止移动。
步骤703,在未检测到针对第二刹车控件的操作的情况下,控制显示处于漂移状态的虚拟车辆。
步骤704,响应于针对第一刹车控件的操作,控制虚拟车辆的漂移角逐渐减小。
步骤705,响应于针对油门控件的第一操作,控制虚拟车辆加速移动,以及加快虚拟车辆的漂移角的减小速度。
步骤706,在虚拟车辆的漂移角小于第一阈值的情况下,控制虚拟车辆退出漂移状态。
上述步骤703-706与图3实施例中的步骤301-304类似,具体参见图3实施例,在此不作赘述。
示例性地,结合参考图8至12,对漂移状态和退出漂移状态后虚拟车辆的移动方式进行介绍。如图8所示,虚拟车辆81处于平跑状态。之后,在检测到方向调整控件82和第二刹车控件83同时被触发的情况下,如图9所示,控制虚拟车辆81进入漂移状态。之后,如图10所示,在虚拟车辆81处于漂移状态的情况下,在检测到针对第一刹车控件84的操作的情况下,控制虚拟车辆81的漂移角减小,以控制虚拟车辆81开始退漂。之后,如图11所示,在虚拟车辆81处于漂移状态的情况下,在检测到针对油门控件85的点击操作的情况下,若 虚拟车辆81的漂移角小于第二阈值,则控制虚拟车辆81的漂移角加快减小,并控制虚拟车辆81加速移动,同时,显示第二提示信息86以指示虚拟车辆81进入弹射出弯状态。之后,在虚拟车辆81的漂移角小于第一阈值的情况下,虚拟车辆81退出漂移状态重新进入平跑状态,并自动控制虚拟车辆81继续加速移动0.3s,之后,如图12所示,在检测到针对油门控件85的持续按压操作的情况下,在持续按压操作的持续时段内延长虚拟车辆81的加速移动,并在持续按压操作的持续时长达到0.5s的情况下,显示第一提示信息87,以指示第二操作的持续时长达到最大响应值。
综上所述,本申请实施例提供的技术方案中,通过方向调整控件配合第二手刹控件,控制虚拟车辆进入漂移状态,之后,再次通过第二手刹控件控制虚拟车辆停止移动,不需要设置新的漂移控件即可控制虚拟车辆进入漂移状态,提高用户界面简洁性。
另外,结合参考图13,对虚拟车辆从漂移状态到退出漂移状态的移动流程进行介绍。具体步骤如下:
步骤1301,在检测到方向调整控件和第二刹车控件同时被触发的情况下,显示处于漂移状态的虚拟车辆。
步骤1302,在检测到针对第一刹车控件的操作的情况下,控制虚拟车辆的漂移角逐渐减小。
步骤1303,在检测到针对油门控件的第一操作的情况下,获取虚拟车辆的漂移角。
步骤1304,判断虚拟车辆的漂移角是否小于第一阈值。若虚拟车辆的漂移角小于第一阈值,则执行步骤1305;若虚拟车辆的漂移角不小于第一阈值,则执行步骤1306。
步骤1305,控制虚拟车辆的漂移角加快减小,以及控制虚拟车辆加速移动。
步骤1306,判断虚拟车辆的漂移角是否大于第二阈值。若虚拟车辆的漂移角大于第二阈值,则执行步骤1307;若虚拟车辆的漂移角不大于第二阈值,则执行步骤1308。
步骤1307,增加虚拟车辆的抓地力,以控制虚拟车辆从失控状态切换至恢复抓地状态。
步骤1308,控制虚拟车辆的漂移角继续减小。
步骤1309,在虚拟车辆的漂移角小于第一阈值的情况下,确定虚拟车辆退出漂移状态。
步骤1310,判断是否检测到针对油门控件的第二操作。在检测到针对油门控件的第二操作的情况下,执行步骤1312;在未检测到针对油门控件的第二操作的情况下,执行步骤1311。
步骤1311,在第一时长内控制虚拟车辆加速移动。
步骤1312,在第二操作的持续时长内控制虚拟车辆加速移动。
步骤1313,判断第二操作的持续时长是否达到最大响应值。在第二操作的持续时长达到最大响应值的情况下,执行步骤1314;在第二操作的持续时长未达到最大响应值的情况下,继续执行步骤1312。
步骤1314,显示第一提示信息。
下面,对虚拟车辆在漂移状态之外的移动方式进行介绍。
请参考图14,其示出了本申请另一个实施例提供的虚拟车辆的控制方法的流程图。该方法由图1所示的虚拟车辆的控制系统的终端设备10执行,如各步骤的执行主体可以是终端设备10中的应用程序的客户端。该方法可以包括以下几个步骤(1401~1402)中的至少一个步骤:
步骤1401,响应于针对油门控件的点击操作,控制虚拟车辆加速移动。
油门控件用于控制虚拟车辆加速移动。在本申请实施例中,客户端在检测到针对油门控件的点击操作的情况下,控制虚拟车辆加速移动。在一些实施例中,油门控件对应有第一基础加速度,客户端基于该第一基础加速度控制虚拟车辆加速移动。其中,该第一基础加速度的方向与虚拟车辆的移动方向相同。
步骤1402,响应于针对第一刹车控件的操作,控制虚拟车辆减速移动。
第一刹车控件用于控制虚拟车辆减速移动或倒车。在本申请实施例中,客户端在检测到针对第一刹车控件的操作的情况下,控制虚拟车辆减速移动。
在一种可能的实施方式中,上述操作为点击操作。客户端在检测到针对第一刹车控件的点击操作的情况下,控制虚拟车辆减速移动,直至速度为零。在一些实施例中,第一刹车控件对应有第二基础加速度,客户端基于该第二基础加速度控制虚拟车辆减速移动。其中,该第二基础加速度的方向与虚拟车辆的移动方向相反。
在另一种可能的实施方式中,上述操作为持续按压操作。在本申请实施例中,客户端在检测到针对第一刹车控件的持续按压操作的情况下,控制虚拟车辆减速移动;进一步地,在虚拟车辆的速度减少至零,且该持续按压操作未消失的情况下,控制虚拟车辆倒车。在一些实施例中,第一刹车控件对应有第二基础加速度和第四加速度,在第二基础加速度的基础上叠加第四加速度得到第四目标加速度,进而客户端基于该第四目标加速度控制虚拟车辆减速移动。其中,第四目标加速度的方向与虚拟车辆的移动方向相反。
综上所述,本申请实施例提供的技术方案中,通过针对油门控件的点击操作即控制虚拟车辆加速移动,不需要一直按压油门控件即可保持虚拟车辆加速移动,简化了用户操作,减少了终端设备的检测开销,通过第一刹车控件能够控制虚拟车辆减少移动或倒车,丰富了虚拟车辆的移动方式,且针对虚拟车辆的速度调整更加灵活。
另外,结合参考图15,从人机交互的角度对虚拟车辆的控制方式进行介绍。具体如下:
对于平跑状态,用户点击油门控件,客户端基于第一基础加速度控制虚拟车辆加速移动;用户点击第一刹车控件,客户端基于第二基础加速度控制虚拟车辆减速移动;用户持续按压第一刹车控件,客户端基于第二加速度叠加第四加速度控制虚拟车辆减速移动。
对于漂移状态,用户同时点击方向调整控件和第二刹车控件,客户端控制虚拟车辆进入漂移状态;用户点击第一刹车控件,客户端控制虚拟车辆的漂移角减小;用户点击油门控件,在漂移角大于第三阈值的情况下,客户端增加抓地力以控制虚拟车辆从失控状态切换至恢复抓地状态,在漂移角小于第三阈值且大于第二阈值的情况下,客户端控制虚拟车辆的漂移角继续减小,在漂移角小于第三阈值的情况下,客户端控制虚拟车辆的漂移角快速减小,并基于第一基础加速度叠加第一加速度控制虚拟车辆加速移动。
对于退出漂移状态后的平跑状态,客户端基于第一基础加速度叠加第二加速度自动控制虚拟车辆在第一时长内加速移动;用户持续按压油门控件,客户端在持续按压操作的持续时段内,基于第一基础加速度叠加第三加速度控制虚拟车辆加速移动;之后,在持续按压操作的持续时长达到最大响应值的情况下,客户端基于第一基础加速度控制虚拟车辆加速移动。
需要说明的一点是,在本申请实施例中,对于上述“大于”、“小于”的介绍,“等于”可以合并至任一分支。示例性地,“小于第一阈值”可以理解为“小于第一阈值”或“小于等于第一阈值”。
还需要说明的一点是,上文中通过实施例对本申请的介绍,仅仅是示例性和解释性的,将上述实施例中的步骤进行任意组合形成的新的实施例,也在本申请的保护范围内。
请参考图16,其示出了本申请一个实施例提供的虚拟车辆的控制装置的框图。该装置具有实现上述虚拟车辆的控制方法的功能,该功能可以由硬件实现,也可以由硬件执行相应的软件实现。该装置可以是终端设备,也可以设置终端设备中。该装置1600可以包括:车辆漂移模块1610、车辆控制模块1620、加速退漂模块1630和车辆退漂模块1640。
所述车辆漂移模块1610,用于显示处于漂移状态的虚拟车辆;其中,所述漂移状态是所述虚拟车辆的漂移角大于第一阈值的状态,所述漂移角是所述虚拟车辆的移动方向与所述虚拟车辆的车头朝向之间的夹角。
所述车辆控制模块1620,用于响应于针对第一刹车控件的操作,控制所述虚拟车辆的漂移角逐渐减小。
所述加速退漂模块1630,用于响应于针对油门控件的第一操作,控制所述虚拟车辆加速移动,以及加快所述虚拟车辆的漂移角的减小速度。
所述车辆退漂模块1640,用于在所述虚拟车辆的漂移角小于所述第一阈值的情况下,控制所述虚拟车辆退出所述漂移状态。
在示例性实施例中,所述加速退漂模块1630,还用于增加所述虚拟车辆的抓地力,所述抓地力与所述漂移角的减小速度呈正相关关系。
在示例性实施例中,所述加速退漂模块1630,还用于:
在所述虚拟车辆的第一基础加速度上叠加额外的第一加速度,得到所述虚拟车辆的第一目标加速度;
基于所述第一目标加速度控制所述虚拟车辆加速移动。
在示例性实施例中,所述车辆控制模块1620,包括:朝向获取单元、移动确定单元和移动控制单元。
所述朝向获取单元,用于获取所述虚拟车辆在下一时间戳的目标车头朝向,相邻两个时间戳之间的时间间隔为单位时间。
所述移动确定单元,用于根据所述目标车头朝向,确定所述虚拟车辆在所述下一时间戳的目标移动方向;其中,所述目标移动方向与所述目标车头朝向之间的夹角,小于当前时间戳的移动方向与车头朝向之间的夹角。
所述移动控制单元,用于控制所述虚拟车辆在所述下一时间戳根据所述目标移动方向进行移动。
在示例性实施例中,所述移动确定单元,用于:
根据所述虚拟车辆在当前时间戳的抓地力和移动方向,以及所述目标车头朝向,确定所述移动方向的角度变化量;其中,所述抓地力与单位时间内所述移动方向的角度变化量呈正相关关系;
根据所述当前时间戳的移动方向和所述移动方向的角度变化量,确定所述虚拟车辆在所述下一时间戳的目标移动方向。
在示例性实施例中,如图17所示,所述装置1600,还包括:车辆加速模块1650。
所述车辆加速模块1650,用于在所述漂移状态的退出时刻起的第一时长内,控制所述虚拟车辆加速移动。
在示例性实施例中,如图17所示,所述车辆加速模块1650,还用于:
在所述虚拟车辆的第一基础加速度的基础上叠加额外的第二加速度,得到所述虚拟车辆的第二目标加速度;
在所述漂移状态的退出时刻起的第一时长内,基于所述第二目标加速度控制所述虚拟车辆加速移动。
在示例性实施例中,如图17所示,所述装置1600,还包括:信息显示模块1660。
所述车辆加速模块1650,还用于在检测到针对所述油门控件的第二操作的情况下,在所述第二操作的持续时段内控制所述虚拟车辆加速移动。
所述信息显示模块1660,用于从所述漂移状态的退出时刻起,若所述第二操作的持续时长达到最大响应值,则显示第一提示信息,所述第一提示信息用于指示所述第二操作的持续时长达到所述最大响应值。
在示例性实施例中,所述加速退漂模块1630,还用于响应于针对所述油门控件的所述第一操作,在所述虚拟车辆的漂移角小于第二阈值的情况下,执行所述控制所述虚拟车辆加速移动,以及加快所述虚拟车辆的漂移角的减小速度的步骤。
在示例性实施例中,如图17所示,所述信息显示模块1660,还用于显示第二提示信息, 所述第二提示信息用于指示所述虚拟车辆进入目标退漂状态。
在示例性实施例中,如图17所示,所述装置1600,还包括:状态确定模块1670和状态切换模块1680。
所述状态确定模块1670,用于响应于针对所述油门控件的所述第一操作,在所述虚拟车辆的漂移角大于第三阈值的情况下,确定所述虚拟车辆处于失控状态;其中,在所述失控状态下,所述虚拟车辆的抓地力趋近于零,且所述虚拟车辆的移动方向无法调整。
所述状态切换模块1680,用于控制所述虚拟车辆从所述失控状态切换至恢复抓地状态。
在示例性实施例中,所述状态切换模块1680,还用于:
控制所述虚拟车辆的抓地力增加,以控制所述虚拟车辆退出所述失控状态;
显示第三提示信息,所述第三提示信息用于指示所述虚拟车辆进入所述恢复抓地状态。
在示例性实施例中,所述车辆控制模块1620,还用于响应于针对所述油门控件的所述第一操作,在所述虚拟车辆的漂移角大于第二阈值且小于第三阈值的情况下,控制所述虚拟车辆的漂移角继续逐渐减小,以及基于所述虚拟车辆的第一基础加速度控制所述虚拟车辆加速移动。
在示例性实施例中,如图17所示,所述车辆漂移模块1610,还用于在检测到方向调整控件和第二刹车控件均处于被触发状态的情况下,控制所述虚拟车辆进入所述漂移状态;其中,所述第二刹车控件是不同于所述第一刹车控件的另一个控件。
在示例性实施例中,如图17所示,所述装置1600,还包括:车辆减速模块1690。
所述车辆减速模块1690,用于响应于针对所述第二刹车控件的操作,控制所述虚拟车辆减速移动,直至速度为零。
在示例性实施例中,所述车辆加速模块1650,还用于响应于针对所述油门控件的点击操作,控制所述虚拟车辆加速移动。
在示例性实施例中,所述车辆减速模块1690,还用于响应于针对所述第一刹车控件的操作,控制所述虚拟车辆减速移动。
在示例性实施例中,所述车辆减速模块1690,还用于:
响应于针对所述第一刹车控件的点击操作,控制所述虚拟车辆减速移动,直至速度为零;
或者,
响应于针对所述第一刹车控件的持续按压操作,控制所述虚拟车辆减速移动;在所述虚拟车辆的速度减少至零,且所述持续按压操作未消失的情况下,控制所述虚拟车辆倒车。
综上所述,本申请实施例提供的技术方案中,通过第一刹车控件控制虚拟车辆的漂移角减小,在虚拟车辆的漂移角减小至小于阈值的情况下,即控制虚拟车辆退出漂移状态,实现从漂移状态退出的自动化,不需要用户通过方向调整控件频繁调整虚拟车辆的移动方向或车头朝向,简化用户操作;通过油门控件加快虚拟车辆的漂移角的减小速度,加快虚拟车辆退出漂移状态,提高虚拟车辆的退漂效率,而且,通过油门控件控制虚拟车辆加速,提供了一种漂移加速的移动方式,使得虚拟车辆的移动方式更加丰富。
需要说明的是,上述实施例提供的装置,在实现其功能时,仅以上述各功能模块的划分进行举例说明,实际应用中,可以根据需要而将上述功能分配由不同的功能模块完成,即将设备的内部结构划分成不同的功能模块,以完成以上描述的全部或者部分功能。另外,上述实施例提供的装置与方法实施例属于同一构思,其具体实现过程详见方法实施例,这里不再赘述。
请参考图18,其示出了本申请一个实施例提供的终端设备1800。该终端设备1800可以为诸如手机、平板电脑、游戏主机、电子书阅读器、多媒体播放设备、可穿戴设备、PC等等。该终端设备1800用于实现上述虚拟车辆的控制方法的功能。具体来讲:
通常,终端设备1800包括有:处理器1801和存储器1802。
处理器1801可以包括一个或多个处理核心,比如4核心处理器、8核心处理器等。处理器1801可以采用DSP(Digital Signal Processing,数字信号处理)、FPGA(Field Programmable Gate Array,现场可编程门阵列)、PLA(Programmable Logic Array,可编程逻辑阵列)中的至少一种硬件形式来实现。处理器1801也可以包括主处理器和协处理器,主处理器是用于对在唤醒状态下的数据进行处理的处理器,也称CPU(Central Processing Unit,中央处理器);协处理器是用于对在待机状态下的数据进行处理的低功耗处理器。在一些实施例中,处理器1801可以在集成有GPU(Graphics Processing Unit,图像处理器),GPU用于负责显示屏所需要显示的内容的渲染和绘制。一些实施例中,处理器1801还可以包括AI(Artificial Intelligence,人工智能)处理器,该AI处理器用于处理有关机器学习的计算操作。
存储器1802可以包括一个或多个计算机可读存储介质,该计算机可读存储介质可以是非暂态的。存储器1802还可包括高速随机存取存储器,以及非易失性存储器,比如一个或多个磁盘存储设备、闪存存储设备。在一些实施例中,存储器1802中的非暂态的计算机可读存储介质用于存储至少一个指令,至少一段程序、代码集或指令集,所述至少一条指令、至少一段程序、代码集或指令集,且经配置以由一个或者一个以上处理器执行,以实现上述界面显示方法。
在一些实施例中,终端设备1800还可选包括有:外围设备接口1803和至少一个外围设备。处理器1801、存储器1802和外围设备接口1803之间可以通过总线或信号线相连。各个外围设备可以通过总线、信号线或电路板与外围设备接口1803相连。具体地,外围设备包括:射频电路1804、显示屏1805、摄像头组件1806、音频电路1807和电源1808中的至少一种。
本领域技术人员可以理解,图18中示出的结构并不构成对终端设备1800的限定,可以包括比图示更多或更少的组件,或者组合某些组件,或者采用不同的组件布置。
在示例性实施例中,还提供了一种计算机可读存储介质,所述存储介质中存储有计算机程序,所述计算机程序在被处理器执行时以实现上述虚拟车辆的控制方法。
在一些实施例中,该计算机可读存储介质可以包括:ROM(Read Only Memory,只读存储器)、RAM(Random Access Memory,随机存取记忆体)、SSD(Solid State Drives,固态硬盘)或光盘等。其中,随机存取记忆体可以包括ReRAM(Resistance Random Access Memory,电阻式随机存取记忆体)和DRAM(Dynamic Random Access Memory,动态随机存取存储器)。
在示例性实施例中,还提供了一种计算机程序产品,该计算机程序产品包括计算机指令,该计算机指令存储在计算机可读存储介质中。终端设备的处理器从计算机可读存储介质读取该计算机指令,处理器执行该计算机指令,使得该终端设备执行上述虚拟车辆的控制方法。
应当理解的是,在本文中提及的“多个”是指两个或两个以上。“和/或”,描述关联对象的关联关系,表示可以存在三种关系,例如,A和/或B,可以表示:单独存在A,同时存在A和B,单独存在B这三种情况。字符“/”一般表示前后关联对象是一种“或”的关系。另外,本文中描述的步骤编号,仅示例性示出了步骤间的一种可能的执行先后顺序,在一些其它实施例中,上述步骤也可以不按照编号顺序来执行,如两个不同编号的步骤同时执行,或者两个不同编号的步骤按照与图示相反的顺序执行,本申请实施例对此不作限定。
以上所述仅为本申请的示例性实施例,并不用以限制本申请,凡在本申请的精神和原则之内,所作的任何修改、等同替换、改进等,均应包含在本申请的保护范围之内。

Claims (20)

  1. 一种虚拟车辆的控制方法,所述方法由终端设备执行,所述方法包括:
    显示处于漂移状态的虚拟车辆;其中,所述漂移状态是所述虚拟车辆的漂移角大于第一阈值的状态,所述漂移角是所述虚拟车辆的移动方向与所述虚拟车辆的车头朝向之间的夹角;
    响应于针对第一刹车控件的操作,控制所述虚拟车辆的漂移角逐渐减小;
    响应于针对油门控件的第一操作,控制所述虚拟车辆加速移动,以及加快所述虚拟车辆的漂移角的减小速度;
    在所述虚拟车辆的漂移角小于所述第一阈值的情况下,控制所述虚拟车辆退出所述漂移状态。
  2. 根据权利要求1所述的方法,其中,所述加快所述虚拟车辆的漂移角的减小速度,包括:
    增加所述虚拟车辆的抓地力,所述抓地力与所述漂移角的减小速度呈正相关关系。
  3. 根据权利要求1所述的方法,其中,所述控制所述虚拟车辆加速移动,包括:
    在所述虚拟车辆的第一基础加速度上叠加额外的第一加速度,得到所述虚拟车辆的第一目标加速度;
    基于所述第一目标加速度控制所述虚拟车辆加速移动。
  4. 根据权利要求1所述的方法,其中,所述控制所述虚拟车辆的漂移角逐渐减小,包括:
    获取所述虚拟车辆在下一时间戳的目标车头朝向,相邻两个时间戳之间的时间间隔为单位时间;
    根据所述目标车头朝向,确定所述虚拟车辆在所述下一时间戳的目标移动方向;其中,所述目标移动方向与所述目标车头朝向之间的夹角,小于当前时间戳的移动方向与车头朝向之间的夹角;
    控制所述虚拟车辆在所述下一时间戳根据所述目标移动方向进行移动。
  5. 根据权利要求4所述的方法,其中,所述根据所述目标车头朝向,确定所述虚拟车辆在所述下一时间戳的目标移动方向,包括:
    根据所述虚拟车辆在当前时间戳的抓地力和移动方向,以及所述目标车头朝向,确定所述移动方向的角度变化量;其中,所述抓地力与单位时间内所述移动方向的角度变化量呈正相关关系;
    根据所述当前时间戳的移动方向和所述移动方向的角度变化量,确定所述虚拟车辆在所述下一时间戳的目标移动方向。
  6. 根据权利要求1所述的方法,其中,所述控制所述虚拟车辆退出所述漂移状态之后,还包括:
    在所述漂移状态的退出时刻起的第一时长内,控制所述虚拟车辆加速移动。
  7. 根据权利要求6所述的方法,其中,所述在所述漂移状态的退出时刻起的第一时长内,控制所述虚拟车辆加速移动,包括:
    在所述虚拟车辆的第一基础加速度的基础上叠加额外的第二加速度,得到所述虚拟车辆的第二目标加速度;
    在所述漂移状态的退出时刻起的第一时长内,基于所述第二目标加速度控制所述虚拟车辆加速移动。
  8. 根据权利要求1所述的方法,其中,所述控制所述虚拟车辆退出所述漂移状态之后,还包括:
    在检测到针对所述油门控件的第二操作的情况下,在所述第二操作的持续时段内控制所述虚拟车辆加速移动;
    从所述漂移状态的退出时刻起,若所述第二操作的持续时长达到最大响应值,则显示用于指示油门全开技巧被触发的提示信息。
  9. 根据权利要求1所述的方法,其中,所述方法还包括:
    响应于针对所述油门控件的所述第一操作,在所述虚拟车辆的漂移角小于第二阈值的情况下,执行所述控制所述虚拟车辆加速移动,以及加快所述虚拟车辆的漂移角的减小速度的步骤;
    显示用于指示弹射出弯技巧被触发的提示信息。
  10. 根据权利要求1所述的方法,其中,所述方法还包括:
    响应于针对所述油门控件的所述第一操作,在所述虚拟车辆的漂移角大于第三阈值的情况下,确定所述虚拟车辆处于失控状态;其中,在所述失控状态下,所述虚拟车辆的抓地力趋近于零,且所述虚拟车辆的移动方向无法调整;
    控制所述虚拟车辆从所述失控状态切换至恢复抓地状态。
  11. 根据权利要求10所述的方法,其中,所述控制所述虚拟车辆从所述失控状态切换至恢复抓地状态,包括:
    控制所述虚拟车辆的抓地力增加,以控制所述虚拟车辆退出所述失控状态;
    显示用于指示恢复抓地技巧被触发的提示信息。
  12. 根据权利要求1所述的方法,其中,所述方法还包括:
    响应于针对所述油门控件的所述第一操作,在所述虚拟车辆的漂移角大于第二阈值且小于第三阈值的情况下,控制所述虚拟车辆的漂移角继续逐渐减小,以及基于所述虚拟车辆的第一基础加速度控制所述虚拟车辆加速移动。
  13. 根据权利要求1至12任一项所述的方法,其中,所述方法还包括:
    在检测到方向调整控件和第二刹车控件均处于被触发状态的情况下,控制所述虚拟车辆进入所述漂移状态;
    其中,所述第二刹车控件是不同于所述第一刹车控件的另一个控件。
  14. 根据权利要求13所述的方法,其中,所述控制所述虚拟车辆进入所述漂移状态之后,还包括:
    响应于针对所述第二刹车控件的操作,控制所述虚拟车辆减速移动,直至速度为零。
  15. 根据权利要求1至12任一项所述的方法,其中,所述方法还包括:
    响应于针对所述油门控件的点击操作,控制所述虚拟车辆加速移动;
    响应于针对所述第一刹车控件的操作,控制所述虚拟车辆减速移动。
  16. 根据权利要求15所述的方法,其中,所述响应于针对所述第一刹车控件的操作,控制所述虚拟车辆减速移动,包括:
    响应于针对所述第一刹车控件的点击操作,控制所述虚拟车辆减速移动,直至速度为零;
    或者,
    响应于针对所述第一刹车控件的持续按压操作,控制所述虚拟车辆减速移动;在所述虚拟车辆的速度减少至零,且所述持续按压操作未消失的情况下,控制所述虚拟车辆倒车。
  17. 一种虚拟车辆的控制装置,所述装置包括:
    车辆漂移模块,用于显示处于漂移状态的虚拟车辆;其中,所述漂移状态是所述虚拟车辆的漂移角大于第一阈值的状态,所述漂移角是所述虚拟车辆的移动方向与所述虚拟车辆的车头朝向之间的夹角;
    车辆控制模块,用于响应于针对第一刹车控件的操作,控制所述虚拟车辆的漂移角逐渐减小;
    加速退漂模块,用于响应于针对油门控件的第一操作,控制所述虚拟车辆加速移动,以及加快所述虚拟车辆的漂移角的减小速度;
    车辆退漂模块,用于在所述虚拟车辆的漂移角小于所述第一阈值的情况下,控制所述虚拟车辆退出所述漂移状态。
  18. 一种终端设备,所述终端设备包括处理器和存储器,所述存储器中存储有计算机程序, 所述计算机程序由所述处理器加载并执行以实现如权利要求1至16任一项所述的虚拟车辆的控制方法。
  19. 一种计算机可读存储介质,所述可读存储介质中存储有计算机程序,所述计算机程序由处理器加载并执行以实现如权利要求1至16任一项所述的虚拟车辆的控制方法。
  20. 一种计算机程序产品,所述计算机程序产品包括计算机程序,所述计算机程序存储在计算机可读存储介质中,终端设备的处理器从所述计算机可读存储介质读取并执行所述计算机程序,使得所述终端设备执行如权利要求1至16任一项所述的虚拟车辆的控制方法。
PCT/CN2023/087825 2022-05-20 2023-04-12 虚拟车辆的控制方法、装置、设备及存储介质 WO2023221695A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202210555884.1 2022-05-20
CN202210555884.1A CN117122908A (zh) 2022-05-20 2022-05-20 虚拟车辆的控制方法、装置、设备及存储介质

Publications (1)

Publication Number Publication Date
WO2023221695A1 true WO2023221695A1 (zh) 2023-11-23

Family

ID=88834598

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2023/087825 WO2023221695A1 (zh) 2022-05-20 2023-04-12 虚拟车辆的控制方法、装置、设备及存储介质

Country Status (2)

Country Link
CN (1) CN117122908A (zh)
WO (1) WO2023221695A1 (zh)

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9687741B1 (en) * 2015-03-10 2017-06-27 Kabam, Inc. System and method for providing separate drift and steering controls
CN108939546A (zh) * 2018-05-21 2018-12-07 网易(杭州)网络有限公司 虚拟对象的漂移控制方法及装置、电子设备、存储介质
CN109513210A (zh) * 2018-11-28 2019-03-26 腾讯科技(深圳)有限公司 虚拟世界中的虚拟车辆漂移方法、装置及存储介质
CN110126831A (zh) * 2019-03-21 2019-08-16 纳恩博(北京)科技有限公司 一种车辆漂移的控制方法、控制系统和车辆

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9687741B1 (en) * 2015-03-10 2017-06-27 Kabam, Inc. System and method for providing separate drift and steering controls
CN108939546A (zh) * 2018-05-21 2018-12-07 网易(杭州)网络有限公司 虚拟对象的漂移控制方法及装置、电子设备、存储介质
CN109513210A (zh) * 2018-11-28 2019-03-26 腾讯科技(深圳)有限公司 虚拟世界中的虚拟车辆漂移方法、装置及存储介质
CN112755531A (zh) * 2018-11-28 2021-05-07 腾讯科技(深圳)有限公司 虚拟世界中的虚拟车辆漂移方法、装置及存储介质
CN110126831A (zh) * 2019-03-21 2019-08-16 纳恩博(北京)科技有限公司 一种车辆漂移的控制方法、控制系统和车辆

Also Published As

Publication number Publication date
CN117122908A (zh) 2023-11-28

Similar Documents

Publication Publication Date Title
WO2021036581A1 (zh) 虚拟对象的控制方法和相关装置
CN109011559B (zh) 游戏中虚拟载具的控制方法、装置、设备和存储介质
US10990274B2 (en) Information processing program, information processing method, and information processing device
JP6005831B1 (ja) プログラム及び情報処理方法
CN110559658B (zh) 信息交互方法、装置、终端以及存储介质
WO2020199820A1 (zh) 对象控制方法和装置、存储介质及电子装置
US20130217498A1 (en) Game controlling method for use in touch panel medium and game medium
WO2021043110A1 (zh) 虚拟对象的移动控制方法、装置、终端及存储介质
WO2022213521A1 (zh) 游戏中控制虚拟对象移动的方法、装置、电子设备及存储介质
WO2021218460A1 (zh) 虚拟对象的控制方法、装置、终端及存储介质
CN113398590B (zh) 声音处理方法、装置、计算机设备及存储介质
EP3950080A1 (en) Method and apparatus for selecting virtual object, and device and storage medium
JP2017119080A (ja) プログラム及び情報処理方法
WO2023221695A1 (zh) 虚拟车辆的控制方法、装置、设备及存储介质
WO2024007675A1 (zh) 虚拟对象的切换方法、装置、存储介质及电子装置
CN112169338A (zh) 球体运动的控制方法、装置、存储介质及计算机设备
WO2023246166A1 (zh) 一种视频进度的调节方法、装置、计算机设备及存储介质
WO2023216781A1 (zh) 虚拟角色的控制方法、装置、设备及存储介质
WO2023221688A1 (zh) 虚拟车辆的控制方法、装置、终端设备及存储介质
WO2023221879A1 (zh) 虚拟车辆的控制方法、装置、设备及计算机可读存储介质
CN115999153A (zh) 虚拟角色的控制方法、装置、存储介质及终端设备
KR20190059727A (ko) 가상현실 환경에서의 복합된 객체의 상호작용 제어 시스템
WO2023221707A1 (zh) 虚拟车辆的控制方法、装置、设备及存储介质
WO2023221689A1 (zh) 虚拟车辆的控制方法、装置、设备及介质
US11826644B2 (en) Bifurcation of gameplay between mobile and non-mobile play with intelligent game state saving, and startups

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 23806651

Country of ref document: EP

Kind code of ref document: A1