Virtual motorcycle drift control method and device, electronic equipment and storage medium

By analyzing the combination of throttle and direction commands of a virtual motorcycle, the drift control mode is determined, and the motion parameters of the virtual motorcycle are dynamically adjusted. This solves the problems of kinetic energy loss and handling experience when the motorcycle is drifting at high speed, achieving a balance between speed and handling and meeting diverse driving needs.

CN121648567APending Publication Date: 2026-03-13GUANGZHOU KULUO SHUJIE TECH CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-12-22
Publication Date
2026-03-13

AI Technical Summary

Technical Problem

Existing motorcycle drift control systems suffer from problems such as high energy loss, sluggish steering response, and disjointed handling experience during high-speed drifting, making it difficult to meet the driving needs of different scenarios.

Method used

By acquiring the speed and input commands of the virtual motorcycle, analyzing the combination of throttle and direction commands, determining the drift control mode, including straight-line emergency stop, high-speed steering, and inertial tail-swing mode, and dynamically adjusting the motion parameters of the virtual motorcycle.

Benefits of technology

It achieves a dynamic balance between speed performance and handling feedback, meeting the driving needs of different players and improving the smoothness and richness of game operation.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121648567A_ABST
    Figure CN121648567A_ABST
Patent Text Reader

Abstract

The embodiment of the invention provides a virtual motorcycle drift control method and device, electronic equipment and a storage medium, and belongs to the technical field of games. The method comprises the steps that the current running speed of a virtual motorcycle and an input instruction for the virtual motorcycle are acquired; determining a drift control mode of the virtual motorcycle according to a combined state of an accelerator instruction and a direction instruction in the input instruction in response to the situation that the input instruction comprises a drift trigger signal; and controlling the virtual motorcycle to execute drift motion according to the drift control mode. According to the embodiment of the invention, the drifting mechanism of the motorcycle carrier can maintain the speed performance, and the control feedback conforming to the physical expectation can be reserved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of game technology, and in particular to a virtual motorcycle drift control method, device, electronic device and storage medium. Background Technology

[0002] In existing open-world games, racing games, and virtual simulation applications, motorcycles are highly favored due to their unique maneuverability. Although current motorcycles generally have drift control functions, their technical implementation still has significant shortcomings: On the one hand, limited by the rigid body dynamics simulation of the physics engine, vehicles often experience severe kinetic energy loss during high-speed drifts, and due to inertia, their steering response is relatively sluggish, the steering action is heavy, and the cornering radius is too large. On the other hand, this single physical feedback mechanism creates a fragmented user experience. While some players enjoy the thrill of drifting, the resulting speed penalty often prevents or discourages some players from utilizing the drift mechanism when operating motorcycles.

[0003] Therefore, optimizing the drift mechanism of motorcycle-type vehicles to maintain speed performance at high speeds while retaining control feedback that conforms to physical expectations, thereby meeting driving needs in different scenarios, has become an urgent technical problem to be solved. Summary of the Invention

[0004] The main objective of this application is to propose a virtual motorcycle drift control method, device, electronic device, and storage medium, which aims to enable the drift mechanism of motorcycle vehicles to maintain speed performance while retaining the control feedback that conforms to physical expectations.

[0005] To achieve the above objectives, a first aspect of this application proposes a virtual motorcycle drift control method, the method comprising: Obtain the current speed of the virtual motorcycle and the input commands for the virtual motorcycle; In response to the input command including a drift trigger signal, the drift control mode of the virtual motorcycle is determined according to the combination state of the throttle command and the direction command in the input command; The virtual motorcycle is controlled to perform drifting motions according to the drift control mode.

[0006] In some embodiments, the response to the input command includes a drift trigger signal, and determining the drift control mode of the virtual motorcycle based on the combination of the throttle command and the direction command in the input command includes: In response to the input command including the throttle command but not the direction command, the drift control mode of the virtual motorcycle is determined to be a straight-line emergency stop mode; In response to the input command including the throttle command and the direction command, the drift control mode of the virtual motorcycle is determined to be a high-speed steering mode; In response to the input command not containing the throttle command but containing the direction command, the drift control mode of the virtual motorcycle is determined to be the inertial tail-slide mode.

[0007] In some embodiments, determining that the drift control mode of the virtual motorcycle is a straight-line emergency stop mode in response to the input command including the throttle command but not the direction command includes: In response to the drift control mode being a straight-line emergency stop mode, the inertial motion direction of the virtual motorcycle is obtained; The virtual motorcycle is controlled based on its inertial motion direction, and its speed is adjusted according to a preset deceleration friction coefficient until the speed drops to zero.

[0008] In some embodiments, determining that the drift control mode of the virtual motorcycle is a high-speed steering mode in response to the input command including the throttle command and the direction command includes: In response to the drift control mode being a high-speed steering mode, the steering angular velocity of the virtual motorcycle is adjusted to a pre-configured steering speed threshold. The speed of the virtual motorcycle is adjusted based on a preset steering friction coefficient so that the speed of the virtual motorcycle during drifting is maintained within a preset speed range. Based on the directional command, the motion trajectory of the virtual motorcycle is fitted into a circular motion.

[0009] In some embodiments, determining the drift control mode of the virtual motorcycle as an inertial drift mode in response to the input command not including the throttle command but including the direction command includes: In response to the drift control mode being inertial tail-swing mode, the inertial motion direction of the virtual motorcycle is obtained; The virtual motorcycle is controlled based on its inertial motion direction, and its speed is adjusted according to a preset deceleration friction coefficient. Based on the directional commands, the movement trajectory of the virtual motorcycle is controlled.

[0010] In some embodiments, the throttle command and the direction command are continuously detected within a preset time window after the drift trigger signal is received; In response to detecting the directional command within the preset time window, the drift control mode is adjusted from the straight-line emergency stop mode to the high-speed steering mode; In response to detecting the throttle command within the preset time window, the drift control mode is adjusted from the inertial drift mode to the high-speed steering mode.

[0011] In some embodiments, acceleration resource values ​​are accumulated based on the duration or drift angle of the virtual motorcycle maintaining a drift state. In response to the input command after the drift operation ends, the acceleration resource value is detected; In response to the acceleration resource value meeting a preset resource threshold, the acceleration resource value is consumed to control the virtual motorcycle to perform an acceleration operation.

[0012] To achieve the above objectives, a second aspect of this application provides a virtual motorcycle drift control device, the device comprising: The instruction acquisition module is used to acquire the current driving speed of the virtual motorcycle and the input instructions for the virtual motorcycle. A drift control module is used to respond to the input command containing a drift trigger signal and determine the drift control mode of the virtual motorcycle based on the combination state of the throttle command and the direction command in the input command; A drift execution module is used to control the virtual motorcycle to perform drifting motions according to the drift control mode.

[0013] To achieve the above objectives, a third aspect of this application provides an electronic device, which includes a memory and a processor. The memory stores a computer program, and the processor executes the computer program to implement the virtual motorcycle drift control method described in the first aspect.

[0014] To achieve the above objectives, a fourth aspect of the present application provides a computer-readable storage medium storing a computer program that, when executed by a processor, implements the virtual motorcycle drift control method described in the first aspect.

[0015] The virtual motorcycle drift control method, device, electronic device, and storage medium proposed in this application acquire the current driving speed of the virtual motorcycle and the input command for the virtual motorcycle. Responding to the input command including a drift trigger signal, the application determines the drift control mode of the virtual motorcycle based on the combination of throttle and direction commands in the input command, and controls the virtual motorcycle to perform drifting motion according to the drift control mode. Therefore, this application, by analyzing the combination of throttle and direction commands in the input command when the drift trigger signal is triggered, enters different drift control modes, thereby determining whether the player's current driving intention is to maintain kinetic energy for high-speed cornering or to use friction for sudden stops and tail-swings. This dynamically adjusts the motion parameters of the virtual motorcycle, achieving a dynamic balance between speed performance and handling feel, satisfying the gaming needs of different players. Attached Figure Description

[0016] Figure 1 This is a flowchart illustrating the virtual motorcycle drift control method provided in an embodiment of this application; Figure 2 yes Figure 1 A flowchart illustrating step S102 in the process; Figure 3 yes Figure 2 A flowchart illustrating step S201 in the process; Figure 4 yes Figure 2 A flowchart illustrating step S202 in the process; Figure 5 yes Figure 2 A flowchart illustrating step S203 in the process; Figure 6 yes Figure 1 A flowchart illustrating step S102 in the process; Figure 7 This is another flowchart illustrating the virtual motorcycle drift control method provided in this application embodiment; Figure 8 This is a schematic diagram of the structure of the virtual motorcycle drift control device provided in the embodiments of this application; Figure 9 This is a schematic diagram of the hardware structure of the electronic device provided in the embodiments of this application. Detailed Implementation

[0017] To make the objectives, technical solutions, and advantages of this application clearer, the following detailed description is provided in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the scope of this application.

[0018] It should be noted that although functional modules are divided in the device schematic diagram and a logical order is shown in the flowchart, in some cases, the steps shown or described may be performed in a different order than the module division in the device or the order in the flowchart. The terms "first," "second," etc., in the specification, claims, and the aforementioned drawings are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence.

[0019] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this application belongs. The terminology used herein is for the purpose of describing embodiments of this application only and is not intended to limit this application.

[0020] This application provides a virtual motorcycle drift control method, device, electronic device, and storage medium, which aims to enable the drift mechanism of motorcycle vehicles to maintain speed performance while retaining the control feedback that conforms to physical expectations.

[0021] The virtual motorcycle drift control method, device, electronic device, and storage medium provided in this application are specifically described through the following embodiments. First, the virtual motorcycle drift control method in this application embodiment is described.

[0022] The virtual motorcycle drift control method provided in this application relates to the field of game technology. This virtual motorcycle drift control method can be applied to a terminal, a server, or software running on either a terminal or a server. In some embodiments, the terminal can be a smartphone, tablet, laptop, desktop computer, etc.; the server can be configured as an independent physical server, a server cluster or distributed system composed of multiple physical servers, or a cloud server providing basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communication, middleware services, domain name services, security services, CDN, and big data and artificial intelligence platforms; the software can be an application implementing the virtual motorcycle drift control method, but is not limited to the above forms.

[0023] This application can be used in a wide variety of general-purpose or special-purpose computer system environments or configurations. Examples include: personal computers, server computers, handheld or portable devices, tablet devices, multiprocessor systems, microprocessor-based systems, set-top boxes, programmable consumer electronics, network PCs, minicomputers, mainframe computers, and distributed computing environments including any of the above systems or devices. This application can be described in the general context of computer-executable instructions executed by a computer, such as program modules. Generally, program modules include routines, programs, objects, components, data structures, etc., that perform specific tasks or implement specific abstract data types. This application can also be practiced in distributed computing environments where tasks are performed by remote processing devices connected via a communication network. In distributed computing environments, program modules can reside in local and remote computer storage media, including storage devices.

[0024] Figure 1 This is an optional flowchart illustrating the virtual motorcycle drift control method provided in this application embodiment. Figure 1 The method may include, but is not limited to, steps S101 to S103.

[0025] Step S101: Obtain the current speed of the virtual motorcycle and the input commands for the virtual motorcycle; Step S102: In response to the input command containing a drift trigger signal, determine the drift control mode of the virtual motorcycle based on the combination state of the throttle command and the direction command in the input command; Step S103: Control the virtual motorcycle to perform drifting motion according to the drift control mode.

[0026] Steps S101 to S103 of this embodiment involve acquiring the current speed of the virtual motorcycle and the input command for the virtual motorcycle. Responding to the input command including a drift trigger signal, the drift control mode of the virtual motorcycle is determined based on the combination of throttle and direction commands in the input command. The virtual motorcycle is then controlled to perform drifting motion according to the drift control mode. Therefore, this application, by analyzing the combination of throttle and direction commands in the input command when the drift trigger signal is triggered, enters different drift control modes. This determines whether the player's current driving intention is to maintain kinetic energy for high-speed cornering or to use friction for sudden stops and tail-swings. The motion parameters of the virtual motorcycle are then dynamically adjusted, achieving a dynamic balance between speed performance and handling feel, thus satisfying the gaming needs of different players.

[0027] In step S101 of some embodiments, the electronic device monitors data in the game environment in real time. First, it extracts the current state data of the virtual motorcycle from the physics engine, including the magnitude vector of the speed and the direction vector.

[0028] Simultaneously, the system scans the user's input interfaces, such as button input signals from a gamepad or a mobile phone touchscreen, to obtain input commands for the virtual motorcycle. These input commands include not only single button signals, such as throttle, brake, or steering signals, but also signals from multiple concurrent buttons. Input devices can be physical gamepads, keyboards, mice, or virtual joysticks and buttons on a touchscreen.

[0029] In step S102 of some embodiments, when a preset drift trigger signal is detected in the input command, such as when the player presses a specific drift function key, other input commands that coexist with the drift trigger signal can be further analyzed, especially the combination of throttle command and direction command.

[0030] If the system detects that the player is pressing the drift button while simultaneously holding down the accelerator button and inputting a left or right directional command, the player's current intention can be interpreted as a fast cornering maneuver. If the system detects that the player is holding down the accelerator button but not inputting any directional input, or has released the accelerator button, the player's intention can be interpreted as braking or adjusting posture. Through this mapping of combined states, various driving needs can be distinguished without the need for additional function keys.

[0031] Please see Figure 2 In some embodiments, step S102 may include, but is not limited to, steps S201 to S203: Step S201: In response to the input command containing a throttle command but not a direction command, determine that the drift control mode of the virtual motorcycle is a straight-line emergency stop mode. Step S202: In response to the input command containing both throttle and direction commands, determine that the drift control mode of the virtual motorcycle is high-speed steering mode. In step S203, in response to the input command not containing a throttle command but containing a direction command, the drift control mode of the virtual motorcycle is determined to be the inertial tail-sliding mode.

[0032] In step S201 of some embodiments, when it is detected that the player has pressed the throttle button or pulled the accelerator trigger, but no valid left or right directional input command is detected at the same time, the player's current driving intention can be determined as straight-line braking. In this case, the virtual motorcycle's drift control mode will be adjusted to a straight-line emergency stop mode. In the straight-line emergency stop mode, it is assumed that the player does not intend to drift, and the throttle command was triggered simply because the player forgot to release the throttle or habitually pressed it. Physical logic similar to a strong handbrake can be invoked to apply reverse resistance to the virtual motorcycle, causing it to rapidly reduce speed while maintaining a straight trajectory. This is suitable for scenarios where emergency stopping or avoiding obstacles is required while driving at high speed.

[0033] In step S202 of some embodiments, when the input command is detected to contain both throttle and direction commands, it is determined that the player's intention is to change the course while maintaining kinetic energy. At this time, the drift control mode of the virtual motorcycle can be determined as high-speed steering mode. High-speed steering mode corresponds to a mechanical, arcade-style control scheme, which can adjust the physical parameters of the virtual motorcycle to achieve extremely high steering angular velocity while significantly reducing friction loss caused by tire sideslip. This allows the virtual motorcycle to complete fast cornering in a way that defies conventional physical inertia without significantly losing speed, meeting the player's need for smoothness in racing or pursuit gameplay.

[0034] In step S203 of some embodiments, when the input command does not contain a throttle command but does contain a direction command, this can be determined as an operation using inertia to adjust the attitude. At this time, the drift control mode of the virtual motorcycle can be determined as an inertial drift mode. In inertial drift mode, the tire grip characteristics in a real physical environment can be simulated, allowing the rear of the motorcycle to swing outwards from the corner under inertia, while applying a deceleration effect that conforms to the laws of physics. This enables small-radius sharp turns or U-turns, although accompanied by speed loss, it provides players with a more realistic handling feel and stronger grip feedback, suitable for scenarios requiring precise passage through complex terrain or showcasing driving skills.

[0035] Through steps S201 to S203, a multimodal drift response mechanism is constructed by logically combining the signals from the two basic dimensions of throttle and steering commands. This allows players to switch freely between two distinct physical feedbacks—high-speed cornering and precise drifting—simply by intuitively pressing and releasing the accelerator, without needing to learn complex key combinations or switch to additional driving modes. This significantly improves the game's operational tolerance and the richness of the driving experience.

[0036] Please see Figure 3In some embodiments, step S201 may include, but is not limited to, steps S301 to S302: Step S301: In response to the drift control mode being a straight-line emergency stop mode, the inertial motion direction of the virtual motorcycle is obtained; Step S302: Control the virtual motorcycle's inertial motion direction and adjust its speed according to a preset deceleration friction coefficient until the speed drops to zero.

[0037] In step S301 of some embodiments, when it is confirmed that the current drift control mode is a straight-line emergency stop mode, the physics engine will immediately lock the momentum state of the virtual motorcycle at the current moment, and then read and obtain the current inertial motion direction of the vehicle's center of gravity.

[0038] During this process, to ensure stability during emergency stops, the front of the vehicle can be forcibly aligned with the direction of inertial motion, or the rotational freedom of the vehicle body around the vertical axis can be restricted. This approach prevents uncontrollable skidding or fishtailing of the vehicle body due to slight directional input during high-speed braking, ensuring the linearity and predictability of the braking trajectory.

[0039] In step S302 of some embodiments, a resistance vector opposite to the direction of motion is applied to the virtual motorcycle based on the determined direction of inertial motion. The magnitude of this resistance vector depends on a preset deceleration friction coefficient, which is typically configured to be significantly higher than the friction force of normal road surfaces to simulate the physical feedback when tires lock up or a strong handbrake is engaged. Then, in each frame of the physical simulation update, the current speed of the virtual motorcycle is continuously calculated to decrease using this deceleration friction coefficient. The deceleration process continues, ignoring acceleration requests from the throttle button, until the speed is detected to have dropped to zero, completely stopping the vehicle's movement and achieving an emergency stop.

[0040] Through steps S301 to S302, a stable and efficient emergency braking mechanism is simulated in the virtual environment. When players encounter cliffs, dead ends, or scenarios requiring precise parking, they do not need to control the vehicle's posture through complex operation combinations. They only need to trigger the straight-line emergency stop mode to obtain the system-assisted straight-line braking effect, which greatly reduces the difficulty of operation in high-pressure scenarios and improves the sense of security and control precision during the driving process.

[0041] Please see Figure 4 In some embodiments, step S202 may include, but is not limited to, steps S401 to S403: Step S401: In response to the drift control mode being high-speed steering mode, the steering angular velocity of the virtual motorcycle is adjusted to a pre-configured steering speed threshold. Step S402: Adjust the speed of the virtual motorcycle based on the preset steering friction coefficient so that the speed of the virtual motorcycle during drifting is maintained within the preset speed range. Step S403: Based on the direction command, control the motion trajectory of the virtual motorcycle to fit a circular motion.

[0042] In step S401 of some embodiments, when the drift control mode is determined to be a high-speed steering mode, the system immediately intervenes and takes over the virtual motorcycle's attitude control logic. At this time, the steering angular velocity of the virtual motorcycle rotating around the vertical axis can be directly adjusted to a pre-configured steering speed threshold. The steering speed threshold is usually set to a high value to break the limitation in conventional physics simulations that the faster the speed, the slower the steering. Through this forced assignment, it can be ensured that the vehicle can respond to the player's operation even at extremely high speeds, quickly completing the rapid deflection of the front of the vehicle, so that the vehicle body is instantly aligned with the inside of the curve.

[0043] In some embodiments, the steering angular velocity can also be calculated based on the current driving speed and mass inertia to obtain conventional physical simulation results.

[0044] In step S402 of some embodiments, to maintain the exhilarating experience of high-speed cornering, the speed calculation formula during drifting can be specially modified. A preset, low steering friction coefficient can be used to calculate ground resistance, thereby significantly reducing the speed decay effect caused by sideslip. On the other hand, visual effects can be used to supplement the sense of weight in drifting operations and enhance the player's immersion in drifting.

[0045] In some embodiments, if a tendency for the speed to drop below the lower limit is detected, a power compensation mechanism can be introduced to ensure that the virtual motorcycle's speed remains within a preset high-speed range throughout the entire drifting and cornering process, thereby achieving a driving performance that does not lose speed while drifting.

[0046] In step S403 of some embodiments, an idealized target path can be planned in real time based on the player's continuously input directional commands. An algorithm fits the actual physical displacement of the virtual motorcycle into a smooth circular motion trajectory.

[0047] In some embodiments, the lateral displacement vector of the vehicle can be dynamically corrected to keep the virtual motorcycle attached to the calculated circular track, instead of allowing it to slip uncontrollably outwards due to inertia. This fitting process transforms cornering from a chaotic process of sideslip and correction into a precise, predictable, and smooth arc motion. This provides users with predictable drifting results, allowing players seeking efficiency and speed to achieve faster steering maneuvers through high-speed steering mode.

[0048] Steps S401 to S403 completely solve the technical problems of excessively large high-speed turning radius and sluggish cornering rhythm in racing games based on realistic physics simulation. Players do not need to master complex corner entry deceleration points or throttle control techniques to easily complete sharp turns at high speeds, and the whole process is smooth and continuous, greatly reducing the operation threshold and enhancing the visual impact and flow experience during the game.

[0049] Please see Figure 5 In some embodiments, step S203 may include, but is not limited to, steps S501 to S503: Step S501: In response to the drift control mode being inertial tail-sliding mode, the inertial motion direction of the virtual motorcycle is obtained. Step S502: Control the inertial motion direction of the virtual motorcycle and adjust the speed of the virtual motorcycle according to the preset deceleration friction coefficient. Step S503: Based on directional commands, control the movement trajectory of the virtual motorcycle.

[0050] In step S501 of some embodiments, when the drift control mode is determined to be inertial drift mode, the physics engine first extracts the inertial motion direction from the current motion state of the virtual motorcycle. First, it obtains the linear velocity vector of the virtual motorcycle relative to the world coordinate system in the current frame. The linear velocity vector accurately describes the actual direction and speed of the vehicle's movement at that instant. Then, it generates the inertial motion direction based on the linear velocity vector.

[0051] To create the visual effect of a car's tail swinging, the angle between the vehicle's orientation vector and the inertial reference vector, also known as the slip angle, can be calculated in real time. In inertial drift mode, the slip angle is allowed to increase rapidly in a short period of time. By releasing the strong binding relationship between the vehicle model and the direction of movement of the physical collider, the vehicle model can rotate rapidly around the vertical axis to a large angle (e.g., 90 degrees laterally), while the physical collider continues to slide forward along the inertial direction. Through this locking of the momentum vector and dynamic amplification of the slip angle, the visual effect of a virtual motorcycle losing rear wheel traction, sliding laterally, and experiencing severe friction is presented on the screen.

[0052] In step S502 of some embodiments, to reflect the unique sense of weight and physical realism of the drift mode, a significant deceleration effect can be applied to the virtual motorcycle based on the acquired inertial motion direction. A preset deceleration friction coefficient can be used in the physical calculations. The value of the deceleration friction coefficient is usually set relatively high to simulate the huge ground resistance generated when tires lose traction and slide laterally in the real world. With each frame iteration, the speed of the virtual motorcycle will rapidly decrease according to the deceleration friction coefficient. This allows the vehicle to quickly consume kinetic energy during drifting, thereby helping the player to effectively reduce the vehicle speed after entering a corner at high speed, leaving room for subsequent precise vehicle control or avoiding running off the track.

[0053] In step S503 of some embodiments, even though the vehicle is in a decelerating and sideslipping state, the player still needs to maintain control over the vehicle's attitude. Therefore, the player's input direction commands are read in real time, and a desired steering vector is calculated based on the current deceleration state. The physics engine then weights and fuses the current inertial gliding trajectory with the desired steering vector, or directly applies a centripetal force correction pointing towards the center of the curve to the vehicle. Even if the tires are in a simulated slipping state, the virtual motorcycle's center of gravity will still respond to the player's steering intention and shift along the inside of the curve.

[0054] Through steps S501 to S503, players can use inertia to make significant adjustments to the vehicle's posture in a very short time and distance. At the same time, the strong deceleration feedback gives the driving operation a realistic sense of weight and grip, effectively solving the problem of operation errors caused by excessive vehicle speed or excessive turning radius when in narrow terrain or when precise positioning is required.

[0055] In step S103 of some embodiments, a motion parameter configuration corresponding to the determined drift control mode can be invoked to drive the virtual motorcycle. If the current mode is high-speed steering, a set of low-drag, high-steering-flexibility physical parameters can be applied to suppress the speed decay of the virtual motorcycle and correct its steering trajectory to fit circular motion, ensuring that the vehicle can pass through curves at a high speed.

[0056] If the current mode is in inertial drift or straight-line emergency stop, the system will switch to high-drag, rigid-body inertia-compliant physical parameters, applying greater lateral friction or reverse acceleration to the virtual motorcycle to create a realistic drift deceleration effect. This dynamic switching mechanism updates the virtual motorcycle's displacement and attitude in real time with each frame of rendering.

[0057] Please see Figure 6 In some embodiments, step S102 may include, but is not limited to, steps S601 to S603: Step S601: Within a preset time window after receiving the drift trigger signal, continuously detect throttle and direction commands; Step S602: In response to detecting a directional command within a preset time window, the drift control mode is adjusted from straight-line emergency stop mode to high-speed steering mode. Step S603: In response to the detection of a throttle command within a preset time window, the drift control mode is adjusted from inertial tail-sliding mode to high-speed steering mode.

[0058] In step S601 of some embodiments, an input command buffering mechanism is introduced to compensate for potential time errors during player operation. Upon first receiving a drift trigger signal, the current drift control mode is not locked; instead, a preset time window is opened. Within this brief time window, the state of the input device is continuously polled and detected at a high frequency, specifically monitoring whether throttle and direction commands have undergone state changes.

[0059] In step S602 of some embodiments, if at the initial moment of drift triggering, a straight-line emergency stop mode is initially determined due to the detection of throttle input but no directional input, but a delayed directional command is detected before the aforementioned preset time window has ended, the determination logic will immediately correct it. It can be recognized that the player's true intention is not an emergency stop, but rather an attempt to corner, only the directional key is pressed slightly later than the drift key. At this time, the straight-line emergency stop mode, which is already in or about to enter, can be dynamically adjusted to a high-speed steering mode, immediately releasing the forced braking of speed and applying steering assist parameters, thereby avoiding accidental stopping at the entrance to the curve due to millisecond-level operational errors.

[0060] In other embodiments, the preset time window is set more leniently, allowing directional commands to be received even after the straight-line emergency stop mode has been triggered and executed for a period of time. This allows the player to switch from the straight-line emergency stop mode to the high-speed steering mode midway through the drift. This enables players to switch more flexibly between various drift control modes, such as switching to high-speed steering mode halfway through a straight-line emergency stop to drift with the remaining speed. This also aligns with player intuition. For example, when an obstacle appears ahead, a player might not initially decide which direction to evade and instinctively perform an emergency stop. After a short time, the player may decide which direction to evade, and only then input directional commands.

[0061] In step S603 of some embodiments, if at the initial moment of drift triggering, a directional but no throttle input is detected, and the system is initially determined to be in an inertial drift mode, but a throttle command is subsequently detected within a preset time window, the determination logic will still perform mode correction. It can be considered that the player's throttle input is to maintain kinetic energy through the corner, rather than to utilize inertia for deceleration. Therefore, the drift control mode can be seamlessly adjusted from an inertial drift mode that emphasizes deceleration to a high-speed steering mode that emphasizes speed maintenance. This process allows the player to adjust the car's attitude before adding power, providing an operational space similar to power delivery transitions.

[0062] In other embodiments, the preset time window is set more leniently, so that even if the inertial drift mode has been triggered and executed for a period of time, the throttle command can still be received, and then the inertial drift mode can be switched to the high-speed steering mode midway.

[0063] For example, players can quickly adjust their direction using the inertial drift mode, and then switch to high-speed steering mode by triggering the throttle command to add power to the remaining short drift, so that the virtual motorcycle can quickly adjust its direction and replenish power in time for efficient turning operations.

[0064] Steps S601 to S603 significantly lower the barrier to entry for high-difficulty driving operations, effectively solving the problem of misoperation caused by button asynchrony. At the same time, it makes the switching of drift control modes more flexible. Players can switch drift control modes during a drift to achieve multiple drift operations based on their gameplay needs. This operation method is simple and in line with the player's operating intuition, reducing the difficulty of interacting with the virtual motorcycle.

[0065] Please see Figure 7 In some embodiments, the embodiments of this application may include, but are not limited to, steps S701 to S703: Step S701: Accumulate acceleration resource values ​​based on the duration or drift angle of the virtual motorcycle maintaining a drift state. Step S702: In response to the input command after the drift operation ends, the acceleration resource value is detected; Step S703: In response to the acceleration resource value meeting the preset resource threshold, the acceleration resource value is consumed to control the virtual motorcycle to perform acceleration operation.

[0066] In step S701 of some embodiments, when the virtual motorcycle is in a drifting state, the background system initiates resource calculation logic. By continuously monitoring the duration of the virtual motorcycle's drift, or by calculating in real-time the angle between the motorcycle's axis and the actual velocity vector, the system generates corresponding acceleration resource values ​​in real-time according to a preset conversion formula, based on the monitored duration or drift angle. These values ​​are then accumulated and stored in the virtual character's resource data structure, such as an energy bar or nitro boost. Generally, the longer the drift is maintained or the more the drift angle meets specific high-difficulty standards, the faster the accumulated acceleration resource values ​​increase, thus quantifying the player's skill gains.

[0067] In step S702 of some embodiments, when it is detected that the player releases the drift key or the vehicle posture returns to straight-line driving, it marks the end of a complete drift operation. At this time, if a specific input command is received, such as the player triggering a dedicated acceleration function key, the acceleration resource value currently stored in the resource data structure will be immediately read and detected, and it will be confirmed whether the acceleration resource value previously accumulated by the player is sufficient to support an effective power burst.

[0068] In step S703 of some embodiments, if the detection result indicates that the current acceleration resource value meets or exceeds a preset resource threshold, such as the charging tank being full or reaching the minimum release scale, then an acceleration command can be executed. At this time, the corresponding amount of acceleration resource value will be deducted, and simultaneously an additional instantaneous thrust or an increase in the maximum speed limit will be applied to the virtual motorcycle. This will cause the virtual motorcycle to gain significant acceleration in a short period of time, producing a visual sprint effect, thereby quickly increasing the driving speed and helping the vehicle quickly leave the curve area and return to cruising mode.

[0069] Steps S701 to S703 cleverly solve the physical problem of motorcycles inevitably losing kinetic energy when drifting through corners. By converting the speed loss during drifting into storable acceleration resources and returning them to the player when exiting the corner, it not only effectively compensates for the vehicle's average speed and ensures the smoothness of the map driving process, but also encourages players to actively use drifting skills to gain a racing advantage, thereby enhancing the strategic depth and enjoyment of the driving gameplay.

[0070] This application embodiment acquires the current speed of the virtual motorcycle and the input commands for the virtual motorcycle. Responding to the input commands including a drift trigger signal, it determines the drift control mode of the virtual motorcycle based on the combination of throttle and direction commands in the input commands, and controls the virtual motorcycle to perform drifting motion according to the drift control mode. Therefore, this application, by analyzing the combination of throttle and direction commands in the input commands when the drift trigger signal is triggered, enters different drift control modes, thereby determining whether the player's current driving intention is to maintain kinetic energy for high-speed cornering or to use friction for sudden stops and tail-swings. This dynamically adjusts the motion parameters of the virtual motorcycle, achieving a dynamic balance between speed performance and handling feel, satisfying the gaming needs of different players.

[0071] Please see Figure 8 This application also provides a virtual motorcycle drift control device, which can implement the above-mentioned virtual motorcycle drift control method. The device includes: The instruction acquisition module is used to acquire the current speed of the virtual motorcycle and the input instructions for the virtual motorcycle. The drift control module is used to respond to input commands that include drift trigger signals and determine the drift control mode of the virtual motorcycle based on the combination of throttle and direction commands in the input commands. The drift execution module is used to control the virtual motorcycle to perform drifting movements according to the drift control mode.

[0072] The specific implementation of this virtual motorcycle drift control device is basically the same as the specific implementation of the virtual motorcycle drift control method described above, and will not be repeated here.

[0073] This application also provides an electronic device, which includes a memory and a processor. The memory stores a computer program, and the processor executes the computer program to implement the above-described virtual motorcycle drift control method. This electronic device can be any smart terminal, including a tablet computer or an in-vehicle computer.

[0074] Please see Figure 9 , Figure 9 The hardware structure of an electronic device according to another embodiment is illustrated. The electronic device includes: The processor 901 can be implemented using a general-purpose CPU (Central Processing Unit), microprocessor, application-specific integrated circuit (ASIC), or one or more integrated circuits, and is used to execute relevant programs to implement the technical solutions provided in the embodiments of this application. The memory 902 can be implemented as a read-only memory (ROM), static storage device, dynamic storage device, or random access memory (RAM). The memory 902 can store the operating system and other applications. When the technical solutions provided in the embodiments of this specification are implemented through software or firmware, the relevant program code is stored in the memory 902 and called and executed by the processor 901 using the virtual motorcycle drift control method of the embodiments of this application. The input / output interface 903 is used to implement information input and output; The communication interface 904 is used to enable communication and interaction between this device and other devices. Communication can be achieved through wired means (such as USB, Ethernet cable, etc.) or wireless means (such as mobile network, WIFI, Bluetooth, etc.). Bus 905 transmits information between various components of the device (e.g., processor 901, memory 902, input / output interface 903, and communication interface 904); The processor 901, memory 902, input / output interface 903, and communication interface 904 are connected to each other within the device via bus 905.

[0075] This application also provides a computer-readable storage medium storing a computer program that, when executed by a processor, implements the above-described virtual motorcycle drift control method.

[0076] Memory, as a non-transitory computer-readable storage medium, can be used to store non-transitory software programs and non-transitory computer-executable programs. Furthermore, memory may include high-speed random access memory, and may also include non-transitory memory, such as at least one disk storage device, flash memory device, or other non-transitory solid-state storage device. In some embodiments, memory may optionally include memory remotely located relative to the processor, and these remote memories can be connected to the processor via a network. Examples of such networks include, but are not limited to, the Internet, intranets, local area networks, mobile communication networks, and combinations thereof.

[0077] The virtual motorcycle drift control method, device, electronic device, and storage medium provided in this application embodiment acquire the current driving speed of the virtual motorcycle and the input command for the virtual motorcycle. Responding to the input command including a drift trigger signal, the method determines the drift control mode of the virtual motorcycle based on the combination of throttle and direction commands in the input command, and controls the virtual motorcycle to perform drifting motion according to the drift control mode. Therefore, this application, by analyzing the combination of throttle and direction commands in the input command when the drift trigger signal is triggered, enters different drift control modes, thereby determining whether the player's current driving intention is to maintain kinetic energy for high-speed cornering or to use friction for sudden stopping and tail-swinging. This dynamically adjusts the motion parameters of the virtual motorcycle, achieving a dynamic balance between speed performance and handling feel, satisfying the gaming needs of different players.

[0078] The embodiments described in this application are for the purpose of more clearly illustrating the technical solutions of the embodiments of this application, and do not constitute a limitation on the technical solutions provided by the embodiments of this application. As those skilled in the art will know, with the evolution of technology and the emergence of new application scenarios, the technical solutions provided by the embodiments of this application are also applicable to similar technical problems.

[0079] Those skilled in the art will understand that the technical solutions shown in the figures do not constitute a limitation on the embodiments of this application, and may include more or fewer steps than shown, or combine certain steps, or different steps.

[0080] The device embodiments described above are merely illustrative. The units described as separate components may or may not be physically separate; that is, they may be located in one place or distributed across multiple network units. Some or all of the modules can be selected to achieve the purpose of this embodiment according to actual needs.

[0081] Those skilled in the art will understand that all or some of the steps in the methods disclosed above, as well as the functional modules / units in the systems and devices, can be implemented as software, firmware, hardware, or suitable combinations thereof.

[0082] The terms “first,” “second,” “third,” “fourth,” etc. (if present) in the specification and accompanying drawings of this application are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that the embodiments of this application described herein can be implemented in orders other than those illustrated or described herein. Furthermore, the terms “comprising” and “having,” and any variations thereof, are intended to cover non-exclusive inclusion; for example, a process, method, system, product, or apparatus that comprises a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to such processes, methods, products, or apparatus.

[0083] It should be understood that in this application, "at least one (item)" means one or more, and "more than" means two or more. "And / or" is used to describe the relationship between related objects, indicating that three relationships can exist. For example, "A and / or B" can represent three cases: only A exists, only B exists, and both A and B exist simultaneously, where A and B can be singular or plural. The character " / " generally indicates that the preceding and following related objects are in an "or" relationship. "At least one (item) of the following" or similar expressions refer to any combination of these items, including any combination of single or plural items. For example, at least one (item) of a, b, or c can represent: a, b, c, "a and b", "a and c", "b and c", or "a and b and c", where a, b, and c can be single or multiple.

[0084] In the several embodiments provided in this application, it should be understood that the disclosed apparatus and methods can be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative; for instance, the division of the units described above is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. The coupling or direct coupling or communication connection between the shown or discussed units may be through some interfaces, or indirect coupling or communication connection between the apparatus or units, and may be electrical, mechanical, or other forms.

[0085] The units described above as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.

[0086] Furthermore, the functional units in the various embodiments of this application can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or as a software functional unit.

[0087] If the integrated unit is implemented as a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, or all or part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes multiple instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods of the various embodiments of this application. The aforementioned storage medium includes various media capable of storing programs, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.

[0088] The preferred embodiments of the present application have been described above with reference to the accompanying drawings, but this does not limit the scope of the claims of the present application. Any modifications, equivalent substitutions, and improvements made by those skilled in the art without departing from the scope and substance of the embodiments of the present application shall be within the scope of the claims of the present application.

Claims

1. A virtual motorcycle drift control method, characterized in that, The method includes: Obtain the current speed of the virtual motorcycle and the input commands for the virtual motorcycle; In response to the input command including a drift trigger signal, the drift control mode of the virtual motorcycle is determined according to the combination state of the throttle command and the direction command in the input command; The virtual motorcycle is controlled to perform drifting motions according to the drift control mode.

2. The method according to claim 1, characterized in that, The response to the input command including a drift trigger signal, determining the drift control mode of the virtual motorcycle based on the combination of throttle and direction commands in the input command, includes: In response to the input command including the throttle command but not the direction command, the drift control mode of the virtual motorcycle is determined to be a straight-line emergency stop mode; In response to the input command including the throttle command and the direction command, the drift control mode of the virtual motorcycle is determined to be a high-speed steering mode; In response to the input command not containing the throttle command but containing the direction command, the drift control mode of the virtual motorcycle is determined to be the inertial tail-slide mode.

3. The method according to claim 2, characterized in that, The step of determining that the drift control mode of the virtual motorcycle is a straight-line emergency stop mode in response to the input command including the throttle command but not the direction command includes: In response to the drift control mode being a straight-line emergency stop mode, the inertial motion direction of the virtual motorcycle is obtained; The virtual motorcycle is controlled based on its inertial motion direction, and its speed is adjusted according to a preset deceleration friction coefficient until the speed drops to zero.

4. The method according to claim 2, characterized in that, The step of determining that the drift control mode of the virtual motorcycle is a high-speed steering mode in response to the input command including the throttle command and the direction command includes: In response to the drift control mode being a high-speed steering mode, the steering angular velocity of the virtual motorcycle is adjusted to a pre-configured steering speed threshold. The speed of the virtual motorcycle is adjusted based on a preset steering friction coefficient so that the speed of the virtual motorcycle during drifting is maintained within a preset speed range. Based on the directional command, the motion trajectory of the virtual motorcycle is fitted into a circular motion.

5. The method according to claim 2, characterized in that, The step of determining the drift control mode of the virtual motorcycle as an inertial drift mode in response to the input command not containing the throttle command but containing the direction command includes: In response to the drift control mode being inertial tail-swing mode, the inertial motion direction of the virtual motorcycle is obtained; The virtual motorcycle is controlled based on its inertial motion direction, and its speed is adjusted according to a preset deceleration friction coefficient. Based on the directional commands, the movement trajectory of the virtual motorcycle is controlled.

6. The method according to claim 2, characterized in that, The method further includes: Within a preset time window after receiving the drift trigger signal, the throttle command and the direction command are continuously detected; In response to detecting the directional command within the preset time window, the drift control mode is adjusted from the straight-line emergency stop mode to the high-speed steering mode; In response to detecting the throttle command within the preset time window, the drift control mode is adjusted from the inertial drift mode to the high-speed steering mode.

7. The method according to any one of claims 1 to 6, characterized in that, The method includes: Accumulate acceleration resource values ​​based on the duration or drift angle of the virtual motorcycle maintaining a drift state; In response to the input command after the drift operation ends, the acceleration resource value is detected; In response to the acceleration resource value meeting a preset resource threshold, the acceleration resource value is consumed to control the virtual motorcycle to perform an acceleration operation.

8. A virtual motorcycle drift control device, characterized in that, The device includes: The instruction acquisition module is used to acquire the current driving speed of the virtual motorcycle and the input instructions for the virtual motorcycle. A drift control module is used to respond to the input command containing a drift trigger signal and determine the drift control mode of the virtual motorcycle based on the combination state of the throttle command and the direction command in the input command; A drift execution module is used to control the virtual motorcycle to perform drifting motions according to the drift control mode.

9. An electronic device, characterized in that, The electronic device includes a memory and a processor, the memory storing a computer program, and the processor executing the computer program to implement the virtual motorcycle drift control method according to any one of claims 1 to 7.

10. A computer-readable storage medium storing a computer program, characterized in that, When the computer program is executed by the processor, it implements the virtual motorcycle drift control method according to any one of claims 1 to 7.

Citation Information

Patent Citations

  • Generation method, control method and device for prompt information in game

    CN117643721A