Collision processing method and device in virtual scene, electronic device, computer readable storage medium and computer program product

By deflecting along the tangential direction of the surface when a virtual vehicle collides with an object, the problems of abrupt changes in the motion state of the vehicle after a collision and high hardware resource consumption are solved, thus achieving stable and continuous vehicle motion and efficient utilization of resources.

CN122097973APending Publication Date: 2026-05-29SAROS NETWORK TECHNOLOGY (SHENZHEN) CO LTD

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
SAROS NETWORK TECHNOLOGY (SHENZHEN) CO LTD
Filing Date
2026-04-10
Publication Date
2026-05-29

AI Technical Summary

Technical Problem

In existing technologies, vehicle collision handling is based on rigid body physics simulation, which leads to abrupt changes in motion state after collision and excessive consumption of hardware resources. In addition, the simulation complexity is high, which affects the resource utilization of electronic devices.

Method used

By determining the tangential direction of the surface when a virtual vehicle collides with an object and controlling the vehicle to deflect along the tangential direction, the movement continuity is maintained. The collision handling logic is simplified by using a deflection rate that is related to the vehicle's weight and speed.

Benefits of technology

It reduces the hardware resource consumption of collision processing, ensures the stability and continuity of vehicle motion, and improves the accuracy of post-collision motion control.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122097973A_ABST
    Figure CN122097973A_ABST
Patent Text Reader

Abstract

The application provides a collision processing method and device in a virtual scene, electronic equipment, a computer readable storage medium and a computer program product; the method comprises: displaying a virtual carrier in a moving state in a virtual scene; when the virtual carrier collides with an object in the virtual scene, and a collision posture of the virtual carrier and the object meets a preset collision posture, determining a surface tangent direction of the object at a collision position; under the condition of maintaining the moving continuity of the virtual carrier, controlling the virtual carrier to deflect along the surface tangent direction based on a current moving direction, so as to present a visual effect that the virtual carrier moves in accordance with an external contour of the object. Through the application, the hardware resource consumption of collision processing is reduced.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to computer technology, and more particularly to a collision handling method, apparatus, electronic device, computer-readable storage medium, and computer program product in a virtual scene. Background Technology

[0002] In related technologies, vehicle collision processing is based on rigid body physics simulation technology. The direction of the collision impulse is fixed as the normal of the collision point surface. The vehicle speed decay is completely determined by the physics engine calculation. Moreover, the number of rigid body collision surfaces used in the simulation is limited, which can easily cause the vehicle to stop or its speed to drop sharply due to normal calculation problems. In addition, the high computational complexity increases the hardware resource consumption of the collision processing stage and reduces the resource utilization of electronic devices. Summary of the Invention

[0003] This application provides a collision handling method, apparatus, electronic device, computer-readable storage medium, and computer program product in a virtual scene, which reduces the hardware resource consumption of collision handling.

[0004] The technical solution of this application embodiment is implemented as follows: This application provides a collision handling method in a virtual scene, the method comprising: Display virtual vehicles in motion within a virtual scene; When the virtual vehicle collides with an object in the virtual scene and the collision posture between the virtual vehicle and the object conforms to a preset collision posture, the surface tangent direction of the object at the collision position is determined. While maintaining the continuity of the virtual vehicle's movement, the virtual vehicle is controlled to deflect along the tangent direction of the surface based on the current direction of movement, so as to present the visual effect that the virtual vehicle moves in accordance with the external contour of the object.

[0005] This application embodiment provides a collision handling device in a virtual scene, the device comprising: The first display module is used to display virtual vehicles in motion within the virtual scene; The determination module is used to determine the surface tangent direction of the object at the collision position when the virtual vehicle collides with an object in the virtual scene and the collision posture of the virtual vehicle and the object conforms to a preset collision posture. The first control module is used to control the virtual vehicle to deflect along the tangent direction of the surface based on the current direction of movement while maintaining the continuity of the virtual vehicle's movement, so as to present the visual effect that the virtual vehicle moves in accordance with the external contour of the object.

[0006] In the above scheme, the first control module is further configured to control the virtual vehicle to deflect along the tangent direction of the surface based on the weight attribute of the virtual vehicle and using a corresponding deflection rate, wherein the deflection rate is negatively correlated with the weight attribute; or, based on the movement speed of the virtual vehicle, control the virtual vehicle to deflect along the tangent direction of the surface based on the current movement direction and using a corresponding deflection rate; wherein the movement speed is the movement speed of the virtual vehicle before colliding with an object in the virtual scene, and the deflection rate is positively correlated with the movement speed.

[0007] In the above scheme, the collision handling device in the virtual scene further includes: a second display module, used to display at least one of the following during the process of controlling the virtual vehicle to deflect along the tangent direction of the surface based on the current movement direction: deflection animation and deflection prompt information; or, during the process of controlling the virtual vehicle to deflect along the tangent direction of the surface based on the current movement direction, displaying the virtual vehicle using a target display style; wherein, the deflection animation is used to display the deflection trajectory of the virtual vehicle, the deflection prompt information is used to indicate the deflection direction of the virtual vehicle, and the target display style is used to indicate that the virtual vehicle is deflecting.

[0008] In the above scheme, the deflection rate is determined based on the moving speed and penetration depth of the virtual vehicle; the collision handling device in the virtual scene further includes: a first setting module, used to display the setting interface of the virtual scene before controlling the virtual vehicle to deflect along the tangent direction of the surface based on the current moving direction, and display a weight setting control in the setting interface, the weight setting control being used to set a first influence weight of the moving speed on the deflection rate and a second influence weight of the penetration depth on the deflection rate; in response to the weight setting operation performed based on the weight setting control, displaying the first influence weight and the second influence weight obtained by setting; the first control module is further used to control the virtual vehicle to deflect along the tangent direction of the surface based on the current moving direction using a first deflection rate, the first deflection rate being determined based on the moving speed, the penetration depth, the first influence weight and the second influence weight.

[0009] In the above scheme, the collision handling device in the virtual scene further includes: a preview control, used to display the collision preview control after the first influence weight and the second influence weight obtained by the display setting; and to display a preview deflection screen in response to a trigger operation on the collision preview control; wherein the preview deflection screen is used to display the deflection process when the virtual vehicle collides with an object in the virtual scene under the condition of setting the first influence weight and the second influence weight.

[0010] In the above scheme, the collision handling device in the virtual scene further includes: a third display module, used to display corresponding deflection effects according to the type of the virtual vehicle during the process of controlling the virtual vehicle to deflect along the tangent direction of the surface based on the current movement direction; wherein, different types of virtual vehicles correspond to different deflection effects.

[0011] In the above scheme, the collision handling device in the virtual scene further includes: a second control module, used to control the virtual vehicle to deflect along the deflection direction indicated by the adjustment command based on the current movement direction in response to the adjustment command for the deflection direction during the process of controlling the virtual vehicle to deflect along the deflection direction indicated by the adjustment command based on the current movement direction.

[0012] In the above scheme, the collision handling device in the virtual scene further includes: a fourth display module for displaying a deflection switch, the deflection switch being used to enable the automatic deflection function of the virtual vehicle; the first control module is further used to control the virtual vehicle to deflect along the tangent direction of the surface based on the current movement direction when the deflection switch is in the on state.

[0013] In the above scheme, the collision handling device in the virtual scene further includes: a prompting module, which is used to display target prompting information when the virtual vehicle collides with an object in the virtual scene and the number of times the collision posture of the virtual vehicle and the object conforms to the preset collision posture reaches the first count when the deflection switch is in the off state. The target prompting information is used to prompt the deflection switch to be turned on.

[0014] In the above scheme, the collision handling device in the virtual scene further includes: a comparison module, used to display comparison trajectory information when the virtual vehicle collides with an object in the virtual scene and the collision posture of the virtual vehicle and the object conforms to a preset collision posture, when the deflection switch is in the on state; wherein, the comparison trajectory information includes the collision trajectory without controlling the deflection of the virtual vehicle and the deflection trajectory with controlling the deflection of the virtual vehicle.

[0015] In the above scheme, the deflection is achieved by applying a virtual deflection impulse to the virtual vehicle. The collision handling device in the virtual scene further includes: a fifth display module, used to display a deflection indicator during the process of controlling the virtual vehicle to deflect along the tangent direction of the surface based on the current movement direction; wherein, the deflection indicator is used to indicate the direction of the virtual deflection impulse, and the size of the deflection indicator is positively correlated with the magnitude of the virtual deflection impulse.

[0016] In the above scheme, the collision handling device in the virtual scene further includes: a magnification display module, used to magnify and display the contact area between the virtual vehicle and the object during the process of controlling the virtual vehicle to deflect along the tangent direction of the surface based on the current movement direction, and to magnify and display the deflection process of the virtual vehicle based on the magnified contact area.

[0017] In the above scheme, the collision processing device in the virtual scene further includes: a vibration output module, used to output vibration feedback when the virtual vehicle collides with an object in the virtual scene, wherein the intensity of the vibration feedback is positively correlated with the collision intensity of the virtual vehicle.

[0018] In the above scheme, the collision handling device in the virtual scene further includes: a playback module, used to play a target audio corresponding to the type of the virtual vehicle according to the type of the virtual vehicle during the process of controlling the virtual vehicle to deflect along the tangent direction of the surface based on the current movement direction; different types of the virtual vehicle correspond to different target audio. Alternatively, during the process of controlling the virtual vehicle to deflect along the tangent direction of the surface based on the current movement direction, it plays a target audio corresponding to the type of the environment in which the virtual vehicle is located, with different types of the environment corresponding to different target audio.

[0019] In the above scheme, the collision handling device in the virtual scene further includes: a second setting module, used to display the setting interface of the virtual scene before controlling the virtual vehicle to deflect along the tangent direction of the surface based on the current movement direction, and display a rate setting control for setting the deflection rate in the setting interface; in response to the setting operation of the rate setting control for the deflection rate, the set deflection rate is determined as a second deflection rate; the first control module is further used to use the second deflection rate to control the virtual vehicle to deflect along the tangent direction of the surface based on the current movement direction.

[0020] In the above scheme, the collision handling device in the virtual scene further includes: a viewing module, used to display a posture viewing control in the interface of the virtual scene; and to display at least one of the preset collision postures in response to a trigger operation on the posture viewing control.

[0021] In the above scheme, the virtual vehicle is driven by a virtual character, and the collision handling device in the virtual scene further includes: an installation module, used to display the backpack interface of the virtual character's virtual backpack and display the target virtual item in the backpack interface before controlling the virtual vehicle to deflect along the tangent direction of the surface based on the current movement direction; in response to the installation command for the target virtual item, controlling the virtual character to install the target virtual item onto the virtual vehicle; the first control module is also used to maintain the movement continuity of the virtual vehicle when the target virtual item is installed on the virtual vehicle, and to control the virtual vehicle to deflect along the tangent direction of the surface based on the current movement direction.

[0022] In the above scheme, the collision handling device in the virtual scene further includes: a playback control, used to display the playback control after the virtual vehicle deflects along the tangent direction of the surface based on the current movement direction; and to play a playback video in response to a trigger operation on the playback control, the playback video being used to replay the process of the virtual vehicle deflecting along the tangent direction of the surface based on the current movement direction.

[0023] In the above scheme, the collision handling device in the virtual scene further includes: a third control module, used to control the virtual vehicle to deflect along the tangent direction of the surface based on the current movement direction, and then control the virtual vehicle to obtain a virtual protective layer, the virtual protective layer being used to block attacks on the virtual vehicle, and the virtual protective layer having an effective duration; when the effective duration is reached, the virtual protective layer is controlled to disappear.

[0024] In the above scheme, the collision handling device in the virtual scene further includes: a sixth display module, used to control the attribute value of the virtual vehicle to decrease and display the reduced first attribute value of the virtual vehicle when the virtual vehicle collides with an object in the virtual scene and the collision posture of the virtual vehicle and the object conforms to a preset collision posture; wherein, the first attribute value is less than a second attribute value, and the second attribute value is the attribute value reduced when the virtual vehicle collides with an object in the virtual scene and the collision posture does not conform to the preset collision posture.

[0025] In the above scheme, the appearance style of the virtual vehicle is a first appearance style, and the collision handling device in the virtual scene further includes: a switching module, used to unlock the second appearance style of the virtual vehicle when the virtual vehicle collides with an object in the virtual scene and the number of times the collision posture of the virtual vehicle and the object conforms to a preset collision posture reaches the second number; and in response to the switching command for the second appearance style of the virtual vehicle, to switch the appearance style of the virtual vehicle from the first appearance style to the second appearance style.

[0026] This application provides an electronic device, including: Memory is used to store executable instructions or computer programs. The processor, when executing computer-executable instructions or computer programs stored in the memory, implements the collision handling method in the virtual scene provided in the embodiments of this application.

[0027] This application provides a computer-readable storage medium storing computer-executable instructions or computer programs, which, when executed by a processor, implement the collision handling method in the virtual scene provided in this application.

[0028] This application provides a computer program product, including computer-executable instructions or a computer program, which, when executed by a processor, implements the collision handling method in a virtual scene provided in this application.

[0029] The embodiments of this application have the following beneficial effects: This application determines the surface tangent direction at the collision location when the collision posture of a virtual vehicle and an object conforms to a preset collision posture, thus avoiding the drawbacks of indiscriminate calculation in rigid body physics collision processing. It controls the vehicle to deflect along the tangent direction based on the current movement direction and maintains the continuity of movement, allowing the vehicle's motion trajectory to adapt to the external contour of the colliding object. This replaces the passive calculation method of fixing the impulse direction in collision processing, avoiding sudden changes in the vehicle's motion state due to collision and ensuring the stability and continuity of the motion state after collision. At the same time, it only performs directional processing for preset collision posture scenarios, simplifying the calculation logic of collision processing, reducing the hardware resource consumption of the collision processing stage, and improving the accuracy of vehicle motion state control after collision. Attached Figure Description

[0030] Figure 1 This is a schematic diagram of the collision handling system in the virtual scene provided in the embodiments of this application; Figure 2 This is a schematic diagram of the structure of the electronic device provided in the embodiments of this application; Figure 3 This is a first flowchart illustrating the collision handling method in a virtual scene provided in this application embodiment; Figure 4 This is a schematic diagram of collision handling in a virtual scene provided in the embodiments of this application. Figure 1 ; Figure 5 This is a schematic diagram of collision handling in a virtual scene provided in the embodiments of this application. Figure 2 ; Figure 6This is a schematic diagram of collision handling in a virtual scene provided in the embodiments of this application. Figure 3 ; Figure 7 This is a schematic diagram of collision handling in a virtual scene provided in the embodiments of this application. Figure 4 ; Figure 8 This is a schematic diagram of collision handling in a virtual scene provided in the embodiments of this application. Figure 5 ; Figure 9 This is a schematic diagram of collision handling in a virtual scene provided in the embodiments of this application. Figure 6 ; Figure 10 This is a schematic diagram of collision handling in a virtual scene provided in the embodiments of this application. Figure 7 ; Figure 11 This is a schematic diagram of collision handling in a virtual scene provided in the embodiments of this application. Figure 8 ; Figure 12 This is a schematic diagram of collision handling in a virtual scene provided in the embodiments of this application. Figure 9 ; Figure 13 This is a schematic diagram of collision handling in a virtual scene provided in the embodiments of this application. Figure 10 ; Figure 14 This is a schematic diagram of collision handling in a virtual scene provided in the embodiments of this application. Figure 10 one; Figure 15 This is a schematic diagram of collision handling in a virtual scene provided in the embodiments of this application. Figure 10 two; Figure 16 This is a schematic diagram of collision handling in a virtual scene provided in the embodiments of this application. Figure 10 three; Figure 17 This is a schematic diagram of collision handling in a virtual scene provided in the embodiments of this application. Figure 10 Four; Figure 18 This is a second flowchart illustrating the collision handling method in a virtual scene provided in this application embodiment; Figure 19 This is a schematic diagram of a frontal offset collision provided in an embodiment of this application; Figure 20 This is a schematic diagram of a side collision provided in an embodiment of this application; Figure 21 This is a schematic diagram of the third process of the collision handling method in the virtual scene provided in the embodiments of this application. Detailed Implementation

[0031] To make the objectives, technical solutions, and advantages of this application clearer, the application will be further described in detail below with reference to the accompanying drawings. The described embodiments should not be regarded as limitations on this application. All other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.

[0032] In the following description, references are made to “some embodiments,” which describe a subset of all possible embodiments. However, it is understood that “some embodiments” may be the same subset or different subsets of all possible embodiments and may be combined with each other without conflict.

[0033] In the following description, the terms "first, second, third" are used merely to distinguish similar objects and do not represent a specific ordering of objects. It is understood that "first, second, third" may be interchanged in a specific order or sequence where permitted, so that the embodiments of this application described herein can be implemented in an order other than that illustrated or described herein.

[0034] In the embodiments of this application, the terms "module" or "unit" refer to a computer program or part of a computer program that has a predetermined function and works with other related parts to achieve a predetermined goal, and can be implemented wholly or partially using software, hardware (such as processing circuitry or memory), or a combination thereof. Similarly, a processor (or multiple processors or memory) can be used to implement one or more modules or units. Furthermore, each module or unit can be part of an overall module or unit that includes the functionality of that module or unit.

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

[0036] In the implementation of this application, the collection and processing of relevant data should strictly comply with the requirements of relevant laws and regulations, obtain the informed consent or separate consent of the personal information subject, and carry out subsequent data use and processing within the scope of laws and regulations and the authorization of the personal information subject.

[0037] Before providing a further detailed description of the embodiments of this application, the nouns and terms involved in the embodiments of this application will be explained, and the nouns and terms involved in the embodiments of this application shall be interpreted as follows.

[0038] 1) In response to, used to indicate the conditions or states on which the operation performed depends. When the conditions or states on which it depends are met, one or more operations performed may be performed in real time or with a set delay. Unless otherwise specified, there is no restriction on the order in which the multiple operations are performed.

[0039] 2) Client, also known as user terminal, refers to the program that provides local services to users in contrast to the server. Except for some applications that can only run locally, it is generally installed on the terminal and needs to work with the server. That is, there needs to be a corresponding server and service program on the network to provide the corresponding services. Thus, a specific communication connection needs to be established between the client and the server to ensure the normal operation of the application.

[0040] 3) A virtual scene is a virtual scene displayed (or provided) by an application when it runs on a terminal. This virtual scene can be a simulation of the real world, a semi-simulated / semi-fictional virtual environment, or a purely fictional virtual environment. A virtual scene can be any of the following: two-dimensional, 2.5-dimensional, or three-dimensional.

[0041] For example, a virtual scene can include the sky, land, and ocean. The land can include environmental elements such as deserts and cities. Users (i.e., players) can control virtual characters to move within this virtual scene. These activities include, but are not limited to, adjusting body posture, crawling, walking, running, riding, jumping, driving, picking up items, shooting, attacking, and throwing at least one of these. The virtual scene can be displayed from a first-person perspective (e.g., the user plays the virtual character in the game from their own perspective); it can also be displayed from a third-person perspective (e.g., the user chases after the virtual character in the game); or it can be displayed from a bird's-eye view. Users can switch freely between these perspectives.

[0042] 4) Virtual Characters: These are interactive images of people and objects within a virtual scene, or movable objects within that scene. These movable objects can be virtual characters, animals, anime characters, etc., such as people, animals, plants, oil drums, walls, and stones displayed in the virtual scene. A virtual character can be a virtual avatar representing the user within that scene. A virtual scene can include multiple virtual characters, each with its own shape and volume, occupying a portion of the virtual scene's space.

[0043] For example, the virtual character can be a player character controlled through client operations, an artificial intelligence (AI) trained and set up for virtual scene battles, or a non-player character (NPC) set up for interaction in the virtual scene. The number of virtual characters participating in the interaction in the virtual scene can be preset or dynamically determined based on the number of clients joining the interaction.

[0044] During the research process, the inventors discovered the following technical problems in the relevant technology: In related technologies, vehicle collision handling is mostly based on rigid body physics simulation technology. The direction of the collision impulse is fixed and points to the surface normal at the point of collision. It can only passively rely on the physics engine to complete the collision calculation, which can easily lead to problems such as sudden changes in motion state after the vehicle crashes, such as stopping or a sharp drop in speed. At the same time, the same calculation method is used for all collision scenarios without any scene-specific simplification of the calculation logic, which increases the hardware resource consumption of the collision handling process. In addition, the number of collision surfaces of the rigid body used in the simulation is limited, which also affects the accuracy of the collision calculation. Ultimately, the control result of the vehicle's motion state does not match the actual operation requirements.

[0045] Based on this, embodiments of this application provide a collision handling method, apparatus, electronic device, computer-readable storage medium, and computer program product in a virtual scene, reducing the hardware resource consumption of collision handling.

[0046] See Figure 1 , Figure 1 This is a schematic diagram of the collision handling system in the virtual scene provided in the embodiments of this application. Figure 1 The collision handling system 100 shown in the virtual scene is designed to support a collision handling application in a virtual scene. The terminal 400 is connected to the server 200 through the network 300, which can be a wide area network, a local area network, or a combination of both.

[0047] Terminal 400 is used to display a virtual vehicle in a moving state in a virtual scene. When a collision is detected between the virtual vehicle and an object in the virtual scene and the collision posture of the two conforms to the preset collision posture, the terminal 400 sends the current movement direction and collision position data of the virtual vehicle to the server 200 through the network 300. Server 200 receives data on the current movement direction and collision position of the virtual vehicle sent by terminal 400. Based on the collision position data, it determines the surface tangent direction of the object at the collision position. Combined with the current movement direction of the virtual vehicle, it generates motion control commands that maintain the continuity of the virtual vehicle's movement and control its deflection along the surface tangent direction. Then, it feeds the motion control commands back to terminal 400 through network 300, so that terminal 400 controls the virtual vehicle to present a visual effect of moving in accordance with the external contour of the object.

[0048] In other embodiments, the collision handling method in the virtual scene provided by the present invention can also be implemented independently by a terminal. The terminal is equipped with a client that can implement the collision handling method in the virtual scene. The client displays a virtual vehicle in a moving state in the virtual scene. When the virtual vehicle collides with an object in the virtual scene and the collision posture of the virtual vehicle and the object conforms to the preset collision posture, the surface tangent direction of the object at the collision position is determined. While maintaining the continuity of the virtual vehicle's movement, the virtual vehicle is controlled to deflect along the surface tangent direction based on the current movement direction, so as to present the visual effect of the virtual vehicle moving in accordance with the external contour of the object.

[0049] The client running on the terminal can also embed a collision handling plugin for the virtual scene to implement collision handling methods locally on the client. For example, a virtual vehicle in motion is displayed in the virtual scene; when the virtual vehicle collides with an object in the virtual scene and the collision posture of the virtual vehicle and the object conforms to a preset collision posture, the surface tangent direction of the object at the collision position is determined; while maintaining the continuity of the virtual vehicle's movement, the virtual vehicle is controlled to deflect along the surface tangent direction based on the current movement direction, so as to present the visual effect of the virtual vehicle moving in accordance with the outer contour of the object.

[0050] In some embodiments, server 200 may be a standalone 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, content delivery networks (CDNs), and big data and artificial intelligence platforms. Terminal 400 may be a smartphone, tablet, laptop, desktop computer, set-top box, smart voice interaction device, smart home appliance, virtual reality device, vehicle terminal, aircraft, portable music player, personal digital assistant, dedicated messaging device, portable gaming device, smart speaker, and smartwatch, but is not limited thereto. Terminals and servers can be directly or indirectly connected via wired or wireless communication, which is not limited in this embodiment.

[0051] The electronic device implementing the collision handling method in the virtual scene provided in the embodiments of this application will be described next. See Figure 2 , Figure 2 This is a schematic diagram of the structure of the electronic device provided in the embodiments of this application. In practical applications, the electronic device can be implemented as various types of terminals such as laptops, tablets, desktop computers, smartphones, smart speakers, smartwatches, smart TVs, and vehicle terminals. It can also be implemented as a server or as a device cluster composed of servers and terminals. Figure 2 The illustrated electronic device includes at least one processor 510, a memory 550, at least one network interface 520, and a user interface 530. The various components of the electronic device are coupled together via a bus system 540. It is understood that the bus system 540 is used to implement communication between these components. In addition to a data bus, the bus system 540 also includes a power bus, a control bus, and a status signal bus. However, for clarity, in… Figure 2 The general labeled all buses as Bus System 540.

[0052] The processor 510 can be an integrated circuit chip with signal processing capabilities, such as a general-purpose processor, a digital signal processor (DSP), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. The general-purpose processor can be a microprocessor or any conventional processor, etc.

[0053] User interface 530 includes one or more output devices 531 that enable the presentation of media content, including one or more speakers and / or one or more visual displays. User interface 530 also includes one or more input devices 532, including user interface components that facilitate user input, such as a keyboard, mouse, microphone, touch screen display, camera, other input buttons and controls.

[0054] The memory 550 may be removable, non-removable, or a combination thereof. Exemplary hardware devices include solid-state storage, hard disk drives, optical disk drives, etc. The memory 550 may optionally include one or more storage devices physically located away from the processor 510.

[0055] The memory 550 may include volatile memory or non-volatile memory, or both. The non-volatile memory may be read-only memory (ROM), and the volatile memory may be random access memory (RAM). The memory 550 described in this application embodiment is intended to include any suitable type of memory.

[0056] In some embodiments, memory 550 is capable of storing data to support various operations, examples of which include programs, modules, and data structures or subsets or supersets thereof, as illustrated below.

[0057] Operating system 551 includes system programs for handling various basic system services and performing hardware-related tasks, such as the framework layer, core library layer, and driver layer, for implementing various basic business functions and handling hardware-based tasks.

[0058] The network communication module 552 is used to reach other electronic devices via one or more (wired or wireless) network interfaces 520, exemplary network interfaces 520 including Bluetooth, WiFi, and Universal Serial Bus (USB).

[0059] Presentation module 553 enables the presentation of information (e.g., a user interface for operating peripheral devices and displaying content and information) via one or more output devices 531 associated with user interface 530 (e.g., a display screen, a speaker, etc.).

[0060] The input processing module 554 is used to detect one or more user inputs or interactions from one or more input devices 532, and to translate the detected inputs or interactions.

[0061] In some embodiments, the collision handling device in the virtual scene provided in this application can be implemented in software. Figure 2 A collision handling device 555 for a virtual scene stored in memory 550 is shown. This device can be software in the form of programs and plugins, and includes the following software modules: a first display module 5551, a determination module 5552, and a first control module 5553. These modules are logically connected and can therefore be arbitrarily combined or further separated according to their implemented functions. The functions of each module will be described below.

[0062] In some embodiments, the terminal or server can implement the collision handling method in the virtual scene provided in this application embodiment by running a computer program. For example, the computer program can be a native program or software module in the operating system; it can be a native application (APP), i.e., a local client, i.e., a program that needs to be installed in the operating system to run, such as an instant messaging APP or a web browser APP; it can also be a mini-program, i.e., a program that only needs to be downloaded into the browser environment to run; or it can be a mini-program that can be embedded in any APP. In short, the above-mentioned computer program can be any form of client, module, or plugin.

[0063] Below, based on the electronic device and system provided in the embodiments of this application, the collision handling method in the virtual scene provided in the embodiments of this application will be described.

[0064] See Figure 3 , Figure 3 This is a first flowchart illustrating the collision handling method in a virtual scene provided in this application embodiment. In practical applications, this method can be implemented by the terminal or the server alone, or by the terminal and the server working together. The following example uses terminal implementation and will combine... Figure 3 The steps shown illustrate the collision handling method in the virtual scene provided in the embodiments of this application.

[0065] In step 101, a virtual vehicle in motion is displayed in the virtual scene.

[0066] In practical applications, the terminal is equipped with a game application, which can be any of the following: open-world game, multiplayer online role-playing game, first-person shooter game, third-person shooter game, multiplayer online tactical competitive game, virtual reality application, 3D map program, or multiplayer shooting survival game.

[0067] For single-player offline games, in response to a trigger action on the game application, the game application's interface can be displayed, showing a virtual scene within it. For multiplayer online games, in response to a trigger action on the game application, the terminal can send a data retrieval request to the server. The server can then send data to the terminal to display the game application's interface, allowing the interface to be displayed on the terminal, and within that interface, a virtual scene can be shown. Virtual vehicles in motion can also be displayed within the virtual scene.

[0068] Among them, the virtual vehicle in motion is a digital vehicle model controlled by the user (player) and whose position coordinates change in real time in the virtual scene. The motion state is reflected in the virtual vehicle having a clear direction and speed of movement in the virtual scene. The motion state of the virtual vehicle is driven by the user control commands received by the terminal and can present a continuous motion visual effect in the display interface of the virtual scene.

[0069] It should be noted that the virtual vehicles include various digital vehicle models adapted to the virtual scene, such as land and air. The movement states of the virtual vehicles include various motion forms such as constant speed, variable speed, and turning. The movement parameters of the virtual vehicles are adjusted in real time by user control commands. The movement parameters include core data such as movement direction and movement speed. Changes in the movement parameters will be displayed synchronously in the display interface of the virtual scene.

[0070] In actual implementation, when displaying a moving virtual vehicle in a virtual scene, the system collects motion data such as the virtual vehicle's position coordinates and direction of movement according to a preset frame synchronization frequency and completes the rendering update. The frame synchronization frequency is adapted to the terminal's graphics rendering capabilities, thereby ensuring the visual continuity of the virtual vehicle's movement in the virtual scene.

[0071] In step 102, when the virtual vehicle collides with an object in the virtual scene and the collision posture of the virtual vehicle and the object conforms to the preset collision posture, the surface tangent direction of the object at the collision position is determined.

[0072] It should be noted that the collision posture of a virtual vehicle and an object refers to the comprehensive posture information that characterizes the relative position and motion state of the virtual vehicle and the object in the virtual scene when the virtual vehicle collides with the object. The collision posture is defined by the movement direction of the virtual vehicle and the spatial coordinates of the collision position.

[0073] In actual implementation, the collision detection process between virtual vehicles and objects in the virtual scene is carried out by real-time acquisition of the position coordinates of the virtual vehicle and the outline boundary coordinates of the objects in the virtual scene, and real-time comparison of their spatial positions. When the coordinates of the two objects are in spatial contact or intersecting, a collision is immediately determined.

[0074] Determining the surface tangent direction of an object at the collision location refers to obtaining the spatial direction of the tangent line on the outer contour surface of the object at the spatial location where it collides with the virtual vehicle using digital spatial geometry calculations. The surface tangent direction provides a precise directional reference for the subsequent deflection motion of the virtual vehicle.

[0075] In this context, objects in a virtual scene are digital entities with independent digital contours, spatial boundaries, and geometric surface features. They can engage in spatial contact and collision with moving virtual vehicles, participating in collision attitude determination, collision position determination, and calculation of the tangent direction of the collision position surface. They are interactive objects used to control the contour fitting and deflection of virtual vehicles. Objects in a virtual scene can include static terrain objects, building walls, road guardrails, and fixed obstacles such as mountain slopes. They can also include static decorative models and interactive fixed props, as well as various digital scene entities with external surface contours that can collide and interact with virtual vehicles. The shape and geometry of objects that can collide and interact with virtual vehicles in a virtual scene are not limited; various shapes and structures with independent spatial boundaries and surface features are applicable. For example, objects can specifically include regular geometric shapes such as cuboid walls, cube obstacles, cylindrical columns, and spherical curved surfaces, as well as irregular shapes such as slopes, sharp corners, uneven terrain, irregular rocks, and streamlined curved components.

[0076] It should be noted that preset collision postures can include two categories: frontal offset collision postures and side collision postures. These are specific collision scenarios pre-set in the virtual scene for virtual vehicle collision handling, which need to trigger the determination of the tangent direction of the collision location surface and the vehicle deflection control. The preset collision postures are comprehensively defined by the angle range between the virtual vehicle's movement direction and the collision normal direction, as well as the spatial position characteristics of the collision between the virtual vehicle and the object. The side collision posture is a collision scenario where the angle between the virtual vehicle's movement direction and the collision normal direction is between a first angle and a second angle. In this collision posture, the virtual vehicle and the object in the virtual scene make oblique side contact and collide, rather than colliding head-on. It is an important preset collision posture for triggering virtual vehicle collision deflection handling. The frontal offset collision posture is a collision situation where the angle between the virtual vehicle's movement direction and the collision normal direction is between the second and third angles, and the virtual vehicle's predicted collision position is moved a small distance perpendicular to its movement direction, and the virtual vehicle no longer collides with objects in the virtual scene. In this collision posture, although the virtual vehicle shows a tendency to collide head-on, it is only in an offset contact state with the object's edge, corner, etc., and does not collide head-on with the object. It is the core preset collision posture that triggers the virtual vehicle collision deflection processing.

[0077] In other words, the frontal offset collision posture is the collision posture in which the front area of ​​the virtual vehicle only partially contacts the object when the virtual vehicle collides with an object in the virtual scene. It is not the frontal full collision posture in which the entire front of the virtual vehicle makes full contact with the object. For example, if the corner of the front of the virtual vehicle comes into contact with the edge or corner of the object, it is a frontal offset collision posture.

[0078] In practical implementation, when a virtual vehicle collides with an object in the virtual scene, and the collision posture between the virtual vehicle and the object conforms to a preset collision posture, before determining the surface tangent direction of the object at the collision location, the expected position of the virtual vehicle in the next image frame is determined based on the current moving speed and current position of the virtual vehicle. Collision detection is then performed on the virtual vehicle (specifically, sweep collision detection can be performed on the collision bounding box / ray of the virtual vehicle) starting from the current position and ending at the expected position, yielding the collision detection result. When the collision detection result indicates that the virtual vehicle has collided with an object in the virtual scene, and the collision posture between the virtual vehicle and the object conforms to a preset collision posture, the surface tangent direction of the object at the collision location is determined. Here, the current position is the real-time 3D spatial coordinate position of the virtual vehicle at the moment of the currently rendered image frame when calculating the expected position of the virtual vehicle in the next image frame and setting the start and end points of the collision detection interval; it is a fixed point acquired before the collision detection determination.

[0079] In other words, collision detection can be performed not only after the virtual vehicle actually collides with an object in the virtual scene, but before determining the surface tangent direction of the object at the collision location, the predicted position in the next image frame is calculated based on the current moving speed and current position of the virtual vehicle, and collision detection is carried out with the current position as the starting point and the predicted position as the ending point. This is a predictive collision detection carried out before the virtual vehicle and the object actually collide. Only when the collision detection result indicates that the two will collide and the collision posture conforms to the preset collision posture will the subsequent operation of determining the surface tangent direction of the object at the collision location continue to be executed.

[0080] After performing collision detection on the virtual vehicle and obtaining the collision detection results, when the collision detection results indicate that a collision has occurred, the collision normal direction of the virtual vehicle and the object at the time of the collision is obtained; the angle between the collision normal direction and the current movement direction of the virtual vehicle is obtained, and it is determined whether the collision posture conforms to the preset collision posture.

[0081] Specifically, determining whether the collision posture conforms to the preset collision posture based on the angle between the collision normal direction and the current movement direction of the virtual vehicle can be achieved in the following way: when the angle is greater than the first angle and less than the second angle, the collision posture is determined to conform to the preset collision posture, and the second angle is greater than the first angle; when the angle is greater than or equal to the second angle and less than the third angle, and the virtual vehicle moves the target distance from the expected position to the direction perpendicular to the current movement direction without colliding with the object, the collision posture is determined to conform to the preset collision posture.

[0082] The first angle defines the lower limit of the angle between the virtual vehicle's side collision posture and the collision normal direction. It is the minimum angle formed by the virtual vehicle's movement direction and the collision normal direction. This angle threshold distinguishes between the virtual vehicle's non-collision state and its side collision posture with objects in the virtual scene, and serves as the starting reference value for triggering the side collision posture determination. The second angle defines the upper limit of the angle between the virtual vehicle's side collision posture and the lower limit of its frontal offset collision posture. It is the critical angle threshold distinguishing between these two postures, serving as the core dividing point for determining the angle between the two preset collision postures, enabling precise differentiation. The third angle defines the upper limit of the angle between the virtual vehicle's frontal offset collision posture and the collision normal direction. It is the maximum angle formed by the virtual vehicle's movement direction and the collision normal direction. This angle threshold distinguishes between the frontal offset collision posture and a complete head-on collision state, and serves as the ending reference value for determining the frontal offset collision posture. The second angle is greater than the first angle, and the third angle is greater than the second angle.

[0083] For example, the first angle can be set to 90 degrees, the second angle can be set to 160 degrees, and the third angle can be set to 180 degrees. This set of values ​​is adapted to the conventional judgment requirements of virtual vehicle collision handling in virtual scenes. It can accurately distinguish between side collision posture and frontal offset collision posture, which is in line with the actual scene calculation logic of virtual vehicle collision posture judgment.

[0084] It should be noted that determining whether a virtual vehicle collides with an object after moving a target distance perpendicular to its current direction of movement from its expected position is used to accurately determine whether the virtual vehicle and the object in the virtual scene form a frontal offset collision posture, rather than a complete head-on collision posture. The core characteristic of a frontal offset collision posture is that the virtual vehicle only forms offset contact with the object's edge, corner, or other local positions, and does not form a full head-on contact with the object's effective frontal collision surface. If the virtual vehicle does not collide with an object after moving a target distance perpendicular to its current direction of movement from its expected position, it proves that the virtual vehicle's collision area is only a local edge position of the object, and does not form a full head-on contact with the object's effective frontal collision surface. This clearly distinguishes between a frontal offset collision posture and a complete head-on collision state, providing an objective spatial position verification basis for the accurate determination of the preset collision posture, and ensuring that subsequent collision processing operations are triggered only for frontal offset collision postures that conform to the preset values.

[0085] The movement from the predicted position to the vertical direction of the current movement direction is a digital simulation of spatial displacement of the virtual vehicle, starting from the predicted collision handling position in the virtual scene and using the normal direction of the current movement direction of the virtual vehicle as the displacement direction. The displacement operation is only used in the collision attitude determination calculation process and does not actually control the virtual vehicle to move in the display interface of the virtual scene. During the displacement, the collision bounding box, model outline and other collision determination-related parameters of the virtual vehicle remain unchanged. Only the spatial position coordinates of the virtual vehicle are changed. The collision detection and verification with the object are completed through the coordinates after the simulated displacement. The direction of the displacement is the horizontal normal direction at a 90-degree angle to the current movement direction of the virtual vehicle.

[0086] It should be noted that the direction of the surface tangent at the collision location is the projection direction of the virtual vehicle's current movement direction onto the object's surface.

[0087] In step 103, while maintaining the continuity of the virtual vehicle's movement, the virtual vehicle is controlled to deflect along the surface tangent direction based on the current direction of movement, so as to present the visual effect that the virtual vehicle moves in accordance with the external contour of the object.

[0088] It should be noted that maintaining the continuity of virtual vehicle movement means ensuring that the virtual vehicle's speed does not suddenly decrease, its trajectory does not get interrupted, and its speed does not change drastically in a way that is perceptible to the naked eye throughout the entire process of controlling the virtual vehicle to perform directional deflection operations. This ensures that the virtual vehicle maintains a continuous and smooth movement in the virtual scene and eliminates sudden stops and abrupt changes caused by collisions.

[0089] To maintain the continuity of virtual vehicle movement, the fluctuation range of the virtual vehicle's speed is limited to a preset speed variation range. This preset speed variation range can be set using methods such as relative percentage values, fixed absolute speed values, inter-frame speed increment thresholds, or normalized speed fluctuation coefficients. The relative percentage value uses the baseline speed at the moment of collision triggering as a reference standard, while the fixed absolute speed value is a pre-set constant speed fluctuation threshold. For example, the preset speed variation range can be set to ±5% of the virtual vehicle's original speed. By precisely constraining the speed fluctuation range, visual inconsistencies caused by sudden speed increases or decreases are avoided, ensuring a stable and smooth visual movement performance of the virtual vehicle.

[0090] The current movement direction of the virtual vehicle is the real-time travel vector direction at the moment of collision triggering. It is determined based on the unified spatial coordinate system of the virtual scene and the input parameters of the user controlling the virtual vehicle, and serves as the basic reference standard for adjusting the deflection angle of the virtual vehicle. The visual effect of moving in accordance with the external contour of an object is that after the virtual vehicle completes its directional deflection, its trajectory conforms to the outline of the object corresponding to the collision position. This is intuitively presented in the virtual scene visualization interface, showing the virtual vehicle smoothly gliding along the surface of the object.

[0091] It should be noted that the deflection along the surface tangent direction based on the current movement direction is based on the current movement direction of the virtual vehicle at the moment of collision triggering. Combined with the calculated surface tangent direction of the object at the collision position, the virtual vehicle's movement orientation and motion vector are smoothly adjusted frame by frame. The original movement trend of the virtual vehicle is preserved, and the movement path of the virtual vehicle is gradually guided to extend along the surface tangent direction. The entire deflection control process is synchronized with the rendering rhythm of the virtual scene. With the help of rate limiting, the movement continuity of the virtual vehicle is ensured, and finally a deflection motion effect that adapts to the external contour of the object is formed.

[0092] In actual implementation, the deflection angle of the virtual vehicle adopts a smooth and gradual adjustment mode between frames, without instantaneous large-angle jumps. The adjustment rhythm matches the rendering frame rate of the virtual scene, further improving the overall smoothness of the virtual vehicle's movement.

[0093] In addition, the virtual vehicle will combine the current direction of movement with the surface tangent direction of the object's collision position to synthesize a new travel vector. The new travel vector not only retains the original travel intention of the virtual vehicle, but also adapts to the object's outline and optimizes the motion control logic.

[0094] In some embodiments, to adapt to the different attributes and pre-collision motion states of various virtual vehicles and improve the realism of physical simulation and visual control experience, the deflection process is controlled by matching the deflection rate according to the corresponding feature differences. Specifically, controlling the virtual vehicle to deflect along the surface tangent direction based on the current direction of movement can be achieved in the following ways: based on the weight attribute of the virtual vehicle, a corresponding deflection rate is used to control the virtual vehicle to deflect along the surface tangent direction based on the current direction of movement, and the deflection rate is negatively correlated with the weight attribute; or, based on the movement speed of the virtual vehicle, a corresponding deflection rate is used to control the virtual vehicle to deflect along the surface tangent direction based on the current direction of movement; wherein, the movement speed is the movement speed of the virtual vehicle before colliding with an object in the virtual scene, and the deflection rate is positively correlated with the movement speed.

[0095] It should be noted that the weight attribute of a virtual vehicle is an inherent parameter pre-configured and stored within the system, representing the physical mass of the virtual vehicle. Different types and specifications of virtual vehicles correspond to different weight attribute values. The weight attribute of virtual vehicles can be divided into multiple levels: light, medium, and heavy, with each level corresponding to a fixed range of weight attribute values.

[0096] Deflection rate is the change in angle of a virtual vehicle's direction of travel per unit time or per rendering frame during deflection along the tangent direction of a surface. Deflection rate determines the speed of the overall deflection motion of the virtual vehicle. A negative correlation exists between deflection rate and weight attribute; that is, the larger the weight attribute value of the virtual vehicle, the smaller the deflection rate value assigned to it, and vice versa.

[0097] It should be noted that the deflection rate and the weight attribute of the virtual vehicle are generally negatively correlated. Specifically, this can include linear negative correlation mapping, nonlinear negative correlation mapping, and piecewise stepped fixed mapping. Among them, linear negative correlation mapping is a uniformly gradual linear function correspondence with continuous and smooth parameter changes. Nonlinear negative correlation mapping includes curve-like changes such as inverse proportional and quadratic curves, which can differentiate and control the degree of deflection rate attenuation in different weight ranges. Piecewise stepped fixed mapping matches a fixed deflection rate according to a preset level of weight attribute. It has simple operation logic, lower hardware computing power consumption, and can flexibly select the corresponding mapping method according to the actual simulation accuracy and terminal operating conditions.

[0098] For example, in a game scenario with virtual undulating slopes, a light virtual vehicle with a weight attribute of 50kg uses a deflection rate of 8° / s to complete the tangential deflection, while a heavy virtual vehicle with a weight attribute of 100kg only uses a deflection rate of 4° / s to complete the tangential deflection. The greater the weight of the vehicle, the lower the deflection rate.

[0099] The speed at which a virtual vehicle moves before colliding with an object in the virtual scene is the real-time stable speed data of the virtual vehicle when it enters the collision detection process but has not yet collided with an object in the virtual scene.

[0100] It should be noted that before the virtual vehicle collides with an object in the virtual scene, this refers to the time sequence after the virtual vehicle has completed the predictive sweep collision detection of the current image frame to the next image frame in the virtual scene's frame-by-frame rendering process, before the virtual vehicle and the object in the virtual scene have generated a collision bounding box spatial intersection in any rendered image frame, and before the collision physics feedback and deflection control process is triggered. This stage is before the collision takes effect frame, and the real-time movement speed of the virtual vehicle is not affected by external collision forces.

[0101] Furthermore, the deflection rate and the movement speed of the virtual vehicle before collision are generally positively correlated, specifically including linear positive correlation mapping, nonlinear positive correlation mapping, and piecewise stepped fixed mapping. Among them, the linear positive correlation mapping is a uniformly increasing linear function correspondence, with continuous and smooth parameter changes; the nonlinear positive correlation mapping includes curve-like changes such as proportional curves and quadratic gain, which can differentiate and amplify the deflection rate increase in different speed ranges; the piecewise stepped fixed mapping matches a fixed deflection rate according to a preset movement speed level, with simple operation logic and lower hardware computing power consumption, and the corresponding mapping method can be flexibly selected according to the actual simulation accuracy and terminal operating conditions.

[0102] For example, if a virtual vehicle moves at a speed of 10 m / s before colliding with a rock obstacle in the scene, the corresponding deflection rate is 3° / s to avoid the obstacle by deflecting along the tangent of the surface. When the moving speed increases to 30 m / s before the collision, the deflection rate increases to 9° / s to complete the tangential deflection. The faster the moving speed before the collision, the higher the deflection rate.

[0103] In actual implementation, a linear negative correlation numerical mapping relationship between weight attribute and deflection rate, and a linear positive correlation numerical mapping relationship between pre-collision movement speed and deflection rate are pre-constructed. After obtaining the weight attribute value of the virtual vehicle, the matching target deflection rate is retrieved, and the physical impulse amplitude in the corresponding surface tangent direction is calculated according to the screen rendering frame period. The physical impulse in the tangent direction is applied to the virtual vehicle frame by frame, and the virtual vehicle is controlled to deflect along the surface tangent direction based on the current movement direction. After obtaining the movement speed value of the virtual vehicle before colliding with the object in the virtual scene, the matching target deflection rate is retrieved, and the physical impulse amplitude in the corresponding surface tangent direction is calculated according to the screen rendering frame period. The physical impulse in the tangent direction is applied to the virtual vehicle frame by frame, and the virtual vehicle is controlled to deflect along the surface tangent direction based on the current movement direction.

[0104] Thus, by matching the deflection rate negatively correlated with the weight attribute of the virtual vehicle, in accordance with the laws of physical inertia, the deflection action of virtual vehicles of different weights along the tangent of the surface appears realistic and natural; by matching the deflection rate positively correlated with the speed of movement of the virtual vehicle before the collision, the degree of tangential deflection response can be adaptively adjusted, enhancing the deflection capability at high speeds and maintaining driving stability at low speeds, thereby improving the smoothness of the virtual vehicle's movement along the surface and the control adaptability for collision avoidance.

[0105] In some embodiments, to intuitively present the deflection dynamics of the virtual vehicle, clearly define the deflection direction and operating status, and improve user visual perception and operational recognition, corresponding visual feedback content is displayed simultaneously during the virtual vehicle's deflection process, or a dedicated display style is used for identification and prompting. Specifically, during the process of controlling the virtual vehicle to deflect along the surface tangent direction based on the current movement direction, at least one of the following is displayed: deflection animation and deflection prompt information; or, during the process of controlling the virtual vehicle to deflect along the surface tangent direction based on the current movement direction, a target display style is used to display the virtual vehicle; wherein, the deflection animation is used to display the deflection trajectory of the virtual vehicle, the deflection prompt information is used to indicate the deflection direction of the virtual vehicle, and the target display style is used to indicate that the virtual vehicle is deflecting.

[0106] The deflection animation is a dynamic visual effect that is rendered and played synchronously as the virtual vehicle deflects along the tangent direction of the surface. It visually demonstrates the complete deflection and movement path of the virtual vehicle. The deflection animation can be presented using any one or more combinations of trajectory flowing light effects, virtual path dotted line guidance animation, and dynamic directional arrow extension animation. The deflection trajectory is the movement path formed by continuously stitching together the spatial coordinates of the virtual vehicle frame by frame as it deflects along the tangent direction of the object's surface.

[0107] Deflection prompts are visual indicators displayed in the virtual scene's interactive interface, clearly guiding the virtual vehicle to its intended target direction. Deflection prompts can take various visual forms, including minimalist text annotations, floating location icons, corner directional indicators, and fixed-point color flashing alerts.

[0108] It should be noted that the target display style differs from that of a virtual vehicle in normal driving mode. The display style includes multiple dimensions of visual appearance, such as the virtual vehicle's rendering color scheme, model outline, ambient lighting effects, surface texture, display transparency, dynamic flashing frequency, and local marker shapes. By differentiating the parameters of these different dimensions, the visual appearance of the virtual vehicle under different driving states can be intuitively distinguished. For example, a virtual vehicle in normal driving mode uses a basic inherent color, a regular texture, and no additional special effects rendering, while a virtual vehicle undergoing deflection can switch to a highlight-specific color scheme, add an luminous outline edge, and feature flowing ambient lighting effects, quickly visually identifying that the virtual vehicle is performing a tangential deflection.

[0109] In actual implementation, the spatial coordinates and real-time orientation data of the virtual vehicle during its deflection along the surface tangent direction are collected frame by frame. The deflection trajectory is generated by fitting the continuous point path and the deflection animation is rendered and output frame by frame. The deflection direction angle value is calculated based on the tangent orientation of the collision position, and the deflection prompt information is generated and displayed by mapping and matching the preset visual identifier parameters. The color, light and shadow and texture materials corresponding to the virtual vehicle's conventional display are replaced by calling the exclusive rendering configuration parameters. The visual presentation effect of the virtual vehicle is refreshed frame by frame to form the target display style. All visual generation calculations are performed synchronously with the frame rhythm of the virtual vehicle deflection control.

[0110] As an example, see Figure 4 , Figure 4 This is a schematic diagram of collision handling in a virtual scene provided in the embodiments of this application. Figure 1 During the process of controlling the virtual vehicle to deflect along the surface tangent direction based on the current direction of movement, the deflection prompt information indicated by the dashed box 401 is displayed.

[0111] As another example, see Figure 5 , Figure 5 This is a schematic diagram of collision handling in a virtual scene provided in the embodiments of this application. Figure 2 During the process of controlling the virtual vehicle to deflect along the surface tangent direction based on the current direction of movement, the virtual vehicle is displayed using the target display style indicated by 501.

[0112] Thus, by displaying deflection animations, deflection prompts, or using target display styles while controlling a virtual vehicle to deflect along the surface tangent based on its current direction of movement, the deflection trajectory and direction of the virtual vehicle can be presented intuitively and concretely. This allows for quick differentiation between the deflection operation state and the normal driving state of the virtual vehicle, overcoming the shortcomings of relying solely on the vehicle's displacement dynamics to accurately identify the intention to adjust the movement in real time. This significantly improves the intuitiveness of visual interaction and the efficiency of control recognition, while also enriching the visual layers of the screen and enhancing the immersive experience of vehicle movement control in the virtual scene.

[0113] In some embodiments, to overcome the limitations of fixed surface tangent deflection directions, meet the personalized needs of autonomous steering, and improve the control freedom and interactive adaptability of virtual vehicles, the deflection direction is flexibly adjusted as needed during virtual vehicle deflection in response to deflection direction adjustment commands. Specifically, during the process of controlling the virtual vehicle to deflect along the surface tangent direction based on the current direction of movement, the virtual vehicle is controlled to deflect along the deflection direction indicated by the adjustment command based on the current direction of movement in response to the deflection direction adjustment command.

[0114] Among them, the deflection direction adjustment command is an interactive control command generated during the deflection of the virtual vehicle along the surface tangent direction. The command carries a specific target deflection orientation parameter and can change the original deflection direction set by the virtual vehicle to conform to the surface tangent. The deflection direction adjustment command can be triggered by any human-computer interaction method, such as clicking the left and right deflection controls on the interactive interface, directional sliding on the touch screen, moving the joystick left and right, or pressing the function buttons on the peripheral device.

[0115] In practice, during the process of controlling the virtual vehicle to deflect along the surface tangent direction based on the current direction of movement, deflection adjustment controls are displayed to adjust the deflection direction. In response to triggering an operation on a deflection adjustment control, an adjustment command for the corresponding deflection direction is generated. Different deflection adjustment controls correspond to different deflection directions. For example, displaying a left deflection adjustment control and a right deflection adjustment control; the left deflection adjustment control corresponds to a left deflection direction, and the right deflection adjustment control corresponds to a right deflection direction. Triggering either deflection adjustment control will generate an adjustment command for the corresponding deflection direction.

[0116] Among them, the triggering operation refers to the behavior of the user to trigger a certain function or event by interacting with the display interface of the terminal. The triggering operation can include one or more of the following: single click operation, double click operation, long press operation, drag operation, swipe operation, hover operation, shortcut key, voice control, and gesture operation. The triggering operations provided in the embodiments of this application can be referred to the above description, and will not be repeated hereafter.

[0117] As an example, see Figure 6 , Figure 6This is a schematic diagram of collision handling in a virtual scene provided in the embodiments of this application. Figure 3 The display shows deflection adjustment controls 601 and 602 for adjusting the deflection direction. In response to a trigger operation on the deflection adjustment control 601, an adjustment command for leftward is triggered.

[0118] In this way, by responding to the adjustment command of the deflection direction in real time during the process of controlling the virtual vehicle to deflect along the surface tangent direction, the target deflection direction of the virtual vehicle can be dynamically changed, breaking away from the fixed limitation of the preset surface tangent deflection direction, adapting to the movement control needs of different control intentions and complex virtual scenes, effectively improving the control freedom and interactive adaptability of the virtual vehicle, and further optimizing the control feel of the virtual vehicle and the user's immersive gaming experience.

[0119] In some embodiments, to differentiate the deflection visual characteristics of different types of virtual vehicles, create differentiated visual presentations, and improve the recognizability of the deflection states of various virtual vehicles, a matching deflection effect is displayed according to the type of virtual vehicle during the deflection process. Specifically, during the process of controlling the virtual vehicle to deflect along the tangent direction of the surface based on the current direction of movement, a corresponding deflection effect is displayed according to the type of virtual vehicle; different types of virtual vehicles correspond to different deflection effects.

[0120] Here, virtual vehicles can be categorized based on any one or more combinations of dimensions, including weight attribute level, functional application positioning, appearance category, size specifications, and power drive method. This allows for multiple classification standards, such as light and heavy vehicles, functional purpose distinctions, and appearance category distinctions, providing a precise classification basis for matching exclusive and differentiated deflection effects to different virtual vehicles. For example, by weight, they can be divided into light, medium, and heavy virtual vehicles; by function, they can be divided into racing, off-road, and transportation virtual vehicles; by appearance, they can be divided into virtual car, sports car, and virtual Class A virtual vehicles; by size, they can be divided into micro, small, and large virtual vehicles; and by power, they can be divided into wheeled, tracked, and hovercraft-driven virtual vehicles.

[0121] It should be noted that the deflection effect is a customized dynamic visual effect that is presented synchronously with the virtual vehicle as it deflects along the tangent direction of the surface based on the current direction of movement. It not only intuitively indicates that the virtual vehicle is deflecting along the tangent direction of the surface and clearly reflects the running status, but also identifies the type of virtual vehicle, improving visual recognition efficiency. At the same time, it enriches the visual expressiveness of the virtual vehicle deflection process and enhances the user's control and interaction experience.

[0122] Different deflection effects differ in at least one of the following dimensions: color, light and shadow brightness, particle shape, dynamic change rhythm, effect attachment position, coverage size range, luminous intensity, rendering duration, texture style, and sub-effect stacking combination.

[0123] As an example, see Figure 7 , Figure 7 This is a schematic diagram of collision handling in a virtual scene provided in the embodiments of this application. Figure 4 During the process of controlling the virtual vehicle to deflect along the surface tangent direction based on the current movement direction, a deflection effect corresponding to the virtual vehicle 701 is displayed.

[0124] As another example, see Figure 8 , Figure 8 This is a schematic diagram of collision handling in a virtual scene provided in the embodiments of this application. Figure 5 During the process of controlling the virtual vehicle to deflect along the surface tangent direction based on the current movement direction, the deflection effect corresponding to the virtual vehicle 801 is displayed.

[0125] In this way, when controlling the virtual vehicle to deflect along the tangent direction of the surface based on the current direction of movement, exclusive deflection effects are displayed according to the type of virtual vehicle. This can intuitively reflect the running status of the virtual vehicle undergoing tangential deflection. By relying on differentiated visual effects, different types of virtual vehicles can be quickly distinguished, improving the user's efficiency in recognizing vehicle types and motion states, enriching the visual layers of the virtual scene, and enhancing the visual expressiveness and immersive interactive experience of the virtual vehicle control process.

[0126] In some embodiments, in order to meet the personalized adjustment needs of different users for the deflection sensitivity and deflection speed of virtual vehicles, and to improve the adaptability of deflection rate and the degree of control customization, two types of influencing weights are displayed in the settings interface and the weight settings control. The first deflection rate is determined by combining the movement speed, the penetration depth and the set weights, and the virtual vehicle deflection is controlled. Specifically, the deflection rate is determined based on the virtual vehicle's movement speed and penetration depth. Movement speed is the speed at which the virtual vehicle moves before colliding with an object in the virtual scene. Penetration depth is the distance the virtual vehicle and the object intersect at the collision point. Before controlling the virtual vehicle to deflect along the surface tangent direction based on its current movement direction, the virtual scene's settings interface is displayed, and a weight setting control is shown in the settings interface. This control is used to set the first influence weight of movement speed on the deflection rate and the second influence weight of penetration depth on the deflection rate. In response to the weight setting operation performed based on the weight setting control, the set first and second influence weights are displayed. Correspondingly, controlling the virtual vehicle to deflect along the surface tangent direction based on its current movement direction can be achieved in the following way: using a first deflection rate, the virtual vehicle is controlled to deflect along the surface tangent direction based on its current movement direction. The first deflection rate is determined based on the movement speed, penetration depth, first influence weight, and second influence weight.

[0127] It should be noted that the deflection rate is a quantitative value of the change in the deflection angle of the virtual vehicle per unit time during the process of the virtual vehicle deflecting along the tangential direction of the surface based on the current direction of movement. It is used to characterize the speed of the virtual vehicle's tangential deflection action.

[0128] It should be noted that the movement speed of the virtual vehicle before it collides with an object in the virtual scene is determined by performing collision detection with the virtual vehicle's current position as the starting point and the expected position as the ending point. This determines the movement speed of the virtual vehicle in the rendering frame preceding the moment when the collision interaction between the virtual vehicle and an object in the virtual scene is identified.

[0129] In actual implementation, the display settings control is activated. In response to the trigger operation of the settings control, the virtual scene settings interface is displayed. The virtual scene settings interface is a visual interactive display interface that is independent of the virtual vehicle driving screen and carries various control parameter configuration functions.

[0130] The weight setting control can take the form of any one or more combinations of horizontal sliders, precise numeric input boxes, and multi-level selection buttons, and be displayed in the settings interface of the virtual scene. The weight setting operation performed based on the weight setting control involves parameter modification interactions such as dragging to adjust the weight setting control, entering numerical values, selecting levels, and clicking to confirm, through any one or more combinations of these actions.

[0131] As an example, see Figure 9 , Figure 9 This is a schematic diagram of collision handling in a virtual scene provided in the embodiments of this application. Figure 6 In the settings interface, settings controls 901 and 902 for setting the first influence weight are displayed, and settings controls 903 and 904 for setting the second influence weight are displayed.

[0132] It should be noted that different types of virtual vehicles are pre-matched with different initial values ​​for the first and second influence weights to adapt to the native deflection control physics characteristics of various virtual vehicles.

[0133] In practical implementation, the movement speed of the virtual vehicle before colliding with objects in the virtual scene and the penetration depth at the collision point are first obtained. The original movement speed values ​​are then mapped to a preset reasonable speed standard range to obtain speed mapping values, and the original penetration depth values ​​are mapped to a preset reasonable depth standard range to obtain depth mapping values. The speed mapping values ​​are then multiplied by a first influence weight to obtain a speed-weighted calculation component, and the depth mapping values ​​are multiplied by a second influence weight to obtain a depth-weighted calculation component. The speed-weighted calculation component and the depth-weighted calculation component are then summed to obtain the first deflection rate. The mapping method can be either linear, uniformly proportional mapping or a customized nonlinear curve mapping.

[0134] For example, the initial moving speed of the virtual vehicle before colliding with an object in the virtual scene is 24, and the initial penetration depth at the collision location is 1.2. The first influence weight is set to 0.6 and the second influence weight is set to 0.4. The initial moving speed is mapped to an integer speed value of 6 through a preset mapping rule, and the initial penetration depth is mapped to an integer depth value of 3 through a preset mapping rule. The speed mapping value is multiplied by the first influence weight to obtain a speed-weighted calculation component, and the depth mapping value is multiplied by the second influence weight to obtain a depth-weighted calculation component. The speed-weighted calculation component and the depth-weighted calculation component are summed to finally obtain the first yaw rate of 4.8.

[0135] In this way, the first influence weight corresponding to the movement speed and the second influence weight corresponding to the penetration depth can be configured independently through the weight setting control in the virtual scene setting interface. The configured weight values ​​can be displayed in real time. Based on the movement speed, penetration depth and the two types of custom weights, the first deflection rate is determined and the virtual vehicle is controlled to deflect along the tangent direction of the surface, adapting to the deflection requirements of different collision conditions, realizing personalized adjustment of deflection performance, and improving the control freedom and user interaction experience of the virtual vehicle.

[0136] In some embodiments, to allow users to intuitively preview the collision deflection effect corresponding to custom weights and to verify in advance whether the parameter settings meet the expected control, a collision preview control is set up, which can be triggered to display a preview screen showing the entire collision deflection process of the virtual vehicle under the corresponding parameters. Specifically, after displaying the first influence weight and the second influence weight obtained from the settings, the collision preview control is displayed; in response to the trigger operation of the collision preview control, a preview deflection screen is displayed; wherein, the preview deflection screen is used to display the deflection process when the virtual vehicle collides with an object in the virtual scene under the setting of the first influence weight and the second influence weight.

[0137] Here, the preview deflection screen is a dynamic visualization generated according to the currently configured first and second influence weights and the standard physical deflection calculation logic of virtual vehicles. It fully displays the overall deflection process when the virtual vehicle collides with objects in the virtual scene, intuitively presenting the real deflection effect of the virtual vehicle along the tangent direction of the surface under the corresponding weight parameters, making it easy for users to verify the rationality of the weight settings. The preview deflection screen can be presented in the form of a floating pop-up window, split screen interface, independent full-screen demonstration, etc., and this application embodiment does not impose any restrictions. The preview deflection screen synchronously restores the motion posture and scene visual effects of the entire process of virtual vehicle collision contact, intersecting cut-in, and tangent deflection.

[0138] Thus, after displaying the first and second impact weights, a collision preview control is shown. Executing a trigger operation on the collision preview control loads and outputs a preview deflection screen, which can intuitively display the complete collision deflection process between the virtual vehicle and objects in the virtual scene corresponding to the currently set first and second impact weights. This eliminates the need for parameter testing and debugging based on actual operating scenarios, significantly reducing the time spent adjusting weight parameters, facilitating quick determination of the weight value's suitability, accurately matching the control feel preferences of different users, and improving the convenience and accuracy of parameter configuration.

[0139] In some embodiments, to adapt to the control requirements of different usage scenarios and flexibly select whether to enable the automatic deflection capability of the virtual vehicle, a deflection switch is configured to manage the start and stop of the automatic deflection function. The deflection control process of the virtual vehicle along the surface tangent direction is only executed when the deflection switch is on. Specifically, the deflection switch is displayed and used to enable the automatic deflection function of the virtual vehicle; correspondingly, controlling the virtual vehicle to deflect along the surface tangent direction based on the current movement direction can be achieved in the following way: when the deflection switch is on, control the virtual vehicle to deflect along the surface tangent direction based on the current movement direction.

[0140] Here, the deflection switch is a functional control displayed in the virtual scene interface, used to toggle the automatic deflection function of the virtual vehicle on and off. The automatic deflection function of the virtual vehicle is an intelligent motion control function that, when the virtual vehicle collides with an object in the virtual scene, it can autonomously complete the deflection and movement along the tangent direction of the collision surface based on the current direction of movement, without manual intervention, according to the preset deflection control logic and the calculated deflection rate.

[0141] In practical implementation, the deflection switch can be configured as a toggle switch, a checkbox, or a clickable function switch button in the virtual scene interaction interface. When the deflection switch is off, it is turned on in response to a trigger operation. When the deflection switch is on, it is turned off in response to a trigger operation.

[0142] As an example, see Figure 10 , Figure 10 This is a schematic diagram of collision handling in a virtual scene provided in the embodiments of this application. Figure 7 The deflection switch 1001 is displayed as closed, and in response to a trigger operation on the deflection switch 1001, the deflection switch 1001 is turned on.

[0143] In this way, the interactive interface visually displays the deflection switch, and users can choose to start or stop the automatic deflection function of the virtual vehicle. The deflection control of the virtual vehicle along the tangent direction of the surface is triggered only when the deflection switch is on. This can adapt to different usage scenarios and personalized control preferences, enrich the control modes of the virtual vehicle, and improve the control flexibility and applicability.

[0144] In some embodiments, to guide users in optimizing the virtual vehicle collision control experience and understanding the practical value of the automatic deflection function, a target prompt message is displayed to prompt the user to turn on the deflection switch when specified collision posture and collision count conditions are met. Specifically, when the deflection switch is off, when the virtual vehicle collides with an object in the virtual scene, and the number of times the collision posture between the virtual vehicle and the object meets the preset collision posture reaches the first count, the target prompt message is displayed to prompt the user to turn on the deflection switch.

[0145] Understandably, when the deflection switch is in the off state, it means that the automatic deflection function of the virtual vehicle remains disabled, and the automatic deflection control logic will not be triggered when the virtual vehicle collides with objects in the virtual scene.

[0146] In practice, target prompts can be presented in any one or more combinations of forms, such as floating pop-ups, text prompts, and voice broadcasts linked to text displays, to enhance the intuitive reach of the prompts.

[0147] The "first count" is a pre-set counting threshold used to determine whether the trigger standard for displaying and guiding the activation of the deflection switch has been met. The "first count" can be customized and flexibly adjusted based on the difficulty level of the virtual scene, the type of virtual vehicle, the user's personalized control preferences, the adaptation requirements of different operating terminals, and the stringency of the preset collision posture judgment.

[0148] In practice, the number of times a virtual vehicle collides with an object in the virtual scene within a fixed time interval, and the collision posture matches a preset collision posture, can be preset. Once this number reaches the first threshold, the target prompt message is then triggered, avoiding unnecessary frequent prompts due to long-term global accumulation. Alternatively, switching the virtual scene map, restarting the virtual vehicle's process, or logging out and back into the virtual scene automatically resets the cumulative count of collisions matching the preset posture to zero, initiating a new round of counting and statistics.

[0149] In practical applications, the system displays the number of times a virtual vehicle collides with an object in a virtual scene, and the collision posture of the virtual vehicle and the object conforms to the preset collision posture. When the number of collisions reaches the first count, the number of collisions is highlighted.

[0150] As an example, see Figure 11 , Figure 11 This is a schematic diagram of collision handling in a virtual scene provided in the embodiments of this application. Figure 8 When the deflection switch 1101 is in the off state, when the virtual vehicle collides with an object in the virtual scene and the number of times the collision posture between the virtual vehicle and the object matches the preset collision posture reaches the first count, the target prompt information 1102 is displayed.

[0151] In other embodiments, the target prompt message carries a confirmation control, and in response to a triggering operation on the confirmation control, the on state of the deflection switch is switched from the off state to the on state.

[0152] Thus, under the premise that the deflection switch is in the off state, the number of collisions between the virtual vehicle and objects in the virtual scene with the preset collision posture is accumulated and counted. When the accumulated value reaches the first count, the target prompt message to turn on the deflection switch is displayed. The guidance push is only triggered when there are frequent adverse collision conditions that affect the operation. The timing of the prompt is precise and reasonable, avoiding meaningless pop-ups that interfere with normal operation. It intelligently guides users to experience the automatic deflection function, further optimizing the smoothness of virtual vehicle operation and user experience.

[0153] In some embodiments, to visually demonstrate the differences in driving path optimization brought about by the automatic deflection function and to facilitate users' clear perception of the actual effect of the function, comparative trajectory information containing two different driving paths is displayed when the deflection switch is turned on and the collision matches the preset collision posture. Specifically, when the deflection switch is on, when the virtual vehicle collides with an object in the virtual scene and the collision posture between the virtual vehicle and the object matches the preset collision posture, comparative trajectory information is displayed; wherein, the comparative trajectory information includes the collision trajectory without controlling the virtual vehicle's deflection and the deflection trajectory with controlling the virtual vehicle's deflection.

[0154] The collision trajectory without controlled virtual vehicle deflection is the original driving path formed naturally after a virtual vehicle collides with an object in the virtual scene, assuming the automatic deflection control logic for virtual vehicles is not enabled. The deflection trajectory with controlled virtual vehicle deflection is the optimized driving path formed when the virtual vehicle deflects along the tangent direction of the collision surface based on its current direction of movement after the automatic deflection control logic for virtual vehicles is enabled.

[0155] In actual implementation, the collision trajectory of the uncontrolled virtual vehicle deflection and the deflection trajectory of the controlled virtual vehicle deflection can be displayed in different styles. The display styles include at least one of the following: line color, line type (solid or dashed), line thickness, dynamic lighting effects, and label text. For example, the collision trajectory is presented as a thin gray dashed line, while the deflection trajectory is presented as a thick solid line in a bright color with a superimposed dynamic light effect.

[0156] In addition, at the associated location of the comparison trajectory information, the collision trajectory of the uncontrolled virtual vehicle deflection and the deflection trajectory of the controlled virtual vehicle deflection can be displayed simultaneously with quantitative parameter data such as driving distance, passage time, lag time, and deflection angle. Relying on intuitive and comparable numerical dimensions, the path optimization range and actual control improvement effect brought about by the automatic deflection function can be accurately quantified and presented.

[0157] Thus, when the deflection switch is turned on and the virtual vehicle collides with an object in the virtual scene in accordance with the preset collision posture, the system simultaneously displays a comparison of the collision trajectory without controlling the virtual vehicle's deflection and the deflection trajectory with controlling the virtual vehicle's deflection. This visually presents the difference between the two types of driving paths, allowing users to clearly perceive the optimization effect of the automatic deflection function on the driving trajectory, intuitively understand the actual role of the virtual vehicle deflection control, improve their awareness of the automatic deflection function's operating effect, and provide users with an intuitive reference for judging the rationality of the control logic, further optimizing the interactive experience during the virtual vehicle control process.

[0158] In some embodiments, controlling the virtual vehicle to deflect along the surface tangent direction based on the current movement direction can be achieved by: obtaining the penetration depth corresponding to the collision, and determining a depth weight based on the penetration depth, where the penetration depth is the distance between the virtual vehicle and the object at the collision location; determining a velocity weight based on the movement speed of the virtual vehicle, where the movement speed is the movement speed of the virtual vehicle before colliding with the object in the virtual scene; generating a correction impulse based on the depth weight and velocity weight; and applying the correction impulse to the virtual vehicle to control the virtual vehicle to deflect along the surface tangent direction.

[0159] Before generating the corrected impulse based on depth and velocity weights, the forward direction vector of the virtual vehicle is obtained; the minimum translation direction vector of the object at the collision position is obtained; the projection of the minimum translation direction vector onto the forward direction vector is subtracted from the minimum translation direction vector to obtain the corrected direction vector; correspondingly, the corrected impulse is generated based on depth and velocity weights, which can be achieved in the following way: the corrected impulse is generated based on the corrected direction vector, depth weights, and velocity weights.

[0160] In actual implementation, the penetration depth is obtained. The movement speed of virtual vehicles Depth weights are determined using formula (1). and speed weight .

[0161] Formula (1) in, It is a custom mapping function that can perform parameter transformation using linear mapping or nonlinear mapping, such as linear proportional mapping based on collision penetration depth or quadratic nonlinear mapping based on collision penetration depth. It is a custom mapping function that can perform parameter transformation using linear mapping or nonlinear mapping, such as linear proportional mapping based on vehicle speed or exponential nonlinear mapping based on vehicle speed.

[0162] The correction direction vector can be determined using formula (2). .

[0163] Formula (2) in, To correct the direction vector; It is the vector of minimum translation direction; This is the forward direction vector of the virtual vehicle.

[0164] Obtaining the corrected direction vector Depth weights and speed weight Then, the corrected impulse can be calculated using formula (3). .

[0165] Formula (3) In some embodiments, to allow users to intuitively perceive the direction and magnitude of the virtual deflection impulse, a deflection indicator is displayed during the deflection of the virtual vehicle. Deflection is achieved by applying a virtual deflection impulse to the virtual vehicle, and the deflection indicator is displayed while controlling the virtual vehicle to deflect along the surface tangent direction based on the current direction of movement; wherein the deflection indicator is used to indicate the direction of the virtual deflection impulse, and the size of the deflection indicator is positively correlated with the magnitude of the virtual deflection impulse.

[0166] Among them, virtual deflection impulse is a virtual physical force parameter acting on a virtual vehicle. It has clear directional and magnitude attributes. By applying virtual deflection impulse with corresponding direction and value to the virtual vehicle, the virtual vehicle can be driven to complete deflection motion along the tangent direction of the collision surface based on its current movement direction. The direction of the virtual deflection impulse determines the direction of deflection, and the magnitude determines the amplitude and intensity of deflection.

[0167] The deflection indicator is a visual identifier displayed during the deflection maneuver of a virtual vehicle. It is used to convey relevant parameter information about the virtual deflection impulse to the user and provide an intuitive visual reference for the deflection status.

[0168] In practical implementation, the deflection indicator accurately corresponds to the direction of the virtual deflection impulse through its pointing angle and extension direction, allowing users to directly identify the deflection drive direction of the virtual vehicle. The deflection indicator can employ various visual forms such as arrows, vector lines, conical light effects, and streamlined icons, all adhering to the core rule of indicating the direction of the virtual deflection impulse and how its size changes with the magnitude of the impulse. The deflection indicator can be displayed at relevant locations on the virtual vehicle; for example, it can be displayed at the front of the vehicle, on the side, around the point of impact, or on the top of the vehicle, adapting to different observation needs from various control perspectives and ensuring clear viewing for the user.

[0169] The dimensions of the deflection indicator include parameters such as display length, width, and display area. The dimensions are positively correlated with the magnitude of the virtual deflection impulse. The larger the value of the virtual deflection impulse, the larger the overall size of the deflection indicator, and the smaller the value of the virtual deflection impulse, the smaller the overall size of the deflection indicator. The dynamic changes in size intuitively reflect the strength of the virtual deflection impulse, making it easy for users to intuitively perceive the magnitude of the virtual vehicle deflection drive.

[0170] As an example, see Figure 12 , Figure 12 This is a schematic diagram of collision handling in a virtual scene provided in the embodiments of this application. Figure 9 During the process of controlling the virtual vehicle 1201 to deflect along the surface tangent direction based on the current direction of movement, the deflection indicator 1202 is displayed.

[0171] In this way, by applying virtual deflection impulse to the virtual vehicle to achieve deflection action, and displaying a deflection indicator simultaneously during the deflection process, the direction of the virtual deflection impulse is reflected by the indicator pointing to it, and the size of the indicator corresponds to the magnitude of the virtual deflection impulse. The originally invisible virtual physical drive parameters can be transformed into intuitive visual feedback, allowing users to clearly grasp the deflection trend and deflection intensity of the virtual vehicle in real time. This greatly improves the visualization and control perception of the deflection process, makes the feedback of the vehicle's motion status clearer, and optimizes the overall control interaction experience.

[0172] In some embodiments, to clearly present the contact state and deflection details between the virtual vehicle and the object, the contact area and the deflection process are magnified. Specifically, during the process of controlling the virtual vehicle to deflect along the tangent direction of the surface based on the current direction of movement, the contact area between the virtual vehicle and the object is magnified, and the deflection process of the virtual vehicle is magnified based on the magnified contact area.

[0173] Here, the contact area between the virtual vehicle and the object is the local area where the collision detection boundary of the virtual vehicle and the collision detection boundary of the object coincide and generate spatial interference when the virtual vehicle moves in the virtual scene and collides with the objects in the scene. It is also the core physical interaction area where the virtual vehicle receives the tangential direction constraint of the surface, triggers and executes the deflection action.

[0174] It should be noted that the magnified display of the virtual vehicle's deflection process based on the magnified contact area uses the magnified collision contact area as the visual center, and simultaneously magnifies the continuous motion state of the virtual vehicle deflecting along the tangent direction of the surface to focus on the detailed display of the core deflection action.

[0175] The magnification ratio of the contact area between the virtual vehicle and the object is a preset adjustable parameter. A fixed magnification factor can be set according to the layout of the virtual scene and the complexity of the collision, or the magnification ratio can be dynamically adjusted according to the magnitude of the collision.

[0176] It should be noted that the zoom-in operation is only performed during the entire process of the virtual vehicle deflecting along the tangent direction of the object's surface. After the virtual vehicle finishes deflecting and returns to normal driving mode, the screen will automatically return to the normal display ratio and normal viewing angle.

[0177] In addition, a split-screen display mode can be used, with one screen retaining the general global view of the virtual scene and the other screen magnifying the contact area and the deflection process of the virtual vehicle, taking into account both the overall view and the observation of local details.

[0178] In this way, as the virtual vehicle deflects along the tangent direction of the object's surface, the contact area between the virtual vehicle and the object is magnified and displayed. The entire deflection process is then magnified and displayed synchronously with this contact area as the center. This allows the focus to be on the core local area of ​​the collision interaction, reducing the interference of irrelevant scene images. This makes the contact state and deflection action details, which are originally difficult to distinguish from a global perspective, clearly presented. Users can accurately perceive the real-time interaction posture and deflection trajectory changes between the vehicle and the object, greatly improving the visual feedback accuracy and interactive intuitiveness of the deflection process, and making the motion control feedback of the virtual vehicle clearer and more controllable.

[0179] In some embodiments, to realistically perceive the severity of a collision, vibration feedback that is positively correlated with the collision intensity is output upon collision. Specifically, when a virtual vehicle collides with an object in a virtual scene, vibration feedback is output, and the intensity of the vibration feedback is positively correlated with the collision intensity of the virtual vehicle.

[0180] It should be noted that the collision intensity of a virtual vehicle is a quantitative parameter used to characterize the severity of a collision between a virtual vehicle and an object in a virtual scene. The collision intensity is calculated by comprehensively considering the instantaneous moving speed of the virtual vehicle before the collision, the collision angle, the collision contact area, the virtual mass of the virtual vehicle itself, and the virtual physical properties of the object being collided with. The magnitude of the collision intensity directly determines the output intensity of the subsequent vibration feedback.

[0181] It is understandable that vibration feedback is a tactile sensory interaction signal output to the user, used to convey interactive information about the collision between virtual vehicles and objects in the virtual scene. Specifically, it can be presented in the form of physical vibration through hardware devices such as linear motors on mobile terminals and vibration units on game controllers. The intensity parameters of vibration feedback are positively correlated with the collision intensity of the virtual vehicle. The higher the collision intensity, the more significant the intensity indicators such as the amplitude and frequency of the vibration. The lower the collision intensity, the more gradual the vibration intensity. This allows users to intuitively perceive the intensity of the collision through touch, replacing or assisting visual feedback and enhancing the immersive and realistic sensory experience of the virtual vehicle interaction process.

[0182] The positive correlation between the intensity of vibration feedback and the collision intensity of the virtual vehicle means that the intensity parameters of vibration feedback, such as vibration amplitude, vibration frequency, and vibration intensity, will increase synchronously as the value of the collision intensity of the virtual vehicle increases and decrease synchronously as the value of the collision intensity decreases, thus accurately matching the severity of the collision through changes in vibration intensity.

[0183] In actual implementation, the virtual scene settings interface is configured with vibration feedback adjustment controls, allowing users to adjust the overall intensity of vibration feedback or choose to turn off the vibration feedback function corresponding to collisions.

[0184] In this way, when a virtual vehicle collides with an object in a virtual scene, it outputs vibration feedback, and the intensity of the vibration feedback is positively correlated with the intensity of the collision of the virtual vehicle. This can transform the abstract intensity of the collision in the virtual scene into an intuitive tactile perception signal, breaking through the limitations of single visual feedback. It allows users to perceive the severity of the collision in real time through touch. The way the vibration intensity dynamically adapts to the collision intensity conforms to the laws of real physical interaction, greatly improving the realism and immersion of virtual vehicle collision interaction, and making the overall control interaction feedback more three-dimensional and in line with the actual experience.

[0185] In some embodiments, to make the deflection sound effects of the virtual vehicle more suitable for its own attributes or the scene it is in, a corresponding target audio is played. Specifically, during the process of controlling the virtual vehicle to deflect along the tangent direction of the surface based on the current direction of movement, a target audio corresponding to the type of the virtual vehicle is played, with different target audios corresponding to different types of virtual vehicles; or, during the process of controlling the virtual vehicle to deflect along the tangent direction of the surface based on the current direction of movement, a target audio corresponding to the type of environment in which the virtual vehicle is located is played, with different target audios corresponding to different types of environments.

[0186] In practical implementation, the target audio supports user-defined settings. A first audio setting control is displayed for each type of virtual vehicle. In response to audio setting instructions based on the first audio setting control, the set audio is determined to be the corresponding audio. Similarly, a second audio setting control is displayed for each type of environment. In response to audio setting instructions based on the second audio setting control, the set audio is determined to be the corresponding audio.

[0187] Different virtual vehicle types correspond to different target audios, which means that each virtual vehicle type is configured with an independent target audio. When the virtual vehicle deflects along the tangent direction of the surface, the type of the virtual vehicle is identified and the target audio that matches it is played. The target audios corresponding to different virtual vehicle types are different in at least one of timbre, rhythm, and sound effects, so as to form acoustic feedback that is adapted to the virtual vehicle type.

[0188] Similarly, different target audios correspond to different environment types. This means that a unique target audio is set for each environment type. When the virtual vehicle deflects along the tangent direction of the surface, the type of environment in which the virtual vehicle is located is determined and the corresponding matching target audio is played. The target audios corresponding to different environment types have at least one difference in timbre, rhythm, and sound effects, so that the auditory performance of the deflection process is consistent with the virtual scene environment.

[0189] The type of environment in which a virtual vehicle operates is categorized based on the objective attributes of the virtual scene in which the virtual vehicle runs. This categorization is based on at least one of the following: the surface material, spatial structure, atmosphere, and interaction rules of the virtual scene. Different types of environments possess different scene characteristics and interaction conditions. For example, hard-surface environments are characterized by smooth and hard surface materials; ice environments have low-friction surface physical properties; water environments are primarily composed of liquid media; and enclosed indoor environments have a closed spatial structure and unique scene interaction logic. The classification of each type of environment clearly defines the movement restrictions and interaction adaptation range of virtual vehicles within their respective scenes.

[0190] For example, when a virtual vehicle deflects along the tangent of an object's surface based on its current direction of movement, if the virtual vehicle is a wheeled vehicle, it plays target audio related to tire friction, which is adapted to the deflection friction characteristics of wheeled vehicles. If the virtual vehicle is a hovering vehicle, it plays target audio related to airflow disturbance. In addition, when the virtual vehicle deflects on an ice surface, it plays target audio related to ice sliding, and when the virtual vehicle deflects on a concrete road surface, it plays target audio related to hard ground friction. This achieves the effect of playing corresponding target audio based on the type of virtual vehicle or the type of environment.

[0191] In this way, as the virtual vehicle deflects along the tangent of the surface, playing matching target audio based on the type of the virtual vehicle or the type of environment it is in allows the auditory feedback of the deflection process to be highly adapted to the attributes of the virtual vehicle and the environmental characteristics of the virtual scene. This eliminates the monotony of a single fixed audio and makes the acoustic feedback fit the actual scene and characteristics of the virtual interaction, further enriching the sensory experience of the virtual vehicle's motion interaction. This makes the overall audiovisual experience of virtual control more layered and realistic, and enhances the immersion and sense of involvement in the virtual scene interaction.

[0192] In some embodiments, to meet users' personalized control needs regarding the deflection speed of virtual vehicles and adapt to different operating habits and scene experiences, a setting method for adjustable deflection rate is provided before the virtual vehicle deflects. Specifically, before controlling the virtual vehicle to deflect along the surface tangent direction based on the current movement direction, a setting interface for the virtual scene is displayed, and a rate setting control for setting the deflection rate is displayed in the setting interface; in response to the setting operation of the rate setting control for the deflection rate, the set deflection rate is determined as the second deflection rate; correspondingly, controlling the virtual vehicle to deflect along the surface tangent direction based on the current movement direction can be achieved by using the second deflection rate to control the virtual vehicle to deflect along the surface tangent direction based on the current movement direction.

[0193] Here, the rate setting control is a visual interactive component in the virtual scene's settings interface used to adjust the deflection rate of the virtual vehicle. The rate setting control can be a slider, a numeric input box, a gear selection button, or an increase / decrease adjustment button. Corresponding setting operations include dragging the slider, inputting or modifying data in the numeric input box, clicking the gear selection button to switch gears, and clicking the increase / decrease adjustment button to increase or decrease the value. Different forms of rate setting controls correspond to different interactive operation methods, all of which allow for customized settings of the deflection rate.

[0194] In actual implementation, in response to the setting operation of the deflection rate based on the rate setting control, a confirmation control is displayed, and in response to the triggering operation of the confirmation control, the set deflection rate is determined as the second deflection rate.

[0195] It should be noted that the deflection rate has a preset legal value range. The second deflection rate can only be between the preset minimum and maximum deflection rates. Settings outside the preset range will not take effect, and the rate value exceeding the range will be automatically limited to the rate value corresponding to the range boundary. This avoids affecting the normal interactive experience of virtual vehicle deflection due to the rate setting being too high or too low. For example, if the preset legal value range for the deflection rate is a minimum of 0.5 and a maximum of 3.0, when the user sets the deflection rate to 4.0 through the rate setting control, the value exceeding the upper limit will be automatically limited to the maximum deflection rate of 3.0. When the user sets the deflection rate to 0.3, the value below the lower limit will be automatically limited to the minimum deflection rate of 0.5.

[0196] Among them, the deflection rate is a quantitative parameter used to measure how fast a virtual vehicle deflects along the tangent direction of the surface based on the current direction of movement. The magnitude of the deflection rate directly determines the execution speed of the virtual vehicle's deflection action.

[0197] In practical implementation, a default deflection rate is configured. When the deflection rate setting operation is not performed through the rate setting control, the virtual vehicle deflects along the surface tangent direction using the default deflection rate. The deflection rate adjustment supports multi-level granularity. When the user operates the rate setting control, the specific value of the second deflection rate can be adjusted step by step according to fixed parameter increments.

[0198] In addition, in response to the setting operation of the deflection rate based on the rate setting control, after the set deflection rate is determined as the second deflection rate, the reset control is displayed, and in response to the trigger operation of the reset control, the set deflection rate is reset to the default deflection rate.

[0199] In actual implementation, after displaying the virtual scene settings interface and presenting the rate setting control, the operation input information generated by the rate setting control is obtained. The corresponding rate value is extracted from the operation input information. The extracted rate value is compared with the preset minimum deflection rate and maximum deflection rate. When the comparison result indicates that the rate value meets the value range, it is determined as the second deflection rate. During the process of controlling the deflection of the virtual vehicle, the deflection angle increment of the virtual vehicle is calculated in real time based on the second deflection rate. The motion posture of the virtual vehicle is adjusted frame by frame according to the calculated deflection angle increment, so that the virtual vehicle completes the deflection action along the surface tangent direction based on the current movement direction at the second deflection rate.

[0200] As an example, see Figure 13 , Figure 13 This is a schematic diagram of collision handling in a virtual scene provided in the embodiments of this application. Figure 10 The virtual scene settings interface is displayed, and a rate setting control 1301 for setting the deflection rate is displayed; in response to the setting operation of the deflection rate based on the rate setting control, the set deflection rate "1.5" is determined as the second deflection rate.

[0201] Thus, by displaying the virtual scene's settings interface and rate setting controls before the virtual vehicle deflects along the surface tangent direction based on its current movement direction, responding to the setting operation for the deflection rate and determining the corresponding second deflection rate, and controlling the virtual vehicle to perform the deflection action with this custom rate, the deflection speed of the virtual vehicle can be adapted to the operating habits and usage needs of different users. This breaks through the singleness of interaction caused by a fixed deflection rate, making the deflection attitude adjustment of the virtual vehicle more flexible and adaptable, improving the personalization of the virtual vehicle's motion control, and making the overall interactive experience more in line with the user's actual operating preferences.

[0202] In some embodiments, to facilitate users' intuitive preview of the collision posture of virtual vehicles and to know the post-collision posture effect in advance, a posture viewing control is used to display the corresponding preset collision posture. Specifically, the posture viewing control is displayed in the virtual scene interface; in response to a trigger operation on the posture viewing control, at least one preset collision posture is displayed.

[0203] Here, the attitude viewing control is a visual interactive component in the virtual scene interface used to trigger the display of preset collision attitudes. The attitude viewing control can use various display formats such as icon buttons, text labels, and floating interactive controls. A preset collision attitude is the attitude state of a pre-configured virtual vehicle after colliding with an object in the virtual scene. The preset collision attitude includes attitude characteristics such as the virtual vehicle's angle deflection, positional shift, and shape adjustment. Each preset collision attitude is displayed in two formats: a static attitude image and a dynamic attitude animation. The dynamic attitude animation can fully present the complete process of the virtual vehicle switching from a normal motion attitude to a preset collision attitude. During the display of the preset collision attitude, other unnecessary interactive controls within the virtual scene interface can be hidden simultaneously to highlight the effect of the virtual vehicle's preset collision attitude.

[0204] In practical applications, at least one preset collision posture can be displayed through at least one of the following: pop-up window, floating layer, side preview bar, full-screen display interface, thumbnail scrolling panel, and embedded preview area. Pop-up window and floating layer can display preset collision posture without obscuring the core virtual scene interaction content. Side preview bar can arrange and display multiple preset collision postures along the edge of the virtual scene interface. Full-screen display interface can fully present the detailed effects of preset collision posture. Thumbnail scrolling panel can display multiple preset collision postures at the same time for quick viewing. Embedded preview area is directly integrated into the virtual scene interface to realize synchronous display of posture.

[0205] In actual implementation, after displaying at least one preset collision posture, a close control for the at least one preset collision posture is displayed. In response to a trigger operation on the close control, the display of the at least one preset collision posture is cancelled. Alternatively, the at least one preset collision posture has a preset display duration; when the display duration of the at least one preset collision posture reaches the preset display duration, the display of the at least one preset collision posture is cancelled.

[0206] As an example, see Figure 14 , Figure 14 This is a schematic diagram of collision handling in a virtual scene provided in the embodiments of this application. Figure 10 First, in the virtual scene interface, display the attitude viewing control 1401; in response to the trigger operation of the attitude viewing control 1401, display the preset collision attitude 1402 and the preset collision attitude 1403.

[0207] Thus, displaying a posture viewing control in the virtual scene interface and responding to trigger operations on the posture viewing control to show at least one preset collision posture allows users to preview the posture performance after the collision before the virtual vehicle actually collides. This provides an intuitive understanding of the presentation effect of the virtual vehicle's collision posture, improves the visibility and predictability of virtual scene interaction, allows users to form a clear understanding of the collision performance of virtual vehicles, enriches the interactive dimensions in the virtual vehicle movement control process, and enhances the overall interactive smoothness and immersive experience of the virtual scene.

[0208] In some embodiments, the virtual vehicle is driven by a virtual character. Before controlling the virtual vehicle to deflect along the surface tangent direction based on the current direction of movement, the backpack interface of the virtual character's virtual backpack is displayed, and the target virtual item is displayed in the backpack interface. In response to a trigger operation for the target virtual item, the installation control corresponding to the target virtual item is displayed. In response to a trigger operation for the installation control, the virtual character is controlled to install the target virtual item onto the virtual vehicle. While maintaining the continuity of the virtual vehicle's movement, controlling the virtual vehicle to deflect along the surface tangent direction based on the current direction of movement can be achieved in the following way: when the virtual vehicle has the target virtual item installed, the continuity of the virtual vehicle's movement is maintained, and the virtual vehicle is controlled to deflect along the surface tangent direction based on the current direction of movement.

[0209] Here, the virtual backpack is the storage medium for virtual characters' items in the virtual scene. It is used to store and collect various virtual items acquired by the virtual character, and supports the display, selection and use of virtual items. It is the basic medium for virtual characters to interact with items and configure equipment in the virtual scene.

[0210] The target virtual prop is a virtual item in the virtual scene that can be acquired by the virtual character, stored in the virtual backpack, and can form an assembly and matching relationship with the virtual vehicle. It is used to control the virtual vehicle to deflect along the tangent direction of the surface based on the current movement direction when the virtual vehicle collides with an object in the virtual scene and the collision posture of the virtual vehicle and the object conforms to the preset collision posture.

[0211] The target virtual item can be obtained by completing designated tasks within the virtual scene, participating in limited-time interactive events held within the virtual scene, exchanging or purchasing it through the virtual scene's in-game store, achieving control achievements and challenge objectives set within the virtual scene, picking it up within the virtual scene, and randomly obtaining it as a reward after a virtual vehicle control match. For example, the target virtual item and virtual character are displayed in the virtual scene. When the target virtual item exists within a preset range centered on the virtual character, a pick-up control for the target virtual item is displayed. In response to triggering the pick-up control, the virtual character is controlled to pick up the target virtual item and add it to the virtual inventory.

[0212] Among them, the target virtual props can be functional virtual props or appearance virtual props, such as deflection stabilization components that help virtual vehicles complete tangential deflection, air guide wings that optimize deflection attitude, balance accessories that improve deflection smoothness, as well as decorative vehicle paint, crash bars, exclusive tail wings, and light-up decorations. Once these props are equipped, they can all serve as prerequisites for virtual vehicles to deflect along the tangential direction of the surface.

[0213] In actual implementation, in response to the trigger operation for the target virtual item, the target virtual item is controlled to be in a selected state, and the installation control corresponding to the selected target virtual item is displayed.

[0214] In addition, after the virtual character installs the target virtual item onto the virtual vehicle, an item icon is displayed to indicate that the virtual vehicle has the target virtual item installed.

[0215] In practical applications, a backpack control is displayed in the interface of a virtual scene, and the virtual backpack interface is displayed in response to the triggered operation of the backpack control.

[0216] As an example, see Figure 15 , Figure 15 This is a schematic diagram of collision handling in a virtual scene provided in the embodiments of this application. Figure 10 Second, display the virtual backpack of the virtual character in the backpack interface 1501, and display the target virtual item in the backpack interface 1501; in response to the trigger operation for the target virtual item, display the installation control 1502 corresponding to the target virtual item.

[0217] In this way, by selecting and installing the target virtual item into the virtual vehicle being driven in the virtual character's backpack interface, the virtual vehicle is controlled to maintain continuous movement and deflect along the tangent direction of the surface based on the current direction of movement, provided that the virtual vehicle is equipped with the target virtual item. This makes the deflection action of the virtual vehicle linked with the item's equipment status, enriching the interactive logic and gameplay dimensions of virtual vehicle control. It ensures that the deflection trigger of the virtual vehicle has clear preconditions, while ensuring that the virtual vehicle does not experience movement interruption or posture lag during the deflection process after the item is equipped. This maintains the overall smoothness of vehicle movement and control stability, achieving an organic combination of virtual item equipment effect and virtual vehicle movement deflection control, and enhancing the customization and fun of vehicle driving interaction in the virtual scene.

[0218] In some embodiments, to facilitate users in reviewing the deflection process of the virtual vehicle and preserving exciting moments of the vehicle's movement, a playback control is used to play a replay video of the virtual vehicle's deflection process. Specifically, after controlling the virtual vehicle to deflect along the surface tangent direction based on the current direction of movement, the playback control is displayed; in response to a trigger operation on the playback control, the playback video is played, which replays the process of the virtual vehicle deflecting along the surface tangent direction based on the current direction of movement.

[0219] Here, the replay control is a visual interactive component displayed in the virtual scene interface after the virtual vehicle completes its deflection along the surface tangent direction based on the current movement direction. The replay control is used to replay the process of the virtual vehicle deflecting along the surface tangent direction based on the current movement direction. The replay control can be displayed in various forms such as icon buttons, text labels, and floating interactive controls.

[0220] The replay video is a complete record of the entire process of a virtual vehicle's deflection, from initiation to completion. It fully preserves the virtual vehicle's movement trajectory, deflection attitude, and scene interactions, reproducing the complete process of the virtual vehicle's deflection along the surface tangent. The display modes of the replay video can include floating window playback, full-screen playback, pop-up embedded playback, and sidebar preview playback, etc., and this application embodiment does not impose any limitations. During playback, the replay video supports pause, frame-by-frame viewing, loop playback, fast forward, and rewind controls, allowing users to carefully examine the attitude details and trajectory changes during the virtual vehicle's deflection process.

[0221] In practice, after playing the playback video, a sharing control for the playback video is displayed. In response to the trigger operation of the sharing control, the playback video is shared to the target sharing object.

[0222] As an example, see Figure 16 , Figure 16 This is a schematic diagram of collision handling in a virtual scene provided in the embodiments of this application. Figure 10 Third, after controlling the virtual vehicle to deflect along the surface tangent direction based on the current movement direction, display the playback control 1601.

[0223] Thus, after the virtual vehicle completes its deflection along the surface tangent based on its current direction of movement, a playback control is displayed. Responding to the trigger operation of the playback control, the playback video recording the deflection process is played. This can completely reproduce the trajectory, attitude, and scene interaction of the virtual vehicle's deflection, allowing users to review and analyze the details of the vehicle's deflection at any time. This enables a traceable display of the vehicle's movement process, enriches the interactive forms after controlling the virtual vehicle, enhances the integrity and visual appeal of the vehicle's movement experience in the virtual scene, and makes the display of the deflection process more continuous.

[0224] In some embodiments, to provide temporary attack protection for the virtual vehicle after deflection, a virtual protection layer with a valid duration is configured for the virtual vehicle and then disappears after the duration expires. Specifically, after controlling the virtual vehicle to deflect along the surface tangent direction based on the current direction of movement, the virtual vehicle acquires a virtual protection layer. This virtual protection layer is used to block attacks on the virtual vehicle and has a valid duration; when the valid duration expires, the virtual protection layer disappears.

[0225] It should be noted that the virtual protection layer is used to block attacks on virtual vehicles. It is a digital protective mechanism attached to the virtual vehicle within the virtual environment. During its effective period, the virtual protection layer provides attack isolation for the virtual vehicle. It can block various attacks launched by other objects or other virtual vehicles within the virtual environment, preventing the virtual vehicle from suffering state loss or attribute reduction due to attacks. The virtual protection layer moves synchronously with the virtual vehicle within the virtual environment, maintaining complete protective coverage at all times. The virtual protection layer can take the form of a visual energy shield, light barrier, defensive aura, protective barrier, etc., all of which can achieve the core protective functions of blocking attacks and protecting the virtual vehicle.

[0226] The virtual protection layer can block various attack types in the virtual scene, including melee attacks, ranged attacks, and skill attacks. The blocking effect of the virtual protection layer remains consistent across different attack types, comprehensively protecting the virtual vehicle's status from attacks. The virtual protection layer is displayed visually around the virtual vehicle, and its display style, color, and transparency can be matched to the overall visual style of the virtual scene. Users can intuitively identify the presence of the virtual protection layer through the virtual scene display interface.

[0227] In actual implementation, after the virtual vehicle obtains the virtual protection layer, a countdown timer for the virtual protection layer is displayed. When the countdown timer reaches zero, the virtual protection layer disappears. The initial size of the countdown timer is the same as the effective duration.

[0228] It should be noted that virtual protection layers can be divided into two types: single-attack blocking type and fixed attribute value blocking type. The single-attack blocking type virtual protection layer can directly resist one attack on the virtual vehicle and disappears immediately after the attack is resisted. The fixed attribute value blocking type virtual protection layer can offset a preset value of attack damage attribute value and continues to be effective within the effective time period until the accumulated blocked damage attribute value reaches the upper limit or the effective time period ends. Both types of virtual protection layers will automatically disappear after the effective time period expires.

[0229] As an example, see Figure 17 , Figure 17This is a schematic diagram of collision handling in a virtual scene provided in the embodiments of this application. Figure 10 Fourth, after controlling the virtual vehicle to deflect along the surface tangent direction based on the current movement direction, control the virtual vehicle to obtain the virtual protective layer 1701.

[0230] In this way, after a virtual vehicle completes a deflection along the surface tangent based on its current direction of movement, it automatically acquires a virtual protective layer with a valid duration. This layer can block attacks against the virtual vehicle within the time limit. Once the valid duration expires, the virtual protective layer disappears. This allows the deflection action of the virtual vehicle and the defense mechanism to form a precise linkage, providing targeted protection for the vehicle during the critical period after deflection, reducing the probability of the vehicle being affected by attacks. At the same time, the limitation of the valid duration allows for reasonable control of the protective effect, preventing the defensive effect from continuing indefinitely, maintaining the balance of vehicle interaction within the virtual scene, and organically linking the vehicle's movement control and defense protection, thereby improving the survival guarantee and gameplay strategy during virtual vehicle operation.

[0231] In some embodiments, when a virtual vehicle collides with an object in a virtual scene and the collision posture between the virtual vehicle and the object conforms to a preset collision posture, the attribute value of the virtual vehicle is reduced, and the reduced first attribute value of the virtual vehicle is displayed; wherein, the first attribute value is less than the second attribute value, and the second attribute value is the attribute value reduced when the virtual vehicle collides with an object in a virtual scene and the collision posture does not conform to the preset collision posture.

[0232] Here, attribute values ​​can include health points, mana points, attack power, defense power, movement speed, stamina points, and luck points. Mana points are the attribute values ​​consumed when a virtual object uses a skill. Attack power represents the virtual object's ability to attack other virtual objects and inflict damage. Defense power represents the virtual object's ability to defend against attacks from other objects. Movement speed is the speed at which the virtual object moves within the virtual scene.

[0233] Stamina can affect at least one of the following attributes of a virtual object: movement speed, attack power, and defense power. The higher the stamina, the higher the stamina, and the lower the stamina, the lower the stamina, and the lower the stamina, meaning that stamina is positively correlated with at least one of these attributes.

[0234] For example, when a virtual vehicle collides with an obstacle in a virtual scene, if the vehicle's angle and contact point at the time of collision conform to the preset collision posture, the virtual vehicle's durability attribute value will decrease by 8 points, and the interface will simultaneously display this decrease of 8 points as the first attribute value. If the vehicle's posture at the time of collision deviates from the preset standard and is a non-compliant collision posture, the virtual vehicle's durability attribute value will decrease by 20 points, which is the second attribute value. Through the difference between the two sets of reduction values, it is intuitively shown that the attribute loss caused by the collision is smaller when conforming to the preset collision posture.

[0235] In practice, attribute values ​​can be displayed using common visualization methods such as visual numerical labels, quantified status progress bars, and attribute status icons. Different attribute values ​​can be distinguished using different visual labels to intuitively reflect the attribute status of the virtual vehicle. A decrease in attribute value can be visualized through the shrinking of the quantified progress bar, dynamic numerical changes, and switching of the visual state of the attribute label. Different degrees of attribute value decrease correspond to different intensities of visual representation, thus differentiating the degree of attribute loss.

[0236] In addition, while displaying the first attribute value of the virtual vehicle that has decreased, the second attribute value of the virtual vehicle when the collision posture does not conform to the preset collision posture can be displayed simultaneously. The simultaneous presentation of the two attribute values ​​forms an intuitive comparison, clearly showing the difference in the degree of damage suffered by the virtual vehicle under different collision postures.

[0237] In this way, by differentiating the reduction range of attribute values ​​based on whether the posture of the virtual vehicle when colliding with scene objects meets the preset standards, and deducting only the smaller first attribute value when the collision posture is compliant and displaying it visually, it is possible to achieve refined classification and feedback of collision damage, so that collision loss is directly related to the actual control posture of the vehicle. At the same time, by using the numerical difference to convey a clear control guide to the user, it prompts the control behavior to move closer to the preset compliant posture, improves the accuracy and strategy of virtual vehicle control, makes the collision interaction between virtual vehicle and scene objects more in line with actual logic, and optimizes the rationality of collision feedback and the balance of scene interaction.

[0238] In some embodiments, the virtual vehicle has a first appearance style. When the virtual vehicle collides with an object in the virtual scene and the number of times the collision posture between the virtual vehicle and the object matches the preset collision posture reaches the second time, the second appearance style of the virtual vehicle is unlocked. In response to the switching command for the second appearance style of the virtual vehicle, the appearance style of the virtual vehicle is switched from the first appearance style to the second appearance style.

[0239] Here, appearance style refers to the visual image of a virtual vehicle displayed in a virtual scene. It is the expression that represents the visual characteristics of a virtual vehicle and can create different visual effects depending on different settings. Appearance style includes at least one of the following: model shape, color scheme, material texture, decorative parts, and visual effects. The diverse appearance of virtual vehicles is formed through the combination and matching of different dimensions.

[0240] For example, when a virtual vehicle collides with an object in the virtual scene and the collision posture meets the preset standard, the second appearance style of the virtual vehicle can be unlocked after a preset number of collisions (the second count). The default first appearance style of the virtual vehicle is a basic matte solid color body, simple and conventional wheels, and no additional lighting effects. The unlocked second appearance style is a gradient colorful body color, equipped with a dynamic flowing light rear wing, and wheels with rotating light effects. The overall visual presentation is clearly distinguished from the basic appearance.

[0241] In actual implementation, after unlocking the second appearance style of the virtual vehicle, a switching control is displayed. In response to the triggering operation of the switching control, a switching command for the second appearance style of the virtual vehicle is triggered.

[0242] In addition, after unlocking the second appearance style of the virtual vehicle, a style prompt message is displayed for the second appearance style, which is used to indicate that the second appearance style has been unlocked.

[0243] It should be noted that the second count is a pre-set cumulative threshold, used as the criterion for unlocking the corresponding appearance style of the virtual vehicle. The second count can be flexibly configured based on factors such as the type and level of the virtual vehicle, the rarity of the appearance style, the difficulty of the gameplay, and the threshold for achieving certain control behaviors.

[0244] In this way, linking the cumulative number of compliant collision postures of virtual vehicles with the unlocking of appearance styles can provide visual positive feedback on the control behavior of virtual vehicles. By unlocking the second appearance style by accumulating achievements, users are guided to control the collision posture of virtual vehicles more accurately. At the same time, the appearance style switching function enriches the visual expression of virtual vehicles, meets personalized display needs, enhances the fun and continuity of virtual vehicle control and scene interaction, and establishes a direct link between control results and appearance rewards, thereby optimizing the overall interactive experience and gameplay incentive effect.

[0245] In some embodiments, when a virtual vehicle collides with an object in a virtual scene and the collision posture between the virtual vehicle and the object conforms to a preset collision posture, trajectory prompt information is displayed; wherein, the trajectory prompt information includes a deflection trajectory of the virtual vehicle deflecting along the tangent direction of the surface based on the current movement direction, which is used to prompt the virtual vehicle to deflect based on the deflection trajectory.

[0246] In some embodiments, the virtual vehicle has a level. Accordingly, when the virtual vehicle collides with an object in the virtual scene and the collision posture of the virtual vehicle and the object conforms to a preset collision posture, the surface tangent direction of the object at the collision position is determined. This can be achieved in the following way: when the virtual vehicle collides with an object in the virtual scene and the collision posture of the virtual vehicle and the object conforms to a preset collision posture, if the level of the virtual vehicle reaches the target level, the surface tangent direction of the object at the collision position is determined.

[0247] The virtual vehicle's level is a quantitative indicator representing its growth stage, comprehensive capability level, and functional unlock permissions. Different levels correspond to different growth states and operational permissions for the virtual vehicle. The virtual vehicle's level can be improved by completing specified tasks within the scene, accumulating effective control behaviors, accumulating growth experience points, and achieving phased interaction goals.

[0248] In some embodiments, during the process of controlling the virtual vehicle to deflect along the tangent direction of the surface based on the current direction of movement, speed prompt information is displayed; wherein, the speed prompt information is used to indicate the degree to which the current movement speed of the virtual vehicle is maintained relative to the target movement speed, the target movement speed being the movement speed of the virtual vehicle before it collides with an object in the virtual scene.

[0249] The "maintenance degree" characterizes the degree to which the virtual vehicle's current speed matches the target's speed before the collision, reflecting the effectiveness of the current speed in maintaining the original target speed. A higher degree of fit indicates a better speed maintenance. The maintenance degree can be displayed using common visualization methods such as quantified proportional values, dynamic progress bars, color gradient indicators, and changes in special effects intensity to intuitively present the maintenance status of the current speed relative to the target's speed.

[0250] By applying the above embodiments of this application, when a virtual vehicle experiences a compliant collision, it is controlled to deflect along the tangent of the object's surface while maintaining continuous movement. The deflection rate is dynamically adjusted in conjunction with parameters such as vehicle weight and speed. User-defined rates, weights, and automatic deflection are supported. The deflection process is presented in multiple forms, including animation, prompts, special effects, audio, and vibration. Combined with functions such as trajectory playback, graded collision loss determination, unlocking appearance upon compliant collision, and obtaining time-limited protection after deflection, the collision motion is made more consistent with physical logic and scene contours, significantly improving the smoothness, realism, and controllability of collision interaction, and optimizing the overall control and scene interaction experience of the virtual vehicle.

[0251] The following will describe an exemplary application of the embodiments of this application in a real-world application scenario.

[0252] In-game vehicles (i.e. virtual vehicles) generally use rigid body physics simulation to simulate their physical behavior. When a vehicle in such a game collides with another vehicle, its speed will decrease due to the impact of the collision. The extent of the speed decrease is entirely determined by the final result of the collision calculation, and the direction of the impact is always towards the surface normal at the point of collision.

[0253] During implementation, the applicant discovered the following problems with the relevant technology for collision handling in virtual scenes: Game vehicles using rigid body physics simulations are prone to crashing to a complete stop or experiencing a significant speed reduction when colliding with complex in-game environments due to the limited number of faces of the colliders used in the simulation. This can negatively impact the player's driving experience. For example, if a game vehicle uses a cube collider in a rigid body physics simulation, even a collision with the edge of an object like a corner in the game environment can cause the vehicle to stop abruptly due to issues with the collision normals.

[0254] Based on this, a corrective impulse is applied to the game vehicle when a collision occurs, allowing the game vehicle to correct its movement in the direction desired by the player, thus preventing a significant decrease in the speed of the game vehicle.

[0255] The collision handling method in the virtual scene provided in the embodiments of this application will be further described from the technical perspective.

[0256] This solution aims to optimize two types of collision scenarios: frontal offset collision and side collision. For these two collision scenarios, an additional impulse will be applied to the vehicle when a collision occurs. This additional impulse has two functions: first, to eliminate the vehicle speed reduction caused by the scene impulse during the collision; and second, to cause the vehicle to deflect in an attempt to avoid subsequent collisions.

[0257] See Figure 18 , Figure 18 This is a schematic diagram of the second process of the collision handling method in the virtual scene provided in the embodiments of this application. The following will be combined with... Figure 18 The steps shown are explained.

[0258] In step 1801, the correction begins.

[0259] In step 1802, it is determined whether collision correction is enabled.

[0260] In actual implementation, the Boolean state of the global switch parameter for collision correction is detected to determine whether the collision correction function is enabled in the current game scene or vehicle.

[0261] If yes, proceed to step 1804; otherwise, proceed to step 1803.

[0262] In step 1803, the correction is skipped.

[0263] In step 1804, the time interval is checked.

[0264] In actual implementation, the time difference between the last collision correction operation and the current time is checked to determine whether a preset time threshold has been reached. If the time interval is insufficient, step 1803 is executed; if the time interval is sufficient, step 1805 is executed.

[0265] In step 1805, the predicted location is calculated.

[0266] It should be noted that collision prediction requires combining the vehicle's current speed, position, and orientation to calculate the vehicle's expected position in the next frame. The essence of collision prediction is a numerical integration. Because the time interval between two frames in the game is short, to simplify the calculations, we can temporarily assume the vehicle is currently moving at a constant speed. Therefore, the vehicle's expected position in the next frame can be obtained using formula (4). That is, predicting the location.

[0267] Formula (4) in, This indicates the current vehicle location. The vehicle's current speed (including its speed before the collision); This is the frame time interval.

[0268] In step 1806, the minimum translation vector is calculated.

[0269] After calculating the vehicle's expected position in the next frame, a sweep detection needs to be performed from the vehicle's current position to this expected position. This detection determines whether the vehicle will collide. If the detection result indicates that the vehicle is about to collide, the next step is to determine whether the collision can be corrected.

[0270] In step 1807, the adjustment vector is calculated.

[0271] If a collision is detected, the collision normal direction and impulse at the predicted collision time can be obtained. First, the angle between the collision normal and the vehicle's current velocity direction must be determined. This angle is typically between 90 and 180 degrees; a collision will occur within this range. Next, a threshold is set for this angle. For example, an angle between 90 and 160 degrees is considered a side collision, and an angle between 160 and 180 degrees is considered a frontal collision. If the result is a frontal collision, further determination is needed to determine if it is an offset collision. In this case, the vehicle's predicted position for the next frame is moved a small distance (i.e., the target distance) along the direction perpendicular to the velocity. If the vehicle does not collide after the movement, it is considered a frontal offset collision. See [example example]. Figure 19 , Figure 19 This is a schematic diagram of a frontal offset collision provided in an embodiment of this application; see also Figure 20 , Figure 20 This is a schematic diagram of a side collision provided in an embodiment of this application.

[0272] See also Figure 18 In step 1808, the depth and velocity weights are calculated.

[0273] In step 1809, the final impulse is calculated.

[0274] When a collision occurs and the collision posture of the virtual vehicle conforms to the preset collision posture, the corrected impulse is calculated by formula (1), formula (2), and formula (3).

[0275] In step 1810, an impulse is applied to the vehicle.

[0276] In step 1811, the debugging visualization is performed.

[0277] In step 1812, the process ends.

[0278] In some embodiments, see Figure 21 , Figure 21 This is a schematic diagram of the third process of the collision handling method in the virtual scene provided in the embodiments of this application. The input parameters include collision components, current position, current velocity, and frame time. In the calculation process, the predicted position is first calculated by the current position, current velocity, and frame time. Then, the collision components and the predicted position participate in the minimum translation distance (MTD) calculation to obtain the interpenetration direction and interpenetration depth. Subsequently, an adjustment vector (i.e., a corrected direction vector) is calculated based on the interpenetration direction and the current velocity. At the same time, a weight is calculated based on the interpenetration depth and the current velocity. Finally, the final impulse is calculated by the adjustment vector and the weight. In terms of output effect, the final impulse can achieve velocity maintenance and direction correction. The direction correction can further achieve collision avoidance.

[0279] By applying the above embodiments of this application, an additional impulse is applied to the vehicle upon collision, preventing a significant decrease in speed during tilting or offset collisions. Simultaneously, the vehicle adjusts its orientation more quickly, resulting in a smoother and more stable driving experience for the player. Timely directional adjustments prevent secondary collisions, reducing the probability of subsequent collisions. The algorithm exhibits excellent performance, fully adapting to the application requirements of real-time games. It also possesses good configuration flexibility, adapting to different types of vehicles and various game scenarios through curve configuration. Furthermore, it brings multifaceted user experience improvements, specifically reducing the sense of game interruption caused by unexpected vehicle collisions, enhancing the responsiveness and predictability of vehicle control, improving the stability and safety of high-speed driving, and enhancing the vehicle's ability to traverse complex terrain.

[0280] The following description continues to illustrate the exemplary structure of the collision handling device 555 in the virtual scene provided in the embodiments of this application as a software module. In some embodiments, such as Figure 2 As shown, the software modules of the collision handling device 555 in the virtual scene may include: a first display module 5551, a determination module 5552, and a first control module 5553.

[0281] The first display module 5551 is used to display a virtual vehicle in a moving state in a virtual scene; The determination module 5552 is used to determine the surface tangent direction of the object at the collision position when the virtual vehicle collides with an object in the virtual scene and the collision posture of the virtual vehicle and the object conforms to a preset collision posture. The first control module 5553 is used to control the virtual vehicle to deflect along the tangent direction of the surface based on the current direction of movement while maintaining the continuity of the virtual vehicle's movement, so as to present the visual effect that the virtual vehicle moves in accordance with the external contour of the object.

[0282] In some embodiments, the first control module 5553 is further configured to control the virtual vehicle to deflect along the tangent direction of the surface based on the weight attribute of the virtual vehicle and using a corresponding deflection rate, wherein the deflection rate is negatively correlated with the weight attribute; or, based on the moving speed of the virtual vehicle, control the virtual vehicle to deflect along the tangent direction of the surface based on the moving speed; wherein the moving speed is the moving speed of the virtual vehicle before colliding with an object in the virtual scene, and the deflection rate is positively correlated with the moving speed.

[0283] In some embodiments, the collision handling device in the virtual scene further includes: a second display module, configured to display at least one of the following during the process of controlling the virtual vehicle to deflect along the tangent direction of the surface based on the current direction of movement: a deflection animation and a deflection prompt message; or, during the process of controlling the virtual vehicle to deflect along the tangent direction of the surface based on the current direction of movement, displaying the virtual vehicle using a target display style; wherein the deflection animation is used to display the deflection trajectory of the virtual vehicle, the deflection prompt message is used to indicate the deflection direction of the virtual vehicle, and the target display style is used to indicate that the virtual vehicle is deflecting.

[0284] In some embodiments, the deflection rate is determined based on the moving speed and penetration depth of the virtual vehicle; the collision handling device in the virtual scene further includes: a first setting module, configured to display a setting interface of the virtual scene before controlling the virtual vehicle to deflect along the tangent direction of the surface based on the current moving direction, and display a weight setting control in the setting interface, the weight setting control being configured to set a first influence weight of the moving speed on the deflection rate and a second influence weight of the penetration depth on the deflection rate; in response to a weight setting operation performed based on the weight setting control, displaying the first influence weight and the second influence weight obtained therefrom; the first control module 5553 is further configured to use a first deflection rate to control the virtual vehicle to deflect along the tangent direction of the surface based on the current moving direction, the first deflection rate being determined based on the moving speed, the penetration depth, the first influence weight, and the second influence weight.

[0285] In some embodiments, the collision handling device in the virtual scene further includes: a preview control, used to display a collision preview control after the first influence weight and the second influence weight obtained by the display setting; and to display a preview deflection screen in response to a trigger operation on the collision preview control; wherein the preview deflection screen is used to display the deflection process when the virtual vehicle collides with an object in the virtual scene under the condition of setting the first influence weight and the second influence weight.

[0286] In some embodiments, the collision handling device in the virtual scene further includes: a third display module, used to display a corresponding deflection effect according to the type of the virtual vehicle during the process of controlling the virtual vehicle to deflect along the tangent direction of the surface based on the current movement direction; wherein different types of virtual vehicles correspond to different deflection effects.

[0287] In some embodiments, the collision handling device in the virtual scene further includes: a second control module, configured to, in response to an adjustment command for the deflection direction, control the virtual vehicle to deflect along the deflection direction indicated by the adjustment command based on the current movement direction during the process of controlling the virtual vehicle to deflect along the tangential direction of the surface based on the current movement direction.

[0288] In some embodiments, the collision handling device in the virtual scene further includes: a fourth display module for displaying a deflection switch, the deflection switch being used to enable the automatic deflection function of the virtual vehicle; and the first control module 5553, which is further used to control the virtual vehicle to deflect along the tangent direction of the surface based on the current movement direction when the deflection switch is in the on state.

[0289] In some embodiments, the collision handling device in the virtual scene further includes: a prompting module, used to display target prompting information when the virtual vehicle collides with an object in the virtual scene and the number of times the collision posture of the virtual vehicle and the object conforms to a preset collision posture reaches the first count, when the deflection switch is in the off state, the target prompting information is used to prompt the deflection switch to be turned on.

[0290] In some embodiments, the collision handling device in the virtual scene further includes: a comparison module, configured to display comparison trajectory information when the virtual vehicle collides with an object in the virtual scene and the collision posture of the virtual vehicle and the object conforms to a preset collision posture, when the deflection switch is in the on state; wherein, the comparison trajectory information includes a collision trajectory without controlling the deflection of the virtual vehicle and a deflection trajectory with controlling the deflection of the virtual vehicle.

[0291] In some embodiments, the deflection is achieved by applying a virtual deflection impulse to the virtual vehicle, and the collision handling device in the virtual scene further includes: a fifth display module, used to display a deflection indicator during the process of controlling the virtual vehicle to deflect along the tangent direction of the surface based on the current direction of movement; wherein the deflection indicator is used to indicate the direction of the virtual deflection impulse, and the size of the deflection indicator is positively correlated with the magnitude of the virtual deflection impulse.

[0292] In some embodiments, the collision handling device in the virtual scene further includes: a magnification display module, used to magnify and display the contact area between the virtual vehicle and the object during the process of controlling the virtual vehicle to deflect along the tangent direction of the surface based on the current movement direction, and to magnify and display the deflection process of the virtual vehicle based on the magnified contact area.

[0293] In some embodiments, the collision handling device in the virtual scene further includes: a vibration output module, used to output vibration feedback when the virtual vehicle collides with an object in the virtual scene, wherein the intensity of the vibration feedback is positively correlated with the collision intensity of the virtual vehicle.

[0294] In some embodiments, the collision handling device in the virtual scene further includes: a playback module, configured to, during the process of controlling the virtual vehicle to deflect along the tangent direction of the surface based on the current movement direction, play a target audio corresponding to the type of the virtual vehicle, wherein different types of the virtual vehicle correspond to different target audio; or, during the process of controlling the virtual vehicle to deflect along the tangent direction of the surface based on the current movement direction, play a target audio corresponding to the type of the environment in which the virtual vehicle is located, wherein different types of the environment correspond to different target audio.

[0295] In some embodiments, the collision handling device in the virtual scene further includes: a second setting module, configured to display a setting interface of the virtual scene before controlling the virtual vehicle to deflect along the tangent direction of the surface based on the current movement direction, and display a rate setting control for setting the deflection rate in the setting interface; in response to the setting operation of the rate setting control for the deflection rate, determine the set deflection rate as a second deflection rate; the first control module 5553 is further configured to use the second deflection rate to control the virtual vehicle to deflect along the tangent direction of the surface based on the current movement direction.

[0296] In some embodiments, the collision handling device in the virtual scene further includes: a viewing module, configured to display a posture viewing control in the interface of the virtual scene; and to display at least one of the preset collision postures in response to a trigger operation on the posture viewing control.

[0297] In some embodiments, the virtual vehicle is driven by a virtual character, and the collision handling device in the virtual scene further includes: an installation module, configured to display the backpack interface of the virtual character's virtual backpack and display a target virtual item in the backpack interface before controlling the virtual vehicle to deflect along the tangent direction of the surface based on the current direction of movement; and to control the virtual character to install the target virtual item onto the virtual vehicle in response to an installation command for the target virtual item; the first control module 5553 is further configured to maintain the continuity of movement of the virtual vehicle when the target virtual item is installed on the virtual vehicle, and to control the virtual vehicle to deflect along the tangent direction of the surface based on the current direction of movement.

[0298] In some embodiments, the collision handling device in the virtual scene further includes: a playback control, used to display the playback control after the virtual vehicle deflects along the tangent direction of the surface based on the current movement direction; and to play a playback video in response to a trigger operation on the playback control, the playback video being used to replay the process of the virtual vehicle deflecting along the tangent direction of the surface based on the current movement direction.

[0299] In some embodiments, the collision handling device in the virtual scene further includes: a third control module, configured to control the virtual vehicle to obtain a virtual protective layer after the virtual vehicle deflects along the tangent direction of the surface based on the current movement direction, the virtual protective layer being used to block attacks on the virtual vehicle, and the virtual protective layer having an effective duration; and to control the virtual protective layer to disappear when the effective duration is reached.

[0300] In some embodiments, the collision handling device in the virtual scene further includes: a sixth display module, configured to control the attribute value of the virtual vehicle to decrease and display the decreased first attribute value of the virtual vehicle when the virtual vehicle collides with an object in the virtual scene and the collision posture of the virtual vehicle and the object conforms to a preset collision posture; wherein the first attribute value is less than a second attribute value, and the second attribute value is the attribute value decreased when the virtual vehicle collides with an object in the virtual scene and the collision posture does not conform to the preset collision posture.

[0301] In some embodiments, the appearance style of the virtual vehicle is a first appearance style, and the collision handling device in the virtual scene further includes: a switching module, configured to unlock the second appearance style of the virtual vehicle when the virtual vehicle collides with an object in the virtual scene and the number of times the collision posture of the virtual vehicle and the object conforms to a preset collision posture reaches the second number; and to switch the appearance style of the virtual vehicle from the first appearance style to the second appearance style in response to a switching command for the second appearance style of the virtual vehicle.

[0302] This application provides a computer program product, which includes a computer program or computer-executable instructions. When the computer-executable instructions or the computer program are executed by a processor, the processor will execute the collision handling method in the virtual scene provided in this application embodiment. For example, ... Figure 3 The method is illustrated above. The processor of the electronic device reads the computer program or computer-executable instructions from a computer-readable storage medium, and executes the computer program or computer-executable instructions, causing the electronic device to perform the collision handling method in the virtual scene described in the embodiments of this application.

[0303] This application provides a computer-readable storage medium storing computer-executable instructions or a computer program. When the computer-executable instructions or the computer program are executed by a processor, the processor will execute the collision handling method in the virtual scene provided in this application embodiment. For example, ... Figure 3 The methods shown are as follows.

[0304] In some embodiments, the computer-readable storage medium may be a memory such as RAM, ROM, flash memory, magnetic surface memory, optical disk, or CD-ROM; or it may be a variety of devices including one or any combination of the above-mentioned memories.

[0305] In some embodiments, computer-executable instructions may take the form of programs, software, software modules, scripts, or code, written in any form of programming language (including compiled or interpreted languages, or declarative or procedural languages), and may be deployed in any form, including as stand-alone programs or as modules, components, subroutines, or other units suitable for use in a computing environment.

[0306] As an example, computer-executable instructions may, but do not necessarily, correspond to files in a file system. They may be stored as part of a file that holds other programs or data, for example, in one or more scripts in a Hyper Text Markup Language (HTML) document, in a single file dedicated to the program in question, or in multiple co-located files (e.g., files that store one or more modules, subroutines, or code sections).

[0307] As an example, computer-executable instructions can be deployed to execute on a single electronic device, or on multiple electronic devices located at one location, or on multiple electronic devices distributed across multiple locations and interconnected via a communication network.

[0308] In summary, by controlling the virtual vehicle to deflect along the tangent of the object's surface and maintain continuous movement when a compliant collision occurs, and dynamically adjusting the deflection rate based on parameters such as vehicle weight and speed, the system supports user-defined rates, weights, and automatic deflection. It also presents the deflection process through animation, prompts, effects, audio, and vibration, along with features such as trajectory playback, graded collision damage assessment, unlocking appearance upon compliant collision, and time-limited protection after deflection. This makes collision motion more consistent with physical logic and scene contours, significantly improving the smoothness, realism, and controllability of collision interaction, and optimizing the overall control and scene interaction experience of virtual vehicles.

[0309] The above description is merely an embodiment of this application and is not intended to limit the scope of protection of this application. Any modifications, equivalent substitutions, and improvements made within the spirit and scope of this application are included within the scope of protection of this application.

Claims

1. A collision handling method in a virtual scene, characterized in that, The method includes: Display virtual vehicles in motion within a virtual scene; When the virtual vehicle collides with an object in the virtual scene and the collision posture between the virtual vehicle and the object conforms to a preset collision posture, the surface tangent direction of the object at the collision position is determined. While maintaining the continuity of the virtual vehicle's movement, the virtual vehicle is controlled to deflect along the tangent direction of the surface based on the current direction of movement, so as to present the visual effect that the virtual vehicle moves in accordance with the external contour of the object.

2. The method according to claim 1, characterized in that, The control of the virtual vehicle to deflect along the tangent direction of the surface based on the current direction of movement includes: Based on the weight attribute of the virtual vehicle, a corresponding deflection rate is adopted to control the virtual vehicle to deflect along the tangent direction of the surface based on the current direction of movement. The deflection rate is negatively correlated with the weight attribute. Alternatively, based on the moving speed of the virtual vehicle, a corresponding deflection rate is used to control the virtual vehicle to deflect along the tangent direction of the surface based on the current moving direction; wherein, the moving speed is the moving speed of the virtual vehicle before colliding with an object in the virtual scene, and the deflection rate is positively correlated with the moving speed.

3. The method according to claim 1, characterized in that, The method further includes: During the process of controlling the virtual vehicle to deflect along the tangent direction of the surface based on the current direction of movement, at least one of the following is displayed: deflection animation and deflection prompt information; Alternatively, while controlling the virtual vehicle to deflect along the tangent direction of the surface based on the current direction of movement, the virtual vehicle is displayed using a target display style; The deflection animation is used to display the deflection trajectory of the virtual vehicle, the deflection prompt information is used to indicate the deflection direction of the virtual vehicle, and the target display style is used to indicate that the virtual vehicle is deflecting.

4. The method according to claim 1, characterized in that, The deflection rate is determined based on the movement speed and penetration depth of the virtual vehicle; Before controlling the virtual vehicle to deflect along the tangent direction of the surface based on the current direction of movement, the method further includes: The virtual scene settings interface is displayed, and a weight setting control is displayed in the settings interface. The weight setting control is used to set the first influence weight of the movement speed on the deflection rate and the second influence weight of the penetration depth on the deflection rate. In response to the weight setting operation performed based on the weight setting control, the first influence weight and the second influence weight obtained by the setting are displayed; The control of the virtual vehicle to deflect along the tangent direction of the surface based on the current direction of movement includes: A first deflection rate is used to control the virtual vehicle to deflect along the tangent direction of the surface based on the current direction of movement. The first deflection rate is determined based on the movement speed, the penetration depth, the first influence weight, and the second influence weight.

5. The method according to claim 4, characterized in that, After obtaining the first influence weight and the second influence weight through the display settings, the method further includes: Display the collision preview control; In response to a trigger operation on the collision preview control, a preview deflection screen is displayed; The preview deflection screen is used to display the deflection process when the virtual vehicle collides with an object in the virtual scene, given the first influence weight and the second influence weight.

6. The method according to claim 1, characterized in that, The method further includes: During the process of controlling the virtual vehicle to deflect along the tangent direction of the surface based on the current direction of movement, the corresponding deflection effect is displayed according to the type of the virtual vehicle; Different types of virtual vehicles correspond to different deflection effects.

7. The method according to claim 1, characterized in that, The method further includes: During the process of controlling the virtual vehicle to deflect along the tangent direction of the surface based on the current direction of movement, in response to an adjustment command for the deflection direction, the virtual vehicle is controlled to deflect along the deflection direction indicated by the adjustment command based on the current direction of movement.

8. The method according to claim 1, characterized in that, The method further includes: Display deflection switch, the deflection switch is used to enable the automatic deflection function of the virtual vehicle; The control of the virtual vehicle to deflect along the tangent direction of the surface based on the current direction of movement includes: When the deflection switch is in the on state, the virtual vehicle is controlled to deflect along the tangent direction of the surface based on the current direction of movement.

9. The method according to claim 8, characterized in that, The method further includes: When the deflection switch is in the off state, when the virtual vehicle collides with an object in the virtual scene and the number of times the collision posture of the virtual vehicle and the object matches the preset collision posture reaches the first count, a target prompt message is displayed. The target prompt message is used to prompt the deflection switch to be turned on.

10. The method according to claim 8, characterized in that, The method further includes: When the deflection switch is in the on state, when the virtual vehicle collides with an object in the virtual scene and the collision posture of the virtual vehicle and the object matches the preset collision posture, the comparison trajectory information is displayed; The comparison trajectory information includes the collision trajectory where the virtual vehicle's deflection was not controlled and the deflection trajectory where the virtual vehicle's deflection was controlled.

11. The method according to claim 1, characterized in that, The deflection is achieved by applying a virtual deflection impulse to the virtual vehicle, and the method further includes: A deflection indicator is displayed while controlling the virtual vehicle to deflect along the tangent direction of the surface based on the current direction of movement. The deflection indicator is used to indicate the direction of the virtual deflection impulse, and the size of the deflection indicator is positively correlated with the magnitude of the virtual deflection impulse.

12. The method according to claim 1, characterized in that, The method further includes: During the process of controlling the virtual vehicle to deflect along the tangent direction of the surface based on the current direction of movement, the contact area between the virtual vehicle and the object is magnified and displayed, and the deflection process of the virtual vehicle is magnified and displayed based on the magnified contact area.

13. The method according to claim 1, characterized in that, The method further includes: When the virtual vehicle collides with an object in the virtual scene, it outputs vibration feedback, and the intensity of the vibration feedback is positively correlated with the collision intensity of the virtual vehicle.

14. The method according to claim 1, characterized in that, The method further includes: During the process of controlling the virtual vehicle to deflect along the tangent direction of the surface based on the current direction of movement, a target audio corresponding to the type of the virtual vehicle is played according to the type of the virtual vehicle; different types of virtual vehicles correspond to different target audio. Alternatively, during the process of controlling the virtual vehicle to deflect along the tangent direction of the surface based on the current direction of movement, a target audio corresponding to the type of environment in which the virtual vehicle is located is played, with different target audios corresponding to different types of environments.

15. The method according to claim 1, characterized in that, Before controlling the virtual vehicle to deflect along the tangent direction of the surface based on the current direction of movement, the method further includes: The settings interface of the virtual scene is displayed, and a rate setting control for setting the deflection rate is displayed in the settings interface. In response to the setting operation of the deflection rate based on the rate setting control, the set deflection rate is determined as the second deflection rate; The control of the virtual vehicle to deflect along the tangent direction of the surface based on the current direction of movement includes: Using the second deflection rate, the virtual vehicle is controlled to deflect along the tangent direction of the surface based on the current direction of movement.

16. The method according to claim 1, characterized in that, The method further includes: The virtual scene interface displays a posture viewing control; In response to a trigger operation on the posture viewing control, at least one of the preset collision postures is displayed.

17. The method according to claim 1, characterized in that, The virtual vehicle is driven by a virtual character, and before controlling the virtual vehicle to deflect along the tangent direction of the surface based on the current direction of movement, the method further includes: The backpack interface displays the virtual backpack of the virtual character, and displays the target virtual item in the backpack interface; In response to a trigger operation targeting the target virtual item, the installation control corresponding to the target virtual item is displayed; In response to a trigger operation on the installation control, the virtual character is controlled to install the target virtual item onto the virtual vehicle; While maintaining the continuity of the virtual vehicle's movement, controlling the virtual vehicle to deflect along the tangent direction of the surface based on the current direction of movement includes: When the virtual vehicle is equipped with the target virtual prop, maintain the continuity of the virtual vehicle's movement and control the virtual vehicle to deflect along the tangent direction of the surface based on the current direction of movement.

18. The method according to claim 1, characterized in that, After controlling the virtual vehicle to deflect along the tangent direction of the surface based on the current direction of movement, the method further includes: Display playback control; In response to a trigger operation on the playback control, a playback video is played, the playback video being used to replay the process of the virtual vehicle deflecting along the tangent direction of the surface based on the current direction of movement.

19. The method according to claim 1, characterized in that, After controlling the virtual vehicle to deflect along the tangent direction of the surface based on the current direction of movement, the method further includes: Controlling the virtual vehicle to obtain a virtual protection layer, the virtual protection layer is used to block attacks on the virtual vehicle, and the virtual protection layer has an effective duration; When the effective duration is reached, the virtual protection layer disappears.

20. The method according to claim 1, characterized in that, The method further includes: When the virtual vehicle collides with an object in the virtual scene and the collision posture between the virtual vehicle and the object conforms to a preset collision posture, the attribute value of the virtual vehicle is reduced, and the reduced first attribute value of the virtual vehicle is displayed. Wherein, the first attribute value is less than the second attribute value, and the second attribute value is the attribute value that is reduced when the virtual vehicle collides with an object in the virtual scene and the collision posture does not conform to the preset collision posture.

21. The method according to claim 1, characterized in that, The virtual vehicle's appearance style is a first appearance style, and the method further includes: When the virtual vehicle collides with an object in the virtual scene, and the number of times the collision posture between the virtual vehicle and the object conforms to the preset collision posture reaches the second count, the second appearance style of the virtual vehicle is unlocked. In response to a switching command for a second appearance style of the virtual vehicle, the appearance style of the virtual vehicle is switched from the first appearance style to the second appearance style.

22. A collision handling device for a virtual scene, characterized in that, The device includes: The first display module is used to display virtual vehicles in motion within the virtual scene; The determination module is used to determine the surface tangent direction of the object at the collision position when the virtual vehicle collides with an object in the virtual scene and the collision posture of the virtual vehicle and the object conforms to a preset collision posture. The first control module is used to control the virtual vehicle to deflect along the tangent direction of the surface based on the current direction of movement while maintaining the continuity of the virtual vehicle's movement, so as to present the visual effect that the virtual vehicle moves in accordance with the external contour of the object.

23. An electronic device, characterized in that, The electronic device includes: Memory is used to store executable instructions or computer programs. A processor, when executing computer-executable instructions or computer programs stored in the memory, implements the collision handling method in the virtual scene according to any one of claims 1 to 21.

24. A computer-readable storage medium storing computer-executable instructions or a computer program, characterized in that, When the computer-executable instructions or computer program are executed by a processor, they implement the collision handling method in the virtual scene as described in any one of claims 1 to 21.

25. A computer program product comprising computer-executable instructions or a computer program, characterized in that, When the computer-executable instructions or computer program are executed by the processor, they implement the collision handling method in the virtual scene according to any one of claims 1 to 21.