Cover position determination method, shielding method, corresponding device and electronic equipment

By generating query points on the boundary lines of the navigation grid and performing ray detection, the problem of incorrect cover recognition in the virtual environment was solved, achieving efficient and accurate cover positioning and improving the gaming experience.

CN116212388BActive Publication Date: 2026-01-30TENCENT TECHNOLOGY (SHENZHEN) CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202111481248.0
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-12-06
Publication Date
2026-01-30
Estimated Expiration
2041-12-06

AI Technical Summary

Technical Problem

Existing technologies have errors in cover recognition in virtual environments, affecting the visual and experiential aspects, especially in shooting games where virtual objects overlap with vehicles.

Method used

By determining the boundary segments of the navigation grid, candidate query points are generated, and ray detection is performed to filter out invalid query points and find suitable shelter locations.

Benefits of technology

It improves the positioning accuracy and efficiency of shelters in virtual environments, reduces labor costs and resource consumption, and adapts to dynamic and complex scenarios.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116212388B_ABST
    Figure CN116212388B_ABST
Patent Text Reader

Abstract

This application provides a method for determining cover positions, an occlusion method, corresponding devices, and electronic devices, relating to fields such as games, artificial intelligence, cloud technology, automatic navigation, and blockchain technology. The method includes: determining each boundary segment of a navigation grid within a predetermined range, and generating candidate query points on each boundary segment; performing ray detection on each candidate query point based on at least one direction to obtain the collision situation of each candidate query point; and determining the candidate query points with collision situations as query points, which are used to determine the position where virtual objects are occluded using cover in the virtual environment. This application embodiment can achieve accurate and efficient cover location, providing a basis for virtual characters to locate cover, thereby improving the accuracy of human-computer interaction in the virtual environment.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of computer human-computer interaction technology. Specifically, this application relates to a method for determining the position of a cover, a shading method, and corresponding devices and electronic equipment. Background Technology

[0002] Human-computer interaction has become a research hotspot in fields such as artificial intelligence (AI) in recent years, and is widely used in the development of industries such as virtual reality and games. In application scenarios involving shooting and aiming, virtual objects may perform actions such as finding hidden enemies, firing, and using cover for defense, which requires a high degree of field of vision. Therefore, cover recognition is crucial in these application scenarios.

[0003] The current mainstream approach is to use automated generation tools to bake cover markers offline. At runtime, the application can then use these pre-defined markers to inform virtual objects of the cover's location. However, since these automated generation tools produce these markers according to fixed rules, some errors are inevitable. For example, when using a car as cover, the front of the car might not be marked, causing the virtual character to overlap with the car when hiding in front of it, affecting the visual appeal and user experience. Summary of the Invention

[0004] This application provides a method for determining the location of cover, a method for occlusion, corresponding devices, and electronic equipment, enabling virtual characters to accurately and efficiently locate cover in a virtual environment, thereby improving the accuracy of human-computer interaction. The technical solution is as follows:

[0005] According to one aspect of the embodiments of this application, a method for determining the location of a shelter is provided, the method comprising:

[0006] Determine the boundary segments of the navigation grid within the predetermined range, and generate candidate query points on each boundary segment;

[0007] Ray detection is performed on each candidate query point based on at least one direction to obtain the collision situation of each candidate query point;

[0008] Candidate query points where collisions occur are identified as query points. Query points are used to determine the locations where virtual objects are occluded using cover in the virtual environment.

[0009] In one optional implementation, for each boundary segment, candidate query points are generated on the boundary segment, including:

[0010] Generate the first candidate query point at the two endpoints of the boundary line segment;

[0011] On the boundary line segment between the two endpoints, query point interpolation is performed to generate at least one second candidate query point.

[0012] In one optional implementation, query point interpolation is performed on the boundary line segment between the two endpoints, including:

[0013] Get the preset query point interval value, query point density value, or query point insertion number;

[0014] Based on the query point interval value, query point density value, or query point insertion number, query point interpolation is performed on the boundary line segment between the two endpoints.

[0015] In one optional implementation, for each candidate query point, ray detection is performed on the candidate query point based on at least one direction, including:

[0016] Determine the desired height of the bunker;

[0017] Using the desired height above the candidate query point's shelter as the starting point, emit rays in at least one direction for ray detection.

[0018] In one alternative implementation, determining the desired height of the bunker includes at least one of the following:

[0019] Obtain the preset desired height of the cover;

[0020] Determine the desired height of the shelter based on the height of the virtual object;

[0021] The desired height of the shelter is determined based on the height and type of the virtual object.

[0022] In one optional implementation, for each candidate query point, ray detection is performed on the candidate query point based on at least one direction, including:

[0023] Obtain the region type on both sides of the boundary segment where the candidate query point is located. The region type includes walkable region and non-walkable region.

[0024] The direction perpendicular to the boundary line segment where the candidate query point is located, pointing from the walkable area to the unwalkable area, is determined as the target direction. Ray detection is then performed on the candidate query point based on the target direction.

[0025] In one alternative implementation, before determining the individual boundary segments of the navigation grid within a predetermined range, the method further includes:

[0026] Determine the current position of the virtual object;

[0027] Obtain the preset spatial range parameters;

[0028] Based on the current location, the spatial range corresponding to the spatial range parameter is determined as the predetermined range.

[0029] In one alternative implementation, the spatial range is a cylindrical range;

[0030] The cylindrical range parameters include at least one of the following:

[0031] Cylinder radius, cylinder half-height or height;

[0032] Based on the current location, the spatial range corresponding to the spatial range parameter is determined as the predetermined range, including:

[0033] Using the current position as the center of the cylinder, the cylinder range corresponding to the cylinder range parameters is determined as the predetermined range.

[0034] In one optional implementation, using the current location as a reference, the spatial range corresponding to the spatial range parameter is determined as a predetermined range, including:

[0035] Obtain the preset vertical offset values ​​within the spatial range;

[0036] Using the current position as a reference, the spatial range corresponding to the spatial range parameter is offset based on the vertical offset value of the spatial range to obtain the predetermined range.

[0037] According to one aspect of the embodiments of this application, a cover occlusion method is provided, the method comprising:

[0038] When a masking action of a virtual object is detected, at least one query point is generated according to the mask position determination method provided in the embodiments of this application.

[0039] Determine the target query point from at least one query point to perform the masking action;

[0040] Control the virtual object to move towards the target query point, so as to use the cover corresponding to the target query point to occlude the virtual object.

[0041] According to another aspect of the embodiments of this application, a shelter location determination device is provided, the device comprising:

[0042] The first generation module is used to determine each boundary segment of the navigation grid within a predetermined range and generate candidate query points on each boundary segment;

[0043] The detection module is used to perform ray detection on each candidate query point based on at least one direction to obtain the collision status of each candidate query point;

[0044] The first determination module is used to determine candidate query points where collisions occur as query points. The query points are used to determine the positions where virtual objects are occluded using cover in the virtual environment.

[0045] In one optional implementation, the first generation module, when generating candidate query points on each boundary segment, specifically performs the following:

[0046] Generate the first candidate query point at the two endpoints of the boundary line segment;

[0047] On the boundary line segment between the two endpoints, query point interpolation is performed to generate at least one second candidate query point.

[0048] In one optional implementation, when the first generation module performs query point interpolation processing on the boundary line segment between the two endpoints, it specifically performs the following:

[0049] Get the preset query point interval value, query point density value, or query point insertion number;

[0050] Based on the query point interval value, query point density value, or query point insertion number, query point interpolation is performed on the boundary line segment between the two endpoints.

[0051] In one optional implementation, when the detection module performs ray detection on each candidate query point based on at least one direction, it specifically performs the following:

[0052] Determine the desired height of the bunker;

[0053] Using the desired height above the candidate query point's shelter as the starting point, emit rays in at least one direction for ray detection.

[0054] In one alternative implementation, the detection module, when used to determine the desired height of the shelter, specifically uses at least one of the following:

[0055] Obtain the preset desired height of the cover;

[0056] Determine the desired height of the shelter based on the height of the virtual object;

[0057] The desired height of the shelter is determined based on the height and type of the virtual object.

[0058] In one optional implementation, when the detection module performs ray detection on each candidate query point based on at least one direction, it specifically performs the following:

[0059] Obtain the region type on both sides of the boundary segment where the candidate query point is located. The region type includes walkable region and non-walkable region.

[0060] The direction perpendicular to the boundary line segment where the candidate query point is located, pointing from the walkable area to the unwalkable area, is determined as the target direction. Ray detection is then performed on the candidate query point based on the target direction.

[0061] In an alternative implementation, the first generation module is further configured to: Before determining the boundary segments of the navigation mesh within a predetermined range,

[0062] Determine the current position of the virtual object;

[0063] Obtain the preset spatial range parameters;

[0064] Based on the current location, the spatial range corresponding to the spatial range parameter is determined as the predetermined range.

[0065] In one alternative implementation, the spatial range is a cylindrical range;

[0066] The cylindrical range parameters include at least one of the following:

[0067] Cylinder radius, cylinder half-height or height;

[0068] When the first generation module is used to determine the spatial range corresponding to the spatial range parameter as a predetermined range based on the current position, it is specifically used for:

[0069] Using the current position as the center of the cylinder, the cylinder range corresponding to the cylinder range parameters is determined as the predetermined range.

[0070] In one optional implementation, when the first generation module determines the spatial range corresponding to the spatial range parameter as a predetermined range based on the current position, it is specifically used for:

[0071] Obtain the preset vertical offset values ​​within the spatial range;

[0072] Using the current position as a reference, the spatial range corresponding to the spatial range parameter is offset based on the vertical offset value of the spatial range to obtain the predetermined range.

[0073] According to another aspect of the embodiments of this application, a shelter shielding device is provided, the device comprising:

[0074] The second generation module is used to generate at least one query point according to the cover position determination method provided in the embodiments of this application when the masking action of the virtual object is detected.

[0075] The second determining module is used to determine the target query point for performing the masking action among at least one query point;

[0076] The movement module is used to control the virtual object to move towards the target query point, so as to use the cover corresponding to the target query point to occlude the virtual object.

[0077] According to another aspect of the embodiments of this application, an electronic device is provided, the electronic device including: a memory, a processor and a computer program stored in the memory, the processor executing the computer program to implement the steps of the cover position determination method or cover occlusion method provided in the embodiments of this application.

[0078] According to another aspect of the embodiments of this application, a computer-readable storage medium is provided, on which a computer program is stored, which, when executed by a processor, implements the steps of the cover position determination method or cover occlusion method provided in the embodiments of this application.

[0079] According to another aspect of the embodiments of this application, a computer program product is provided, which includes a computer program that, when executed by a processor, implements the steps of the cover position determination method or cover occlusion method provided in the embodiments of this application.

[0080] The cover location determination method, occlusion method, corresponding device and electronic equipment provided in this application embodiment can accurately and efficiently find cover by determining the boundary line segments of the navigation grid and generating query points on the boundary line segments, and then performing ray detection on the query points. This provides a basis for the virtual character to locate cover, thereby improving the accuracy of human-computer interaction in the virtual environment. Attached Figure Description

[0081] To more clearly illustrate the technical solutions in the embodiments of this application, the accompanying drawings used in the description of the embodiments of this application will be briefly introduced below.

[0082] Figure 1 A flowchart illustrating a method for determining the location of a shelter provided in an embodiment of this application;

[0083] Figure 2 This is a schematic diagram illustrating a query point generation result provided in an embodiment of this application;

[0084] Figure 3a A flowchart illustrating the process of generating results from a query point using existing technology;

[0085] Figure 3b A schematic diagram of an existing parameter setting;

[0086] Figure 4 A flowchart illustrating the process of generating results for another query point in the prior art;

[0087] Figure 5 A schematic diagram of a radiation detection method provided in an embodiment of this application;

[0088] Figure 6A schematic diagram of another X-ray detection method provided in an embodiment of this application;

[0089] Figure 7 A schematic diagram illustrating the detection range of a cylinder provided in an embodiment of this application;

[0090] Figure 8 A schematic diagram illustrating parameter settings provided in the embodiments of this application;

[0091] Figure 9 A schematic diagram of a system flow provided for an embodiment of this application;

[0092] Figure 10 A schematic flowchart illustrating a cover shielding method provided in an embodiment of this application;

[0093] Figure 11 A schematic diagram illustrating parameter settings for a distance test provided in an embodiment of this application;

[0094] Figure 12 This is a schematic diagram of a shelter location determination device provided in an embodiment of this application;

[0095] Figure 13 A schematic diagram of a shelter shielding device provided in an embodiment of this application;

[0096] Figure 14 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application. Detailed Implementation

[0097] The embodiments of this application are described below with reference to the accompanying drawings. It should be understood that the embodiments described below with reference to the accompanying drawings are exemplary descriptions for explaining the technical solutions of the embodiments of this application, and do not constitute a limitation on the technical solutions of the embodiments of this application.

[0098] Those skilled in the art will understand that, unless otherwise stated, the singular forms “a,” “an,” and “the” used herein may also include the plural forms. It should be further understood that the terms “comprising” and “including” as used in embodiments of this application mean that the corresponding feature can be implemented as the presented feature, information, data, step, operation, element, and / or component, but do not exclude implementation as other features, information, data, step, operation, element, component, and / or combinations thereof supported by the art. It should be understood that when we say that an element is “connected” or “coupled” to another element, the one element can be directly connected or coupled to the other element, or it can mean that the one element and the other element establish a connection relationship through an intermediate element. Furthermore, “connected” or “coupled” as used herein can include wireless connection or wireless coupling. The term “and / or” as used herein indicates at least one of the items defined by the term; for example, “A and / or B” can be implemented as “A,” or as “B,” or as “A and B.”

[0099] To make the objectives, technical solutions, and advantages of this application clearer, the embodiments of this application will be described in further detail below with reference to the accompanying drawings.

[0100] First, let's introduce and explain several terms used in this application:

[0101] (1) Virtual environment: also known as virtual scene, is an environment different from the real world output by the terminal device during application runtime. For example, it can be a simulation environment of the real world or a fictional environment. Based on the output of the terminal device, the user can form a visual perception of the environment, such as 2D or 2.5D images output by the display screen, or 3D images output by stereoscopic display technologies such as virtual reality and augmented reality. In addition, various possible hardware can be used to form perceptions of hearing, touch, smell, motion, etc. Specifically, the virtual environment can be a virtual scene in a game, that is, a game scene. In this embodiment of the application, the type of game is not specifically limited, for example, it can be a shooting game.

[0102] (2) Virtual Object: A virtual character that can be interacted with by a terminal device. This can be a non-player character (NPC) or a game AI (i.e., a non-player character with intelligent behavior) that has been trained and set up, but is not limited to these. Among them, a virtual object can be a virtual character, a virtual animal / plant or other virtual object. For example, the virtual object can be a virtual enemy that interacts with the user character in a shooting game.

[0103] (3) Unreal Engine 4 (UE4): A game engine and development tool that provides real-time realistic rendering, visual scripting, professional animation and cutscenes, a robust game framework, a flexible material editor, advanced artificial intelligence, and open-source code. It is a complete integrated tool for game building, simulation, and visualization, and also has sufficient flexibility to meet the needs of development teams of different sizes. This game development engine can be used to develop various types of games, such as stealth games, fighting games, and role-playing games.

[0104] (4) Environment Query System (EQS): This is a function of the UE4 AI system, which can be understood as scanning or checking the current virtual environment state. This function can sample and mark the current virtual environment according to certain rules, such as dividing it into points according to density, which are used to score the AI ​​behavior according to the rules.

[0105] (5) Navmesh: A technology used in 3D game world to realize automatic pathfinding of dynamic objects. It simplifies the complex structural organization relationship in the game scene into a navigation mesh with certain information, and then realizes automatic pathfinding through a series of calculations based on these navigation meshes.

[0106] (6) Navigation mesh: also known as walkable surface, is a polygonal mesh data structure used to mark which places are walkable in complex space. It is composed of multiple convex polygons. Each polygon can be understood as the basic unit of the navigation mesh.

[0107] (7) Cooking: After creating and managing resources in UE4 through the editor, it is necessary to convert the resource format in the editor into the file format on the target platform. Cooking is the process of converting this file format.

[0108] This application provides a method for determining the location of a cover and a method for cover obstruction. The subject of this solution can be an electronic device, such as a terminal or a server. The terminal can be a laptop, tablet, desktop computer, set-top box, smart speaker, mobile device (e.g., mobile phone, portable music player, personal digital assistant, portable gaming device, smartwatch, smart voice interaction device, vehicle terminal, etc.), smart home appliance (e.g., but not limited to smart TVs), etc., but is not limited to these. The server can be a standalone physical server, a server cluster or distributed system composed of multiple physical servers, or a cloud server providing cloud computing services.

[0109] The technical solutions provided in this application can relate to the field of artificial intelligence (AI) technology. For example, game AI can be implemented using AI technology. Based on the technical solutions in this application, game AI can know the location of cover and thus find the best hiding position. AI, in this context, refers to the theory, methods, technologies, and application systems that use digital computers or machines controlled by digital computers to simulate, extend, and expand human intelligence, perceive the environment, acquire knowledge, and use that knowledge to obtain optimal results. In other words, AI is a comprehensive technology within computer science that attempts to understand the essence of intelligence and produce a new type of intelligent machine that can react in a way similar to human intelligence. AI studies the design principles and implementation methods of various intelligent machines, enabling them to possess perception, reasoning, and decision-making functions.

[0110] Artificial intelligence (AI) is a comprehensive discipline encompassing a wide range of fields, including both hardware and software technologies. Fundamental AI technologies generally include sensors, dedicated AI chips, cloud computing, distributed storage, big data processing, operating / interactive systems, and mechatronics. AI software technologies primarily include computer vision, speech processing, natural language processing, as well as machine learning / deep learning, autonomous driving, and intelligent transportation.

[0111] The technical solutions provided in the embodiments of this application may also involve computer vision (CV) technology and machine learning (ML) technology.

[0112] Computer vision is the science that studies how to enable machines to "see." More specifically, it refers to machine vision, which uses cameras and computers to replace human eyes in recognizing and measuring targets, and then performs image processing to create images more suitable for human observation or transmission to instruments for detection. As a scientific discipline, computer vision studies related theories and technologies, attempting to build artificial intelligence systems capable of extracting information from images or multidimensional data. Computer vision technologies typically include image processing, image recognition, image semantic understanding, image retrieval, OCR, video processing, video semantic understanding, video content / behavior recognition, 3D object reconstruction, 3D technology, virtual reality, augmented reality, simultaneous localization and mapping (SLAM), autonomous driving, intelligent transportation, and other technologies, as well as common biometric recognition technologies such as facial recognition and fingerprint recognition.

[0113] Machine learning is a multidisciplinary field involving probability theory, statistics, approximation theory, convex analysis, and algorithm complexity theory, among others. It specifically studies how computers can simulate or implement human learning behavior to acquire new knowledge or skills and reorganize existing knowledge structures to continuously improve their performance. Machine learning is the core of artificial intelligence and the fundamental way to endow computers with intelligence; its applications span all areas of artificial intelligence. Machine learning and deep learning typically include techniques such as artificial neural networks, belief networks, reinforcement learning, transfer learning, inductive learning, and instructional learning.

[0114] With the research and advancement of artificial intelligence (AI) technology, AI is being studied and applied in various fields, such as smart homes, smart wearable devices, virtual assistants, smart speakers, smart marketing, autonomous driving, drones, robots, smart healthcare, smart customer service, vehicle networking, and intelligent transportation. It is believed that with the development of technology, AI will be applied in more fields and play an increasingly important role.

[0115] The technical solutions provided in this application embodiment may involve cloud technology. For example, the data processing and computing involved in this application embodiment can be implemented using cloud computing technology. Cloud computing is a delivery and usage model for IT infrastructure, referring to obtaining the required resources in an on-demand and easily scalable manner through the network; in a broader sense, cloud computing refers to a service delivery and usage model, referring to obtaining the required services in an on-demand and easily scalable manner through the network. Such services can be IT and software, Internet-related, or other services. Cloud computing is a product of the development and integration of traditional computer and network technologies such as grid computing, distributed computing, parallel computing, utility computing, network storage technologies, virtualization, and load balancing.

[0116] With the development of the internet, real-time data streams, and the diversification of connected devices, as well as the demands for search services, social networks, mobile commerce, and open collaboration, cloud computing has rapidly developed. Unlike previous parallel distributed computing, cloud computing will fundamentally revolutionize the entire internet model and enterprise management model.

[0117] Optionally, the data involved in the technical solutions provided in this application embodiment can be stored in a blockchain. For a game service platform with multiple game servers, the multiple game servers can form a blockchain, and the game servers are nodes on the blockchain. For example, for cloud gaming, a large number of cloud devices (such as cloud gaming servers, management servers, edge servers, etc.) of the cloud gaming service platform can form a blockchain.

[0118] Cloud gaming is an online gaming technology based on cloud computing. It enables thin clients with relatively limited graphics processing and data processing capabilities to run high-quality games. In cloud gaming, the game does not reside on the player's terminal but runs on a cloud server. The cloud server renders the game scene as a video and audio stream, which is then transmitted to the player's terminal via the network. The player's terminal does not need powerful graphics processing and data processing capabilities; it only needs basic streaming media playback capabilities and the ability to receive player input commands and send them to the cloud server.

[0119] The technical solutions provided in this application can be applied to virtual reality applications, simulation programs, shooting games, action real-time strategy games, etc., but are not limited thereto.

[0120] The technical solutions of this application and their effects are described below through several exemplary embodiments. It should be noted that the following embodiments can be referenced, borrowed from, or combined with each other. Identical terms, similar features, and similar implementation steps in different embodiments will not be repeated.

[0121] This application provides a method for determining the location of a shelter, such as... Figure 1 As shown, the method includes:

[0122] Step S101: Determine each boundary segment of the navigation grid within the predetermined range, and generate candidate query points on each boundary segment;

[0123] In this embodiment of the application, the navigation grid can be a Navmesh-based navigation grid or other navigation grids.

[0124] The inventors of this application discovered that the basic unit of the navigation grid is usually obtained by dividing the overall scene into regions based on model information such as terrain features, obstacles, and scenes within the virtual scene, such as ground, buildings, plants, and hillsides. In other words, the boundary between the area where an obstacle that can serve as cover is located and the walkable area usually corresponds to the boundary (also known as the edge) of the navigation grid.

[0125] In this embodiment, the boundary segments of the navigation grid are detected and identified to determine whether there are suitable shelters in the surrounding area, which can significantly reduce the search range for shelters and improve positioning efficiency.

[0126] The limitation of a predetermined range further narrows the search area for cover. Specifically, it detects and identifies only the boundary segments of the navigation grid within the predetermined range to determine if suitable cover exists nearby. Given real-world scenarios, virtual objects searching for cover may face emergencies or only be able to see cover within their field of vision. Setting a predetermined range better reflects these real-world conditions, aligns with objective real-world scenarios, enhances the game's realism, and improves positioning efficiency. In practical applications, those skilled in the art can set the predetermined range according to actual circumstances; this embodiment does not impose such limitations.

[0127] In this embodiment of the application, candidate query points are generated on each boundary line segment to determine whether there is a suitable cover around each boundary line segment.

[0128] Step S102: Perform ray detection on each candidate query point based on at least one direction to obtain the collision situation of each candidate query point;

[0129] In this embodiment, obstacle area detection is performed circumferentially around each candidate query point as a reference position using ray detection. Specifically, a ray detection is performed by emitting a ray from a starting point in one direction. A collision indicates the presence of an obstacle.

[0130] Step S103: The candidate query points where collisions occur are identified as query points. The query points are used to determine the positions where virtual objects are occluded using cover in the virtual environment.

[0131] In this embodiment of the application, candidate query points that do not involve collisions are filtered out, i.e., invalid query points that are not shelters are excluded. For candidate query points that involve collisions, meaning that the virtual object at that candidate query point can have a shelter for occlusion, all such candidate query points are determined as the final query points. This allows valid query points to be generated around the shelter, such as... Figure 2 As shown.

[0132] By combining the scene and plot, the optimal position for virtual objects to use cover in the virtual environment can be determined among all generated query points.

[0133] As an example, each generated query point can be scored according to rules, and the point with the highest score can be returned, which is the best position to use the corresponding cover for occlusion.

[0134] In this embodiment, the cover in the virtual environment that can be searched can be static or dynamic. Dynamic cover refers to non-fixed objects that appear dynamically or are destructible in the virtual world, such as cars, doors, randomly appearing airdropped items, obstacles placed by other characters, explosive barrels, and fragile boxes. In other words, both static and dynamic cover can be located by determining the corresponding query point in real time.

[0135] The cover location determination method provided in this application embodiment can accurately and efficiently locate cover, providing a basis for virtual characters to locate cover, thereby improving the accuracy of human-computer interaction in the virtual environment.

[0136] To further illustrate the advantages of the shelter location determination method provided in the embodiments of this application, several existing technologies are briefly introduced below.

[0137] The first method: Offline baking solution

[0138] This method involves offline baking of cover markers, combined with manual placement or adjustment by game designers. Automated tools are used to bake the cover positions offline. Since these tools generate markers according to fixed rules, errors are inevitable. Designers can then manually adjust these markers. When the game runs, the AI ​​can use these pre-assigned locations to identify the cover. This method requires offline baking of cover data, increasing the game's file size. It also requires manual adjustment of cover markers by designers, resulting in a large workload and high labor and time costs. Even minor changes to the scene's internal structure necessitate re-baking the entire map, wasting significant time and resources. Furthermore, offline baking cannot detect dynamically generated or movable cover in the scene.

[0139] The cover location determination method provided in this application embodiment can automatically locate cover, avoiding the expenditure of labor costs, time costs and resources during game development.

[0140] Furthermore, the shelter location determination method provided in this application embodiment can identify dynamically generated or movable shelters, which is very advantageous in dealing with some mobile platforms and more complex scenarios.

[0141] The second option: EQS matrix scheme

[0142] like Figure 3a As shown, this scheme generates a large number of query points in the scene through a generator, covering every corner of the scene.

[0143] The generator can define rules such as the range to be generated, the density of query points, and the center of generation through parameters, such as... Figure 3b As shown.

[0144] Because a large number of test points need to be generated in the scene to cover the location of the cover, it is very performance-intensive and has a significant impact on the game's frame rate.

[0145] The cover location determination method provided in this application significantly reduces the number of query points by generating query points on the boundary line segments of the navigation grid and filtering out invalid query points through ray detection, which can significantly improve the cover search speed and enhance game performance.

[0146] The third option: EQS Circle Generator solution

[0147] This scheme emits scattering lines from the generation center (the location of the virtual object). If an obstacle is encountered, a query point is generated at the collision point; if the furthest distance is reached, a query point is also generated. For example... Figure 4 As shown, this scheme can only generate query points on the side of the cover closer to the generation center. The other side of the cover cannot be found by virtual objects for hiding, which may lead to errors in the optimal hiding position and has significant limitations.

[0148] The shelter location determination method provided in this application generates query points on each boundary line segment of the navigation grid, which can generate query points for each direction of the shelter, making it easier to find the best hiding location more comprehensively and with high reliability.

[0149] In this embodiment of the application, a feasible implementation method is provided for step S101, wherein generating candidate query points on each boundary line segment may specifically include the following steps:

[0150] Generate the first candidate query point at the two endpoints of the boundary line segment;

[0151] On the boundary line segment between the two endpoints, query point interpolation is performed to generate at least one second candidate query point.

[0152] In this embodiment of the application, the first candidate query point can be a marker point placed at the two endpoints of the boundary line segment to mark the range for query point interpolation processing.

[0153] If a certain boundary segment is entirely within a predetermined range, then the first candidate query point is directly generated at the two endpoints of the boundary segment.

[0154] If a boundary segment intersects the boundary of a predetermined range, meaning part of the boundary segment is within the predetermined range and part is outside the predetermined range, then only the portion of the boundary segment within the predetermined range is used, and first candidate query points are generated at its two endpoints. In other words, a first candidate query point is generated at the endpoint of the boundary segment within the predetermined range, and another first candidate query point is generated at the point where the boundary segment intersects the predetermined range.

[0155] In one optional implementation, the first candidate query point can be used as a general candidate query point for subsequent raycasting and generation of the final query point, thereby improving the reliability of bunker positioning. That is, when performing raycasting on each candidate query point based on at least one direction, raycasting is performed on each first candidate query point and each second candidate query point based on at least one direction.

[0156] In another optional implementation, the first candidate query point is no longer used as a regular candidate query point for subsequent raycasting and the generation of the final query point, in order to save computational resources. That is, when raycasting is performed on each candidate query point based on at least one direction, only each second candidate query point is raycasted based on at least one direction.

[0157] Furthermore, on the boundary line segment between the two endpoints, query point interpolation is performed, that is, interpolation is added to fill the line segment to obtain at least one second candidate query point.

[0158] In this embodiment of the application, query point interpolation processing is performed on the boundary line segment between two endpoints, which may specifically include:

[0159] Get the preset query point interval value, query point density value, or query point insertion number;

[0160] Based on the query point interval value, query point density value, or query point insertion number, query point interpolation is performed on the boundary line segment between the two endpoints.

[0161] The query point interval value refers to the distance at which a candidate query point is inserted.

[0162] The query point density value refers to the number of candidate query points inserted per unit distance;

[0163] The number of query points inserted refers to the number of candidate query points that are evenly inserted on each boundary segment.

[0164] In practical applications, those skilled in the art can set the above interpolation parameters according to the actual situation. In this embodiment of the application, the values ​​of the above interpolation parameters are not specifically limited.

[0165] In this embodiment, after obtaining any preset interpolation parameter, query point interpolation can be performed on the boundary line segment between the two endpoints based on the interpolation parameter. After query point interpolation based on each boundary line segment, the candidate query points can comprehensively cover the location of the shelter, thereby improving the reliability of shelter positioning.

[0166] In this embodiment, considering that the boundary segment corresponding to an invalid query point may not be the boundary of the shelter, the determination of whether the boundary segment is located at the edge of the shelter can be based on the collision situation of at least one candidate query point on the boundary segment. Those skilled in the art can set whether to check each candidate query point on the boundary segment that is determined not to be the boundary of the shelter according to the actual situation. This embodiment does not make specific limitations here.

[0167] In this embodiment of the application, a feasible implementation method is provided for step S102. Specifically, during X-ray detection, the starting point and direction of X-ray emission can be specified.

[0168] In this embodiment, the starting point of the ray emission can be any candidate query point, or it can be offset from any candidate query point as a reference position, for example, offset upwards by a certain distance. Those skilled in the art can set the starting point of the ray emission according to the actual situation, and no specific limitation is made here.

[0169] In one feasible implementation, for each candidate query point, ray detection is performed on the candidate query point based on at least one direction, which may specifically include the following steps:

[0170] Determine the desired height of the bunker;

[0171] Using the desired height above the candidate query point's shelter as the starting point, emit rays in at least one direction for ray detection.

[0172] It's understandable that cover needs to meet certain conditions to provide cover, such as being of suitable height enough to obscure virtual objects. Additionally, while higher cover allows virtual objects to hide behind it, it may restrict their movement. For example, in shooting games, virtual objects can stand, crouch, or lie prone to fire from one side of higher cover, but it's difficult to observe from above, whereas lower cover allows for effective forward firing from both sides. Cover of varying heights can also be used for shooting with elevation differences. Therefore, height is a crucial factor for cover.

[0173] In this embodiment, by determining the desired height of the shelter, and then using the distance above the candidate query point from the desired height of the shelter as the emission starting point, rays are emitted in at least one direction for ray detection. This can also be understood as raising the query point to the desired height of the shelter for ray detection. Figure 5 As shown, candidate query points with unsuitable heights can be filtered out based on collision conditions, improving the efficiency of finding cover.

[0174] The desired height of the shelter can be determined based on the virtual scene. This embodiment does not limit the specific value of the desired height of the shelter.

[0175] Optionally, the desired height of the bunker is determined, including at least one of the following:

[0176] (1) Obtain the preset desired height of the bunker;

[0177] That is, the desired height of the shelter can be a preset value. Those skilled in the art can set the preset value based on actual needs, and no specific limitation is made here.

[0178] (2) Determine the desired height of the cover based on the height of the virtual object;

[0179] In practical applications, those skilled in the art can set the relationship between the height of the virtual object and the desired height of the shelter according to the actual situation. This application does not impose specific limitations on this embodiment.

[0180] As an example, the expected height of the cover can be set to be no less than the height of the virtual object. For example, if the virtual object is a virtual character, the expected height of the cover can be set to be no less than the height of the virtual character to ensure its safety when hiding.

[0181] As another example, the expected height of cover can be set to be no less than M times the height of the virtual object, where M > 0. For instance, taking a virtual character as an example, the expected height of cover can be set to be no less than the height of the virtual character when crouching or lying down. Or, for example, to avoid being hit by a parabola with a large curvature (projectiles such as, but not limited to, grenades, cannons, etc.), the expected height of cover can be set to be no less than a certain multiple of the height of the virtual character.

[0182] As another example, the expected height of the cover can be set to be no more than N times the height of the virtual object, where N > 0. For example, if the virtual object is a virtual character, the expected height of the cover can be set to be no more than the height that the virtual character can climb.

[0183] (3) Determine the desired height of the shelter based on the height and type of the virtual object.

[0184] For example, virtual characters of different genders can climb to different heights, and the corresponding expected height of cover may differ. Also, virtual characters can perform actions such as crouching, lying down, jumping, rolling, and climbing, while virtual animals typically do not, thus their corresponding expected height of cover may differ. In practical applications, those skilled in the art can set the height of virtual objects and their relationship to the expected height of cover based on the actual situation; this application does not impose specific limitations on these settings.

[0185] In another feasible implementation, when performing ray detection on each candidate query point based on at least one direction, the specific steps may include:

[0186] Determine the desired height of the bunker;

[0187] At least two launch points are determined based on the expected height of the candidate query point above the candidate query point's shelter.

[0188] X-ray detection is performed by emitting rays in at least one direction from each emission point.

[0189] As an example, a point above the candidate query point at the desired height from the candidate query point's shelter can be used as one emission starting point, and a point halfway above the candidate query point at the desired height from the candidate query point's shelter can be used as another emission starting point. Rays can be emitted in at least one direction for ray detection. The settings for other emission starting points can be deduced similarly.

[0190] In practical applications, those skilled in the art can set the height and number of launch points according to the actual situation, and the embodiments of this application do not make specific limitations here.

[0191] This approach can be used in situations where the type and shape of the bunker are more complex.

[0192] In this embodiment of the application, the emission direction of the ray can be at least one direction.

[0193] In one feasible implementation, the emission direction of the ray can be a target direction, such as a direction perpendicular to the boundary line segment where the candidate query point is located, pointing from the walkable area to the unwalkable area.

[0194] For this ray detection method, for each candidate query point, ray detection is performed on the candidate query point based on at least one direction, which can specifically include:

[0195] Obtain the region type on both sides of the boundary segment where the candidate query point is located. The region type includes walkable region and non-walkable region.

[0196] The direction perpendicular to the boundary line segment where the candidate query point is located, pointing from the walkable area to the unwalkable area, is determined as the target direction. Ray detection is then performed on the candidate query point based on the target direction.

[0197] Specifically, the horizontal direction from the walkable area to the non-walkable area, perpendicular to the boundary line segment where the candidate query point is located, can be determined as the target direction.

[0198] It is understandable that if one side of the boundary segment where the candidate query point is located is a walkable area and the other side is an inaccessible area, such as... Figure 6 As shown, the unwalkable area could be an obstacle area or an area outside the scene map. By defining the (horizontal) direction perpendicular to the boundary segment where the candidate query point is located, pointing from the walkable area to the unwalkable area, as the target direction, we can detect whether there is a collision on the unwalkable side of the corresponding boundary segment, thus determining the type of the candidate query point.

[0199] In another feasible implementation, the ray can be emitted in two target directions, such as two directions perpendicular to the boundary segment where the candidate query point is located. Using this method, it is unnecessary to determine the region type on both sides of the boundary segment where the candidate query point is located, which can be used in situations with more complex navigation meshes.

[0200] In another feasible implementation, the ray can be emitted in four target directions. For example, it could be two directions perpendicular to the boundary segment where the candidate query point is located, plus two directions parallel to or overlapping the boundary segment where the candidate query point is located; or it could be the four directions of east, south, west, and north relative to the navigation grid. Using this method, it is unnecessary to determine the region type on both sides of the boundary segment where the candidate query point is located, which is applicable to situations with more complex navigation grids and / or more complex obstacle types.

[0201] In another feasible implementation, the emission direction of the ray can be four or more target directions, such as scanning emission from a specified geometry. Optionally, the shape of the geometry can be a circle formed according to a predetermined emission central angle or circumferential emission density, or a cone formed with the horizontal direction from the walkable area to the non-walkable area as the central axis, or it can be a sphere, capsule, etc. This approach can be used in situations where the navigation mesh is more complex and / or the obstacle types are more complex.

[0202] In other embodiments, the emission direction of the rays can also be three target directions, etc. Those skilled in the art can make appropriate extensions based on the above examples, which can also be applied to this application, and therefore should also be included within the protection scope of this application.

[0203] It should be noted that for detection methods that emit rays in at least two directions, the length of the emitted rays can also be set to avoid erroneously identifying obstacles closer to other query points. Those skilled in the art can set the length of the emitted rays according to actual conditions, such as half the width of a virtual character, etc., and this application embodiment does not limit it.

[0204] In this embodiment of the application, the predetermined range mentioned in step S101 can be a planar range. For example, it can be a range within a predetermined distance around the current position of the virtual object, but it is not limited to this.

[0205] In one possible implementation, determining the predetermined range before step S101 may include the following steps:

[0206] Determine the current position of the virtual object;

[0207] Obtain the preset planar range parameters;

[0208] Using the current position as a reference, the plane range corresponding to the plane range parameter is determined as the predetermined range.

[0209] Taking a circle as an example, the preset plane range parameter can refer to the radius. Then, the current position of the virtual object is used as the center of the circle, and the range of the circle corresponding to that radius is defined as the predetermined range.

[0210] In other examples, the planar extent can also be a polygonal extent, a map extent, an irregular extent, etc. This application does not specifically limit the shape of the planar extent in its embodiments. Furthermore, the relationship between the planar extent and the current position of the virtual object can be set according to actual conditions for different types of planar extents, and is not specifically limited here. Additionally, the corresponding planar extent parameters can also be set according to actual conditions for different types of planar extents, and are not specifically limited here.

[0211] In this embodiment of the application, the predetermined range mentioned in step S101 can be a spatial range (three-dimensional range). For example, it can be a spatial range of a cylinder, cone, frustum, or sphere, but is not limited thereto.

[0212] Optionally, prior to step S101, determining the predetermined range may include the following steps:

[0213] Determine the current position of the virtual object;

[0214] Obtain the preset spatial range parameters;

[0215] Based on the current location, the spatial range corresponding to the spatial range parameter is determined as the predetermined range.

[0216] Optionally, the spatial extent is a cylindrical area.

[0217] The cylindrical range parameters include at least one of the following:

[0218] Cylinder radius, cylinder half-height or height.

[0219] The cylinder radius is used to control the range of the top-view plane.

[0220] The half-height or height of the cylinder is used to control the height range of the detection.

[0221] For embodiments of this application, determining the spatial range corresponding to the spatial range parameter as a predetermined range, based on the current position, may include: determining the cylindrical range corresponding to the cylindrical range parameter as a predetermined range, with the current position as the center of the cylinder, such as... Figure 7 As shown.

[0222] In this embodiment, using a cylindrical area as the detection range allows for the use of fewer parameters to control the generation of the detection range, thereby reducing computational complexity and saving computational resources. Furthermore, the cylindrical area more closely resembles the field of view in the real world, resulting in a more realistic application effect.

[0223] Optionally, the spatial extent is a prism extent.

[0224] In one example, taking a cuboid (right square prism) as the prism, the range parameters of the cuboid include at least one of the following:

[0225] The length, width, and half-height or height of the cuboid.

[0226] The length and width of the cuboid are used to control the extent of the top-view plane.

[0227] The cuboid half-height or height is used to control the height range of the detection.

[0228] For the embodiments of this application, determining the spatial range corresponding to the spatial range parameter as a predetermined range based on the current position may include: determining the cuboid range corresponding to the cuboid range parameter as a predetermined range based on the current position as the center of the cuboid.

[0229] Those skilled in the art will understand that the above-mentioned spatial ranges are merely examples, and other cylindrical ranges, as well as conical ranges, frustum ranges, or spherical ranges, can be analogized based on these examples and are also applicable to this application, and therefore should also be included within the scope of protection of this application.

[0230] In this embodiment of the application, the spatial range corresponding to the spatial range parameter is determined as a predetermined range based on the current location, including:

[0231] Obtain the preset vertical offset values ​​within the spatial range;

[0232] Using the current position as a reference, the spatial range corresponding to the spatial range parameter is offset based on the vertical offset value of the spatial range to obtain the predetermined range.

[0233] Using a cylindrical spatial range as an example, a preset Z-axis offset value can be used to control the vertical movement of the cylindrical range along the Z-axis, thereby adjusting its position to adapt to more scene settings. Other types of spatial ranges can be deduced similarly, and will not be elaborated upon here.

[0234] In this application embodiment, based on at least one of the above embodiments, a ShelterGenerator system can be integrated, wherein the Shelter can control the detection range and the number of query points generated through a series of parameters, and the Generator is used to generate the query points to be tested and weighted.

[0235] like Figure 8 As shown, the parameters that Shelter can obtain are as follows:

[0236] (1) Cylinder Z-axis offset value (Cylinder Center ZOffset): The center of the cylinder detection range is the default generation center (the position of the virtual object). By controlling the cylinder detection range to move up and down in the Z-axis direction through a Z-axis offset value, the position can be adjusted to obtain the vertical offset value used for the above spatial range.

[0237] (2) Cylinder Radius: The radius used to control the detection range of the cylinder, that is, to control the detection range of the top view plane;

[0238] (3) Cylinder Half Height: Used to control the height of the cylinder detection range, or can be replaced with cylinder height.

[0239] (4) Test Height: Anything below this height cannot be considered a cover. The desired height of the cover can be obtained.

[0240] (5) Interval: Used to control the density of generated points. It can be used as the above query point interval value, or it can be replaced with the query point density value or the number of query point insertions.

[0241] (6) Z-axis offset of the query point (Item ZHeight): Used to raise the position of the query point, so as to obtain the desired height of the cover mentioned above.

[0242] (7) Control the center of the query point: determined by the context queryer.

[0243] The scenario context queryer can be used in the EQS system as a central generator for generating query points in the Shelter Generator and as a reference when applying various tests.

[0244] Furthermore, based on the above parameters, the Shelter Generator system can specifically generate the effect of cover points. Specifically, Shelter can locate cover in the scene within a set detection range and generate query points on the ground around the cover that are usable by the EQS system, such as... Figure 2 As shown.

[0245] In this embodiment of the application, the flowchart of the Shelter Generator system execution is as follows: Figure 9 As shown, the process begins with a call to the EQS Shelter. The Shelter finds suitable covers within a certain range and finally generates query points. The steps in the system flowchart are explained below:

[0246] (1) Obtain the Navmesh boundary segment

[0247] Detect all Navmesh boundary segments within the predetermined detection range (e.g., the cylindrical range mentioned above), and mark points (i.e., first candidate query points) on both sides of the boundary segments.

[0248] (2) Fill interpolation in line segments to add query points

[0249] Interpolation is performed at the midpoint of each boundary segment based on the set Interval value to generate an intermediate point (i.e., the second candidate query point).

[0250] (3) Perform ray detection on (candidate) query points.

[0251] Rays are emitted from at least one direction for each (candidate) query point (e.g., the surrounding area, or the horizontal direction from the walkable area to the non-walkable area perpendicular to the corresponding boundary line segment, etc.) to obtain the corresponding collision situation.

[0252] (4) Filtering and generating query points

[0253] Only query points that collide with nearby objects can be generated (judged as cover as valid query points), while query points that do not collide with nearby objects are invalid (invalid query points that are not cover are excluded).

[0254] For example, Figure 2As shown, query points can only be generated at the edges of the navigation mesh below the bunker. Even though there are boundary segments of the navigation mesh above the bunker, ray detection in all directions shows no collisions. Therefore, it will be judged as not being a bunker and no query point will be generated.

[0255] The cover location determination method provided in this application embodiment is based on the information of the EQS system and the navigation grid. By obtaining the edge of the navigation grid, it can dynamically, accurately and efficiently find the cover, providing a basis for the virtual character to locate the cover. Thus, it can improve the accuracy of human-computer interaction in the virtual environment with only low overhead.

[0256] This application provides a method for shielding, such as... Figure 10 As shown, the method includes:

[0257] Step S201: When the masking action of the virtual object is detected, at least one query point is generated according to the masking position determination method provided in the above embodiments;

[0258] For details on the specific implementation, please refer to the introduction above, which will not be repeated here.

[0259] Step S202: Determine the target query point for performing the masking action among at least one query point;

[0260] In this embodiment of the application, at least one query point can be scored according to rules to determine the target query point for performing a masking action.

[0261] Specifically, EQS can use at least one generated query point in a scenario to score the query point based on a test, and finally return the point with the highest score.

[0262] Furthermore, the context (scene context queryer) can be combined to determine the generation center (the location of the virtual object) and the target of the distance test.

[0263] In EQS, executing a test can determine which query point generated is the "best" choice given a context. For example... Figure 11 The Distance Test shown is used to test the distance between the query point and the center specified by the Context. The greater the distance, the higher the score.

[0264] Step S203: Control the virtual object to move towards the target query point so as to use the cover corresponding to the target query point to occlude the virtual object.

[0265] In this embodiment of the application, when the virtual object moves to the target query point, the corresponding occlusion animation effect can be played.

[0266] The technical solution provided in this application uses the boundary of the navigation mesh to find shelter, which takes 90% less time than the traditional EQS ray (i.e. EQS matrix scheme), as shown in Table 1.

[0267]

[0268] Table 1

[0269] Moreover, compared with static scene pre-generation schemes (i.e. offline baking schemes), the technical solution provided in this application embodiment can dynamically find cover, which is more advantageous for dealing with some mobile platforms and more complex virtual scenes, as shown in Table 2.

[0270]

[0271] Table 2

[0272] This application provides a shelter location determination device, such as... Figure 12 As shown, the bunker location determination device 120 may include: a first generation module 1201, a detection module 1202, and a first determination module 1203, wherein,

[0273] The first generation module 1201 is used to determine each boundary segment of the navigation grid within a predetermined range, and generate candidate query points on each boundary segment;

[0274] The detection module 1202 is used to perform ray detection on each candidate query point based on at least one direction to obtain the collision status of each candidate query point;

[0275] The first determining module 1203 is used to determine the candidate query points where there is a collision as query points. The query points are used to determine the position where the virtual object is occluded by the cover in the virtual environment.

[0276] In one optional implementation, the first generation module 1201, when generating candidate query points on each boundary segment, specifically performs the following:

[0277] Generate the first candidate query point at the two endpoints of the boundary line segment;

[0278] On the boundary line segment between the two endpoints, query point interpolation is performed to generate at least one second candidate query point.

[0279] In one optional implementation, when the first generation module 1201 performs query point interpolation processing on the boundary line segment between two endpoints, it is specifically used for:

[0280] Get the preset query point interval value, query point density value, or query point insertion number;

[0281] Based on the query point interval value, query point density value, or query point insertion number, query point interpolation is performed on the boundary line segment between the two endpoints.

[0282] In one optional implementation, when the detection module 1202 performs ray detection on each candidate query point based on at least one direction, it is specifically used for:

[0283] Determine the desired height of the bunker;

[0284] Using the desired height above the candidate query point's shelter as the starting point, emit rays in at least one direction for ray detection.

[0285] In one alternative implementation, the detection module 1202, when used to determine the desired height of the shelter, is specifically used for at least one of the following:

[0286] Obtain the preset desired height of the cover;

[0287] Determine the desired height of the shelter based on the height of the virtual object;

[0288] The desired height of the shelter is determined based on the height and type of the virtual object.

[0289] In one optional implementation, when the detection module 1202 performs ray detection on each candidate query point based on at least one direction, it is specifically used for:

[0290] Obtain the region type on both sides of the boundary segment where the candidate query point is located. The region type includes walkable region and non-walkable region.

[0291] The direction perpendicular to the boundary line segment where the candidate query point is located, pointing from the walkable area to the unwalkable area, is determined as the target direction. Ray detection is then performed on the candidate query point based on the target direction.

[0292] In an optional implementation, before determining the boundary segments of the navigation grid within a predetermined range, the first generation module 1201 is further configured to:

[0293] Determine the current position of the virtual object;

[0294] Obtain the preset spatial range parameters;

[0295] Based on the current location, the spatial range corresponding to the spatial range parameter is determined as the predetermined range.

[0296] In one alternative implementation, the spatial range is a cylindrical range;

[0297] The cylindrical range parameters include at least one of the following:

[0298] Cylinder radius, cylinder half-height or height;

[0299] When the first generation module 1201 is used to determine the spatial range corresponding to the spatial range parameter as a predetermined range based on the current position, it is specifically used for:

[0300] Using the current position as the center of the cylinder, the cylinder range corresponding to the cylinder range parameters is determined as the predetermined range.

[0301] In one optional implementation, when the first generation module 1201 determines the spatial range corresponding to the spatial range parameter as a predetermined range based on the current position, it is specifically used for:

[0302] Obtain the preset vertical offset values ​​within the spatial range;

[0303] Using the current position as a reference, the spatial range corresponding to the spatial range parameter is offset based on the vertical offset value of the spatial range to obtain the predetermined range.

[0304] The apparatus in this application embodiment can execute the method provided in this application embodiment, and the implementation principle is similar. The actions performed by each module in the apparatus of each embodiment of this application correspond to the steps in the method of each embodiment of this application. For detailed functional descriptions of each module of the apparatus and the beneficial effects produced, please refer to the descriptions in the corresponding methods shown above, which will not be repeated here.

[0305] This application provides a shelter shielding device, such as... Figure 13 As shown, the cover shielding device 130 may include: a second generation module 1301, a second determination module 1302, and a moving module 1303, wherein,

[0306] The second generation module 1301 is used to generate at least one query point according to the cover position determination method provided in the embodiments of this application when the cover action of the virtual object is detected.

[0307] The second determining module 1302 is used to determine the target query point for performing the masking action among at least one query point;

[0308] The movement module 1303 is used to control the virtual object to move towards the target query point so as to use the cover corresponding to the target query point to occlude the virtual object.

[0309] The apparatus in this application embodiment can execute the method provided in this application embodiment, and the implementation principle is similar. The actions performed by each module in the apparatus of each embodiment of this application correspond to the steps in the method of each embodiment of this application. For detailed functional descriptions of each module of the apparatus and the beneficial effects produced, please refer to the descriptions in the corresponding methods shown above, which will not be repeated here.

[0310] This application provides an electronic device, including a memory, a processor, and a computer program stored in the memory. The processor executes the computer program to implement the steps of the aforementioned method embodiments.

[0311] In one alternative embodiment, an electronic device is provided, such as Figure 14 As shown, Figure 14 The illustrated electronic device 4000 includes a processor 4001 and a memory 4003. The processor 4001 and the memory 4003 are connected, for example, via a bus 4002. Optionally, the electronic device 4000 may further include a transceiver 4004, which can be used for data interaction between the electronic device and other electronic devices, such as sending and / or receiving data. It should be noted that in practical applications, the transceiver 4004 is not limited to one type, and the structure of the electronic device 4000 does not constitute a limitation on the embodiments of this application.

[0312] Processor 4001 may be a CPU (Central Processing Unit), a general-purpose processor, a DSP (Digital Signal Processor), an ASIC (Application Specific Integrated Circuit), an FPGA (Field Programmable Gate Array), or other programmable logic devices, transistor logic devices, hardware components, or any combination thereof. It can implement or execute the various exemplary logic blocks, modules, and circuits described in conjunction with the disclosure of this application. Processor 4001 may also be a combination that implements computational functions, such as including one or more microprocessor combinations, a combination of a DSP and a microprocessor, etc.

[0313] Bus 4002 may include a pathway for transmitting information between the aforementioned components. Bus 4002 may be a PCI (Peripheral Component Interconnect) bus or an EISA (Extended Industry Standard Architecture) bus, etc. Bus 4002 can be divided into address bus, data bus, control bus, etc. For ease of representation, Figure 14 The bus is represented by a single thick line, but this does not mean that there is only one bus or one type of bus.

[0314] The memory 4003 may be ROM (Read Only Memory) or other types of static storage devices capable of storing static information and instructions, RAM (Random Access Memory) or other types of dynamic storage devices capable of storing information and instructions, or EEPROM (Electrically Erasable Programmable Read Only Memory), CD-ROM (Compact Disc Read Only Memory) or other optical disc storage, optical disc storage (including compressed optical discs, laser discs, optical discs, digital universal optical discs, Blu-ray discs, etc.), magnetic disk storage media, other magnetic storage devices, or any other medium capable of carrying or storing computer programs and capable of being read by a computer, without limitation herein.

[0315] The memory 4003 stores computer programs that execute embodiments of this application, and its execution is controlled by the processor 4001. The processor 4001 executes the computer programs stored in the memory 4003 to implement the steps shown in the foregoing method embodiments.

[0316] Electronic devices include, but are not limited to, terminals and servers. Terminals can be laptops, tablets, desktop computers, set-top boxes, smart speakers, mobile devices (e.g., mobile phones, portable music players, personal digital assistants, portable gaming devices, smartwatches, smart voice interaction devices, in-vehicle terminals, etc.), smart home appliances (e.g., but not limited to smart TVs), etc., but are not limited to these. Backend servers can be independent physical servers, server clusters or distributed systems composed of multiple physical servers, or cloud servers providing cloud computing services.

[0317] This application provides a computer-readable storage medium storing a computer program. When the computer program is executed by a processor, it can implement the steps and corresponding content of the aforementioned method embodiments.

[0318] This application also provides a computer program product, including a computer program that, when executed by a processor, can implement the steps and corresponding content of the aforementioned method embodiments.

[0319] The terms "first," "second," "1," "2," etc., used in the specification, claims, and accompanying drawings of this application are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that the embodiments of this application described herein can be implemented in a sequence other than that shown in the figures or text.

[0320] It should be understood that although arrows indicate various operation steps in the flowcharts of this application's embodiments, the order in which these steps are implemented is not limited to the order indicated by the arrows. Unless explicitly stated herein, in some implementation scenarios of this application's embodiments, the implementation steps in each flowchart can be executed in other orders as required. Furthermore, some or all steps in each flowchart, based on the actual implementation scenario, may include multiple sub-steps or multiple stages. Some or all of these sub-steps or stages can be executed at the same time, and each sub-step or stage can also be executed at different times. In scenarios where execution times differ, the execution order of these sub-steps or stages can be flexibly configured according to requirements, and this application's embodiments do not limit this.

[0321] The above are only optional implementation methods for some implementation scenarios of this application. It should be noted that for those skilled in the art, other similar implementation methods based on the technical concept of this application, without departing from the technical concept of this application, also fall within the protection scope of the embodiments of this application.

Claims

1. A method of determining the position of a shelter, characterized in that The method comprises: determining each boundary line segment of a navigation grid within a predetermined range, and generating a candidate query point on each boundary line segment; performing ray detection on each candidate query point based on at least one direction to obtain a collision condition of each candidate query point; determining a candidate query point with a collision condition as a query point, the query point being used to determine a position for shielding a virtual object by a shelter in a virtual environment; for each candidate query point, performing ray detection on the candidate query point based on at least one direction, comprising: determining a shelter expected height; shooting a ray from a position above the candidate query point at the shelter expected height to at least one direction for ray detection.

2. The method of claim 1, wherein, for each boundary line segment, generating a candidate query point on the boundary line segment, comprising: generating a first candidate query point at each end point of the boundary line segment; performing query point interpolation processing on the boundary line segment between the two end points to generate at least one second candidate query point.

3. The method of claim 2, wherein, the query point interpolation processing on the boundary line segment between the two end points, comprising: obtaining a preset query point interval value, a query point density value, or a query point insertion number; performing query point interpolation processing on the boundary line segment between the two end points according to the query point interval value, the query point density value, or the query point insertion number.

4. The method of claim 1, wherein, The determination of the shelter expected height comprises at least one of the following: obtaining a preset shelter expected height; determining the shelter expected height according to the height of the virtual object; determining the shelter expected height according to the height of the virtual object and the type of the virtual object.

5. The method of claim 1, wherein, for each candidate query point, performing ray detection on the candidate query point based on at least one direction, comprising: obtaining the region type on both sides of the boundary line segment where the candidate query point is located, the region type comprising a walkable region and a non-walkable region; determining a target direction perpendicular to the boundary line segment where the candidate query point is located and pointing from the walkable region to the non-walkable region, and performing ray detection on the candidate query point based on the target direction.

6. The method of claim 1, wherein, Before the determination of each boundary line segment of a navigation grid within a predetermined range, the method further comprises: determining a current position of the virtual object; obtaining a preset space range parameter; determining a space range corresponding to the space range parameter as the predetermined range with the current position as a reference.

7. The method of claim 6, wherein, The space range is a cylindrical range; The cylindrical range parameter comprises at least one of the following: cylindrical radius, cylindrical half-height, or height; The determination of the space range corresponding to the space range parameter as the predetermined range with the current position as a reference, comprising: determining a cylindrical range corresponding to the cylindrical range parameter as the predetermined range with the current position as the center of the cylinder.

8. The method of claim 6, wherein, The determination of the space range corresponding to the space range parameter as the predetermined range with the current position as a reference, comprising: obtaining a preset space range up-down offset value; offsetting the space range corresponding to the space range parameter based on the space range up-down offset value to obtain the predetermined range with the current position as a reference.

9. A method of masking, comprising: The method comprises: When the masking action of the virtual object is detected, the method according to any one of claims 1-8 generates at least one query point; A target query point performing the masking action is determined in the at least one query point; The virtual object is controlled to move to the target query point to be occluded by a shelter corresponding to the target query point.

10. A shelter location determination apparatus, characterized by, Comprise: A first generation module is configured to determine each boundary line segment of a navigation grid within a predetermined range, and generate a candidate query point on each boundary line segment; A detection module is configured to perform ray detection on each candidate query point based on at least one direction to obtain a collision condition of each candidate query point; A first determination module is configured to determine a candidate query point with a collision condition as a query point, which is used to determine a position for occluding a virtual object by a shelter in a virtual environment; When the detection module is configured to perform ray detection on each candidate query point based on at least one direction, it is specifically configured to: Determine a shelter expected height; A point above the candidate query point at the shelter expected height from the candidate query point is taken as a launch point, and a ray is launched in at least one direction for ray detection.

11. The apparatus of claim 10, wherein, When the first generation module is configured to generate a candidate query point on each boundary line segment, it is specifically configured to: Generate a first candidate query point on each end point of the boundary line segment; Generate at least one second candidate query point by performing query point interpolation processing on the boundary line segment between the two end points.

12. The apparatus of claim 11, wherein, When the first generation module is configured to perform query point interpolation processing on the boundary line segment between the two end points, it is specifically configured to: Obtain a preset query point interval value, a query point density value, or a query point insertion number; According to the query point interval value, the query point density value, or the query point insertion number, perform query point interpolation processing on the boundary line segment between the two end points.

13. The apparatus of claim 10, wherein, When the detection module is configured to determine a shelter expected height, it is specifically configured to at least one of: Obtain a preset shelter expected height; Determine the shelter expected height according to the height of the virtual object; Determine the shelter expected height according to the height of the virtual object and the type of the virtual object.

14. The apparatus of claim 10, wherein, When the detection module is configured to perform ray detection on each candidate query point based on at least one direction, it is specifically configured to: Obtain the region type on both sides of the boundary line segment where the candidate query point is located, the region type comprising a walkable region and a non-walkable region; Determine a target direction perpendicular to the boundary line segment where the candidate query point is located, the target direction being from the walkable region to the non-walkable region, and perform ray detection on the candidate query point based on the target direction.

15. The apparatus of claim 10, wherein, Before the first generation module is configured to determine each boundary line segment of a navigation grid within a predetermined range, it is further configured to: Determine a current position of the virtual object; Obtain a preset space range parameter; Determine a space range corresponding to the space range parameter as the predetermined range with the current position as a reference.

16. The apparatus of claim 15, wherein, The space range is a cylindrical range; The cylindrical range parameter comprises at least one of: A cylindrical radius, a cylindrical half-height, or a height; The first generation module, when used for determining the space range corresponding to the space range parameter as the predetermined range based on the current position, is specifically used for: determining a cylinder range corresponding to the cylinder range parameter as the predetermined range based on the current position as the center of the cylinder.

17. The apparatus of claim 15, wherein, The first generation module, when used for determining the space range corresponding to the space range parameter as the predetermined range based on the current position, is specifically used for: obtaining a preset space range up-down offset value; offsetting the space range corresponding to the space range parameter based on the current position based on the space range up-down offset value to obtain the predetermined range.

18. A shelter screening device, characterized by comprise: The second generation module is configured to generate at least one query point according to the method in any one of claims 1-8 when detecting a masking action of a virtual object. The second determination module is configured to determine a target query point performing the masking action from the at least one query point. The moving module is configured to control the virtual object to move to the target query point to shield the virtual object with a shelter corresponding to the target query point.

19. An electronic device comprising a memory, a processor, and a computer program stored on the memory, wherein the computer program, when executed by the processor, is arranged to perform the method of any one of claims 1 to 18. The processor executes the computer program to implement the steps of the method in any one of claims 1-9.

20. A computer readable storage medium having stored thereon a computer program, characterized in that, The computer program is executed by the processor to implement the steps of the method in any one of claims 1-9.

21. A computer program product comprising a computer program, characterized in that, The computer program is executed by the processor to implement the steps of the method in any one of claims 1-9.

Citation Information

Patent Citations

  • Path searching method and device

    CN106964156A

  • Game object dynamic change method, device and equipment and storage medium

    CN112044063A