Game collision detection method and device, storage medium and computer device
Patent Information
- Application Number
- CN202611134507.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-07-29
- Publication Date
- 2026-10-30
AI Technical Summary
[0004]有鉴于此,本申请提供一种游戏的碰撞检测方法、装置、存储介质以及计算机设备,主要目的在于解决现有游戏碰撞检测准确性差、效率低的问题
本申请提供了一种游戏的碰撞检测方法、装置、存储介质以及计算机设备,与现有技术相比,本申请实施例通过加载游戏的资产数据对象,所述资产数据对象为基于不同碰撞体的变换曲线信息预先烘焙得到的结构化数据;响应于碰撞检测指令,按照预设检测时间间隔对渲染帧进行拆分,得到多个检测子窗口,并基于双端确定性参数在所述检测子窗口中进行世界空间变换,得到所述碰撞体的姿态变换;对所述检测子窗口计算首尾角度差,生成碰撞轨迹关键点序列,并基于所述碰撞轨迹关键点序列、所述资产数据对象以及所述姿态变换进行碰撞扫掠检测,得到碰撞检测结果,所述碰撞轨迹关键点序列中的相邻两个关键点组成一个碰撞扫掠段,实现游戏中攻击碰撞检测效果更加精准流程,服务端的CPU资源大幅节约,同等算力可支撑更多并发玩家,降低单位在线用户的服务器成本,减少计算开销,从而提高不同场景下碰撞检测的精度。
Smart Images

Figure CN122998742A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of game development technology, and in particular to a collision detection method, apparatus, storage medium, and computer equipment for games. Background Technology
[0002] In game development, when a character performs an attack action, a collision detection mechanism is usually used to determine whether the attack hits the enemy target, in order to drive subsequent game logic such as damage calculation, hit effects, knockback effects, and event triggering. Therefore, collision detection is the core technical pillar of the action game combat system, which can directly affect the game's feel, fairness, and performance.
[0003] Currently, collision detection in existing games is typically performed on the server side. In this approach, the server runs the complete skeletal animation system for each character, updating the skeletal hierarchy transformations of all combat characters every frame to extract the world-space positions of the collisionbox-attached bones for collision detection. A single-pass full-angle sweep detection method is then used, where a linear or full-angle arc sweep is performed only on the first and last worlds within each collision detection window to determine if a collision has occurred. However, the server needs to run a complete skeletal animation update for each character involved in combat, including animation blueprint calculations, multi-bone blending, IK solving, and physics simulation. Running a complete animation update frame-by-frame for each character consumes massive amounts of CPU resources, drastically reducing the server's single-machine capacity. Furthermore, for scenes with fluctuating frame rates or large-angle rotations, the single-pass full-angle sweep detection method increases the risk of missed detections and computational overhead. Therefore, a new game collision detection method is urgently needed to address these issues. Summary of the Invention
[0004] In view of this, this application provides a collision detection method, apparatus, storage medium, and computer device for games, with the main purpose of solving the problems of poor accuracy and low efficiency in existing game collision detection.
[0005] According to one aspect of this application, a collision detection method for games is provided, comprising: Load the game's asset data object, which is structured data pre-baked based on the transformation curve information of different colliders; In response to a collision detection command, the rendering frame is split according to a preset detection time interval to obtain multiple detection sub-windows, and world space transformation is performed in the detection sub-windows based on dual-end deterministic parameters to obtain the pose transformation of the collider. The head-tail angle difference is calculated for the detection sub-window to generate a collision trajectory key point sequence. Collision sweep detection is performed based on the collision trajectory key point sequence, the asset data object, and the attitude transformation to obtain the collision detection result. Two adjacent key points in the collision trajectory key point sequence form a collision sweep segment.
[0006] Furthermore, the step of splitting the rendering frame according to a preset detection time interval to obtain multiple detection sub-windows includes: If the time difference between the current cumulative collision time and the previous collision detection time exceeds the preset collision time interval, the segment completion process is executed cyclically until the time difference is less than the preset collision time interval and the completion process is completed. The segment-by-segment completion process includes: extending the time based on the previous collision detection time, and constructing a target detection sub-window based on the extended time and the previous collision detection time, so as to perform world space transformation in the target detection sub-window; When the number of iterations exceeds the first preset threshold, the detection sub-window is updated based on the salience level of the game entity object. When the number of iterations exceeds the second preset threshold, the segment completion process is completed. The second preset threshold is greater than the first preset threshold.
[0007] Further, the step of calculating the head-to-tail angle difference of the detection sub-window and generating the collision trajectory key point sequence includes: Obtain the collider world transformation corresponding to the start time and end time of the detection sub-window, and determine the rotation angle difference of the collider world transformation; If the rotation angle difference exceeds a preset angle threshold and the time span of the detection sub-window exceeds a preset time span threshold, then the detection sub-window is recursively split into two parts, and the recursive split is terminated based on the recursion depth count value. If the rotation angle difference is less than a preset angle threshold, or the time span of the detection sub-window is less than a preset time span threshold, then a sequence of key points of the collision trajectory is generated based on the termination time.
[0008] Furthermore, the step of performing world space transformation based on two-ended deterministic parameters in the detection sub-window to obtain the attitude transformation of the collider includes: Obtain the dual-end deterministic parameters, which are parameters that are consistent between the server and the client; In the detection sub-window, the world space of the collider is transformed through the transformation calculation pipeline to obtain the attitude transformation. The transformation calculation pipeline combines filters, transformation modifiers and final modifiers in a chain-like stacking manner.
[0009] Furthermore, after obtaining the collision detection result by performing collision sweep detection based on the collision trajectory key point sequence, the asset data object, and the pose transformation, the method further includes: The sampling time slice is calculated based on the sweep segment number and hit ratio of each collision hit result in the collision detection results; Based on the sampling time slice and the collision hit result, the consumable payload is encapsulated and stored in the attitude alignment consumption queue; In response to the consumption command of the rendering frame, the current animation playback position of the game entity object is obtained, and the pose alignment consumption queue is invoked based on the consumption manager to perform hit settlement.
[0010] Furthermore, before calculating the sampling time slice based on the sweep segment number and hit ratio of each collision hit result in the collision detection results, the method further includes: Detect whether the game entity is a player-controlled character and whether hit result sampling is enabled; If the game entity object is a player-controlled character and hit result sampling is enabled, then the step of calculating the sampling time slice based on the sweep segment number and hit ratio of each collision hit result in the collision detection results is executed. If the game entity is a non-player-controlled character, or if hit result sampling is not enabled, then the collision detection result is output.
[0011] Furthermore, the method also includes: Configure and store a globally unique identifier for the asset data object to synchronize collider instances based on the globally unique identifier. The asset data object includes shape parameters of different colliders, offset transformation of the collider relative to the mounting point, collision detection interval type, hit module configuration identifier, and transformation notification information.
[0012] According to another aspect of this application, a collision detection device for a game is provided, comprising: The loading module is used to load the game's asset data objects, which are structured data pre-baked based on the transformation curve information of different colliders; The transformation module is used to respond to the collision detection command, split the rendering frame according to the preset detection time interval to obtain multiple detection sub-windows, and perform world space transformation in the detection sub-windows based on the dual-end deterministic parameters to obtain the attitude transformation of the collider. The detection module is used to calculate the head and tail angle difference of the detection sub-window, generate a collision trajectory key point sequence, and perform collision sweep detection based on the collision trajectory key point sequence, the asset data object, and the attitude transformation to obtain the collision detection result. Two adjacent key points in the collision trajectory key point sequence form a collision sweep segment.
[0013] Further, the transformation module is specifically used to perform segment-by-segment completion processing cyclically if the time difference between the current cumulative collision time and the previous collision detection time exceeds a preset collision time interval, until the completion processing is completed when the time difference is less than the preset collision time interval; wherein, the segment-by-segment completion processing includes: extending the time based on the previous collision detection time, and constructing a target detection sub-window based on the extended time and the previous collision detection time, so as to perform world space transformation in the target detection sub-window; when the number of iterations is greater than a first preset threshold, updating the detection sub-window based on the salience level of the game entity object; when the number of iterations is greater than a second preset threshold, completing the segment-by-segment completion processing, wherein the second preset threshold is greater than the first preset threshold.
[0014] Further, the detection module is specifically used to obtain the collider world transformation corresponding to the start time and end time of the detection sub-window, and determine the rotation angle difference of the collider world transformation; if the rotation angle difference exceeds a preset angle threshold, and the time span of the detection sub-window exceeds a preset time span threshold, then the detection sub-window is recursively split into two parts, and the end of the recursive split is determined based on the recursion depth count value; if the rotation angle difference is less than the preset angle threshold, or the time span of the detection sub-window is less than the preset time span threshold, then a collision trajectory key point sequence is generated based on the end time.
[0015] Furthermore, the transformation module is specifically used to obtain the dual-end deterministic parameters, which are parameters that are consistent between the server and the client; in the detection sub-window, the world space transformation of the collider is performed through the transformation calculation pipeline to obtain the attitude transformation, and the transformation calculation pipeline is a combination of filters, transformation modifiers and final modifiers in a chain-like stacking manner.
[0016] Furthermore, the device also includes: The calculation module is used to calculate the sampling time slice based on the sweep segment number and hit ratio of each collision hit result in the collision detection results; The storage module is used to encapsulate the sampling time slice and the collision hit result into a consumption payload, and store the consumption payload into the attitude alignment consumption queue; The settlement module is used to respond to the consumption command of the rendering frame, obtain the current animation playback position of the game entity object, and perform hit settlement by calling the posture-aligned consumption queue based on the consumption manager.
[0017] Furthermore, the detection module is also used to detect whether the game entity object is a player-controlled character and whether hit result sampling is enabled; if the game entity object is a player-controlled character and hit result sampling is enabled, then the step of calculating the sampling time slice based on the sweep segment number and hit ratio of each collision hit result in the collision detection result is executed; if the game entity object is a non-player-controlled character, or hit result sampling is not enabled, then the collision detection result is output.
[0018] Furthermore, the storage module is also used to configure and store a globally unique identifier for the asset data object, so as to synchronize collision body instances based on the globally unique identifier. The asset data object includes shape parameters of different collision bodies, offset transformation of the collision body relative to the mounting point, collision detection interval type, hit module configuration identifier, and transformation notification information.
[0019] According to another aspect of this application, a storage medium is provided, wherein at least one executable instruction is stored therein, the executable instruction causing a processor to perform an operation corresponding to the collision detection method of the game described above.
[0020] According to another aspect of this application, a computer device is provided, comprising: a processor, a memory, a communication interface, and a communication bus, wherein the processor, the memory, and the communication interface communicate with each other through the communication bus; The memory is used to store at least one executable instruction, which causes the processor to perform the operation corresponding to the collision detection method of the above game.
[0021] By employing the above technical solutions, the technical solutions provided in the embodiments of this application have at least the following advantages: This application provides a collision detection method, apparatus, storage medium, and computer device for games. Compared with the prior art, the embodiments of this application load game asset data objects, which are structured data pre-baked based on the transformation curve information of different colliders; responding to collision detection instructions, the rendering frame is split according to a preset detection time interval to obtain multiple detection sub-windows, and world space transformation is performed in the detection sub-windows based on dual-end deterministic parameters to obtain the attitude transformation of the colliders; the head and tail angle difference is calculated for the detection sub-windows to generate a collision trajectory key point sequence, and collision sweep detection is performed based on the collision trajectory key point sequence, the asset data object, and the attitude transformation to obtain the collision detection result. Two adjacent key points in the collision trajectory key point sequence form a collision sweep segment, realizing a more accurate collision detection process in the game, significantly saving server-side CPU resources, supporting more concurrent players with the same computing power, reducing server costs per online user, reducing computational overhead, and thus improving the accuracy of collision detection in different scenarios.
[0022] The above description is only an overview of the technical solution of this application. In order to better understand the technical means of this application and to implement it in accordance with the contents of the specification, and to make the above and other objects, features and advantages of this application more obvious and understandable, the following are specific embodiments of this application. Attached Figure Description
[0023] Various other advantages and benefits will become apparent to those skilled in the art upon reading the following detailed description of preferred embodiments. The accompanying drawings are for illustrative purposes only and are not intended to limit the scope of this application. Furthermore, the same reference numerals denote the same parts throughout the drawings. In the drawings: Figure 1 A flowchart of a collision detection method for a game provided in an embodiment of this application is shown; Figure 2 This illustration shows a schematic diagram of an asset baking and loading method provided in an embodiment of this application; Figure 3 This illustration shows a segment-by-segment supplementary diagram of a detection sub-window provided in an embodiment of this application; Figure 4 A schematic diagram of a transformation counting pipeline provided in an embodiment of this application is shown; Figure 5 This illustration shows a schematic diagram of a collision trajectory key point sequence provided in an embodiment of this application; Figure 6 This illustration shows a recursive binary decomposition diagram provided in an embodiment of this application; Figure 7This illustration shows a presampling stage according to an embodiment of the present application; Figure 8 This illustration shows a hit consumption diagram provided by an embodiment of this application; Figure 9 This illustration shows a block diagram of a collision detection device for a game according to an embodiment of this application; Figure 10 A schematic diagram of the structure of a computer device provided in an embodiment of this application is shown. Detailed Implementation
[0024] Exemplary embodiments of the present disclosure will now be described in more detail with reference to the accompanying drawings. While exemplary embodiments of the present disclosure are shown in the drawings, it should be understood that the present disclosure may be implemented in various forms and should not be limited to the embodiments set forth herein. Rather, these embodiments are provided so that this disclosure will be thorough and complete, and will fully convey the scope of the disclosure to those skilled in the art.
[0025] It should be noted that the terms "first," "second," etc., in the specification, claims, and accompanying drawings of this application are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that the embodiments of this application described herein can be implemented in orders other than those illustrated or described herein. Furthermore, the terms "comprising" and "having," and any variations thereof, are intended to cover non-exclusive inclusion; for example, a process, method, system, product, or apparatus that comprises a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to such processes, methods, products, or apparatus.
[0026] This application provides a collision detection method for games, such as... Figure 1 As shown, the method includes: 101. Load the game's asset data object.
[0027] In this embodiment, the game can be a massively multiplayer online game (MMORPG), where players control game characters to perform corresponding game operations. In this embodiment, collision refers to the collision that occurs when a character releases an attack skill and collides with an enemy character in a combat game. At this time, pre-baked asset data objects can be loaded. The asset data objects are structured data pre-baked based on the transformation curve information of different colliders. A collider refers to an invisible shape specifically used in game development for the physics engine to detect contact, collision, and triggering. Different types of colliders can include box colliders, sphere colliders, capsule colliders, cylinder colliders, and mesh colliders, etc., and this embodiment does not specifically limit them. The transformation curve information refers to a complete dataset set according to the game rules for the colliders, including data such as the position and orientation of the colliders changing over time. This structured data is generated through pre-baking.
[0028] In another embodiment of this application, for further definition and explanation, the steps also include: Configure and store a globally unique identifier for the asset data object to synchronize collision instances based on the globally unique identifier.
[0029] To ensure the consistency of resource data between the client and server, thereby reducing collision hit discrepancies between the two ends, the asset data object is pre-baked in the game engine's editor. The asset data object includes shape parameters of different colliders, offset transformations of the colliders relative to the mounting point, collision detection interval type, hit module configuration identifier, and transformation notification information. Shape parameters can include various types such as boxes, spheres, capsules, sectors, and cylinders, along with their size parameters. The transformation notification information is a composable transformation calculation pipeline; this embodiment does not impose specific limitations. Furthermore, a globally unique identifier is configured, the content of which is not specifically limited, for storage.
[0030] In one specific embodiment, such as Figure 2 As shown, asset data is addressed by a fixed-length globally unique identifier based on the configuration identifier. The identifier can be formed by concatenating a fixed prefix string with left zeros padded to a fixed length configuration identifier, ensuring that different configurations are mapped to a unique identifier of the same length and stored in the asset storage system.
[0031] It should be noted that the current execution end can be either a client or a server. When it is a client, the collision detection method of the current execution end can be pre-loaded into the local game installation package to achieve offline detection. When it is a server, the collision detection method of the current execution end can be triggered in real time by the game engine on the server. This application embodiment does not make specific limitations.
[0032] In this embodiment, when creating a collision box instance, both the client and server can load the same asset data from the asset storage system using the same globally unique identifier. After successful loading, the asset data is parsed into each member of the collision box instance, including extracting a list of colliders from the collision shape information and creating corresponding runtime wrapper objects for each type. Simultaneously, each collision box instance can generate a unique network matching identifier based on its collision box configuration and the information of its associated combat instance, used for matching and alignment between the two collision box instances. For example, when the client receives a hit command from the server before local collision detection is initiated, it can directly find the corresponding hit instance for matching using this identifier, without waiting for complete network synchronization of the collision boxes.
[0033] 102. In response to the collision detection command, the rendering frame is split according to a preset detection time interval to obtain multiple detection sub-windows, and world space transformation is performed in the detection sub-windows based on the dual-end deterministic parameters to obtain the attitude transformation of the collider.
[0034] In this embodiment, the collision detection command can be generated by a player triggering a skill release or touching a specific scene object during game operation. Therefore, when performing collision detection in each rendering frame, the rendering frame is first split according to a preset detection time interval to divide it into multiple detection sub-windows, as shown in Figure 3. The preset detection time interval can be set to 0.05 seconds; this embodiment does not impose specific limitations. Furthermore, the dual-end deterministic parameters are parameters that are consistent between the server and the client, and may include, but are not limited to, the current animation update time, character RootTransform, target RootTransform, collision box configuration parameters, and pre-baked curve parameters; this embodiment does not impose specific limitations. Then, world space transformation is performed in the detection sub-window, that is, the transformation of the local position of a collider relative to the position, rotation, and scaling state of the entire game world to obtain the collider's pose transformation.
[0035] In another embodiment of this application, for further definition and explanation, the step of splitting the rendering frame according to a preset detection time interval to obtain multiple detection sub-windows includes: If the time difference between the current cumulative collision time and the previous collision detection time exceeds the preset collision time interval, the segment completion process is executed cyclically until the time difference is less than the preset collision time interval, at which point the completion process is completed.
[0036] To eliminate collision misses from a temporal perspective, during frame segmentation, for each detection sub-window obtained from the segmentation, the time difference between the current cumulative collision time and the previous collision detection time is first determined and compared with a preset collision time interval, which is preferably 0.01 seconds. When the time difference exceeds this preset collision time interval, it indicates that the current detection sub-window has a defect, and a segment-by-segment completion processing loop is entered until the time difference between the current cumulative collision time and the previous collision detection time does not exceed the preset collision time interval during the loop, thus completing the completion processing.
[0037] In this embodiment, the segment completion process includes: extending the time based on the previous collision detection time, and constructing a target detection sub-window based on the extended time and the previous collision detection time, so as to perform world space transformation within the target detection sub-window. Specifically, in each iteration, the previous collision detection time is precisely extended by a fixed interval step, which can be done according to a preset collision detection interval, rather than jumping directly to the current time. The sub-window formed by the extended time and the previous time serves as the boundary, and collision sweep detection is performed within this detection sub-window.
[0038] In another embodiment of this application, in order to control computational overhead while ensuring the accuracy of critical target detection, and to ensure that collision detection is still performed in multiple segments at fixed intervals even if the rendering frame rate fluctuates significantly, so as not to miss detections due to window merging. The method also includes: When the number of iterations exceeds the first preset threshold, the detection sub-window is updated based on the salience level of the game entity object. When the number of iterations exceeds the second preset threshold, the segment completion process is completed. The second preset threshold is greater than the first preset threshold.
[0039] In this embodiment, a two-level termination threshold is introduced in the segment completion loop, and the computational overhead is dynamically adjusted based on the entity salience level. First, the loop count is counted. When the loop count exceeds a first preset threshold, the salience level of the game entity being attacked is obtained. The salience level refers to multiple pre-defined levels based on factors such as entity type, whether it is directly controlled by the player, whether it is a boss or a key target, its distance from the player's field of vision, and whether it participates in the current damage calculation. For example, there are low salience level, medium salience level, and high salience level. Different levels are not simply discarded or continued; instead, different throttling strategies are used according to the level to update the detection sub-window.
[0040] In one embodiment, such as Figure 3As shown, if the game entity is a low-salience target, such as environmental decorations far from the player's field of vision, non-critical summons, or objects that do not directly affect the current settlement, the loop is terminated immediately, and the remaining undetected sub-windows are discarded to prioritize single-frame performance. If the game entity is a medium-salience target, such as ordinary non-player characters or distant targets that may still participate in hit feedback, all remaining windows are not discarded directly. Instead, a downgraded detection mode is entered, which can merge multiple remaining sub-windows into a larger detection window according to a preset merging step size, or only continue to process a preset number of critical windows and record the range of windows that are not fully detected. This preserves the necessary hit judgment capability while limiting the computational load of the current frame. If the game entity is a high-salience target, such as a player-controlled character, a boss, an elite monster, or the main target of the current skill, the complete collision detection of subsequent windows continues until the time difference is filled or the second termination condition is triggered. In addition, for more granular multi-level configurations, the level can be mapped to different maximum number of windows to be filled, merging step sizes, or discarding strategies. The higher the level, the more detection windows can be retained. This application embodiment does not make specific limitations.
[0041] Secondly, when the number of iterations exceeds the second preset threshold, it indicates that the second termination condition is met, and the segment completion process is completed. At this point, the second preset threshold is greater than the first preset threshold. Furthermore, regardless of the significance level, the loop is unconditionally terminated and an error log or performance alarm is output to ensure that the single-frame collision detection overhead always has a hard upper limit under abnormal frame rates or extreme stacking conditions.
[0042] In another embodiment of this application, for further definition and explanation, the step of performing world space transformation based on two-end deterministic parameters in the detection sub-window to obtain the attitude transformation of the collider includes: Obtain the dual-end deterministic parameters; In the detection sub-window, the world space transformation of the collider is performed by transforming the calculation pipeline to obtain the attitude transformation.
[0043] To ensure consistency in collision hits between the two ends, this embodiment employs a transformation calculation pipeline for data synchronization. First, deterministic parameters are acquired. These parameters are consistent between the server and client, including but not limited to the current animation update time, character RootTransform, target RootTransform, collider configuration parameters, and pre-baked curve parameters. For deterministic parameters, if inconsistencies exist (e.g., inconsistent runtime bone positions), they are pre-baked into curve data relative to the character RootTransform during the client's offline phase. If the input is related to external systems such as runtime target selection or skill status, static baking is not possible. In this case, skills, target selection, or other external systems complete data synchronization before entering the pipeline, and the pipeline only consumes the synchronized deterministic parameters. The transformation calculation pipeline uses a chained stacking method to combine filters, transformation modifiers, and final modifiers for serial processing, such as... Figure 4 As shown.
[0044] In one specific embodiment, the filters are stackable chain structures. Each filter layer receives candidate parent transformations or target contexts output by the previous layer, as well as deterministic parameters such as the current animation update time, character RootTransform, and target RootTransform. It then filters or transforms parent transformation sources in a fixed order, outputting a definite parent space transformation. For example, the first layer selects bone mount points, actor root nodes, world space fixed points, or curve-driven points based on the collision box configuration. The second layer can switch to the target relative space based on the synchronized target RootTransform. If bone mount points are used, the pre-baked bone relative root node curve is read and combined with the character RootTransform to avoid runtime differences between the two ends caused by the skeletal system.
[0045] In one specific embodiment, a transformation modifier refers to a modifier in an ordered list of transformation modifiers. Each modifier can be represented as a deterministic pure function Tn = Fn(Tn-1, Pn), where Tn-1 is the transformation result of the previous layer, and Pn is the deterministic parameters required by the modifier, such as time, pre-baked offset curves, fixed rotation / scaling, and physics-driven synchronized parameters. Multiple modifiers are superimposed and combined in configuration order. For example, position offset is performed first, followed by rotation superposition, then scaling modification, and finally curve sampling. As long as the set of input parameters is consistent, the client and server can obtain the same intermediate transformation result.
[0046] In one specific embodiment, the final modifier refers to the final constraint correction performed after combining the parent space transformation output by the filter chain with all modifiers. This constraint correction could be, for example, absolute rotation overlay, absolute scaling overlay, world space alignment, or constraint correction, resulting in a deterministic world space transformation. The final modifier also uses only synchronized or pre-baked deterministic parameters; this embodiment does not impose specific limitations on this.
[0047] By completely decoupling the collider transformation calculation from the skeletal animation system, the transformation calculation pipeline uses time and position parameters as the sole input, and all curve data is pre-baked in the assets. This eliminates the need for the server to execute skeletal animation update pipelines for characters participating in combat; it only needs to call the transformation calculation interface to independently calculate the collisionbox world transformation completely consistent with the client. In large-scale multiplayer online scenarios, this saves a considerable amount of server CPU computing resources, allowing limited server computing power to support more concurrent players. Simultaneously, because both ends calculate independently, there is no need to synchronize the collisionbox world transformation every frame, significantly saving network bandwidth.
[0048] In a two-end consistency example, the client and server do not maintain consistency by synchronizing the world space transformation of the collider frame by frame. Instead, they load the same pre-baked asset data object and call the same transformation calculation pipeline with the same set of deterministic parameters. For example, when the server is the current executor, upon receiving an attack event, it loads the corresponding asset data object, passes in deterministic parameters such as the current animation update time, the character's RootTransform, and the synchronized target RootTransform, and independently calculates the collider world space transformation, performing collision detection and damage assessment. Similarly, when the client is the current executor, while playing the attack animation, it calculates the local collider position based on the same asset data object and the same set of deterministic parameters for local client feedback and effects rendering. Because the input assets, input parameters, and calculation order are consistent across both ends, consistent world space results can be obtained without synchronizing the collider transformation every frame. The transformation calculation pipeline adopts a layered, composable architecture. When adding a transformation source or transformation modifier, it only needs to implement the corresponding interface and register it in the pipeline. Adding a shape type only requires inheritance from the base class. The different stages of the collider lifecycle are coupled through clear interfaces, facilitating independent testing and maintenance.
[0049] In this embodiment, the frame-segmentation strategy fills in the collision window segment by segment at fixed intervals when the rendering frame rate fluctuates, ensuring that the detection density in the temporal dimension does not decrease due to frame rate reduction. The angle-segmentation strategy uses a recursive binary search method to break down large-angle rotation paths into small-angle segments, ensuring that the spatial sweep coverage does not miss intermediate path detections due to large-angle rotations. The two strategies work together in both temporal and spatial dimensions, fundamentally eliminating the possibility of collision misses in high-speed motion and large-angle turning scenes. At the same time, the hierarchical throttling mechanism based on saliency level effectively controls the computational overhead of non-critical entities while ensuring the detection accuracy of critical targets, and the two-level threshold termination mechanism provides a hard upper limit on the computational load per frame.
[0050] 103. Calculate the head and tail angle difference for the detection sub-window, generate a collision trajectory key point sequence, and perform collision sweep detection based on the collision trajectory key point sequence, the asset data object, and the attitude transformation to obtain the collision detection result.
[0051] In this embodiment of the application, each detection sub-window can be recursively split, that is, the difference between the first and last angles in each detection sub-window is calculated respectively, and the collision trajectory key point sequence is generated according to the difference between the first and last angles. At this time, two adjacent key points in the collision trajectory key point sequence form a collision sweep segment, so as to perform collision sweep detection based on the collision trajectory key point sequence, asset data object and attitude transformation, and obtain the collision detection result.
[0052] In one specific embodiment, the sequence of key points of the collision trajectory is stored in the form of a list. Two adjacent key points in the collision trajectory point list constitute an actual collision sweep segment. A key point refers to the termination time point of the detection sub-window. The angle difference of each sweep segment is controlled within a preset angle threshold, such as 0.5 radians. Multi-shape collision detection is performed on each sweep segment, that is, collision judgment is performed on each sweep segment using asset data objects and posture transformations, including the judgment of collisions such as boxes, spheres, capsules, and fan shapes. Sweeping detection can be performed based on asset data objects using a game engine to obtain the collision hit results of each segment; this embodiment does not impose specific limitations. At this time, even if the original window contains large rotational movements such as a 90-degree turn, it will be automatically split into multiple small-angle segments for sweeping, thereby accurately covering the entire motion path and eliminating missed detections in intermediate paths caused by excessively large angle spans.
[0053] In another embodiment of this application, for further definition and explanation, the step of calculating the head-tail angle difference of the detection sub-window and generating a sequence of key points of the collision trajectory includes: Obtain the collider world transformation corresponding to the start time and end time of the detection sub-window, and determine the rotation angle difference of the collider world transformation; If the rotation angle difference exceeds a preset angle threshold and the time span of the detection sub-window exceeds a preset time span threshold, then the detection sub-window is recursively split into two parts, and the recursive split is terminated based on the recursion depth count value. If the rotation angle difference is less than a preset angle threshold, or the time span of the detection sub-window is less than a preset time span threshold, then a sequence of key points of the collision trajectory is generated based on the termination time.
[0054] To eliminate collision misses from a spatial perspective, when generating the key point sequence of collision trajectories, the world transformation of the collider corresponding to the start and end times of the detection sub-window is obtained. Specifically, the world transformation of the collider at the start and end times of the window is obtained, the rotation angle difference between the two transformations is calculated, and then compared with a preset angle threshold. The preset angle threshold is preferably set to 0.5 degrees, and the preset time span threshold is preferably set to 0.01 seconds; however, this embodiment does not impose specific limitations.
[0055] In one specific embodiment, if the rotation angle difference exceeds a preset angle threshold, and the time span of the detection sub-window exceeds a preset time span threshold, then the detection sub-window is recursively split into two parts. Here, recursive splitting refers to taking the arithmetic midpoint between the window's start and end times as the split time, obtaining the world transformation at this intermediate moment through a transformation pipeline, and then performing the transformation from the start to the intermediate moment and from the intermediate moment to the end moment, respectively, resulting in two sub-windows. This is then recursively called to recalculate whether the rotation angle difference exceeds the preset angle threshold. If the rotation angle difference is less than the preset angle threshold, or the time span of the detection sub-window is less than the preset time span threshold, then a collision trajectory keypoint sequence is generated based on the end moment, such as... Figure 5 As shown.
[0056] In one specific embodiment, such as Figure 6 As shown, when determining the end of recursive bisection based on the recursion depth count, the recursion depth is first counted. Here, the recursion depth count refers to the number of bisection layers the current detection sub-window has undergone since the original detection sub-window. For example, the initial recursion depth of the original detection sub-window is recorded as 0. When this window is divided into two sub-windows, the recursion depth of both sub-windows is recorded as 1. If one sub-window continues to be bisected, the recursion depth of its next sub-window is recorded as 2, and so on. Before each recursive call to a sub-window, the current execution end checks whether the recursion depth of this sub-window exceeds the preset depth limit. If it does, an error log is recorded and further segmentation stops. The start and end changes of the current sub-window form a single segment for detection, thus avoiding infinite recursion or too many detection segments in cases of abnormally large angle changes or excessively small threshold configurations.
[0057] In another embodiment of this application, for further definition and explanation, after performing collision sweep detection based on the collision trajectory key point sequence, the asset data object, and the pose transformation to obtain the collision detection result, the method further includes: The sampling time slice is calculated based on the sweep segment number and hit ratio of each collision hit result in the collision detection results; Based on the sampling time slice and the collision hit result, the consumable payload is encapsulated and stored in the attitude alignment consumption queue; In response to the consumption command of the rendering frame, the current animation playback position of the game entity object is obtained, and the pose alignment consumption queue is invoked based on the consumption manager to perform hit settlement.
[0058] To avoid immediate settlement after a collision, the settlement is triggered only when the attacker's animation progresses to the corresponding pose, eliminating the asynchrony between pose and collision hits. After obtaining the collision detection results, for each hit result, the sampling time slice is first calculated based on the sweep segment sequence number and hit ratio of each collision hit result. For example, Figure 7 As shown, the calculation of the sampling time slice can be expressed as: Sampling time slice = Window start time + (Window end time - Window start time) × (Sweep segment number + Hit rate within segment) / Total number of sweep segments; The sweep segment number can be set starting from 0, and the hit ratio can be a normalized value between 0 and 1 for collision hit results. Based on the sampling time slice and collision hit results, these are encapsulated into a consumption payload, which is then stored in the attitude alignment consumption queue. The consumption payload includes a hit result list, a queue start time slice, a consumption time slice, and a sampling time slice. The queue start time slice is set to a fixed duration one logical frame before the sampling time slice to ensure that hit calculation is completed before the animation reaches the sampling time slice. Consumption payloads can be stored in the attitude alignment consumption queue in ascending order of consumption time slices. Furthermore, for ungenerated hit results, even if no character hit results are generated in the current frame, an empty payload is still generated and added to the queue to ensure that hit queries for destructible environmental objects are triggered at the correct attitude time.
[0059] In this embodiment of the application, when settlement is required, such as Figure 8As shown, consumption settlement is performed by the consumption manager when each rendering frame is driven. In response to the consumption command of the rendering frame, the current execution end obtains the current animation playback position of the game entity object and performs hit settlement based on the pose alignment consumption queue retrieved by the consumption manager. Specifically, the attacker's current animation playback position is obtained as the current pose time slice. All payloads with consumption time slices not exceeding the time interval between the current playback position and the frame are popped from the pose alignment consumption queue to tolerate windowing and prevent frame rate fluctuations from causing delayed consumption. Furthermore, the hit result lists from all consumed payloads popped in the same batch can be merged into a single list. The sampling time slice of the last consumed payload is used as the pose reference time for this settlement, executing a single hit settlement process, including damage calculation, knockback direction, hit effect generation, and event triggering. When the queue is empty, the consumption manager automatically deregisters from the frame callback and no longer consumes update resources for subsequent frames.
[0060] It should be noted that after the collider detection is interpreted, if there are still unconsumed hits in the pose alignment consumption queue, and the sampling time slice corresponding to the hit exceeds the attacker's current animation playback position, these out-of-range consumption payloads will be discarded from the queue to avoid invalid cache cleanup. Only after all payloads have been consumed or discarded will the collider undergo the actual end cleanup process, such as deleting the collision instance corresponding to the collider. If there are still payloads to be consumed, the end process will be delayed until the last payload is consumed to trigger the actual end, ensuring the integrity of the presampling process.
[0061] In this embodiment, the hit-pause posture presampling strategy accurately maps the hit result to the corresponding posture position on the attacker's animation timeline. By using a posture-aligned consumption queue, hit settlement is triggered only when the attacker's animation progresses to the target posture, fundamentally eliminating the problem of posture and hit synchronization being out of sync. This strategy is naturally compatible with special scenarios such as network latency and hit pauses, significantly improving the visual continuity and player control feel of action games.
[0062] In another embodiment of this application, for further definition and explanation, before the step of calculating the sampling time slice based on the sweep segment sequence number and hit ratio of each collision hit result in the collision detection results, the method further includes: Detect whether the game entity is a player-controlled character and whether hit result sampling is enabled; If the game entity object is a player-controlled character and hit result sampling is enabled, then the step of calculating the sampling time slice based on the sweep segment number and hit ratio of each collision hit result in the collision detection results is executed. If the game entity is a non-player-controlled character, or if hit result sampling is not enabled, then the collision detection result is output.
[0063] To ensure consistent execution of hits, the current execution end determines whether collision resolution is delayed by setting a function switch. Therefore, the current execution end checks whether the game entity object, which is a game character, is a player-controlled character and whether hit result sampling is enabled.
[0064] In some embodiments, if the game entity is a player-controlled character and hit result sampling is enabled, the step of calculating the sampling time slice based on the sweep segment sequence number and hit ratio of each collision hit result in the collision detection results is executed, i.e., entering the pre-sampling stage and generating a pose alignment consumption queue. If the game entity is a non-player-controlled character, or hit result sampling is not enabled, the collision detection results are directly output, i.e., subsequent processing such as damage calculation, knockback direction, hit effect generation, and event triggering is performed. In addition, the enabled function automatically cancels frame callbacks only when enabled on the local controlled character and the queue is empty, ensuring extremely low additional performance overhead.
[0065] In one example, when the current execution is a client, the animation on the server is driven synchronously over the network, and the immediate settlement method avoids unnecessary queue management overhead. Furthermore, for local characters with the feature switch off, the output collision result is also used as the final collision result for settlement, without waiting for subsequent pose presampling consumption.
[0066] In this embodiment, to ensure that the collision hit results are displayed completely consistently on both ends, a seed-based synchronous random number generator can be used. The generator produces a completely identical pseudo-random number sequence on both the client and server sides using the same initial seed and sequence number. This sequence is used to determine visual parameters such as the random offset position and rotation angle of the hit effect. For non-repeating point selection scenarios, the current execution end can also track the selected point positions by maintaining a two-dimensional Boolean record array. If a randomly selected point hits an already used position, an unused position is found through scanning, ensuring a uniform distribution of the effect.
[0067] This application provides a collision detection method for games. Compared with the prior art, this application, in response to a collision detection command, loads the game's asset data object, which is structured data pre-baked based on the transformation curve information of different colliders; splits the rendering frame according to a preset detection time interval to obtain multiple detection sub-windows, and performs world space transformation in the detection sub-windows based on dual-end deterministic parameters to obtain the pose transformation of the colliders; calculates the head-tail angle difference of the detection sub-windows to generate a collision trajectory key point sequence, and performs collision sweep detection based on the collision trajectory key point sequence, the asset data object, and the pose transformation to obtain the collision detection result. Two adjacent key points in the collision trajectory key point sequence form a collision sweep segment, achieving a more accurate collision detection process in the game, significantly saving server-side CPU resources, supporting more concurrent players with the same computing power, reducing server costs per online user, reducing computational overhead, and thus improving the accuracy of collision detection in different scenarios.
[0068] Furthermore, as a response to the above Figure 1 The implementation of the method shown in this application provides a collision detection device for games, such as... Figure 9 As shown, the device includes: Loading module 21 is used to load the game's asset data object, which is structured data pre-baked based on the transformation curve information of different colliders; The transformation module 22 is used to respond to the collision detection command, split the rendering frame according to the preset detection time interval to obtain multiple detection sub-windows, and perform world space transformation in the detection sub-windows based on the dual-end deterministic parameters to obtain the attitude transformation of the collider. The detection module 23 is used to calculate the head and tail angle difference of the detection sub-window, generate a collision trajectory key point sequence, and perform collision sweep detection based on the collision trajectory key point sequence, the asset data object and the attitude transformation to obtain the collision detection result. Two adjacent key points in the collision trajectory key point sequence form a collision sweep segment.
[0069] Further, the transformation module is specifically used to perform segment-by-segment completion processing cyclically if the time difference between the current cumulative collision time and the previous collision detection time exceeds a preset collision time interval, until the completion processing is completed when the time difference is less than the preset collision time interval; wherein, the segment-by-segment completion processing includes: extending the time based on the previous collision detection time, and constructing a target detection sub-window based on the extended time and the previous collision detection time, so as to perform world space transformation in the target detection sub-window; when the number of iterations is greater than a first preset threshold, updating the detection sub-window based on the salience level of the game entity object; when the number of iterations is greater than a second preset threshold, completing the segment-by-segment completion processing, wherein the second preset threshold is greater than the first preset threshold.
[0070] Further, the detection module is specifically used to obtain the collider world transformation corresponding to the start time and end time of the detection sub-window, and determine the rotation angle difference of the collider world transformation; if the rotation angle difference exceeds a preset angle threshold, and the time span of the detection sub-window exceeds a preset time span threshold, then the detection sub-window is recursively split into two parts, and the end of the recursive split is determined based on the recursion depth count value; if the rotation angle difference is less than the preset angle threshold, or the time span of the detection sub-window is less than the preset time span threshold, then a collision trajectory key point sequence is generated based on the end time.
[0071] Furthermore, the transformation module is specifically used to obtain the dual-end deterministic parameters, which are parameters that are consistent between the server and the client; in the detection sub-window, the world space transformation of the collider is performed through the transformation calculation pipeline to obtain the attitude transformation, and the transformation calculation pipeline is a combination of filters, transformation modifiers and final modifiers in a chain-like stacking manner.
[0072] Furthermore, the device also includes: The calculation module is used to calculate the sampling time slice based on the sweep segment number and hit ratio of each collision hit result in the collision detection results; The storage module is used to encapsulate the sampling time slice and the collision hit result into a consumption payload, and store the consumption payload into the attitude alignment consumption queue; The settlement module is used to respond to the consumption command of the rendering frame, obtain the current animation playback position of the game entity object, and perform hit settlement by calling the posture-aligned consumption queue based on the consumption manager.
[0073] Furthermore, the detection module is also used to detect whether the game entity object is a player-controlled character and whether hit result sampling is enabled; if the game entity object is a player-controlled character and hit result sampling is enabled, then the step of calculating the sampling time slice based on the sweep segment number and hit ratio of each collision hit result in the collision detection result is executed; if the game entity object is a non-player-controlled character, or hit result sampling is not enabled, then the collision detection result is output.
[0074] Furthermore, the storage module is also used to configure and store a globally unique identifier for the asset data object, so as to synchronize collision body instances based on the globally unique identifier. The asset data object includes shape parameters of different collision bodies, offset transformation of the collision body relative to the mounting point, collision detection interval type, hit module configuration identifier, and transformation notification information.
[0075] This application provides a collision detection device for games. Compared with the prior art, this application, in response to a collision detection command, loads the game's asset data object, which is structured data pre-baked based on the transformation curve information of different colliders; splits the rendering frame according to a preset detection time interval to obtain multiple detection sub-windows, and performs world space transformation in the detection sub-windows based on dual-end deterministic parameters to obtain the pose transformation of the colliders; calculates the head-tail angle difference of the detection sub-windows to generate a collision trajectory key point sequence, and performs collision sweep detection based on the collision trajectory key point sequence, the asset data object, and the pose transformation to obtain the collision detection result. Two adjacent key points in the collision trajectory key point sequence form a collision sweep segment, achieving a more accurate collision detection process in the game, significantly saving server-side CPU resources, supporting more concurrent players with the same computing power, reducing server costs per online user, reducing computational overhead, and thus improving the accuracy of collision detection in different scenarios.
[0076] According to one embodiment of this application, a storage medium is provided, the storage medium storing at least one executable instruction that can execute the collision detection method of the game in any of the above method embodiments.
[0077] Figure 10 The diagram shows a structural schematic of a computer device according to one embodiment of the present application. The specific embodiments of the present application do not limit the specific implementation of the computer device.
[0078] like Figure 10As shown, the computer device may include: a processor 302, a communications interface 304, a memory 306, and a communications bus 308.
[0079] The processor 302, communication interface 304, and memory 306 communicate with each other via communication bus 308.
[0080] Communication interface 304 is used to communicate with other network elements such as clients or other servers.
[0081] The processor 302 is used to execute program 310, specifically to execute the relevant steps in the above-described collision detection method embodiment of the game.
[0082] Specifically, program 310 may include program code that includes computer operation instructions.
[0083] Processor 302 may be a central processing unit (CPU), an application-specific integrated circuit (ASIC), or one or more integrated circuits configured to implement the embodiments of this application. The computer device includes one or more processors, which may be processors of the same type, such as one or more CPUs; or they may be processors of different types, such as one or more CPUs and one or more ASICs.
[0084] Memory 306 is used to store program 310. Memory 306 may include high-speed RAM memory, and may also include non-volatile memory, such as at least one disk storage device.
[0085] Specifically, program 310 can be used to cause processor 302 to perform the following operations: Load the game's asset data object, which is structured data pre-baked based on the transformation curve information of different colliders; In response to a collision detection command, the rendering frame is split according to a preset detection time interval to obtain multiple detection sub-windows, and world space transformation is performed in the detection sub-windows based on dual-end deterministic parameters to obtain the pose transformation of the collider. The head-tail angle difference is calculated for the detection sub-window to generate a collision trajectory key point sequence. Collision sweep detection is performed based on the collision trajectory key point sequence, the asset data object, and the attitude transformation to obtain the collision detection result. Two adjacent key points in the collision trajectory key point sequence form a collision sweep segment.
[0086] Obviously, those skilled in the art should understand that the modules or steps of this application described above can be implemented using general-purpose computing devices. They can be centralized on a single computing device or distributed across a network of multiple computing devices. Optionally, they can be implemented using computer-executable program code, thereby storing them in a storage device for execution by a computing device. In some cases, the steps shown or described can be performed in a different order than those presented here, or they can be fabricated as separate integrated circuit modules, or multiple modules or steps can be fabricated as a single integrated circuit module. Thus, this application is not limited to any particular combination of hardware and software.
[0087] The above description is merely a preferred embodiment of this application and is not intended to limit this application. Various modifications and variations can be made to this application by those skilled in the art. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of this application should be included within the scope of protection of this application.
Claims
1. A collision detection method for games, characterized in that, include: Load the game's asset data object, which is structured data pre-baked based on the transformation curve information of different colliders; In response to a collision detection command, the rendering frame is split according to a preset detection time interval to obtain multiple detection sub-windows, and world space transformation is performed in the detection sub-windows based on dual-end deterministic parameters to obtain the pose transformation of the collider. The head-tail angle difference is calculated for the detection sub-window to generate a collision trajectory key point sequence. Collision sweep detection is performed based on the collision trajectory key point sequence, the asset data object, and the attitude transformation to obtain the collision detection result. Two adjacent key points in the collision trajectory key point sequence form a collision sweep segment.
2. The method according to claim 1, characterized in that, The step of splitting the rendering frame according to a preset detection time interval to obtain multiple detection sub-windows includes: If the time difference between the current cumulative collision time and the previous collision detection time exceeds the preset collision time interval, the segment completion process is executed cyclically until the time difference is less than the preset collision time interval and the completion process is completed. The segment-by-segment completion process includes: extending the time based on the previous collision detection time, and constructing a target detection sub-window based on the extended time and the previous collision detection time, so as to perform world space transformation in the target detection sub-window; When the number of iterations exceeds the first preset threshold, the detection sub-window is updated based on the salience level of the game entity object. When the number of iterations exceeds the second preset threshold, the segment completion process is completed. The second preset threshold is greater than the first preset threshold.
3. The method according to claim 1, characterized in that, The step of calculating the first and last angle differences of the detection sub-window and generating the collision trajectory key point sequence includes: Obtain the collider world transformation corresponding to the start time and end time of the detection sub-window, and determine the rotation angle difference of the collider world transformation; If the rotation angle difference exceeds a preset angle threshold and the time span of the detection sub-window exceeds a preset time span threshold, then the detection sub-window is recursively split into two parts, and the recursive split is terminated based on the recursion depth count value. If the rotation angle difference is less than a preset angle threshold, or the time span of the detection sub-window is less than a preset time span threshold, then a sequence of key points of the collision trajectory is generated based on the termination time.
4. The method according to claim 1, characterized in that, The process of performing world space transformation based on two-terminal deterministic parameters in the detection sub-window to obtain the attitude transformation of the collider includes: Obtain the dual-end deterministic parameters, which are parameters that are consistent between the server and the client; In the detection sub-window, the world space of the collider is transformed through the transformation calculation pipeline to obtain the attitude transformation. The transformation calculation pipeline combines filters, transformation modifiers and final modifiers in a chain-like stacking manner.
5. The method according to claim 1, characterized in that, After obtaining the collision detection result by performing collision sweep detection based on the collision trajectory key point sequence, the asset data object, and the pose transformation, the method further includes: The sampling time slice is calculated based on the sweep segment number and hit ratio of each collision hit result in the collision detection results; Based on the sampling time slice and the collision hit result, the consumable payload is encapsulated and stored in the attitude alignment consumption queue; In response to the consumption command of the rendering frame, the current animation playback position of the game entity object is obtained, and the pose alignment consumption queue is invoked based on the consumption manager to perform hit settlement.
6. The method according to claim 5, characterized in that, Before calculating the sampling time slice based on the sweep segment number and hit ratio of each collision hit result in the collision detection results, the method further includes: Detect whether the game entity is a player-controlled character and whether hit result sampling is enabled; If the game entity object is a player-controlled character and hit result sampling is enabled, then the step of calculating the sampling time slice based on the sweep segment number and hit ratio of each collision hit result in the collision detection results is executed. If the game entity is a non-player-controlled character, or if hit result sampling is not enabled, then the collision detection result is output.
7. The method according to any one of claims 1-6, characterized in that, The method further includes: Configure and store a globally unique identifier for the asset data object to synchronize collider instances based on the globally unique identifier. The asset data object includes shape parameters of different colliders, offset transformation of the collider relative to the mounting point, collision detection interval type, hit module configuration identifier, and transformation notification information.
8. A collision detection device for a game, characterized in that, include: The loading module is used to load the game's asset data objects, which are structured data pre-baked based on the transformation curve information of different colliders; The transformation module is used to respond to the collision detection command, split the rendering frame according to the preset detection time interval to obtain multiple detection sub-windows, and perform world space transformation in the detection sub-windows based on the dual-end deterministic parameters to obtain the attitude transformation of the collider. The detection module is used to calculate the head and tail angle difference of the detection sub-window, generate a collision trajectory key point sequence, and perform collision sweep detection based on the collision trajectory key point sequence, the asset data object, and the attitude transformation to obtain the collision detection result. Two adjacent key points in the collision trajectory key point sequence form a collision sweep segment.
9. A computer-readable storage medium having a computer program / instructions stored thereon, characterized in that, When the computer program / instructions are executed by the processor, they implement the steps of the method of claim 1.
10. A computer device, comprising a memory, a processor, and a computer program stored in the memory, characterized in that, The processor executes the computer program to implement the steps of the method of claim 1.
