Interaction position correction method and apparatus, device, medium

CN122912456APending Publication Date: 2026-10-16GUANGZHOU CULUO TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611229546.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-08-13
Publication Date
2026-10-16

AI Technical Summary

Technical Problem

这种方式在场景空间开阔、地形平坦的情况下能够正常运行,然而在虚拟场景中存在墙体、障碍物等复杂环境时,直接使用预设位置容易出现多种问题,例如,当预设的交互位置与场景中的墙体或障碍物发生重叠时,虚拟对象被移动至该位置后,其碰撞体将与场景碰撞体发生穿插,导致穿模现象,影响交互表现的真实性和沉浸感

Benefits of technology

首先,本申请通过响应于虚拟对象交互触发事件确定参与交互的第一虚拟对象和第二虚拟对象,获取指示基准对象的纠正基准信息,以基准对象的当前位置为参考执行位置预测处理确定目标交互位置,并将第一虚拟对象和第二虚拟对象分别调整至目标交互位置中的第一目标位置和第二目标位置后执行交互事件,使得虚拟对象交互的位置能够基于基准对象所处的实际空间环境动态确定,而非依赖于预设的固定交互位置。相关技术中,交互位置的确定通常依赖于预先配置的固定位置参数,系统在触发交互后直接根据预设坐标或偏移量放置双方,当预设位置与场景中的墙体、障碍物等碰撞体发生冲突时,容易出现虚拟对象穿模、卡死等表现异常。本申请通过执行位置预测处理,在实际场景中动态搜索合法的交互位置,减少了因预设位置与场景碰撞体发生空间冲突而导致的交互无法执行或交互表现异常的情况。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122912456A_ABST
    Figure CN122912456A_ABST
Patent Text Reader

Abstract

The application relates to an interactive position correction method and device, equipment and medium. In response to a virtual object interaction trigger event, a first virtual object and a second virtual object participating in interaction are determined; correction reference information associated with the interaction trigger event is acquired; according to the correction reference information, a position prediction process is performed in a virtual scene with the current position of a reference object as a reference to determine a target interaction position; the first virtual object and the second virtual object are respectively adjusted to a first target position and a second target position, and an interaction event corresponding to the virtual object interaction trigger event is performed. The application determines the target interaction position by performing the position prediction process with the current position of the reference object as the reference, so that the virtual object interaction can adapt to a complex scene environment, a legal position is found when the space around the two parties is limited, and the situation that the interaction cannot be performed due to the conflict between the preset interaction position and the scene collision body is reduced.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of virtual interaction technology, and in particular to an interactive position correction method, apparatus, device, and medium thereof. Background Technology

[0002] In virtual environments, virtual objects often need to perform bound interactions that require precise relative poses, such as one object grabbing another, close-quarters combat, suppression, execution, or cooperative cooperation. These interactions typically require the interacting parties to maintain specific relative positions and orientations in order to achieve a natural interactive effect.

[0003] In existing technologies, the determination of interaction positions typically relies on preset fixed position parameters. After triggering an interaction, the system directly moves both parties to the preset position based on pre-configured position coordinates or offsets relative to one party before initiating the interaction. This method works normally in open and flat environments. However, in complex environments with walls, obstacles, and other features in virtual scenes, directly using preset positions can easily lead to various problems. For example, when the preset interaction position overlaps with a wall or obstacle in the scene, the collider of the virtual object moved to that position will intersect with the scene's collider, causing clipping and affecting the realism and immersion of the interaction. Summary of the Invention

[0004] The purpose of this application is to solve the above-mentioned problems by providing an interactive position correction method and corresponding apparatus, devices, non-volatile readable storage media, and computer program products.

[0005] According to one aspect of this application, an interactive position correction method is provided, comprising: In response to virtual object interaction trigger events, determine the first and second virtual objects involved in the interaction; Obtain the correction reference information associated with the interaction trigger event. The correction reference information indicates the reference object for correction of the interaction position using the first virtual object or the second virtual object. Based on the correction benchmark information, and with the current position of the benchmark object as a reference, position prediction processing is performed in the virtual scene to determine the target interaction position; Move the first and second virtual objects to the target interaction position and execute the interaction between them.

[0006] According to another aspect of this application, an interactive position correction device is provided, comprising: The interaction object determination module is used to determine the first and second virtual objects participating in the interaction in response to the virtual object interaction trigger event. The correction benchmark acquisition module is used to acquire correction benchmark information associated with interactive trigger events. The correction benchmark information is used to determine the benchmark object from the first virtual object and the second virtual object. The interaction position prediction module is used to perform position prediction processing in the virtual scene based on the correction reference information and with the current position of the reference object as a reference, to determine the target interaction position. The target interaction position includes the first target position corresponding to the first virtual object and the second target position corresponding to the second virtual object. The object interaction execution module is used to adjust the first virtual object and the second virtual object to the first target position and the second target position respectively, and execute the interaction events corresponding to the virtual object interaction trigger events.

[0007] As can be seen from the above embodiments, the beneficial effects of this application are mainly reflected in the following aspects: First, this application determines the first and second virtual objects involved in the interaction in response to a virtual object interaction trigger event, obtains correction reference information indicating a reference object, performs position prediction processing to determine the target interaction position using the current position of the reference object as a reference, and then adjusts the first and second virtual objects to the first and second target positions respectively within the target interaction position before executing the interaction event. This allows the interaction position of the virtual objects to be dynamically determined based on the actual spatial environment of the reference object, rather than relying on a preset fixed interaction position. In related technologies, the determination of the interaction position usually relies on pre-configured fixed position parameters. After triggering the interaction, the system directly places both parties according to preset coordinates or offsets. When the preset position conflicts with colliders such as walls and obstacles in the scene, abnormal behavior such as virtual objects clipping through or getting stuck can easily occur. This application, by performing position prediction processing, dynamically searches for legal interaction positions in the actual scene, reducing the situation where interaction cannot be executed or abnormal interaction behavior is caused by spatial conflicts between preset positions and scene colliders.

[0008] Furthermore, this application specifies either a first virtual object or a second virtual object as the reference object by correcting the reference information. This allows the spatial reference origin for location prediction processing to be flexibly selected based on the interaction type or scene conditions, rather than being fixed to one side as the anchor point. The target interaction position determined by the location prediction processing includes the first target position corresponding to the first virtual object and the second target position corresponding to the second virtual object, enabling both interacting parties to obtain suitable spatial positions. In related technologies, the interaction position is usually fixed with one side as a reference to place the other side. When the space around the referenced side is insufficient, even if the space where the other side is located is open, this advantageous condition cannot be utilized. This application introduces optional reference object settings by correcting the reference information, enabling location prediction to start the search from the side with more favorable spatial conditions. This reduces the situation where the search range is insufficient or the search fails due to the limited space of the location of a single virtual object, and improves the efficiency of finding legal interaction positions in complex terrain. Attached Figure Description

[0009] Figure 1 This is an exemplary network architecture for this application; Figure 2 This is a flowchart illustrating one embodiment of the interactive position correction method of this application; Figure 3 This is a flowchart illustrating an embodiment of an interactive position correction method for determining a benchmark object based on environmental scoring, according to this application. Figure 4 This is a flowchart illustrating an embodiment of an interactive position correction method according to the present application, which adjusts the search strategy based on scene region type. Figure 5 This is a flowchart illustrating an embodiment of a hierarchical position prediction method based on anchor point placement and surrounding traversal search for an interactive position correction method according to this application. Figure 6 This is a flowchart illustrating an embodiment of an interactive position correction method according to the present application, which selects the target interactive position based on the level and number of removable obstructing entities. Figure 7 This is a flowchart illustrating an embodiment of an interactive position correction method of this application, based on ground normal detection and lower limb joint posture adjustment for a first target position and a second target position, respectively. Figure 8 This is a flowchart illustrating an embodiment of an interactive position correction method based on preset range push detection and displacement limitation according to this application. Figure 9 This is a flowchart illustrating an embodiment of an interactive position correction method based on the marking and occupancy of a target interactive region as an unselectable region, according to this application. Figure 10 This is a schematic block diagram of the interactive position correction device of this application; Figure 11 This is a schematic diagram of the structure of an interactive position correction device used in this application. Detailed Implementation

[0010] The technical solution of this application can be widely applied to various network architectures to adapt to different types and scales of game applications. In a network architecture such as... Figure 1 In the typical network architecture shown, the user's terminal device accesses a game service cluster via the network. This cluster consists of multiple game servers 81. A microservice architecture manages and maintains the runtime resources of these game servers 81, providing multiple service instances. Each service instance is responsible for a different service. For example, some service instances can be used to maintain the front-end service for the terminal device 80 to access the game, while others can be responsible for the game's interactive position correction gameplay service, providing users with corresponding interactive position correction functionality for gameplay. The user's terminal device 80 has a computer program product implemented according to the interactive position correction method of this application installed and running, or the terminal device can be connected to a cloud server container, where the computer program product runs. After the computer program product runs, it accesses the game service cluster, enabling the user to control a user character in the game through the terminal device and interact with various service instances of the game, such as engaging in combat with hostile entities.

[0011] Each service instance can maintain a real-time connection with the user's terminal device 80 via the network, handling various events and interactions in the game, such as the movement, attack, defense, item use, and interaction of the wrestling initiator or the wrestled target. The server provides necessary data support to the terminal device to ensure smooth game operation. This data includes, but is not limited to, data related to the interaction position correction method. These datasets contain map model data in the virtual interaction scene and resource model data for the interaction between virtual objects, such as scene buildings, user character models, and interactive performance resources, which are used by the terminal device 80 to render and generate corresponding real-time images. Based on the received data related to the interaction position correction method, the terminal device 80 performs position prediction processing in the virtual scene based on the correction reference information to determine the corresponding target interaction position. Then, it moves the first and second virtual objects to the target interaction position to execute the interaction between them, thereby improving the user's interaction position correction experience.

[0012] This application is not only applicable to the gaming experience of a single user, but can also be extended to a multiplayer online gaming environment. In multiplayer games, multiple users' terminal devices connect to the game service cluster simultaneously, and each service instance needs to handle interaction requests from multiple users and update the game status in real time.

[0013] In an exemplary application scenario of this application, consider a massively multiplayer online role-playing game (MMORPG) where users can freely explore a vast open-world map.

[0014] The interactive position correction method provided in this application can be widely deployed in various virtual interactive virtual environment systems, especially suitable for application scenarios such as video games, virtual reality experiences, and simulation training platforms. In a typical technical architecture, the execution entity of this application is usually a terminal device running a client application, such as a personal computer, game console, or mobile device. The game engine or application framework running on the terminal device integrates combat gameplay processing middleware and logic processing units, responsible for real-time rendering of virtual scenes, handling user interactions, and managing the use of wrestling performance assets. The wrestling interaction resources and related strategy configuration data can be stored locally on the terminal device or dynamically obtained from a remote server as needed. Real-time monitoring, strategy matching, and interactive position correction processes can be completed locally on the client to ensure low-latency response and a smooth experience.

[0015] The term "system" as used in this application may refer to a collection of software and hardware environments on the game client and / or server sides, used to implement various functions in virtual interactive scenes. It includes components such as game engines, physics systems, collision detection modules, special effects rendering modules, and audio systems. These components work together to process user input, execute game logic, update game state, generate visual and auditory feedback, and provide users with an interactive experience.

[0016] After providing a general overview of the exemplary network architecture and application scenarios of this application, as well as some basic concepts, the following will continue to describe several specific embodiments of this application.

[0017] Please see Figure 2 The interactive position correction method of this application includes steps S1100 to S1400 in some embodiments, and each step is described below.

[0018] Step S1100: In response to the virtual object interaction trigger event, determine the first virtual object and the second virtual object participating in the interaction.

[0019] Responding to a virtual object interaction trigger event, identifying the first and second virtual objects involved in the interaction is the initial processing step of the entire interaction position correction method. This step requires completing two tasks: first, detecting and capturing the occurrence of the virtual object interaction trigger event; and second, identifying the two virtual objects involved in the interaction based on the event, namely the first and second virtual objects. Through this processing step, the system obtains the trigger signal and object basis for initiating subsequent position prediction and interaction execution.

[0020] Virtual object interaction refers to a bound interaction behavior between two virtual objects in a virtual scene that requires maintaining a specific relative posture. In a single virtual object interaction, the first and second virtual objects need to maintain a preset relative position and orientation, and the system drives both to perform corresponding actions. Types of virtual object interaction include, but are not limited to: one virtual object grabbing another, close-quarters combat between the two virtual objects, one virtual object performing a suppression action on another, and two virtual objects cooperating to complete specific actions.

[0021] Wrestling interaction is a typical form of virtual object interaction. In a wrestling interaction, the object initiating the wrestling and the object being wrestled against form an opposing posture in a specific direction. The triggering of wrestling interaction usually depends on preset triggering conditions: when the object being wrestled against performs a specific attack action, and the attack detection area associated with that attack action hits the object initiating the wrestling who is in a defensive state, a wrestling interaction will be formed between the object being wrestled against and the object initiating the wrestling. Wrestling interaction has clear requirements on the spatial positional relationship between the two parties. The two parties need to maintain a preset relative posture during the interaction process; otherwise, problems such as visual misalignment, penetration, or action mismatch will occur. It is precisely because of this strict requirement on the spatial positional relationship that when there are environmental structures such as walls and obstacles in the virtual scene that may cause spatial conflicts, the preset interaction position may conflict with the colliders in the scene. Therefore, it is necessary to predict and correct the interaction position before the interaction is officially executed to determine a target interaction position that satisfies both the relative posture requirements of the interaction and the legality conditions of the scene space.

[0022] A virtual object interaction trigger event is a signal that indicates a virtual object interaction should occur within a virtual scene. Taking a wrestling interaction as an example, when a virtual object performs a specific attack and hits another virtual object in a defensive state, the system detects the overlap between the detection area associated with the attack and the colliding object of the receiving virtual object, thus generating a virtual object interaction trigger event. This event carries the identification information of both parties involved in the interaction, providing a basis for subsequently identifying the first and second virtual objects. In another implementation, the virtual object interaction trigger event can also be generated based on preset triggering conditions in the virtual scene, such as based on the spatial positional relationship or state changes of the virtual objects.

[0023] The first virtual object and the second virtual object distinguish the roles of two virtual objects participating in virtual object interaction. This role distinction is determined based on the specific circumstances of the virtual object interaction trigger event. In a power struggle scenario, the first virtual object can be the object being struggled against, and the second virtual object can be the object initiating the struggle. Alternatively, in one implementation, the first virtual object is a controlled virtual object, i.e., a virtual character manipulated by the user; the second virtual object is a target virtual object not directly manipulated by the user, such as a virtual character controlled by the system. In response to the virtual object interaction trigger event, the system identifies the first and second virtual objects by reading the object identification information carried in the event, providing clear object input for subsequent acquisition of correction reference information and position prediction processing.

[0024] In one implementation, after responding to a virtual object interaction trigger event and identifying the first and second virtual objects, the system also performs concurrent control on the spatial area involved in the current interaction. Specifically, the system marks the interaction area currently occupied by the first and second virtual objects as an occupied area. This occupied area indicates that the space is already used by the ongoing interaction, such as a spherical or capsule-shaped area within a preset radius centered on the current positions of both objects. When other virtual object interaction trigger events occur, and the target interaction position of the other virtual object overlaps with the occupied area, the system prohibits the target interaction position of the other virtual object from encroaching on the occupied area, that is, subsequent interactions are not allowed to be executed within the occupied space. Through this mechanism, when multiple pairs of virtual objects trigger interactions sequentially in a virtual scene, the space occupied by the first interaction can be protected, avoiding multiple interactions from intersecting in the same area and affecting their respective performance.

[0025] It can be seen that the virtual object interaction trigger event serves as a start signal, triggering the system to enter the interactive position correction process. The first and second virtual objects serve as the basic objects for subsequent processing, providing clear object inputs for the acquisition of subsequent correction reference information and the execution of position prediction processing.

[0026] Step S1200: Obtain the correction reference information associated with the interaction trigger event. The correction reference information indicates the reference object for correction of the interaction position using the first virtual object or the second virtual object.

[0027] The process of acquiring correction baseline information associated with the interaction trigger event, which indicates whether a first or second virtual object should be used as the baseline object for interaction position correction, is a step in transforming the configuration information carried in the interaction trigger event into the reference basis required for subsequent position prediction processing. This step requires completing two tasks: first, reading the correction baseline information from the interaction configuration data associated with the interaction trigger event; and second, determining which virtual object should be used as the baseline object for this interaction position correction based on the correction baseline information. Through this step, the system clarifies the selection basis for anchor points in subsequent position prediction processing, providing a spatial reference origin for searching the target interaction position in the virtual scene.

[0028] Correction reference information is a parameter stored in the interaction configuration data used to specify a reference object. The interaction configuration data is associated with interaction trigger events and is automatically read by the system after detecting an interaction trigger event. The value range of the correction reference information includes indicating that a first virtual object is used as the reference object, and indicating that a second virtual object is used as the reference object. A reference object is a virtual object whose current position is used as the spatial reference origin for position prediction processing. In position prediction processing, the system uses the current position of the reference object as an anchor point, treating both virtual objects as a whole, and searches for a spatial location at or around the anchor point that can accommodate both. The selection of the reference object directly affects the search direction and result of position prediction. When the correction reference information indicates that the first virtual object is used as the reference object, the system prioritizes keeping the position of the first virtual object unchanged and attempts to move the second virtual object to its vicinity; when the correction reference information indicates that the second virtual object is used as the reference object, the system prioritizes keeping the position of the second virtual object unchanged and attempts to move the first virtual object to its vicinity.

[0029] In one implementation, when determining the reference object, the system first acquires the first current position information of a first virtual object and the second current position information of a second virtual object. The first current position information describes the spatial coordinates and surrounding environment data of the first virtual object in the virtual scene, and the second current position information describes the spatial coordinates and surrounding environment data of the second virtual object in the virtual scene. The system uses the area of ​​the passable region corresponding to the first current position information as the first spatial value and the area of ​​the passable region corresponding to the second current position information as the second spatial value. The passable region refers to the spatial range in the virtual scene where the virtual object is allowed to move and stand freely without walls or obstacles blocking it; a larger spatial value indicates a higher degree of openness around the virtual object. The system uses the obstacle density corresponding to the first current position information as the first density value and the obstacle density corresponding to the second current position information as the second density value. The obstacle density reflects the proportion of obstacles such as walls and large objects within a certain spatial range around the virtual object; a smaller density value indicates a more regular and continuous space around the virtual object. The system determines a first environment score based on the first spatial value and the first density value, and determines a second environment score based on the second spatial value and the second density value. The environmental score is a quantitative score obtained by comprehensively weighing spatial and density values, used to measure how friendly the environment around a virtual object is to the prediction of interactive locations. In one implementation, the system normalizes the spatial values ​​to obtain a spatial score, with a higher spatial value resulting in a higher score; it also normalizes the density values ​​and takes an inverse score, with a lower density value resulting in a higher score; the spatial and density scores are then weighted and summed according to preset weights to obtain the environmental score. The system compares a first environmental score with a second environmental score, identifying the virtual object with the higher environmental score as the benchmark object. When the first and second environmental scores are the same, the system identifies the virtual object corresponding to the larger of the first and second spatial values ​​as the benchmark object. This process allows anchor point selection to reflect the actual spatial conditions of both parties, prioritizing location search from the side with more open space and fewer obstacles, thus increasing the probability of quickly finding a legal location in subsequent location prediction processing.

[0030] In one implementation, the correction reference information, in addition to the reference object indication parameter, may also include one or more of the following: a search radius parameter, a candidate location point number parameter, and a candidate location point distribution rule parameter. The search radius parameter defines the spatial range for the surrounding search centered on the anchor point; for example, the search radius parameter can be set to 1 meter or 2 meters. The candidate location point number parameter defines the number of location points that need to be traversed and detected within this search range; for example, the candidate location point number parameter can be set to 8 or 16. The candidate location point distribution rule parameter defines the spatial distribution method of the candidate location points within the search range, such as a uniform circular distribution or a grid distribution.

[0031] In one embodiment, the correction reference information may further include a reference switching switch parameter, used to indicate whether it is permissible to switch the reference object to another virtual object and re-execute the search when a valid interaction position cannot be found using the default reference object as a reference. When the reference switching switch parameter indicates that switching is permitted, the system can automatically switch the reference object after the first round of search failure, and re-execute the position prediction process using the current position of the new reference object as the new anchor point. When the reference switching switch parameter indicates that switching is not permitted, the system directly determines that the position prediction process has failed after the first round of search failure.

[0032] It can be seen that the system determines the reference object and search strategy parameters by reading the correction reference information, which provides a clear spatial reference origin for the location prediction process. This enables the search process to select anchor points and perform location prediction processing according to the interaction type, thereby improving the efficiency of finding legal interaction locations in complex terrain.

[0033] Step S1300: Based on the correction reference information and with the current position of the reference object as a reference, perform position prediction processing in the virtual scene to determine the target interaction position.

[0034] Based on the correction benchmark information and using the current position of the benchmark object as a reference, position prediction processing is performed in the virtual scene to determine the target interaction position. This process transforms the configurable benchmark selection and spatial search strategy into a specific, legal interaction position. The task of this process is to use the current position of the benchmark object as the spatial reference origin, and through a step-by-step search and detection method, find a legal position in the virtual scene that can simultaneously accommodate the first and second virtual objects without overlapping with colliders in the scene. This position is then determined as the target interaction position for performing the interaction. Through this process, the system provides a positional basis that meets the spatial legality conditions for subsequent interaction execution.

[0035] Position prediction processing refers to the process by which the system, using the current position of a baseline object as the spatial reference origin, searches for a legal interaction location in a virtual scene through progressively trying and expanding the search range. Position prediction processing uses the current position of the baseline object as an anchor point. It first attempts to place both virtual objects directly at the anchor point and checks the spatial legality. If the anchor point is unavailable, the search range is gradually expanded, traversing the area around the anchor point. The output of position prediction processing is one of two scenarios: first, a legal target interaction location is determined, and the system subsequently moves both objects to that location and performs the interaction; second, no legal location is found after all search steps, indicating that position prediction processing has failed, and the system uses a pre-set fallback strategy. The search strategy and search range of position prediction processing are determined by relevant parameters carried in the correction baseline information.

[0036] The target interaction position is the spatial location determined by the position prediction process for executing the interaction. The target interaction position includes the first target position corresponding to the first virtual object and the second target position corresponding to the second virtual object. The first target position is the spatial coordinate that the first virtual object should occupy in the interaction state, as determined by the position prediction process, and the second target position is the spatial coordinate that the second virtual object should occupy in the interaction state, as determined by the position prediction process. During the position prediction process, the system, based on the relative standing relationship between the two interacting parties defined in the current interaction configuration data, finds a candidate position that meets the spatial legality conditions. Using this candidate position as a reference, and combining the relative standing relationship, it calculates the spatial positions that the first and second virtual objects should each occupy, thus obtaining the first and second target positions. The target interaction position is distinguished into the respective target positions of both parties, rather than using a general center position, because the first and second virtual objects usually need to occupy different spatial coordinates during interaction execution. For example, in a wrestling interaction, the two parties need to stand face-to-face, each located on either side of the confrontation center point, and there is a preset spatial offset between the first and second target positions.

[0037] In one implementation, the system adjusts its search strategy based on the scene region type currently occupied by the reference object during location prediction processing. The system first obtains the scene region type, which is a pre-defined type identifier for different spatial regions in the virtual scene based on their spatial characteristics, such as indoor, outdoor, and narrow passage types. Different types of regions have different spatial characteristics. Based on the scene region type, the system selects a corresponding set of search parameters from a set of preset search parameters. Each set of search parameters corresponds to a scene region type and includes a search radius and the number of candidate location points. The search radius defines the size of the spatial range for searching the surrounding area centered on the anchor point, and the number of candidate location points defines the number of location points that need to be traversed and detected within this search range. For example, the indoor type corresponds to a smaller search radius and a larger number of candidate location points to suit the characteristics of a small indoor space requiring precise searching; the outdoor type corresponds to a larger search radius and a smaller number of candidate location points to suit the characteristics of an open outdoor space requiring high search efficiency. The system performs location prediction processing based on the selected search parameters, enabling the search behavior to automatically adjust the search strategy according to the spatial characteristics of the scene area. This allows for more precise searches in confined indoor areas and more efficient searches in open outdoor areas, balancing search success rate and search efficiency.

[0038] In one implementation, during position prediction processing, the system uses the current position of the reference object as the anchor point and determines the overall collider of the first and second virtual objects in the interactive state based on the interaction information corresponding to the interaction trigger event. The interaction information is configuration data associated with the interaction trigger event, defining the type of interaction, the relative positioning relationship that the two interacting objects should maintain during the interaction, and other information. Based on the relative positioning relationship defined in the interaction information, the system places the colliders of both objects in their respective spatial positions, combining them into an overall collider. The overall collider reflects the actual size and shape of the space occupied by the two interacting objects during the interaction. The system places the overall collider at the anchor point and detects whether the overall collider overlaps with the colliders of walls, obstacles, or other virtual objects in the virtual scene. When the placed overall collider does not overlap with the colliders of the virtual scene, it indicates that the anchor point can legally accommodate both virtual objects, and the system determines the anchor point as the target interaction position for this interaction. When the placed overall collider overlaps with the collider in the virtual scene, the system traverses multiple candidate locations within a preset range centered on the anchor point and checks whether each candidate location meets the spatial legality condition. The candidate location that meets the spatial legality condition is then determined as the target interaction location.

[0039] In another implementation, when overall placement overlaps, the system performs a traversal search around the anchor point. Specifically, centered on the anchor point, multiple candidate locations are traversed within a preset range, and each candidate location is checked to see if it meets the spatial validity conditions. The system determines the candidate locations that meet the spatial validity conditions as the target interaction location. The candidate locations are generated based on the search radius parameter, the number of candidate locations parameter, and the candidate location distribution rule parameter carried in the correction reference information. For example, the search radius parameter can be set to 1 meter, the number of candidate locations parameter can be set to 8, and the candidate location distribution rule parameter can be set to uniform distribution around the circumference. Then, the system uniformly selects 8 candidate locations on a circle with a radius of 1 meter centered on the anchor point, and sequentially places the overall collider at each candidate location, checking whether it overlaps with the scene collider. When a candidate location is detected to meet the spatial validity conditions, the system stops traversing and determines that candidate location as the target interaction location.

[0040] In another implementation, when a valid target interaction position cannot be determined at the anchor point and surrounding candidate locations, using the reference object indicated by the correction reference information as a reference, the system automatically switches to using another virtual object as the reference object and re-executes the position prediction process. This reference switching mechanism corresponds to the reference switching switch parameter in the correction reference information. When the reference switching switch parameter indicates that switching is allowed, the system determines another virtual object as the new reference object, uses the current position of the new reference object as the new anchor point, and re-executes the overall placement detection and surrounding traversal search. Taking wrestling interaction as an example, when the object being wrestled is in a narrow corner, and a valid position cannot be found by using it as the reference object for anchor point detection and traversal of the eight surrounding candidate locations, the system switches the wrestling initiator object as the new reference object, uses the current position of the wrestling initiator object in the open area as the new anchor point, re-executes the overall placement and surrounding search, and pulls the object being wrestled to the vicinity of the wrestling initiator object for interaction.

[0041] When location prediction fails to determine the target interaction location, the system employs a fallback strategy. In one implementation, if all location predictions fail to identify a legitimate target interaction location, the system does not cancel the interaction but instead acquires at least one pre-configured safe interaction location point in the virtual scene. This safe interaction location point is a pre-set dedicated coordinate system in the virtual scene, typically located in an open area to ensure sufficient space to accommodate the virtual objects involved in the interaction. The system selects the safe interaction location point closest to the current reference object, moves the first and second virtual objects to this safe interaction location point, and then executes the interaction. In another implementation, if all location predictions fail to determine a legitimate target interaction location, the system determines that the interaction cannot be executed in the current terrain, cancels the interaction, and the first and second virtual objects do not enter an interaction state; both maintain their respective positions and states before triggering the interaction. Taking a wrestling interaction as an example, when both parties are in an extremely confined space, all search strategies fail to find a legitimate location to accommodate both parties, and no available safe interaction location point is configured in the scene, the system cancels the wrestling interaction, and both parties do not enter a wrestling standoff state, returning to normal operation.

[0042] In another implementation, after moving the first and second virtual objects to the target interaction position, the system also processes other virtual objects around that position. Specifically, the system detects whether there are other virtual objects within a preset range around the target interaction position. When other virtual objects are detected, the system pushes them away from the target interaction position, and the pushing distance does not exceed a preset maximum displacement. This process ensures that the two interacting parties have sufficient space when performing the interaction, avoiding overlap with other virtual objects. Taking a wrestling interaction as an example, after the system moves the two wrestling parties to the target interaction position, if it finds other virtual objects that are too close to them, the system gently pushes these other virtual objects away from the wrestling area, limiting the pushing distance to a preset range to prevent exaggerated displacement effects.

[0043] As can be seen, the location prediction process uses the reference object as the spatial reference origin. Through a multi-level search strategy of placing anchor points, traversing the surrounding area, and switching the reference point, it gradually finds a legal interaction location in the virtual scene. When the search fails, it ensures the stability of the interaction by using a safety interaction location point or canceling the interaction as a fallback strategy. At the same time, it pushes and squeezes the surrounding virtual objects to ensure the integrity of the interaction space.

[0044] Step S1400: Adjust the first virtual object and the second virtual object to the first target position and the second target position respectively, and execute the interaction event corresponding to the virtual object interaction trigger event.

[0045] The final step in the interaction position correction method involves adjusting the first and second virtual objects to their respective target positions and executing the interaction events triggered by these virtual object interactions. This step requires two tasks: first, adjusting the virtual objects involved in the interaction to the first and second target positions determined by the position prediction process; and second, initiating the pre-defined interaction behavior between the two objects, enabling them to perform the interaction at their respective target positions. Through this step, the system transforms the initial position prediction results into actual interaction actions, completing a closed loop from trigger detection and position prediction to interaction execution.

[0046] When moving the two virtual objects, the system adjusts the first virtual object to the first target position and the second virtual object to the second target position based on the spatial information of the target interaction location. The first target position is the spatial coordinates that the first virtual object should occupy in the interaction state, and the second target position is the spatial coordinates that the second virtual object should occupy in the interaction state; together, they constitute the target interaction location. The movement can be done by independently moving each object from its current position to its respective target position.

[0047] The execution of an interaction event corresponding to a virtual object interaction trigger event refers to the system initiating interaction behavior between the first and second virtual objects after adjusting them to their respective target positions, based on the interaction configuration data associated with the interaction trigger event. This allows the two virtual objects to interact according to the behavior corresponding to the interaction type. An interaction event is the interaction instance specified by the virtual object interaction trigger event, containing configuration data such as the interaction type, the role information of both interacting parties, and the interaction performance assets. After confirming that both parties are in their respective target positions, the system triggers the interaction event to begin execution, controlling the first and second virtual objects to complete the entire interaction process according to the preset interaction behavior. Taking a wrestling interaction as an example, executing the interaction event means that the system initiates a wrestling confrontation between the two parties, presenting a preset confrontational posture and subsequent confrontation process at a determined location until the interaction ends.

[0048] In one implementation, after adjusting both objects to the first and second target positions respectively, and before executing the interaction event, the system also detects the terrain and adjusts the posture of the target interaction positions. Specifically, the system performs ray detection downwards from the first and second target positions respectively to obtain the corresponding ground height and ground normal. Ray detection refers to emitting a virtual ray vertically downwards from a certain spatial coordinate, detecting the intersection point of the ray with the ground collider in the virtual scene, and obtaining the actual height of the ground and the normal direction of the ground at that intersection point. The system corrects the height information of the first and second target positions respectively based on the detected ground height, ensuring that the feet of both virtual objects are in contact with the ground, preventing them from being suspended or embedded in the ground. Subsequently, the system adjusts the lower limb joint posture of the first and second virtual objects based on their respective ground normals, ensuring that the lower limbs of both objects are in contact with the ground. For example, when a wrestling interaction occurs on a slope, the first and second target positions may be located at different slope angles. The system adjusts the lower limb joints of the corresponding virtual objects according to the ground normal at each location, so that the soles of both parties' feet conform to the slope surface where they are located, and the knees and hips adjust accordingly, so that the character's posture naturally adapts to the terrain tilt. This processing allows the two interacting parties to present a natural standing posture even when they are on terrain with different slopes.

[0049] In one implementation, if the location prediction process fails to determine the target interaction location after anchor point detection and surrounding traversal search, the system executes a fallback strategy based on spatial cleanup. The system first acquires multiple candidate location points detected during the location prediction process. Each candidate location point carries a detection record generated during the traversal search, including a list of obstructing entities overlapping with the overall collider at that location point, and the removability level of each obstructing entity. The removability level is a pre-configured attribute parameter on each virtual object or scene object, characterizing the degree to which the entity can be removed or moved during spatial conflicts; a higher removability level indicates that the entity is easier to clean up. The system filters out candidate location points from multiple candidate location points where the removability level of all obstructing entities is greater than a preset removability level threshold. This filtering condition ensures that every obstructing entity on the selected candidate location point is within the allowable removability level range, avoiding unacceptable impacts on the scene caused by the presence of non-removable critical entities. Among the filtered candidate location points, the system selects the one with the fewest obstructing entities as the target candidate location point. Selecting the candidate location with the fewest possible numbers means the system only needs to perform removal or movement operations on the fewest entities, minimizing cleanup costs and impacting the scene state. The system removes or moves obstructing entities from the candidate location to another position, ensuring the candidate location meets spatial validity requirements, and then designates it as the target interaction location. This process frees up available space for both parties with minimal cleanup costs when a naturally valid interaction location cannot be found, reducing the likelihood of interaction cancellation due to scene space being filled.

[0050] It can be seen that the interaction position correction method uses the correction benchmark information as a spatial reference to automatically find a legal position that can accommodate both parties in the complex terrain of the virtual scene, and completes the interaction between the two parties after the position is determined. This provides a position determination method that can adapt to complex scene environments for virtual object interaction, reducing the situation where the interaction cannot be executed or behaves abnormally due to scene obstacles.

[0051] Based on any embodiment of the method in this application, according to the correction reference information, and with the current position of the reference object as a reference, position prediction processing is performed in the virtual scene, including: when a legal target interaction position cannot be determined with the reference object determined by the correction reference information as a reference, another virtual object participating in the interaction is used as the reference object, and position prediction processing is re-executed, specifically.

[0052] When a legitimate target interaction position cannot be determined by using the reference object determined by the correction reference information as a reference, another virtual object involved in the interaction is used as the reference object, and the position prediction process is re-executed. This is a processing mechanism that expands the search range by switching the spatial reference origin when the space around the default reference object cannot accommodate both parties in the interaction.

[0053] During the location prediction process, the system first uses the reference object determined by the correction reference information as the default reference object. Using its current position as the anchor point, it performs overall collision detection and a search of surrounding candidate locations. When the space around the default reference object is insufficient, for example, if a large obstacle occupies space nearby, another virtual object pulled next to the reference object may overlap with that obstacle. In this case, the search using the current reference object as a reference has been exhausted, but another virtual object in the scene may be in an open area, and searching using it as a reference may yield a valid location.

[0054] The other virtual object refers to the one of the two virtual objects participating in the interaction that is not currently used as the reference object. In a power struggle interaction, if the corrected reference information determines that the object being struggled against is the reference object, then the other virtual object is the object initiating the power struggle; conversely, if the corrected reference information determines that the object initiating the power struggle is the reference object, then the other virtual object is the object being struggled against. The system determines the other virtual object as the new reference object, uses its position in the current virtual scene as the new anchor point, and re-executes position prediction processing around the new anchor point. First, it performs overall collider placement detection with the new anchor point as the center. If the overall collider does not overlap with the colliders in the virtual scene after placement, then the new anchor point is determined as the target interaction position; if there is an overlap, then multiple candidate position points are traversed within a preset range with the new anchor point as the center for detection until a legal target interaction position is found or all candidate position points have been traversed.

[0055] The reference switching process is not unlimited. In one implementation, the number of reference switching operations is limited by relevant parameters in the correction reference information, allowing only one switch. That is, after switching from the default reference object to another virtual object, no further switching is allowed, avoiding repeated switching when both objects are in confined spaces. In another implementation, reference switching is controlled by a reference switching switch parameter in the correction reference information. When this parameter indicates that switching is not allowed, even if a valid position cannot be found using the default reference object as a reference, the system will not perform a reference switching operation, but will directly determine that the position prediction processing has failed.

[0056] As can be seen, by introducing a baseline switching mechanism, when the space around the default baseline object is limited, the system can automatically change the spatial reference origin and re-search using the advantageous position of another virtual object, thereby expanding the search range of legal interaction positions and reducing the situation where interaction cannot be performed due to a single virtual object being in unfavorable terrain.

[0057] Based on any embodiment of the method in this application, such as Figure 3 As shown, the process of obtaining the correction baseline information associated with the interactive trigger event includes steps S1211 to S1215, and each step is described below.

[0058] Step S1211: Obtain the first current position information of the first virtual object and the second current position information of the second virtual object.

[0059] The first current location information is a data set used to describe the spatial coordinates and surrounding environment information of the first virtual object in the virtual scene. Its content includes the spatial coordinates of the first virtual object in the world coordinate system.

[0060] The second current location information is a data set used to describe the spatial coordinates and surrounding environment information of the second virtual object in the virtual scene. Its content includes the spatial coordinates of the second virtual object in the world coordinate system.

[0061] The system obtains first and second current position information by reading the real-time position data of each virtual object in the virtual scene. These two pieces of current position information provide a spatial reference origin for subsequent spatial analysis centered on each virtual object.

[0062] Step S1212: Use the area of ​​the passable area corresponding to the first current location information as the first spatial value, and use the area of ​​the passable area corresponding to the second current location information as the second spatial value.

[0063] A passable area refers to the spatial range in a virtual scene where virtual objects are allowed to move and stand freely without walls or obstacles obstructing their path. The space value is a quantitative indicator used to measure the available space around a virtual object; its value represents the area of ​​a continuous region within a preset range, with the virtual object's current position as a reference point, that allows the virtual object to move freely.

[0064] The system uses a preset spatial analysis algorithm to sample and detect space within a preset radius, centered on the spatial coordinates corresponding to the first current position information. It determines whether there is a scene collision object at each sampling position, and accumulates the areas corresponding to the sampling positions without collision objects to obtain the first spatial value.

[0065] The second spatial value is calculated in the same way as the first spatial value, centered on the spatial coordinates corresponding to the second current position information. For example, the system can uniformly sample around the virtual object in a grid pattern, with each sampling point representing a unit area. The number of sampling points that do not overlap with scene colliders is counted, and multiplied by the unit area to obtain the spatial value. The larger the spatial value, the more open the area around the virtual object, providing more space for the placement of interactive parties.

[0066] Step S1213: Use the obstacle density corresponding to the first current location information as the first density value, and use the obstacle density corresponding to the second current location information as the second density value.

[0067] Obstacles refer to scene structures or objects that occupy space in a virtual scene and have collision objects, including walls, pillars, large decorations, and immovable ornaments.

[0068] Density value is a quantitative indicator used to measure the density of obstacles around a virtual object. Its value represents the proportion of space or number of obstacles within a preset range.

[0069] The system uses a preset density analysis algorithm to statistically analyze the distribution of obstacles within a preset range, centered on the spatial coordinates corresponding to the first current location information. The ratio of the spatial volume or number of obstacles to the total volume or total number of samples within that range is used as the first density value.

[0070] The second density value is calculated in the same way as the first density value, centered on the spatial coordinates corresponding to the second current location information. For example, the system can emit multiple rays within a certain radius around the virtual object. These rays are evenly distributed from the center point in all directions. The ratio of the number of rays blocked by obstacles to the total number of rays is the density value. The smaller the density value, the more regular and continuous the space around the virtual object is, and the higher the probability that the candidate location meets the spatial validity conditions.

[0071] Step S1214: Determine the first environmental score based on the first spatial value and the first density value, and determine the second environmental score based on the second spatial value and the second density value.

[0072] The first environment score is a quantitative score used to measure how friendly the environment around the current location of the first virtual object is to the prediction of the interactive location. The second environment score is a quantitative score used to measure how friendly the environment around the current location of the second virtual object is to the prediction of the interactive location.

[0073] The calculation of the environmental score follows a preset scoring rule, which indicates that the environmental score is positively correlated with the spatial value and negatively correlated with the density value. That is, the larger the spatial value and the smaller the density value, the higher the environmental score, indicating that the environment around the virtual object is more conducive to location search.

[0074] In one implementation, the environmental score is calculated using a weighted summation method. The system normalizes the first spatial value to obtain a first spatial score; the larger the spatial value, the higher the spatial score. The system then normalizes the first density value and takes its inverse score to obtain a first density score; the smaller the density value, the higher the density score. The first spatial score and the first density score are then weighted and summed according to preset weights to obtain the first environmental score. The second environmental score is calculated in the same way as the first environmental score.

[0075] In another implementation, the environmental score is calculated using a hierarchical mapping method. The system pre-defines a score mapping table, which defines the environmental score values ​​corresponding to different combinations of spatial value intervals and density value intervals. The system retrieves the first environmental score from the score mapping table based on the intervals into which the first spatial value and the first density value fall; and retrieves the second environmental score from the score mapping table based on the intervals into which the second spatial value and the second density value fall.

[0076] Step S1215: Compare the first environment score with the second environment score, and determine the virtual object with the higher environment score as the benchmark object. When the first environment score and the second environment score are the same, determine the virtual object corresponding to the larger of the first spatial value and the second spatial value as the benchmark object.

[0077] After obtaining a first environment score and a second environment score, the system compares the two. When the first environment score is higher than the second environment score, it indicates that the environment surrounding the first virtual object is more favorable for location search, and the system identifies the first virtual object as the baseline object. When the second environment score is higher than the first environment score, the system identifies the second virtual object as the baseline object.

[0078] When the first environmental score and the second environmental score are the same, the system determines the virtual object corresponding to the larger of the first and second spatial values ​​as the baseline object. Prioritizing the larger spatial value in the case of identical scores is because, under conditions of similar obstacle density, a larger passable area provides a wider search range for subsequent location prediction.

[0079] In another implementation, when two environmental scores are the same, the system can also determine the virtual object corresponding to the smaller of the two density values ​​as the benchmark object. The specific rules can be flexibly configured according to the application scenario.

[0080] In a specific business scenario, the object initiating a confrontation is in a defensive posture. The object being confronted initiates a confrontation interaction with the object initiating the confrontation. After the system detects a collision event, it generates a virtual object interaction trigger event, identifying the object initiating the confrontation as the first virtual object and the object being confronted as the second virtual object. When determining the baseline object, the system first obtains the first current position information of the object initiating the confrontation and the second current position information of the object being confronted. The object being confronted is currently standing in an indoor corridor cluttered with debris. The available space around it is relatively narrow, the passable area is small, and the surrounding debris results in a high obstacle density. The object initiating the confrontation is standing in an indoor lobby outside the corridor. The surrounding area is open and unobstructed, the passable area is large, and the obstacles in the lobby are sparse and the obstacle density is low. The system calculates the first spatial value, the second spatial value, the first density value, and the second density value, respectively. The calculation results show that the first spatial value is larger and the first density value is lower; the second spatial value is smaller and the second density value is higher. The system calculates the first environmental score and the second environmental score based on the spatial value and the density value, respectively. The first environmental score is higher than the second environmental score. The system identifies the object that initiates the struggle with a higher environmental score as the baseline object. Subsequently, using the current position of the object that initiates the struggle as the anchor point, the system performs position prediction processing, pulling the object to be struggled from a narrow passageway to an open area next to the object that initiates the struggle, and searching and determining the target interaction position under favorable spatial conditions.

[0081] As can be seen, by obtaining the area of ​​passable areas and obstacle density around the current positions of both parties, calculating environmental scores and making quantitative comparisons, the system can uniquely determine a benchmark object under any spatial conditions, and prioritize the location prediction search from the side with more open space and fewer obstacles, thus improving the efficiency and success rate of finding legal interaction positions in complex terrain.

[0082] Based on any embodiment of the method in this application, such as Figure 4 As shown, the position prediction process is performed, including steps S1311 to S1313. Each step is described below.

[0083] Step S1311: Obtain the scene region type where the reference object is currently located.

[0084] Scene area type refers to the pre-defined type of different spatial areas in a virtual scene based on their spatial characteristics. Different scene areas have different spatial characteristics. For example, indoor areas are usually relatively small, with narrow passages and many obstacles, while outdoor areas are usually relatively open and with fewer obstacles, and narrow passage areas have a long and narrow spatial shape.

[0085] The division of scene regions can be pre-defined during the virtual scene editing stage by adding type tags to spatial regions within the scene. During the location prediction process, the system obtains the scene region type tag corresponding to the spatial region to which the reference object's current location belongs, serving as the basis for selecting subsequent search parameters. For example, scene region types can include indoor, outdoor, narrow passage, and open plaza types, etc. Different types of regions correspond to different spatial characteristics and require different search strategies.

[0086] Step S1312: Based on the scene area type, select a corresponding set of search parameters from a set of preset search parameters. The search parameters include the search radius and the number of candidate location points.

[0087] The preset sets of search parameters are pre-configured sets of parameters. Each set of search parameters corresponds to a scene area type and defines the search radius and the number of candidate location points to be used when searching for legal interaction locations in that type of area.

[0088] The search radius defines the spatial range for searching the area surrounding the anchor point, while the number of candidate locations defines the number of locations that need to be traversed and detected within this search range. Different scene types correspond to different search parameters. For example, indoor scenes have a smaller search radius and a larger number of candidate locations to suit the characteristics of small indoor spaces requiring precise searching; outdoor scenes have a larger search radius and a smaller number of candidate locations to suit the characteristics of open outdoor spaces requiring high search efficiency; and narrow passage scenes have a moderate search radius and a large number of candidate locations distributed along the passage direction to suit the elongated shape of narrow passages.

[0089] In one implementation, the search parameters also include the candidate location point height range and the candidate location point traversal step size. The candidate location point height range defines the range of selectable height levels in the vertical direction when generating candidate location points around the anchor point; the candidate location point traversal step size defines the spacing between adjacent candidate location points when traversing multiple candidate location points. Different scene area types can correspond to different candidate location point height ranges and traversal step sizes. For example, the candidate location point height range for indoor types can be set to a single layer, that is, candidate location points are generated only on the horizontal plane where the anchor point is located, to avoid generating candidate location points above or below unreachable floors. At the same time, the traversal step size for indoor types can be set to a smaller value, making the candidate location points closer together, to adapt to the characteristics of small indoor spaces but requiring fine-grained searching. The candidate location point height range for outdoor types can be set to multiple layers, that is, candidate location points can be generated on the horizontal plane where the anchor point is located and within a certain height range above and below it, to adapt to the characteristics of outdoor terrain that may have elevation differences. At the same time, the traversal step size for outdoor types can be set to a larger value, making the candidate location points farther apart, to improve search efficiency. For narrow passage types, the height range of candidate location points can be set to a single layer on the horizontal plane where the anchor point is located. The traversal step size can be set to a longitudinal step size along the passage extension direction and a lateral step size perpendicular to the passage direction, where the longitudinal step size is greater than the lateral step size, so that candidate location points are preferentially distributed along the passable direction of the passage. When the system selects a set of search parameters from a set of preset search parameters according to the scene region type, it simultaneously obtains the height range and traversal step size of the candidate location points corresponding to that scene region type, so that the search behavior of the location prediction processing can adapt to the spatial characteristics of different scenes in terms of both vertical direction and search accuracy.

[0090] After obtaining the scene region type of the benchmark object, the system searches for a set of parameters that match the type from a set of preset search parameters.

[0091] Step S1313: Perform position prediction processing based on the selected search parameters.

[0092] The system uses the current position of the baseline object as the anchor point, determines the surrounding search space according to the selected search radius, and generates a corresponding number of candidate position points within the search range based on the selected number of candidate position points. Then, the combined colliders of the first and second virtual objects are placed at each candidate position point in sequence. Each candidate position point is checked to see if it meets the spatial validity conditions, and those that meet the conditions are determined as the target interaction position. Because the search parameters are selected based on the current scene area type, the search behavior of the position prediction processing can automatically adapt to the spatial characteristics of different scenes, performing more refined searches in confined indoor areas and more efficient searches in open outdoor areas.

[0093] In a specific business scenario, the object being contested is standing in an indoor corridor, which is a narrow passage. The system obtains the scene area type of the object's current location and identifies it as a narrow passage. From a set of preset search parameters, the system selects a set corresponding to the narrow passage type. This set has a search radius of 1.5 meters and six candidate locations distributed along the passage's direction. Using the object's current location as an anchor point, the system generates and iterates through candidate locations according to the 1.5-meter search radius and the distribution of the six candidate locations along the passage direction. A location satisfying the spatial legality condition is found at one of the candidate locations along the passage's direction, and this location is designated as the target interaction location. If the object initiating the contest is standing in an outdoor plaza, which is an outdoor type, the system selects search parameters corresponding to the outdoor type, with a search radius of 3 meters and four candidate locations. Using the object's current location as a baseline, the system quickly searches for a legal location within a larger area.

[0094] It can be seen that by obtaining the current scene area type of the benchmark object, and selecting the corresponding search radius and number of candidate location points from multiple preset search parameters, the search behavior of the location prediction processing can adjust the search strategy according to the scene environment, ensuring both search success rate and search efficiency.

[0095] Based on any embodiment of the method in this application, such as Figure 5 As shown, the position prediction process is performed, including steps S1321 to S1324. Each step is described below.

[0096] Step S1321: Using the current position of the reference object as the anchor point, determine the overall collision body of the first virtual object and the second virtual object in the interactive state according to the interaction information corresponding to the interaction trigger event.

[0097] Using the current position of the reference object as the anchor point, the first and second virtual objects are placed as a single collider at the anchor point. This is the first-level spatial legality detection step prioritized in the position prediction process. The task of this step is to use the current position of the reference object as a spatial reference point, combine the interacting parties into a unified collision detection unit, and directly detect whether the current position of the reference object has sufficient space to accommodate the interaction between the two parties.

[0098] An anchor point is a spatial reference coordinate determined by the current position of a reference object. The reference object is the virtual object designated by both interacting parties based on the correction reference information; its current position is the source of the anchor point's coordinates. The anchor point is the origin of the entire position prediction process. The system first checks the spatial availability of the anchor point itself. If the anchor point can directly accommodate both interacting parties, there is no need for further surrounding searches; the anchor point is directly used as the interaction location. If the space at the anchor point is insufficient, the subsequent search will expand outwards from the anchor point.

[0099] A total collider is a collision detection unit formed by merging the colliders of the first and second virtual objects according to their relative positions required for interaction. This unit represents the space occupied by both objects during the interaction. To form a total collider, the system needs to obtain the relative positions that the two objects should maintain during the interaction. This relative position defines the spatial offset and orientation that the first and second virtual objects should maintain during the interaction. Based on this relative position, the system places the colliders of both objects in their respective spatial positions, thus combining them into a total collider. The total collider reflects the actual size and shape of the space occupied by the two objects during the interaction.

[0100] The specific execution process of the placement operation involves keeping the reference object in its current position and moving another virtual object to a corresponding position around the reference object according to the relative positional relationship required for the interaction. For example, suppose the reference object is currently located at coordinates (10,0,5) in the virtual scene, facing due north. The required relative positional relationship for this interaction is that the other virtual object should be 0.5 meters directly in front of the reference object, standing face-to-face. The system keeps the reference object stationary at coordinates (10,0,5), calculates the target coordinates of the other virtual object as (10,0,4.5), which is 0.5 meters directly in front of the reference object, and moves the other virtual object from its current position to this target coordinate. At this point, the reference object and the other virtual object form a face-to-face confrontation at the anchor point. The two colliders occupy corresponding positions in space according to their respective standing postures, together forming a unified collider. The spatial range covered by this unified collider is the actual space required for the interaction between the two objects at the anchor point.

[0101] After placement, the system checks whether the overall collider overlaps with colliders in the virtual scene. Overlap detection involves comparing the overall collider's position and shape in space with each existing collider in the virtual scene to determine if there is any spatial intersection. Using the above scenario as an example, assume the base object is directly behind a wall, and the wall's colliders cover the area from X=10, Z=6 onwards in coordinate space. The system checks the occupancy of each part of the overall collider: the base object's collider is located around Z coordinate 5, the wall's collider is located around Z coordinate 6 onwards, and there is a gap between them, meaning no overlap. The other virtual object's collider is located around Z coordinate 4.5, further away from the wall, and also does not overlap with the wall. At this point, the overall collider has no spatial intersection with any colliders in the virtual scene, and is therefore considered non-overlapping. This indicates that the space at this location is sufficient to accommodate the positions of both interacting objects, and the space at the anchor point is valid.

[0102] Conversely, suppose the wall behind the base object is positioned further forward, and the wall's collider covers the area from X=10, Z=5.5 onwards in coordinate space. The base object's collider is located around Z coordinate 5, and its back intersects with the wall's collider at approximately Z coordinate 5.5, resulting in spatial overlap. In this case, there is spatial intersection between the overall collider and the wall's collider, which is considered an overlap. This indicates that the location cannot simultaneously accommodate both interacting objects, and the space at the anchor point is invalid.

[0103] Step S1322: When the placed overall collider does not overlap with the collider of the virtual scene, the anchor point is determined as the target interaction position.

[0104] When the overall collider does not overlap with any other colliders in the virtual scene at the anchor point, it indicates that there is sufficient space at the anchor point to accommodate the interaction positions of both parties, and the location of the anchor point meets the spatial validity condition. In this case, the system does not need to perform subsequent surrounding traversal searches and directly determines the anchor point as the target interaction position for this interaction; the position prediction processing is completed at this step. This situation typically corresponds to scenarios where the space around the base object's location is relatively open, and the anchor point itself can meet the spatial needs of both parties in the interaction.

[0105] Step S1323: When the placed overall collider overlaps with the collider of the virtual scene, traverse multiple candidate position points within a preset range centered on the anchor point, and check whether each candidate position point meets the spatial legality condition.

[0106] When the overall collider overlaps with the collider in the virtual scene at the anchor point, it indicates that the space at the anchor point is insufficient to accommodate both at the same time. The system needs to expand the search range and find other available locations around the anchor point.

[0107] The preset range is a spatial area defined by an anchor point and a preset search radius, within which candidate location points are generated. In one implementation, candidate location points are evenly distributed around the anchor point on a circumference. For example, assuming the search radius is set to 1 meter, the number of candidate location points is set to 8, and the distribution rule is set to even distribution around the circumference, the system draws a circle with the anchor point as the center and a radius of 1 meter, dividing the circumference into 8 equal segments, each corresponding to one candidate location point, with an angle of 45 degrees between adjacent candidate location points. The 8 candidate location points are located directly in front of, to the right front, directly to the right, to the right rear, directly behind, to the left rear, directly to the left, and to the left front of the anchor point, respectively, each 1 meter away from the anchor point. In another implementation, candidate location points are arranged in a grid around the anchor point. The system expands the grid points outwards on a horizontal plane with preset intervals, with each grid point being a candidate location point.

[0108] The system sequentially selects candidate locations for testing according to a preset traversal order. The traversal order determines which candidate location will be selected first when multiple satisfying conditions exist. In one implementation, the traversal order starts with the candidate location directly in front of the anchor point and proceeds clockwise. In another implementation, the traversal order starts with the candidate location closest to the anchor point and proceeds outwards. Following the selected traversal order, the system selects one candidate location at a time, places the entire collider at that location, and performs a spatial validity check.

[0109] The spatial validity condition refers to the state where the overall collider at the candidate location point does not overlap with any other colliders in the virtual scene. The detection method is the same as at the anchor point: the system places the first and second virtual objects as the overall collider at the candidate location point, maintaining their relative positions, and checks whether the overall collider overlaps with walls, obstacles, or other colliders in the virtual scene. If there is spatial intersection between the overall collider and any other collider in the virtual scene, the candidate location point does not meet the condition, and the system continues to check the next candidate location point. When there is no spatial intersection between the overall collider and any other collider in the virtual scene, the candidate location point meets the condition, the system stops traversing, and determines the candidate location point as the target interaction location for this interaction.

[0110] Taking a wrestling interaction scenario as an example, the object being wrestled against has its back against a wall, with its current coordinates being (10,0,5). The wall is located approximately at a Z-coordinate of 5.5 behind it. The system uses the current position of the object being wrestled against as the anchor point to place the overall collider. The object initiating the wrestling is moved to 0.5 meters in front of the object being wrestled against, at coordinates (10,0,4.5). After placement, the back of the object being wrestled against overlaps with the wall at approximately a Z-coordinate of 5.5, making the anchor point invalid. The system then performs a surrounding search, drawing a circle with a radius of 1 meter centered on the anchor point (10,0,5), and evenly selecting 8 candidate positions on the circumference. Starting with the candidate position directly in front, this point is located 1 meter in front of the anchor point, with coordinates (10,0,4). The system moves the overall collider to this candidate position, placing the object being wrestled against at (10,0,4) and the object initiating the wrestling against it at 0.5 meters in front of the object being wrestled against, at (10,0,3.5). At this point, the back of the object being contested is at approximately Z-coordinate 4, and there is a 1.5-meter gap between it and the wall at approximately Z-coordinate 5.5. The entire colliding body of both objects does not overlap with the wall, and this candidate location meets the spatial validity requirements. The system stops traversing and designates this candidate location as the target interaction location. If a candidate location directly in front is unavailable due to other obstacles, the system continues to check candidate locations to the right in a clockwise order, and so on, until a location that meets the conditions is found or all candidate locations have been traversed.

[0111] If, after traversing all candidate locations within the preset range, no candidate location meeting the spatial validity criteria is found, the system determines that the second-level surrounding search has failed. At this point, the location prediction process fails to determine a valid target interaction location, and the system proceeds to subsequent processing steps, such as switching the reference object to search again, removing obstructing entities of low removability level, or canceling the current interaction.

[0112] Step S1324: The candidate location points that meet the spatial legality conditions are determined as the target interaction locations.

[0113] During the process of traversing candidate locations, once a candidate location is detected that meets the spatial validity condition, it is designated as the target interaction location for this interaction. At this point, the traversal search can be terminated early, without continuing to check the remaining candidate locations. If no candidate location that meets the spatial validity condition is found after traversing all candidate locations, the system determines that the second-level surrounding search has failed and proceeds to the subsequent processing steps.

[0114] It can be seen that by using a hierarchical search strategy that starts with the anchor point and then moves to the surrounding area, the system prioritizes interactive positioning of the reference object in its original location, and then gradually expands the search range when spatial conditions do not allow it, thus balancing search efficiency and search success rate.

[0115] Based on any embodiment of the method in this application, such as Figure 6 As shown, steps S1331 to S1333 are included, and each step is explained below.

[0116] Step S1331: When the location prediction process fails to determine the target interaction location, obtain multiple candidate location points that have been detected in the location prediction process.

[0117] When the location prediction process fails to determine the target interaction location, multiple candidate location points detected in the location prediction process are obtained. This is a fallback strategy for spatial cleanup that is initiated after all regular location predictions have failed.

[0118] In the initial anchor point placement detection and surrounding area traversal search, the location prediction process has already checked multiple candidate locations one by one. Each candidate location has undergone a complete spatial validity check. During the detection process, the system records the coordinates of each candidate location and which entities in the virtual scene overlap with the overall collider at that candidate location. This overlap information includes attributes such as the identifier, type, and removability level of the overlapping entities.

[0119] Candidate location points refer to a set of location coordinates generated by the system within a preset range around the anchor point during the perimeter traversal search phase of the location prediction process, according to preset generation rules, for the purpose of checking the spatial legality of each point. The generation rules for candidate location points are jointly determined by the number of candidate location points and the distribution rule parameters in the search parameters. In one implementation, candidate location points are evenly distributed around the anchor point on a circle, with each candidate location point equidistant from the anchor point and having the same angular interval. In another implementation, candidate location points are arranged in a grid around the anchor point. After each candidate location point is generated, the system places the entire collider at that location point and performs overlap detection, recording the detection results.

[0120] Overlap detection results refer to a set of recorded data generated by the system after performing spatial validity checks on a candidate location. The overlap detection results include the spatial coordinates of the candidate location, whether the location overlaps with any colliders in the virtual scene, and, if so, which specific entities it overlaps with. For each overlapping entity, the overlap detection results also record information such as the entity's identifier, type, and removability level. These overlap detection results are retained in the detection records during the traversal search process for use in subsequent fallback strategies.

[0121] When the anchor point is unavailable and all surrounding candidate locations fail to meet the spatial validity requirements due to overlap, the location prediction process fails to determine the target interaction location. The system extracts all detected candidate locations and their respective overlap detection results from the detection records as data input for subsequent filtering and selection steps.

[0122] Step S1332: From multiple candidate location points, select candidate location points where the removability level of all blocking entities is greater than the preset removability level threshold. The blocking entity is the entity of the collider that overlaps with the overall collider of the first virtual object and the second virtual object.

[0123] An obstructing entity is a virtual object or scene object that spatially overlaps with the overall collider of both interacting parties at a candidate location. Obstructing entities are called obstructing entities because their existence prevents the candidate location from being directly used as an interaction point. Types of obstructing entities include, but are not limited to, system-controlled virtual characters, virtual characters controlled by other users, destructible scene props, fixed decorations, and temporary ornaments. Each obstructing entity occupies a certain spatial area in the virtual scene, and its collider intersects with the overall collider, thus causing the candidate location to fail to meet the spatial validity requirements.

[0124] Removability level is a pre-configured attribute parameter on each virtual object or scene object, representing the degree to which the entity can be removed or moved in the event of a spatial conflict. The removability level is a numerical or enumerated value. A higher removability level indicates that the entity is easier to remove or move, with less impact on the scene's logic and presentation; a lower removability level indicates that the entity is more important or less movable, and removing it may have a significant impact on the scene. For example, temporary decorations, storage boxes, and barrels in the scene can be configured with a higher removability level; important virtual characters, task-related objects, and core mechanisms can be configured with a lower removability level; and other user-controlled virtual characters can be configured with a removability level between the two. The removability level provides a quantitative basis for subsequent filtering, enabling the system to distinguish which obstructing entities can be cleared and which cannot.

[0125] The preset removability level threshold is a pre-defined level value set by the system, serving as the dividing line for determining whether an obstructing entity can be removed. The value of the preset removability level threshold is determined based on the overall design of the application scenario. When the removability level of an obstructing entity is greater than the threshold, the obstructing entity is considered removable; when the removability level of an obstructing entity is not greater than the threshold, the obstructing entity is considered non-removable.

[0126] The screening process checks each candidate location point individually. For a given candidate location point, the system iterates through all obstructing entities that overlap with the overall collider at that point, reads the removability level of each obstructing entity, and compares each removability level with a preset removability level threshold. When the removability level of all obstructing entities at the candidate location point is greater than the preset removability level threshold, it indicates that each obstructing entity at that location point is within the allowable removal level range, and the candidate location point is marked as having passed the screening. When any obstructing entity at the candidate location point has a removability level that is not greater than the preset removability level threshold, it indicates that at least one obstructing entity at that location point is an important entity that cannot be removed, and cleaning up this location may cause unacceptable consequences; therefore, the candidate location point is excluded. For example, assuming the preset removability level threshold is 3, candidate location point A has two obstructing entities with removability levels of 4 and 5, both greater than 3, so this point passes the screening. Candidate location point B has two obstructing entities with removability levels of 2 and 5, one of which is 2 and not greater than 3, so this point is excluded. Through this screening mechanism, the system ensures that every obstructing entity at the candidate location point targeted by the subsequent cleanup operation can be removed, and that the task will not be interrupted or the scene will not be abnormal due to the accidental removal of critical entities.

[0127] Step S1333: Select the candidate location point with the fewest blocking entities from the selected candidate location points, remove or move the blocking entities on the candidate location point to other locations, and determine the candidate location point as the target interaction location.

[0128] After the previous screening step, the system obtains a set of candidate locations where all obstructing entities can be removed. The number of obstructing entities at different candidate locations may vary. The number of obstructing entities directly reflects the operational cost required to clear the candidate location—the more entities that need to be removed or moved, the greater the operational cost and the greater the impact on the scene state. The system counts the number of obstructing entities at each candidate location that passes the screening and selects the one with the fewest obstructing entities as the target candidate location. When there are multiple candidate locations with the same number of obstructing entities, the system can select the one that is closest to the current position of the reference object to reduce the displacement of subsequent movements between the interacting parties.

[0129] After identifying the target candidate location, the system performs a cleanup operation on any obstructing entities at that location. The cleanup operation includes two methods: removal and movement. Removal means directly deleting the obstructing entity from its current spatial location or temporarily hiding it, so that the entity is no longer displayed during the interaction. Movement means shifting the obstructing entity to another spatial location that does not conflict with the candidate location; the entity remains in the virtual scene. The choice between removal and movement can be flexibly determined based on the type of obstructing entity and the scene requirements. After cleanup, the candidate location no longer has any spatial overlap, satisfying the spatial validity condition, and the system determines this candidate location as the target interaction location for this interaction.

[0130] In a specific business scenario, a struggle interaction was triggered between the initiating and targeted objects. After anchor point placement detection and surrounding search, all eight candidate locations were deemed unusable due to obstructing entities, and the location prediction process failed to determine the target interaction location. The system acquired the eight detected candidate locations and their overlap detection results. The preset removability level threshold was 3. The system then performed a filtering process: Candidate location C had one obstructing entity, a virtual character with a removability level of 2, and was excluded because it contained an entity not exceeding the threshold; Candidate location D had one obstructing entity, a mechanism with a removability level of 1, and was also excluded; Candidate location B had two obstructing entities with removability levels of 4 and 5 respectively, both greater than 3, and passed the filtering; Candidate location E had three obstructing entities, all with a removability level of 4, and also passed the filtering. Among the filtered B and E, B had two obstructing entities, and E had three, so the system selected B, which had the fewest obstructing entities. The system removes the clutter box and barrel on candidate location point B to a nearby open space, clearing the space at candidate location point B. The system then designates this point as the target interaction location and moves both parties to this location to perform the interaction.

[0131] As can be seen, by first filtering removable candidate locations and then selecting the candidate locations with the fewest blocking entities for cleanup, the system can free up available space for both parties to interact with minimal cleanup cost when a naturally legitimate interaction location cannot be found, thus reducing the situation where interaction is canceled due to the scene space being filled.

[0132] Based on any embodiment of the method in this application, such as Figure 7 As shown, before executing the interaction event corresponding to the virtual object interaction trigger event, steps S1411 to S1413 are included. Each step is explained below.

[0133] Step S1411: Perform ray detection downwards from the first target position and the second target position respectively to obtain the ground height and ground normal.

[0134] In the interaction event between the first virtual object and the second virtual object, the first target position is the spatial coordinates that the first virtual object should occupy in the interaction state, and the second target position is the spatial coordinates that the second virtual object should occupy in the interaction state. The two are spatially independent, and the ground height and slope below them may be different.

[0135] Ray detection is a spatial detection technology that involves emitting a virtual ray from a spatial location in a virtual scene in a specified direction, detecting whether the ray intersects with a collider in the scene, and obtaining the spatial coordinates and surface normal information of the intersection point.

[0136] Before the interaction is executed, the system emits rays of preset length directly downwards from the spatial coordinates of the first target location and the spatial coordinates of the second target location, respectively. When the ray intersects with the ground collision body, the system obtains two data points from the detection results: one is the height component in the spatial coordinates of the intersection point, i.e., the ground height corresponding to the target location; the other is the normal vector of the ground collision body surface at the intersection point, i.e., the ground normal corresponding to the target location.

[0137] Ground height represents the vertical position coordinates of the ground below the target location in the world coordinate system, which is determined by the vertical coordinate components of the intersection points of the ray detection.

[0138] The ground normal is the direction vector of the surface of the colliding body at the point where the ray intersects with it. It is a unit vector, perpendicular to the ground tangent at that point, pointing outwards. When the normal direction is vertically upwards, it indicates that the ground at that point is horizontal; when the normal direction deviates from the vertical direction, it indicates that the ground at that point is tilted. The direction and angle of deviation of the normal reflect the direction and degree of tilt of the ground.

[0139] For example, assuming the spatial coordinates of the first target location are (10, 2.0, 5), the system emits a ray directly downwards from this location. The ray intersects with the ground collision body at coordinates (10, 1.5, 5). The ground height corresponding to the first target location is 1.5, and the ground normal vector at the intersection point is obtained.

[0140] Step S1412: Correct the height information of the first target position and the height information of the second target position according to the ground height.

[0141] After obtaining the ground height corresponding to the first target location and the ground height corresponding to the second target location, the system replaces the height components of the two target locations respectively. For the first target location, the system replaces the original height component in the first target location with the ground height corresponding to the first target location; for the second target location, the system replaces the original height component in the second target location with the ground height corresponding to the second target location.

[0142] The reason for height correction is that the first and second target positions determined in the previous position prediction process used the height of the current position of the reference object or a preset interaction height. These heights may be higher or lower than the actual ground height below each target position. Directly using the uncorrected height will cause the corresponding virtual object to be suspended in the air or embedded in the ground—when the target position is higher than the actual ground, the virtual object's feet will be suspended in the air and unable to contact the ground; when the target position is lower than the actual ground, the virtual object's lower legs or feet will be embedded below the ground, resulting in clipping. By correcting the height of the two target positions to their respective ground heights, the first and second target positions are aligned vertically with the actual ground below them. This allows the feet of the two virtual objects to maintain contact with their respective ground surfaces, providing a correct height reference for subsequent posture adjustments and interaction execution.

[0143] For example, if the original height of the first target location is 2.0, and the detected ground height corresponding to the first target location is 1.5, then the system will correct the height of the first target location to 1.5. If the original height of the second target location is 2.0, and the detected ground height corresponding to the second target location is 1.8, then the system will correct the height of the second target location to 1.8. After correction, the first and second virtual objects will each be located on different height planes, adapting to their respective terrains.

[0144] Step S1413: Adjust the lower limb joint posture of the first virtual object and the second virtual object based on the ground normal so that the lower limbs of the first virtual object and the second virtual object fit the ground.

[0145] Ground normals reflect the slope and angle of the ground beneath each target location. When the ground normal is not vertically upward, it indicates that the ground is sloped. On flat ground, the lower limb joints of a virtual object can naturally contact the ground in a standard standing posture; however, on sloped ground, if a standard standing posture is adopted, the virtual object's feet cannot fully contact the ground, potentially resulting in toes pointing upwards or heels dangling. The knees and hips also cannot adapt to the slope change, making the overall standing posture appear stiff. Therefore, the system needs to calculate the required rotation angles for each joint of the lower limbs of the first and second virtual objects based on the slope information provided by the ground normals, ensuring that the postures of the two virtual objects adapt to the actual slope of their respective terrains.

[0146] Furthermore, the slope and angle of the ground below the first and second target locations may differ. For example, in a wrestling interaction, the object initiating the wrestling might be standing on a slope, while the object being wrestled might be standing on flat ground, or both might be standing on slopes with different inclines. The system cannot use a single ground normal to uniformly adjust the lower limb postures of both objects; instead, it needs to adjust the postures of the two virtual objects independently based on the ground normals corresponding to each target location.

[0147] Lower limb joints refer to the skeletal joint nodes included in the leg kinematic chain within a virtual object's skeleton. In a complete lower limb skeleton, the lower limb joints comprise multiple bone nodes from the hip joint to the foot joint, specifically the hip, knee, and ankle joints. The hip joint connects the femur and pelvic bones, controlling the rotation and swing of the entire leg; the knee joint connects the femur and tibia, controlling the flexion and extension of the lower leg; and the ankle joint connects the tibia and foot bones, controlling the vertical rotation and inward / outward rotation of the foot.

[0148] The system calculates the tilt direction and angle of the ground where the first virtual object is located based on the ground normal vector corresponding to the first target position, and then determines the amount of rotation adjustment required for each lower limb joint of the first virtual object on the slope terrain. Simultaneously, the system calculates the tilt direction and angle of the ground where the second virtual object is located based on the ground normal vector corresponding to the second target position, and then determines the amount of rotation adjustment required for each lower limb joint of the second virtual object on the slope terrain. By adjusting the lower limb joint postures of both objects separately, the system ensures that the feet of both objects are in contact with the ground, the postures of the knees and hips are adapted to the slope, and the overall lower limb posture naturally conforms to the terrain.

[0149] In a specific business scenario, a struggle interaction is triggered between the initiating and the targeted object. After position prediction processing, the system determines the first and second target positions. The first target position, corresponding to the initiating object, is located on a slope, while the second target position, corresponding to the targeted object, is located on flat ground. Before executing the struggle interaction, the system performs ray detection downwards from both the first and second target positions. A slope is detected below the first target position, with a ground height of 1.5 meters and a ground normal deviating from the vertical direction, indicating a slope. Flat ground is detected below the second target position, with a ground height of 1.8 meters and a ground normal pointing vertically upwards, indicating a level surface. The system corrects the height of the first target position to 1.5 meters and the height of the second target position to 1.8 meters. Then, based on the slope normal of the first target position, the system adjusts the lower limb joint posture of the initiating object, ensuring that the initiating object's feet are aligned with the slope, and its knees and hips bend with the slope. Simultaneously, the system adjusts the lower limb joint posture of the object being wrestled with based on the horizontal normal of the second target position, ensuring that the object's feet are flat on the ground. After these adjustments, the object initiating the wrestling maintains a natural standing position on the slope, while the object being wrestled with maintains a natural standing position on the flat ground, and the two officially begin their wrestling interaction.

[0150] As can be seen, by performing ray detection downwards from the first target position and the second target position respectively and obtaining their corresponding ground height and ground normal, the height information of the two target positions is corrected respectively, and the lower limb joint posture of the two virtual objects is adjusted based on their respective ground normals. This ensures that even when there are differences in the terrain, the lower limbs of the two interacting objects can naturally conform to the ground, avoiding the suspension, clipping, or posture distortion caused by terrain differences. This improves the geographical adaptability and visual realism of the interaction on complex terrain.

[0151] Based on any embodiment of the method in this application, such as Figure 8 As shown, after adjusting the first virtual object and the second virtual object to the first target position and the second target position respectively, the process includes steps S1421 and S1422. The following describes each step.

[0152] Step S1421: Detect whether there are other virtual objects within a preset range around the target interaction location.

[0153] After adjusting the first virtual object and the second virtual object to the first target position and the second target position respectively, the system scans the surrounding space with the target interaction position as the center.

[0154] The preset range is a spatial area determined based on the positions of the first target, the second target, and the positions and movement ranges of both parties during the interaction. The size and shape of the preset range can be flexibly configured according to the type of interaction.

[0155] In one embodiment, the preset range is a spherical region with the midpoint between the first target position and the second target position as its center and a preset radius as its radius.

[0156] In another implementation, the preset range is a capsule-shaped region constructed with the first target location and the second target location as its two endpoints. The capsule extends outward by a preset buffer distance, which serves as the final preset range. The preset range defines the private space boundary for this interaction, and the system detects whether other virtual objects intrude within this boundary.

[0157] Other virtual objects refer to any other entities that occupy space in the virtual scene, other than the first and second virtual objects, including but not limited to moving virtual characters, stationary non-player characters, temporarily generated props, dynamic obstacles, etc.

[0158] During detection, the system traverses all virtual objects around the target interaction location, obtains their respective collider information, and determines one by one whether these colliders have spatial intersection with the preset range.

[0159] In one implementation, the system invokes the spatial query function of the physics engine, taking the geometric region corresponding to a preset range as input, to obtain a list of all colliders in the current virtual scene that spatially intersect with that region. The system iterates through the collider list, sequentially determining the virtual object to which each collider belongs, and excluding colliders belonging to the first virtual object and the second virtual object from the list. If there are no remaining colliders in the list, it is determined that there are no other virtual objects within the preset range, and no further cleanup operation is required. If there are remaining colliders in the list, it is determined that there are other virtual objects within the preset range, triggering a push-out process.

[0160] Step S1422: When other virtual objects are detected, push the other virtual objects away from the target interaction position, and the pushing distance does not exceed the preset maximum displacement.

[0161] Once the system detects any other virtual objects within the preset range, these intruders need to be removed from that range to ensure a clean and smooth interaction.

[0162] For each detected other virtual object, the system calculates the direction vector of its current position relative to the center point of the target interaction position. This direction vector originates from the center point of the target interaction position and points towards the current position of the other virtual object. The system then inverts this direction vector to obtain the pushing direction away from the target interaction position. Subsequently, based on the overlap depth between the collider of the other virtual object and the preset range, the system determines the displacement distance required to completely move the other virtual object out of the preset range.

[0163] In one implementation, the system employs a step-by-step displacement method to perform the pushing action: starting from the current position of the other virtual object, the system moves the object step-by-step along the pushing direction with a preset step size. After each step, the system re-detects whether the object's collider still overlaps with a preset range. If overlap still exists and the cumulative movement distance has not yet reached the preset maximum displacement, the system continues moving the object; if there is no longer overlap, the system immediately stops moving and records the object's final position; if the cumulative movement distance has reached the preset maximum displacement but overlap still exists, the system stops moving, and the object remains at the preset maximum displacement position.

[0164] In another implementation, the system uses a direct calculation method: the system calculates the minimum displacement distance required to completely move the other virtual object out of the preset range, compares the minimum displacement distance with the preset maximum displacement, takes the smaller value as the actual displacement, and moves the other virtual object by the actual displacement in one go along the pushing direction.

[0165] The preset maximum displacement is a distance limit set by the system for push operations. It prevents other virtual objects from being pushed too far, causing abnormal states or excessively exaggerated visual effects. If the displacement required to push an intruding virtual object out of the preset range exceeds the preset maximum displacement, the system will only push it by the maximum displacement and will not forcibly push it out completely. In normal scenarios, the radius of the preset range is usually small, and a single push operation can move most intruders out of the core interaction area while ensuring their positional offset remains within an acceptable range.

[0166] In a specific business scenario, the object initiating and the object being contested are moved by the system to the first and second target positions, respectively, in preparation for the contest interaction. At this moment, another virtual character controlled by the system happens to pass by, and its collider overlaps with the pre-defined spherical area centered on the midpoint between the two target positions. After detecting this virtual character, the system calculates a direction vector from the center of the target interaction position towards the virtual character's current position, inverses this vector to obtain the pushing direction, and calculates that the displacement required to completely push the virtual character out of the pre-defined spherical area is 0.3 meters. This displacement is less than the pre-defined maximum displacement of 0.5 meters. The system then translates the virtual character 0.3 meters along the pushing direction, causing it to leave the pre-defined area. The entire pushing process is completed smoothly, ensuring that the contest interaction is not interfered with by the virtual character and preventing the virtual character from appearing abnormal due to being forcibly pushed away.

[0167] It can be seen that by cleaning up and protecting the dynamic space around the two parties involved in the interaction, clipping or motion interference caused by the unintentional intrusion of other virtual objects during the interaction is avoided, providing an independent and clear expression space for the interaction.

[0168] Based on any embodiment of the method in this application, such as Figure 9 As shown, steps S1431 and S1432 are included. The following describes each step.

[0169] Step S1431: After determining the target interaction position, determine the target interaction area based on the target interaction position and the space occupied by the first virtual object and the second virtual object in the interaction state, and mark the target interaction area as the occupied area.

[0170] In virtual scenarios, multiple pairs of virtual objects may trigger interaction events sequentially at similar times. If the target interaction location determined during the location prediction process overlaps with the space occupied by an already ongoing interaction, the two sets of interactions will intersect in space, disrupting their respective visual effects. Therefore, after determining the target interaction location for each interaction, the system marks the corresponding interaction area as occupied, providing a spatial avoidance basis for the location prediction of subsequent interactions, and releases the occupied area after the interaction ends.

[0171] The target interaction area is the space that the two parties actually need to occupy during the interaction process. This area includes the target interaction location itself as well as the space necessary for both parties due to factors such as the range of their actions, their standing range, and the type of interaction.

[0172] The target interaction area is determined based on the target interaction position, combined with the space occupied by the first and second virtual objects in the interaction state. In the interaction state, the first and second virtual objects each have specific postures and ranges of motion, and their volume and shape in space are directly related to the interaction type. The system reads the space occupied by both parties in this interaction from the interaction configuration data, including parameters such as the collider size of each virtual object, the range of interaction actions, and the position offset. Using the first and second target positions in the target interaction position as references, the system calculates an outward-expanding spatial region that can completely surround the interaction state of both parties as the target interaction area.

[0173] In one implementation, the system uses the first target position and the second target position as two endpoints, and combines the radii of the colliding bodies of the two parties in the interactive state to construct a capsule region. The capsule extends outward by a preset buffer distance to serve as the target interaction area.

[0174] In another implementation, the system constructs a spherical or cuboid region as the target interaction area, centered on the midpoint between the first and second target positions, based on the maximum possible range of motion and positioning of both parties during the interaction. In yet another implementation, the system constructs a spherical region centered on both the first and second target positions, based on the maximum radius of motion of each virtual object in the interaction state, and uses the union of the two spherical regions as the target interaction area.

[0175] An occupied area is a spatial region reserved by the system through a spatial marking mechanism, preventing intrusion by other interactions. After determining the spatial range of a target interaction area, the system marks that target interaction area as an occupied area. Specifically, the marking method involves adding an occupancy record to the global space occupancy table maintained by the system. This occupancy record contains the spatial boundary information of the target interaction area, the occupancy identifier, and the validity period of the occupancy. The marking of the occupied area remains valid during the execution of this interaction until it is actively removed by the system after the interaction event ends. By marking the target interaction area as an occupied area, the system establishes spatial isolation for the current interaction, ensuring that both parties have independent and undisturbed performance space during the execution of the interaction.

[0176] In step S1432, when determining the target interaction location for interactive trigger events of other virtual objects, the occupied area is treated as an unselectable area.

[0177] When other virtual objects in the virtual scene trigger new interaction events, in the process of performing the position prediction of the new interaction, in addition to detecting whether the candidate position point overlaps with the static collider in the virtual scene, the system also needs to use all valid occupied areas in the current global space occupancy table as additional space constraints.

[0178] Unselectable regions refer to spatial areas that are excluded from the candidate range by the system during the location prediction process for new interactions. When performing overall collider placement detection and candidate location point traversal detection in location prediction processing, the system treats each valid occupied region as an unselectable region.

[0179] When checking whether a candidate location meets the spatial validity requirements, the system checks not only whether the overall collider at the candidate location overlaps with a static collider, but also whether the overall collider intersects with any marked occupied areas. Specifically, the system compares the spatial range occupied by the overall collider of the new interaction with the spatial boundary information of each occupied area. If the overall collider intersects with an occupied area, it indicates that the candidate location is already within the influence range of another ongoing interaction, and the candidate location is considered not to meet the spatial validity requirements. The system excludes it from the candidate pool and continues to check the next candidate location. If the overall collider does not intersect with any occupied areas and does not overlap with any static collider, then the candidate location meets the spatial validity requirements. If all candidate locations are unusable due to overlap with occupied areas or static colliders, the system proceeds to a subsequent baseline switching or fallback processing flow. This restriction uses the occupied area of ​​the current interaction as the basis for spatial avoidance when subsequent new interactions search for locations, enabling later-initiated interactions to determine their target interaction location in a space unaffected by existing interactions.

[0180] Once the first and second virtual objects have completed the entire interaction process, and the interaction event ends, the system deletes the corresponding occupancy record from the global space occupancy table or marks it as invalid. The space area is then restored to a state where it can be used by new interactions. The timely release of occupancy marks ensures that space resources are not wasted due to long-term occupation, allowing subsequent interactions to use the area.

[0181] In a specific business scenario, the first pair of initiating and responding objects trigger a struggle interaction. The system determines the target interaction location through position prediction processing and identifies the target interaction area based on the target interaction location and the space occupied by both objects during the struggle interaction, marking this target interaction area as an occupied area. Subsequently, the second pair of initiating and responding objects also trigger a struggle interaction. When performing position prediction processing for the second pair of interactions, the system reads the global space occupancy table to obtain the occupied area marked by the first pair of interactions. While traversing candidate location points, the system performs spatial intersection detection between each candidate location point and the occupied area. When it detects that the overall collider at a candidate location point has spatial intersection with the occupied area of ​​the first pair of interactions, the system considers that candidate location point unselectable and continues to detect the next candidate location point until a candidate location point that neither overlaps with a static collider nor with any occupied area is found as the target interaction location. After the first pair of struggle interactions ends, the system cancels the occupied area marking, and the space area is restored to a usable state.

[0182] As can be seen, by identifying the target interaction area and marking it as occupied, subsequent interactions will automatically avoid the occupied area as an unselectable area during the location search process. The occupancy mark will be released in time after the interaction ends, providing exclusive space protection for multiple pairs of interactions in the virtual scene and avoiding the situation where multiple sets of interactions intersect in the same spatial area.

[0183] Please see Figure 10 According to one aspect of this application, an interactive position correction device includes: an interactive object determination module 11, configured to determine a first virtual object and a second virtual object participating in the interaction in response to a virtual object interaction trigger event; a correction reference acquisition module 12, configured to acquire correction reference information associated with the interaction trigger event, the correction reference information being used to determine a reference object from the first virtual object and the second virtual object; an interactive position prediction module 13, configured to perform position prediction processing in a virtual scene based on the correction reference information and with the current position of the reference object as a reference, to determine a target interactive position, the target interactive position including a first target position corresponding to the first virtual object and a second target position corresponding to the second virtual object; and an object interaction execution module 14, configured to adjust the first virtual object and the second virtual object to the first target position and the second target position respectively, and execute the interactive event corresponding to the virtual object interaction trigger event.

[0184] like Figure 11The diagram shows the internal structure of an interactive position correction device. This device includes a processor, a computer-readable storage medium, a memory, and a network interface connected via a system bus. The computer-readable, non-volatile storage medium stores an operating system, a database, and computer-readable instructions. The database stores information sequences, and when executed by the processor, these computer-readable instructions enable the processor to implement an interactive position correction method.

[0185] The processor of the interactive position correction device provides computing and control capabilities to support the operation of the entire device. The memory of the interactive position correction device can store computer-readable instructions, which, when executed by the processor, cause the processor to perform the interactive position correction method of this application. The network interface of the interactive position correction device is used for communication with a terminal.

[0186] Those skilled in the art will understand that Figure 11 The structure shown is merely a block diagram of a portion of the structure related to the present application and does not constitute a limitation on the interactive position correction device applied thereto. A specific interactive position correction device may include more or fewer components than those shown in the figure, or combine certain components, or have different component arrangements.

[0187] In this embodiment, the processor is used to execute... Figure 10 The specific functions of each module are described, and the memory stores the program code and various data required to execute the above modules or sub-modules. The network interface is used to realize data transmission between user terminals or servers. In this embodiment, the non-volatile readable storage medium stores the program code and data required to execute all modules in the interactive position correction device of this application, and the server can call the server's program code and data to execute the functions of all modules.

[0188] This application also provides a non-volatile readable storage medium storing computer-readable instructions, which, when executed by one or more processors, cause the one or more processors to perform the steps of the interactive position correction method of any embodiment of this application.

[0189] This application also provides a computer program product, including a computer program / instructions that, when executed by one or more processors, implement the steps of the methods in any embodiment of this application.

[0190] In summary, this application determines the target interaction position by performing position prediction processing with reference to the current position of the reference object, enabling virtual object interaction to adapt to complex scene environments and find legal positions when the space around the interacting parties is limited, reducing the situation where interaction cannot be performed due to conflicts between the preset interaction position and scene colliders.

[0191] Those skilled in the art will understand that all or part of the processes in the methods of the above embodiments of this application can be implemented by a computer program instructing related hardware. This computer program can be stored in a non-volatile readable storage medium, and when executed, it can include the processes of the embodiments of the above methods. The aforementioned storage medium can be a computer-readable storage medium such as a magnetic disk, optical disk, read-only memory (ROM), or random access memory (RAM).

Claims

1. An interactive position correction method, characterized in that, include: In response to virtual object interaction trigger events, determine the first and second virtual objects involved in the interaction; Obtain the correction benchmark information associated with the interaction trigger event, wherein the correction benchmark information is used to determine a benchmark object from the first virtual object and the second virtual object; Based on the correction reference information, and with the current position of the reference object as a reference, position prediction processing is performed in the virtual scene to determine the target interaction position. The target interaction position includes the first target position corresponding to the first virtual object and the second target position corresponding to the second virtual object. The first virtual object and the second virtual object are adjusted to the first target position and the second target position, respectively, and the interaction events corresponding to the virtual object interaction trigger events are executed.

2. The method according to claim 1, characterized in that, The step of obtaining the correction baseline information associated with the interaction trigger event includes: Obtain the first current position information of the first virtual object and the second current position information of the second virtual object; The area of ​​the passable area corresponding to the first current location information is used as the first spatial value, and the area of ​​the passable area corresponding to the second current location information is used as the second spatial value. The obstacle density corresponding to the first current location information is used as the first density value, and the obstacle density corresponding to the second current location information is used as the second density value; A first environmental score is determined based on the first spatial value and the first density value, and a second environmental score is determined based on the second spatial value and the second density value. The first environmental score is compared with the second environmental score, and the virtual object with the higher environmental score is determined as the benchmark object. When the first environmental score and the second environmental score are the same, the virtual object corresponding to the larger of the first spatial value and the second spatial value is determined as the benchmark object.

3. The method according to claim 1, characterized in that, The execution location prediction process includes: Obtain the current scene region type of the reference object; Based on the scene area type, a corresponding set of search parameters is selected from a set of preset search parameters, including the search radius and the number of candidate location points; Location prediction processing is performed based on the selected search parameters.

4. The method according to claim 1, characterized in that, The execution location prediction process includes: Using the current position of the reference object as the anchor point, and based on the interaction information corresponding to the interaction trigger event, determine the overall collision body of the first virtual object and the second virtual object in the interaction state; Place the integral collider at the anchor point; When the placed overall collider does not overlap with the collider in the virtual scene, the anchor point is determined as the target interaction position; When the placed overall collider overlaps with the collider of the virtual scene, multiple candidate position points are traversed within a preset range centered on the anchor point, and each candidate position point is checked to see if it meets the spatial legality condition. Candidate locations that meet the spatial legality conditions are determined as the target interaction locations.

5. The method according to claim 1, characterized in that, The step of performing position prediction processing in the virtual scene based on the correction reference information and with the current position of the reference object as a reference includes: If a legitimate target interaction position cannot be determined by using the reference object determined by the correction reference information as a reference, another virtual object involved in the interaction is used as the reference object, and the position prediction process is re-executed.

6. The method according to claim 1, characterized in that, The method further includes: When the location prediction process fails to determine the target interaction location, multiple candidate location points that have been detected in the location prediction process are obtained. From the plurality of candidate location points, candidate location points in which the removability level of all blocking entities is greater than a preset removability level threshold are selected. The blocking entity is an entity of a collider that overlaps with the overall collider of the first virtual object and the second virtual object. From the selected candidate locations, select the candidate location with the fewest obstructing entities, remove or move the obstructing entities at the candidate location to another location, and determine the candidate location as the target interaction location.

7. The method according to claim 1, characterized in that, Before executing the interaction event corresponding to the virtual object interaction trigger event, the method further includes: Ray detection is performed downwards from the first target position and the second target position respectively to obtain the ground height and ground normal. The height information of the first target location and the height information of the second target location are corrected according to the ground height. Adjust the lower limb joint posture of the first virtual object and the second virtual object based on the ground normal so that the lower limbs of the first virtual object and the second virtual object are in contact with the ground.

8. The method according to claim 1, characterized in that, After adjusting the first virtual object and the second virtual object to the first target position and the second target position respectively, the method further includes: Detect whether there are other virtual objects within a preset range around the target interaction location; When other virtual objects are detected, the other virtual objects are pushed away from the target interaction position, and the pushing distance does not exceed the preset maximum displacement.

9. The method according to claim 1, characterized in that, The method further includes: After determining the target interaction location, the target interaction area is determined based on the target interaction location and the space occupied by the first virtual object and the second virtual object in the interaction state, and the target interaction area is marked as the occupied area; When determining the target interaction location for events triggered by interactions with other virtual objects, the occupied area is treated as an unselectable area.

10. An interactive position correction device, characterized in that, include: The interaction object determination module is used to determine the first and second virtual objects participating in the interaction in response to the virtual object interaction trigger event. The correction benchmark acquisition module is used to acquire correction benchmark information associated with the interaction trigger event, and the correction benchmark information is used to determine a benchmark object from the first virtual object and the second virtual object; An interactive position prediction module is used to perform position prediction processing in a virtual scene based on the correction reference information and with reference to the current position of the reference object, to determine the target interactive position. The target interactive position includes a first target position corresponding to the first virtual object and a second target position corresponding to the second virtual object. The object interaction execution module is used to adjust the first virtual object and the second virtual object to the first target position and the second target position respectively, and execute the interaction event corresponding to the virtual object interaction trigger event.

11. An interactive position correction device, comprising a central processing unit and a memory, characterized in that, The central processing unit is used to invoke and run a computer program stored in the memory to perform the steps of the method as described in any one of claims 1 to 9.

12. A non-volatile readable storage medium, characterized in that, It stores, in the form of computer-readable instructions, a computer program implemented according to any one of claims 1 to 9, which, when invoked by a computer, executes the steps included in the corresponding method.