Method and apparatus for setting collision body of virtual article, device, and storage medium

By providing multiple candidate colliders for virtual items, the problem of setting a single collider in the prior art is solved, and the collider is flexibly configured for terminals with different computing capabilities is realized, and computing resource occupation is optimized.

WO2025055877A1PCT designated stage expired Publication Date: 2025-03-20TENCENT TECHNOLOGY (SHENZHEN) CO LTD
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
PCT/CN2024/117900
Authority / Receiving Office
WO · WO
Patent Type
Applications
Current Assignee / Owner
Priority Date
2023-09-12
Filing Date
2024-09-10
Publication Date
2025-03-20

AI Technical Summary

Technical Problem

The prior art is relatively single when setting up a collision body of virtual items, and it is difficult to meet the needs of terminals with different computing capabilities.

Method used

By providing at least two levels of candidate colliders for virtual items, corresponding to different vertices and computing resource usage, the purpose of flexibly configuring colliders for terminals with different computing capabilities is achieved.

Benefits of technology

The method of determining the collision body of virtual items has been expanded, the computing resource occupation has been optimized, and terminals with different computing capabilities can operate stably in the virtual environment.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN2024117900_20032025_PF_FP_ABST
    Figure CN2024117900_20032025_PF_FP_ABST
Patent Text Reader

Abstract

Embodiments of the present application relate to the technical field of computers, and disclose a method and an apparatus for setting a collision body of a virtual article, a device, and a storage medium. The method is executed by a terminal, the terminal runs a game program, the game program is provided with a UGC editor, and the UGC editor is at least configured to customize a creation virtual environment. The method comprises: displaying a build interface of a UGC editor, the UGC editor providing at least two stages of candidate collision bodies for a virtual article; obtaining a setting operation for the virtual article, the setting operation being used for instructing to determine a first candidate collision body as a collision body of the virtual article; and in response to the setting operation, displaying the collision body of the virtual article, wherein the number of vertices of an i-th stage of candidate collision bodies among the at least two stages of candidate collision bodies is a first number, the number of vertices of an (i+1)-th stage of candidate collision bodies is a second number, the first number is greater than the second number, and i is a positive integer less than the number of the candidate collision bodies.
Need to check novelty before this filing date? Find Prior Art

Description

Method, device, equipment and storage medium for setting collision body of virtual item

[0001] This application claims priority to the Chinese patent application filed with the China Patent Office on September 12, 2023, with application number 202311177022.0 and entitled “Method, device, equipment and storage medium for setting the collision volume of virtual items”, the entire contents of which are incorporated by reference into this application. Technical Field

[0002] The present application relates to the field of computer technology, and in particular to a method, apparatus, device, and storage medium for setting a collision body of a virtual item. Background Art

[0003] Collision detection is used to detect whether multiple virtual objects in the virtual environment intersect.

[0004] In related technologies, a collision volume is an area in a virtual environment where virtual objects participate in collision detection. By creating a collision volume for a virtual object according to its three-dimensional shape, physical collisions in the real world are simulated for the virtual object in the virtual environment.

[0005] However, the above-mentioned method of setting the collision body is relatively simple.

[0006] Summary of the Invention

[0007] The present application provides a method, apparatus, device, and storage medium for setting a collision body of a virtual item. The technical solution is as follows:

[0008] According to one aspect of an embodiment of the present application, a method for setting a collision body of a virtual item is provided. The method is performed by a terminal running a game program, the game program having a UGC editor, and the UGC editor is used to customize a virtual environment. The method includes:

[0009] Displaying a construction interface of the UGC editor, wherein the construction interface includes at least one virtual item for building a virtual environment, and the UGC editor provides at least two levels of candidate collision bodies for the virtual item;

[0010] Acquire a setting operation for the virtual item, the setting operation being used to instruct to determine a first candidate collision body among the at least two levels of candidate collision bodies as a collision body for the virtual item;

[0011] In response to the setting operation, displaying the collision volume of the virtual item;

[0012] Among them, the number of vertices of the i-th level candidate collision body in the at least two levels of candidate collision bodies is a first number, the number of vertices of the i+1-th level candidate collision body in the at least two levels of candidate collision bodies is a second number, the first number is greater than the second number, and i is a positive integer less than the number of the candidate collision bodies.

[0013] According to another aspect of an embodiment of the present application, a device for setting a collision body of a virtual item is provided. The device runs a game program, and the game program has a UGC editor. The UGC editor is used to customize and create a virtual environment. The device includes:

[0014] A display module, configured to display a construction interface of the UGC editor, wherein the construction interface includes at least one virtual item for constructing a virtual environment, and the UGC editor provides at least two levels of candidate collision bodies for the virtual item;

[0015] an acquisition module, configured to acquire a setting operation for the virtual item, wherein the setting operation is configured to instruct to determine a first candidate collision body among the at least two levels of candidate collision bodies as a collision body for the virtual item;

[0016] The display module is further configured to display the collision body of the virtual item in response to the setting operation;

[0017] Among them, the number of vertices of the i-th level candidate collision body in the at least two levels of candidate collision bodies is a first number, the number of vertices of the i+1-th level candidate collision body in the at least two levels of candidate collision bodies is a second number, the first number is greater than the second number, and i is a positive integer less than the number of the candidate collision bodies.

[0018] According to another aspect of an embodiment of the present application, a computer device is provided, comprising a processor and a memory, wherein the memory stores at least one instruction, at least one program, a code set, or an instruction set, and the at least one instruction, the at least one program, the code set, or the instruction set is loaded and executed by the processor to implement the method for setting a collision body of a virtual item as described above.

[0019] According to another aspect of an embodiment of the present application, a computer-readable storage medium is provided, wherein the computer-readable storage medium stores at least one instruction, at least one program, a code set, or an instruction set, and the at least one instruction, the at least one program, the code set, or the instruction set is loaded and executed by a processor to implement the method for setting a collision body of a virtual item as described above.

[0020] According to another aspect of an embodiment of the present application, a computer program product is provided, which includes computer-readable instructions stored in a computer-readable storage medium, and a processor reads and executes the computer-readable instructions from the computer-readable storage medium to implement the method for setting the collision body of the virtual item as described above.

[0021] The beneficial effects of the technical solutions provided in the embodiments of the present application include at least:

[0022] By providing virtual items with at least two levels of candidate collision bodies, the method for determining the collision bodies of virtual items is expanded; by corresponding at least two levels of candidate collision bodies to different numbers of vertices, at least two levels of candidate collision bodies correspond to different computing resource occupancy, and the computing resource occupancy is adjusted according to the different numbers of vertices, thereby achieving the purpose of flexibly configuring collision bodies for terminals with different computing capabilities.

[0023] BRIEF DESCRIPTION OF THE DRAWINGS

[0024] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the following briefly introduces the drawings required for use in the description of the embodiments. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without any creative work.

[0025] FIG1 is a structural block diagram of a computer system provided by an exemplary embodiment of the present application;

[0026] FIG2 is a schematic diagram of a method for setting a collision body of a virtual item provided by an exemplary embodiment of the present application;

[0027] FIG3 is a flow chart of a method for setting a collision body of a virtual item provided by an exemplary embodiment of the present application;

[0028] FIG4 is a flow chart of a method for setting a collision body of a virtual item provided by an exemplary embodiment of the present application;

[0029] FIG5 is a schematic diagram of a collision body of a virtual item provided by an exemplary embodiment of the present application;

[0030] FIG6 is a flowchart of a method for setting a collision body of a virtual item provided by an exemplary embodiment of the present application;

[0031] 7 is a flowchart of a method for setting a collision body of a virtual item provided by an exemplary embodiment of the present application;

[0032] FIG8 is a schematic diagram of a collision body of a virtual item provided by an exemplary embodiment of the present application;

[0033] FIG9 is a flowchart of a method for setting a collision body of a virtual item provided by an exemplary embodiment of the present application;

[0034] FIG10 is a schematic diagram of a virtual tree provided by an exemplary embodiment of the present application;

[0035] FIG11 is a schematic diagram of a virtual tree provided by an exemplary embodiment of the present application;

[0036] FIG12 is a schematic diagram of a virtual item provided by an exemplary embodiment of the present application;

[0037] FIG13 is a flowchart of a method for setting a collision body of a virtual item provided by an exemplary embodiment of the present application;

[0038] FIG14 is a schematic diagram of a collision body of a virtual platform provided by an exemplary embodiment of the present application;

[0039] FIG15 is a schematic diagram of detecting a virtual item provided by an exemplary embodiment of the present application;

[0040] FIG16 is a schematic diagram of a first space provided by an exemplary embodiment of the present application;

[0041] FIG17 is a schematic diagram of a method for setting a collision body of a virtual item provided by an exemplary embodiment of the present application;

[0042] FIG18 is a flowchart of a method for setting a collision body of a virtual item provided by an exemplary embodiment of the present application;

[0043] FIG19 is a flowchart of a method for setting a collision body of a virtual item provided by an exemplary embodiment of the present application;

[0044] FIG20 is a structural block diagram of a device for setting a collision body of a virtual item provided by an exemplary embodiment of the present application;

[0045] FIG21 is a structural block diagram of a terminal provided by an exemplary embodiment of the present application.

[0046] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present application and, together with the description, serve to explain the principles of the present application. DETAILED DESCRIPTION

[0047] In order to make the objectives, technical solutions and advantages of this application clearer, the implementation methods of this application will be further described in detail below with reference to the accompanying drawings.

[0048] Exemplary embodiments will be described in detail herein, with examples illustrated in the accompanying drawings. In the following description, when referring to the drawings, identical numerals in different figures represent identical or similar elements, unless otherwise indicated. The embodiments described in the following exemplary embodiments are not intended to represent all embodiments consistent with the present application. Rather, they are merely examples of apparatus and methods consistent with certain aspects of the present application, as detailed in the appended claims.

[0049] The terms used in this disclosure are for the purpose of describing specific embodiments only and are not intended to limit the disclosure. As used in this disclosure and the appended claims, the singular forms "a," "an," "the," and "the" are intended to include the plural forms as well, unless the context clearly indicates otherwise. It should also be understood that the term "and / or" as used herein refers to and encompasses any and all possible combinations of one or more of the associated listed items.

[0050] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, storage, and display, etc.) involved in the embodiments of this application are all information and data authorized by the user or fully authorized by all parties, and the collection, use, and processing of relevant data must comply with the relevant laws, regulations, and standards of the relevant countries and regions. For example, the information such as the setup operations involved in the embodiments of this application is obtained with full authorization.

[0051] It should be understood that although the terms "first," "second," and the like may be used in this disclosure to describe various information, such information should not be limited to these terms. These terms are merely used to distinguish information of the same type from one another. For example, a first parameter may also be referred to as a second parameter, and similarly, a second parameter may also be referred to as a first parameter, without departing from the scope of this disclosure. Depending on the context, the term "if" as used herein may be interpreted as "at the time of" or "when" or "in response to determining that"

[0052] 1 shows a block diagram of a computer system according to an exemplary embodiment of the present application. The computer system 100 includes a first terminal 110 , a server 120 , and a second terminal 130 .

[0053] The first terminal 110 has a client 111 installed and running that supports a virtual environment. The client 111 can be a multiplayer online battle program. When the first terminal 110 runs the client 111, the user interface of the client 111 is displayed on the screen of the first terminal 110. The client 111 can be any of a battle royale shooting game, a virtual reality (VR) application, an augmented reality (AR) program, a three-dimensional map program, a virtual reality game, an augmented reality game, a first-person shooter (FPS), a third-person shooter (TPS), a multiplayer online battle arena (MOBA), a simulation game (SLG), a sandbox building game, a casual game, or a level-based game. In this embodiment, the client 111 is an FPS game for example. First terminal 110 is used by first user 112. First user 112 uses first terminal 110 to control a first virtual object in a virtual environment to perform activities. The first virtual object may be referred to as the virtual object of first user 112. Activities of the first virtual object include, but are not limited to, at least one of: moving, jumping, teleporting, performing skills, using props, adjusting body posture, crawling, walking, running, riding, flying, jumping, driving, picking up, shooting, attacking, and throwing. Illustratively, the first virtual object is a first virtual character, such as a simulated human character or an animated character.

[0054] The second terminal 130 has a client 131 installed and running that supports a virtual environment. This client 131 can be a multiplayer online game program. When the second terminal 130 runs the client 131, the user interface of the client 131 is displayed on the screen of the second terminal 130. The client 131 can be any of a battle royale shooter game, a VR application, an AR program, a 3D map program, a virtual reality game, an augmented reality game, an FPS, a TPS, a MOBA, or a SLG. In this embodiment, the client is a MOBA game as an example. The second terminal 130 is used by a second user 132. The second user 132 uses the second terminal 130 to control a second virtual object in the virtual environment to perform activities. The second virtual object can be referred to as the virtual object of the second user 132. Illustratively, the second virtual object is a second virtual character, such as a simulated human character or an anime character.

[0055] In an embodiment, the first virtual object and the second virtual object are in the same virtual environment. In some embodiments, the first virtual object and the second virtual object may belong to the same camp, the same team, the same organization, have a friendship relationship, or have temporary communication permissions. In other embodiments, the first virtual object and the second virtual object may belong to different camps, different teams, different organizations, or have a hostile relationship.

[0056] In this embodiment, the client installed on the first terminal 110 and the second terminal 130 is the same, or the client installed on the two terminals is the same type of client on different operating system platforms (Android or iOS). The first terminal 110 can generally refer to one of multiple terminals, and the second terminal 130 can generally refer to another of the multiple terminals. This embodiment of the application only uses the first terminal 110 and the second terminal 130 as an example. The device types of the first terminal 110 and the second terminal 130 can be the same or different, and the device types include at least one of a smartphone, a tablet computer, an e-book reader, an MP3 player, an MP4 player, a laptop computer, and a desktop computer.

[0057] Figure 1 shows only two terminals, but in various embodiments, one or more other terminals 140 may be connected to server 120. In one embodiment, these one or more other terminals 140 may be terminals designated by developers. A development and editing platform for a client supporting a virtual environment is installed on terminal 140. Developers can edit and update the client on terminal 140 and transmit the updated client installation package to server 120 via a wired or wireless network. The first terminal 110 and the second terminal 130 can then download the client installation package from server 120, thereby updating the client.

[0058] The first terminal 110 , the second terminal 130 , and the other terminals 140 are connected to the server 120 via a wireless network or a wired network.

[0059] Server 120 includes at least one of a single server, multiple servers, a cloud computing platform, and a virtualization center. Server 120 provides backend services for clients supporting virtual environments. In some embodiments, server 120 performs primary computing tasks, while terminals perform secondary computing tasks; alternatively, server 120 performs secondary computing tasks, while terminals perform primary computing tasks; alternatively, server 120 and terminals utilize a distributed computing architecture for collaborative computing.

[0060] In the illustrated example, server 120 includes a processor 122, a user account database 123, a battle service module 124, and a user-facing input / output interface (I / O interface) 125. Processor 122 is configured to load instructions stored in server 120 and process data in user account database 123 and battle service module 124. User account database 123 is configured to store user account data used by first terminal 110, second terminal 130, and other terminals 140, such as user account avatars, user account nicknames, user account combat power indexes, and the service areas where user accounts are located. Battle service module 124 is configured to provide multiple battle rooms for users to engage in battles, such as 1v1 battles, 3v3 battles, and 5v5 battles. User-facing I / O interface 125 is configured to establish communication and exchange data with first terminal 110 and / or second terminal 130 via a wireless or wired network.

[0061] The method provided in the embodiments of the present application can be applied to, but is not limited to, at least one of the following scenarios: virtual reality applications, 3D map applications, FPS, TPS, MOBA, multiplayer shooter survival games, etc. The following embodiments illustrate the application of the method in games.

[0062] FIG2 is a schematic diagram showing a method for setting a collision body of a virtual item provided by an exemplary embodiment of the present application.

[0063] The first interface 210 is a building interface provided by a UGC editor within the game program running on the terminal. Exemplarily, the UGC editor is used to customize a virtual environment by creating virtual objects on the building interface. Within the customized virtual environment, a virtual character can be controlled to perform at least one of the following virtual activities: moving, jumping, lying down, climbing, and running.

[0064] Exemplarily, the building interface provided by the UGC editor includes a virtual ring 212 for building a virtual environment, a setting operation 214 for the virtual ring 212 is obtained, and a collision body of the virtual ring 212 is determined.

[0065] Exemplarily, the UGC editor provides at least two levels of candidate collision bodies with different computing resource usage for the virtual ring 212 .

[0066] In response to the setting operation 214 being a triggering operation for the first selection control 222 , the virtual ring 212 is determined as a first-level candidate collision body corresponding to the first selection control 222 in an original collision manner, and the first-level candidate collision body 225 is displayed on the second interface 220 .

[0067] In response to the setting operation 214 being a triggering operation for the second selection control 232 , the virtual ring 212 is determined as the second-level candidate collision body corresponding to the first selection control 222 in a minimalist collision manner, and the second-level candidate collision body 235 is displayed on the third interface 230 .

[0068] Exemplarily, the original collision method is used to determine the first-level candidate collision body 225, and the minimalist collision method is used to determine the second-level candidate collision body 235; the original collision method and the minimalist collision method correspond one-to-one to the two-level candidate collision bodies with different computing resource usage, providing a method for determining the collision bodies with different resource usage. In the example, there is a positive correlation between the computing resource usage and the number of vertices of the collision body, and different numbers of vertices of the collision body correspond to different computing resource usage. Exemplarily, the number of vertices of the first-level candidate collision body 225 is a first number, and the number of vertices of the second-level candidate collision body 235 is a second number, and the first number is greater than the second number.

[0069] Exemplarily, the no-collision mode is used to indicate that there is no collision body of the virtual ring 212 , and the at least two levels of candidate collision bodies provided by the UGC editor are used to indicate that when a collision body exists, different levels of candidate collision bodies correspond to different amounts of computing resources.

[0070] 3 shows a flow chart of a method for setting a collision body of a virtual item provided by an exemplary embodiment of the present application. Taking the method applied in a terminal as an example, the method includes the following steps 510-530.

[0071] Step 510: Display the UGC editor construction interface.

[0072] Exemplarily, the terminal runs a game program, and the game program has a user-generated content (UGC) editor, which is used to customize the virtual environment. Exemplarily, the UGC editor provides a building interface, and the virtual environment is customized by creating virtual items in the building interface.

[0073] Exemplarily, the building interface of the UGC editor includes at least one virtual item for building a virtual environment; exemplary, the virtual item can be a virtual three-dimensional shape such as a sphere, a prism, a pyramid, a cylinder, a cone, or can be a pre-built model of a virtual item such as a virtual house, a virtual vehicle, a virtual tree, etc., and the embodiments of the present application are not limited to this.

[0074] Exemplarily, the UGC editor provides at least two levels of candidate collision bodies for virtual items, each corresponding to a different amount of computing resource usage. Exemplarily, the computing resource usage is used to indicate the amount of computing resources required to perform collision detection on the virtual item. Exemplarily, the computing resource usage can be displayed directly on the build interface or as attribute information of the virtual item, indicating the computing resource usage by at least one of the virtual item's loading time and the virtual item's resource usage.

[0075] Step 520: Obtain setting operations for virtual items.

[0076] Exemplarily, the setting operation is used to instruct to determine a first candidate collision body among at least two levels of candidate collision bodies as the collision body of the virtual item. Exemplarily, the first candidate collision body is any one candidate collision body among at least two levels of candidate collision bodies.

[0077] Exemplarily, the implementation of the setting operation includes but is not limited to at least one of the following: clicking, sliding, and rotating; for example, clicking a touch screen or a button, sliding a touch screen or a handle, and rotating the terminal or a handle.

[0078] Step 530: In response to the setting operation, display the collision volume of the virtual item.

[0079] Exemplarily, the collision body is used to simulate the three-dimensional shape of the virtual item, and the collision body is the first candidate collision body in at least two levels of candidate collision bodies. Exemplarily, the at least two levels of candidate collision bodies are used to simulate the three-dimensional shape of the virtual item based on different computing resource usage. Exemplarily, the collision body can be displayed simultaneously with the virtual item to compare the three-dimensional shapes of the collision body and the virtual item; the collision body can also be displayed separately from the virtual item; for example, the collision body can be displayed in the building interface instead of the virtual item.

[0080] Exemplarily, the number of vertices of the i-th level candidate collision body in at least two levels of candidate collision bodies is a first number, the number of vertices of the i+1-th level candidate collision body in at least two levels of candidate collision bodies is a second number, the first number is greater than the second number, and i is a positive integer less than the number of candidate collision bodies. In one example, the computing resource usage of the candidate collision body is positively correlated with the number of vertices of the candidate collision body, and the computing resource usage of the candidate collision body increases as the number of vertices increases.

[0081] To sum up, in the method provided in the embodiment of the present application, by providing at least two levels of candidate collision bodies for virtual items, the method of determining the collision body of the virtual item is expanded; by making at least two levels of candidate collision bodies correspond to different numbers of vertices, the at least two levels of candidate collision bodies correspond to different computing resource occupancy, and the computing resource occupancy is adjusted according to the different numbers of vertices, thereby achieving the purpose of flexibly configuring collision bodies for terminals with different computing capabilities.

[0082] FIG4 is a flowchart of a method for setting a collision body of a virtual item provided by an exemplary embodiment of the present application. This method is described using a terminal as an example. In the embodiment shown in FIG3 , step 520 can be implemented as step 522 , and step 530 can be implemented as step 532 .

[0083] Step 522: In response to the first trigger operation, display a collision volume viewing control of the virtual item.

[0084] In an embodiment, the setting operation includes a first trigger operation on a first selection control and a second trigger operation on a collision volume viewing control. Exemplarily, the collision volume of the virtual item is displayed through the first trigger operation and the second trigger operation.

[0085] Exemplarily, the building interface includes at least two candidate selection controls, and the at least two candidate selection controls correspond one-to-one to the at least two levels of candidate collision bodies. Exemplarily, the at least two candidate selection controls include a first selection control, and the first selection control corresponds to any one of the at least two levels of candidate collision bodies, for example, the first selection control corresponds to the first candidate collision body. Exemplarily, the collision body viewing control is used to provide a functional entry for viewing the first candidate collision body corresponding to the first selection control.

[0086] Exemplarily, the first trigger operation is used to determine a first candidate collision body among at least two levels of candidate collision bodies as the collision body of the virtual item. The collision body viewing control is a viewing control corresponding to the first candidate collision body, and is used to provide a functional entry for viewing the first candidate collision body corresponding to the first selection control.

[0087] It should be noted that the UGC editor in the embodiments of this application provides at least two levels of candidate collision bodies for virtual items, expanding the method of determining collision bodies for custom creation of virtual environments. This is illustrated by taking the example of a first-level candidate collision body having more vertices than a second-level candidate collision body in the at least two levels of candidate collision bodies.

[0088] By identifying virtual item collision bodies as second-level candidate collision bodies, the experience of engaging in virtual activities within a virtual environment can be maintained even when the terminal's computing resources are insufficient. Compared to first-level candidate collision bodies, second-level candidate collision bodies have fewer vertices, reducing the computational complexity of collision detection for virtual items within the virtual environment. This conserves the terminal's computing resources and avoids issues such as display freezes, virtual item display failures, or collision detection anomalies caused by insufficient terminal computing resources.

[0089] By identifying the virtual item's collision body as the first-level candidate collision body, we optimize the effect of simulating physical collisions in the virtual environment. Compared to the second-level candidate collision bodies, the first-level candidate collision bodies have more vertices and are more closely aligned with the virtual item's three-dimensional structure. This ensures that the simulation of physical collisions during collision detection in the virtual environment is effective. For virtual items with complex three-dimensional structures, this avoids the problem of inconsistent collision effects between different collision bodies and the visual effect of the virtual item's texture display caused by excessive gaps between the collision body and the virtual item's three-dimensional structure.

[0090] Step 532: In response to the second trigger operation, display the collision volume of the virtual object;

[0091] Exemplarily, the second trigger operation is a trigger operation on a volume viewing control; the collision body is the first candidate collision body corresponding to the first trigger operation, and the displayed collision body is the first candidate collision body among at least two levels of candidate collision bodies.

[0092] Exemplarily, implementation methods of the first trigger operation and the second trigger operation include but are not limited to at least one of the following: clicking, sliding, and rotating; for example, clicking a touch screen or a button, sliding a touch screen or a handle, and rotating a terminal or a handle.

[0093] FIG5 illustrates a schematic diagram of a collision body for a virtual item provided in an exemplary embodiment of the present application. Fourth interface 240 is a setup interface provided by a UGC editor within a game program running on a terminal. The setup interface includes a virtual circle 242 for building a virtual environment. A first trigger operation 246 is obtained for a first selection control 245, and a collision body viewing control 255 for virtual circle 242 is displayed in fifth interface 250. A second trigger operation 256 is obtained for the collision body viewing control 255, and a collision body 258 for the virtual item is displayed in fifth interface 250.

[0094] In summary, in the method provided in the embodiment of the present application, the purpose of setting the collision body of the virtual item is achieved through the first trigger operation, and the second trigger operation is performed when the collision body needs to be viewed, thereby achieving visual viewing of the collision body.

[0095] Next, we will introduce how to display collision bodies.

[0096] FIG6 shows a flow chart of a method for setting a collision body of a virtual item provided by an exemplary embodiment of the present application. The method is described by taking the application of the method in a terminal as an example, that is, in the embodiment shown in FIG3 , step 520 can be implemented as step 525 .

[0097] Step 525: In response to the setting operation, the collision volume is superimposed and displayed on the virtual item in the virtual environment.

[0098] In an embodiment, a virtual item is an item created in a virtual environment. In this example, the UGC editor's build interface includes a candidate area and a build area, and the virtual item is a virtual item created in the build area. The UGC editor's candidate area provides at least one candidate item, and the virtual item and the candidate item are of the same item type.

[0099] For example, by overlaying a collision volume on a virtual object in a virtual environment, the collision volume corresponding to the virtual object can be directly displayed in the virtual environment, providing an immersive way to view the collision volume in the virtual environment. This facilitates comparison of the distance between the collision volume of the virtual object and other objects around the virtual object in the virtual environment.

[0100] For example, the collision body displayed overlaid on the virtual item can be displayed in a semi-transparent or overlaid manner. In this example, the collision body and the texture image of the virtual item have different colors. The virtual environment can also display collision bodies of other virtual items, such as other virtual items around the virtual item or all virtual items in the virtual environment.

[0101] In summary, in the method provided in the embodiment of the present application, the collision body is superimposed and displayed, which provides an immersive display method for viewing the collision body in a virtual environment and realizes the visual viewing of the collision body.

[0102] FIG7 shows a flow chart of a method for setting a collision body of a virtual item provided by an exemplary embodiment of the present application. The method is described using an example of a terminal, that is, in the embodiment shown in FIG3 , step 520 can be implemented as step 526 .

[0103] Step 526: In response to the setting operation, the initial label of the virtual item is displayed as the first label.

[0104] In an embodiment, a virtual item is a candidate item provided by the building interface. In the example, as described above, the building interface of the UGC editor includes a candidate area and a building area. A virtual item is a virtual item in the candidate area, i.e., a candidate item provided by the building interface. In an embodiment, an environment building item is created in the virtual environment by dragging a candidate item to the building area.

[0105] For example, the initial label of the virtual item is modified through the setting operation, and the initial label of the candidate item provided by the construction interface is determined as the first label; the first label is used to indicate that the virtual item corresponds to the collision body. In this way, by modifying the default state of the candidate item, the created environment construction item and the virtual item have the same collision body.

[0106] Figure 8 shows a schematic diagram of the collision body of the virtual item provided by the exemplary embodiment of the present application. The setting operation 264 in the sixth interface 260 is a setting operation for the UGC editor, which is used to set the collision body of one or more candidate items provided by the UGC editor. Specifically, the setting operation 264 is to set the initial label for the virtual item in the preference settings of the setting entry 262 of the UGC editor. Similar to Figure 2 above, the preference settings provide at least two levels of candidate collision bodies with different computing resource usage. In the example, by setting the initial label of the virtual item to the first label, the environment construction items created in the virtual environment are all collision bodies corresponding to the first label.

[0107] In one implementation, this implementation may further include the following steps:

[0108] In response to obtaining a creation operation for a virtual item, creating an environment building item in the virtual environment;

[0109] In response to obtaining a viewing operation on the environment building item, a collision volume of the environment building item is displayed.

[0110] Exemplarily, the environment building item and the virtual item are of the same type. Exemplarily, by dragging the virtual item to the build area, the environment building item is created in the virtual environment. Exemplarily, the collision body of the environment building item is the first candidate collision body corresponding to the set operation, thereby achieving the purpose of modifying the initial label of the virtual item through the set operation.

[0111] The environment construction item created based on the virtual item with the first tag has the same collision volume as the virtual item, thereby enabling preference settings for the virtual item, avoiding the need to set collision volumes for each created environment construction item in the virtual environment, and improving human-computer interaction efficiency. In this example, the create operation is obtained after the set operation, and the set operation determines the initial collision area of ​​the candidate virtual item in the construction interface as the first candidate collision volume.

[0112] In summary, in the method provided in the embodiment of the present application, the initial label of the candidate item provided by the construction interface is determined as the first label, so that the created environment construction item and the virtual item have the same collision body by modifying the default state of the candidate item.

[0113] Next, the vertices of the collision body are further introduced.

[0114] In the examples of the present application, the vertices of the collision body may be implemented in at least one of the following four implementations.

[0115] Implementation method 1: The vertex position of the collision body belongs to a subset of the vertex position of the virtual object.

[0116] Illustratively, the first set of vertex positions of the virtual object includes the second set of vertex positions of the collision body, thereby constraining the collision body with the three-dimensional structure of the virtual object, thereby ensuring that the collision body can accurately simulate the three-dimensional structure of the virtual object.

[0117] Implementation method 2: When a first plane on which at least three vertices of the collision body are located passes through the virtual object, the maximum distance between the first vertex of the virtual object and the first plane is less than the first distance threshold, and the first vertex is any vertex located on one side of the first plane.

[0118] Illustratively, when the first plane passes through the virtual object, the parts of the collision body at the three vertices are located inside the three-dimensional structure of the virtual object. The first distance threshold is used to constrain the degree of reduction of the collision body inside the three-dimensional structure of the virtual object, thereby avoiding the difference between the collision body and the three-dimensional structure of the virtual object caused by the collision body being set too small, and ensuring that the collision body can accurately simulate the three-dimensional structure of the virtual object.

[0119] For example, in one embodiment, the at least three vertices of the collision body may include a first vertex, and the first plane is a plane where a triangle with a minimum area formed by the first vertex and other two vertices on the collision body lies.

[0120] Illustratively, the first distance threshold may be preset, or may be determined based on the area of ​​a triangle formed by at least three vertices. For example, the first distance threshold and the area of ​​the triangle are positively correlated.

[0121] Implementation method three: when the second plane where at least three vertices of the collision body are located does not pass through the virtual object, the minimum distance between the second vertex of the virtual object and the second plane is less than the second distance threshold, and the second vertex is any vertex on the virtual object.

[0122] Illustratively, when the second plane does not pass through the virtual object, the parts of the collision body at the three vertices are located outside the three-dimensional structure of the virtual object. The second distance threshold is used to constrain the expansion of the collision body outside the three-dimensional structure of the virtual object, thereby avoiding the difference between the three-dimensional structure of the collision body and the virtual object caused by the collision body being set too large, and ensuring that the collision body can accurately simulate the three-dimensional structure of the virtual object.

[0123] Exemplarily, in one embodiment, the at least three vertices of the collision body may include a second vertex, and the second plane is a plane where a triangle with a minimum area formed by the second vertex and other two vertices on the collision body lies.

[0124] Illustratively, the second distance threshold may be preset, or may be determined based on the area of ​​a triangle formed by at least three vertices, for example, the second distance threshold and the area of ​​the triangle are positively correlated.

[0125] Implementation method 4: The distance between any two vertices of the collision body is greater than the third distance threshold.

[0126] Exemplarily, a third distance threshold is used to constrain the minimum spacing between vertices on the collision body to conserve computational resources used by the collision body. Exemplarily, the third distance threshold is positively correlated with the value of i in the i-th level candidate collision body. The computational resources used by the collision body decrease as the value of i increases, and the third distance threshold increases as the value of i increases.

[0127] In summary, in the method provided in the embodiment of the present application, the positions of the vertices of the collision body are restricted by setting constraint conditions, thereby ensuring the accuracy of the collision body in simulating the three-dimensional structure of the virtual object.

[0128] Next, we will introduce how to construct the collision body.

[0129] Exemplarily, the collision volume is a three-dimensional region composed of at least one of a cuboid collision volume, a spherical collision volume, and a polygonal facet. Exemplarily, by composing the collision volume from different collision volumes or polygonal facets, the complexity of constructing the collision volume can be reduced, and the three-dimensional structure of the virtual object can be accurately simulated.

[0130] Exemplarily, the collision body includes at least one of a cuboid collision body, a spherical collision body, and a polygonal facet. Specifically, the cuboid collision body, the spherical collision body, and the polygonal facet are introduced separately.

[0131] In an implementation of the embodiment, when the collision body includes a rectangular parallelepiped collision body, the vertices of the collision body include vertices of the rectangular parallelepiped collision body.

[0132] In another implementation of the embodiment, when the collision body includes a spherical collision body, the vertices of the collision body include vertices of the spherical collision body on the coordinate axes of a three-dimensional coordinate system, and the three-dimensional coordinate system is established with the center of the spherical collision body as the origin.

[0133] In another implementation of the embodiment, in the case where the surface of the collision body includes polygonal patches, the vertices of the collision body include the vertices of the polygonal patches. Exemplarily, the polygonal patches are polygonal planes located on the surface of the collision body. In the example, the collision body is a three-dimensional area surrounded by polygonal patches. For example, the collision body is used to simulate the three-dimensional structure of virtual trees. Since virtual trees are similar to trees in the real world, they have leaves, trunks and other parts, and present an irregular three-dimensional structure. Therefore, the polygonal patches may include multiple triangular patches, and the three-dimensional structure of the virtual trees is simulated by the three-dimensional area surrounded by multiple triangular patches.

[0134] In summary, in the method provided in the embodiment of the present application, a collision body is constructed by using collision bodies of different types, which simplifies the construction method of the collision body.

[0135] FIG9 is a flowchart of a method for setting a collision body of a virtual item provided by an exemplary embodiment of the present application. This method is described using a terminal as an example. That is, based on the embodiment shown in FIG3 , the method further includes step 505 , and step 510 can be implemented as step 512 .

[0136] Step 505: Obtain a combination operation for at least two virtual models.

[0137] Exemplarily, the combine operation is used to instruct the grouping of at least two virtual models. Exemplarily, the virtual models are typically virtual three-dimensional shapes such as spheres, prisms, pyramids, cylinders, and cones, but may also include objects such as virtual bows, virtual bells, and virtual windows. In this example, the combine operation is used to instruct the combination of a cylinder model, three cone models, a virtual bow, and a virtual bell to construct a virtual tree.

[0138] Step 512: In response to the combination operation, display a building interface including virtual items.

[0139] Exemplarily, the virtual item is a combination of at least two virtual models. In the example of step 505, the virtual item is a virtual tree constructed by combining operations.

[0140] Figure 10 shows a schematic diagram of virtual trees provided by an exemplary embodiment of the present application. A seventh interface 270 displays a cylinder model 271, a first cone model 272a, a second cone model 272b, a third cone model 272c, a virtual bow 274, and a virtual bell 275. By clicking or selecting these virtual models, the outlines of these virtual models are displayed on an eighth interface 280. By clicking the Save control 285, these virtual models are combined into a virtual tree 286.

[0141] In one implementation of the embodiment, the vertices of the virtual item's collision volume are vertices on the surface of a three-dimensional region formed by the collision volumes of at least two virtual models. Exemplarily, the collision volumes of at least two virtual models form a connected three-dimensional region, but the possibility of forming multiple independent three-dimensional regions is not excluded. By determining the vertices of the collision volume on the surface of the three-dimensional region, the situation where the collision volumes of different virtual models overlap within the three-dimensional region is simplified, reducing the computational complexity of collision detection and conserving computing resources.

[0142] In another implementation of the embodiment, the vertices of the collision body of the virtual item are the vertices of the rectangular collision body. Exemplarily, the bottom surface of the rectangular collision body is the minimum circumscribed rectangle of the projection of the virtual item in the vertical direction, and there is at least one projection point of the virtual item on any side of the bottom surface of the rectangular collision body. The height of the rectangular collision body is the height of the virtual item, and there is at least one intersection point between the bottom surface and the top surface of the rectangular collision body and the virtual item. Exemplarily, by determining the collision body of the virtual item as a rectangular collision body, the collision body of the virtual item is simplified, and the increase in the computational resource usage of the collision body due to the complexity of the three-dimensional structure of the combination of multiple virtual models is avoided, and it is ensured that the collision body can cover the three-dimensional space where the combination of multiple virtual models is located.

[0143] FIG11 shows a schematic diagram of a virtual tree provided by an exemplary embodiment of the present application. For example, the ninth interface 290 shows that the vertices of the first collision body 292 of the virtual tree are vertices on the surface of a three-dimensional area composed of collision bodies of a cylinder model, three cone models, a virtual bow, and a virtual bell. This method of determining collision bodies is also called a primitive collision method. The tenth interface 300 shows that the vertices of the second collision body 302 of the virtual tree are vertices of a rectangular collision body. The rectangular collision body is the minimum circumscribed rectangular parallelepiped of the cylinder model, three cone models, the virtual bow, and the virtual bell. This method of determining collision bodies is also called an enclosing collision method.

[0144] In summary, in the method provided in the embodiment of the present application, the purpose of combining virtual models and constructing new virtual items is achieved through the combination operation.

[0145] In the example, the UGC editor provides at least two levels of candidate collision bodies with different computing resource usage for virtual items. The collision types corresponding to the two levels of candidate collision bodies are complex collision (also called primitive collision) and simple collision.

[0146] For example, virtual items in a virtual environment are also called components, which are the smallest units used in custom virtual environments in UGC editors. Complex collisions include two cases. One corresponds to the primitive body of collision in the mesh, that is, the basic shape (such as a triangle, quadrilateral, etc.) itself or multiple basic shapes spliced ​​together to form a mesh, which can be used as a collision body. The other case corresponds to a collection of multiple simple shapes. The number of simple shapes in this collection is large and more complex than the basic shapes in the first case (such as polygonal patches). These simple shapes together constitute the organizational structure of a three-dimensional model, as a collision body. Minimalist collision corresponds to the custom primitive body of collision in the mesh, that is, a customized minimized simple shape is used to fit the collision body.

[0147] To accommodate multiple collision details, a custom primitive (also called custom collision) is added to the static mesh configuration. This custom primitive is used to encapsulate minimal collision data. In other words, the custom primitive itself contains collision data and can be used to replace other collisions. Since the granularity of collision settings is component-based, a member variable for the collision type is defined in the component properties to record the component's current collision type. If a collision type change event is received, all static meshes in the component are retrieved to form a static component, and the collision type used in the static component is then set in a loop.

[0148] For example, since the combination of multiple virtual models is a logical element, the basic components that make up the combination are not rendered, that is, there is only logical data and no physical components that can be rendered. Therefore, when the combination is customized for collision, a new static mesh component will be created to serve as the collision box for the group. The size of the collision box is set to a bounding box in the spatial coordinate system of the combination to generate a minimum circumscribed cuboid that completely wraps the entire combination, and the use of the static mesh component allows the collision preview of a single component to be directly reused. The main rendering of the minimalist collision component is set to no. When the collision type of the combination is changed, if it is changed to minimalist collision, the collision of the multiple virtual models inside the combination is first turned off, and the minimalist collision component of the combination is set to be collidable. If it is changed to no collision, the collision of the minimalist collision component of the combination and the multiple virtual models inside are all turned off.

[0149] In this example, if the virtual item is an assembly, when the assembly's collision preview state changes, if the assembly's collision type is complex, the collision preview state of the virtual model within the assembly is directly set. If the assembly's collision type is minimal, the assembly's collision type is first set to minimal, then the minimal collision component is set to main-thread rendering and set to the corresponding preview state. The collision preview state is a view in which the collision body is rendered, not the virtual item itself.

[0150] In the example, the collision type field of the virtual item is saved in the properties of the component, the virtual environment data is serialized and stored in the bus interface module, the attribute information is stored along with the virtual environment, the collision type is initialized through the loading logic of the virtual environment, and the virtual environment data is restored to the mesh and collision body.

[0151] Exemplarily, the UGC editor in the embodiment of the present application provides at least two levels of candidate collision bodies with different computing resource usage for virtual items. In one design, it is also included that, for virtual light and shadow in the virtual environment, the UGC editor does not provide candidate collision bodies for the virtual light and shadow, and creates virtual light and shadow in the virtual environment in a collision-free manner. Exemplarily, virtual light and shadow include but are not limited to at least one of virtual lightning, virtual rainbow, virtual sunlight, holographic projection, etc. In another design, it is also included that, for shape models in the virtual environment, the UGC editor provides a first-level candidate collision body for the shape model. Exemplarily, the shape model is any one of a cube and a sphere, and the cube and the sphere are the three-dimensional shapes of the collision elements when constructing the collision body. In another design, it is also included that, for virtual machine levels in the virtual environment, the UGC editor provides at least one level of candidate collision bodies for the virtual machine levels. Exemplarily, the virtual machine level is a human-computer interaction mechanism in the virtual environment that relies on collision detection triggering, such as at least one of the mechanisms such as a trampoline, a switch pedal, etc.

[0152] Figure 12 shows a schematic diagram of a virtual item provided by an exemplary embodiment of the present application. A virtual cube 311a is displayed in the tenth interface 311, and a first-level candidate collision body is provided for the virtual cube 311a, that is, the collision body of the virtual cube 311a is determined in the original collision mode, and the no-collision mode is used to indicate that there is no collision body of the virtual cube 311a. A holographic star 312a is displayed in the eleventh interface 312, and no candidate collision body is provided for the holographic star 312a. The holographic star 312a is created in the virtual environment in a no-collision mode. A virtual trampoline 313a is displayed in the twelfth interface 313, and a first-level candidate collision body is provided for the virtual trampoline 313a. The collision body of the virtual trampoline 313a is determined in the original collision mode, and there is no setting for creating the virtual trampoline 313a in a no-collision mode indicating that there is no collision body.

[0153] FIG13 is a flowchart of a method for setting a collision body of a virtual item provided by an exemplary embodiment of the present application. Taking the method applied to a terminal as an example, that is, based on the embodiment shown in FIG3 , the method further includes steps 542 and 544.

[0154] Step 542: In response to the drag operation on the collision volume, move the position of the virtual object in the virtual environment.

[0155] Exemplarily, a drag operation is an operation performed on a virtual object's collision body when the collision body is displayed. When the collision body is displayed, the position of the virtual object in the virtual environment is modified by dragging the object. In this example, the collision body is displayed in the virtual environment, and dragging the virtual object allows the user to observe the position changes of the collision body and other virtual objects in the virtual environment while previewing the collision body, thereby changing the position of the virtual object according to the collision body's position requirements, thereby improving the efficiency of human-computer interaction.

[0156] For example, by moving the position of virtual objects in the virtual environment, a new setting method for virtual objects is expanded for the UGC editor, and the collision body is displayed when the virtual object is moved, and the position change of the collision body as the virtual object moves can be viewed in real time.

[0157] It should be noted that step 542 in this embodiment can be combined with steps 510 to 530 in Figure 3 to form a new embodiment and implemented separately, and the embodiment of the present application is not limited to this.

[0158] Figure 14 shows a schematic diagram of the collision bodies of the virtual platform provided by the exemplary embodiment of the present application. There are a first platform, a second platform and a virtual wall in the virtual environment. Sub-figure (a) shows the positions of the first platform 301, the second platform 302 and the virtual wall 303. Correspondingly, sub-figure (b) shows the collision bodies of the corresponding virtual objects mentioned above; the first platform 301 corresponds to the first collision body 301a, the second platform 302 corresponds to the second collision body 302a, and the virtual wall 303 corresponds to the third collision body 303a. By dragging the first collision body 301a and the second collision body 302a in sub-figure (b), the positions of the first platform 301 and the second platform 302 are modified. Sub-figure (c) shows the fourth collision body 301b and the fifth collision body 302b updated after the first collision body 301a and the second collision body 302a are dragged. Correspondingly, the positions of the first jumping platform 301 and the second jumping platform 302 are changed, and sub-figure (d) shows the updated position 305 of the first jumping platform and the updated position 306 of the second jumping platform.

[0159] Step 544: When the quantity of the first virtual items in the first space of the virtual environment exceeds a quantity threshold, display a prompt message.

[0160] Exemplarily, the prompt information is an alarm message indicating that the quantity of the first virtual item exceeds a quantity threshold. The quantity threshold may be a preset threshold or a threshold determined according to the computing capability of the terminal. Furthermore, the quantity threshold is positively correlated with the computing capability of the terminal.

[0161] Exemplarily, the quantity threshold is a safety threshold for rendering and displaying a first virtual item in a first space in a virtual environment. The first space is a predefined space in the virtual environment, or a space selected by a user for rendering. The first virtual item is a virtual item contained in the first space. Furthermore, the quantity threshold is a safety threshold for rendering and displaying the first virtual item at at least one of a preset resolution, a preset frame rate, and a preset rendering time.

[0162] In one implementation of the embodiment, step 544 may be implemented as: displaying a prompt message when the number of vertices of the collision volume of the first virtual object exceeds a quantity threshold.

[0163] Illustratively, the number of vertices in the collision volume of the first virtual object indicates the computational resource usage for collision detection within the first space. The computational complexity of collision detection increases with the number of vertices. If the number of vertices in the collision volume of the first virtual object exceeds a threshold, the computational resource usage for collision detection within the first space exceeds a safe threshold for rendering and displaying the first virtual object in the first space.

[0164] In another implementation of the embodiment, step 544 may be implemented as: displaying a prompt message when the data volume of the texture resource of the first virtual item exceeds a quantity threshold.

[0165] Exemplarily, the data volume of the first virtual item's texture resources indicates the computational resource usage required for texture rendering of the first virtual item's surface when viewing the first space. The computational complexity of texture rendering of the first virtual item's surface increases with the data volume of the texture resources. If the data volume of the first virtual item's texture resources exceeds a threshold, the computational resource usage required for texture rendering of the first virtual item's surface within the first space exceeds a safe threshold for rendering and displaying the first virtual item within the first space.

[0166] In one implementation of the embodiment, the display mode of the prompt information includes at least one of the following: display as a prominent mark in the first space, display as a pop-up window, display as a bubble, and display as a pop-up message card.

[0167] In an example, the highlight mark is displayed in a superimposed manner on the first space. In an embodiment, the highlight mark includes at least one of a wireframe mark, a text mark, and a color highlight mark.

[0168] It should be noted that step 544 in this embodiment can be combined with steps 510 to 530 in Figure 3 to form a new embodiment and implemented separately, and the embodiment of the present application is not limited to this.

[0169] It should be noted that the prompt information can be automatically displayed when the number of first virtual items in the first space of the virtual environment exceeds the quantity threshold, or the prompt information can be displayed in response to a detection operation on the virtual environment, in which the number of first virtual items is detected and the number of first virtual items exceeds the quantity threshold.

[0170] In one implementation, the virtual environment detection operation is performed when the virtual environment is published. Exemplarily, the prompt information is displayed in response to the virtual environment publishing operation, where the custom-created virtual environment is published as a virtual map in the game program through the publishing operation. In response to the publishing operation, the custom-created virtual environment is detected to determine whether the first virtual item in the first space can be rendered and displayed.

[0171] FIG15 shows a schematic diagram of detecting virtual items provided by an exemplary embodiment of the present application. By displaying a prompt message 332 on the published map interface 330, it is prompted that the number of first virtual items in the first space of the virtual environment exceeds the safety threshold for rendering and display. Exemplarily, the prompt message 332 includes a prompt text 333 and a jump control 334. The prompt text is text indicating that the number of first virtual items exceeds the safety threshold for rendering and display, for example, "Your work may be at risk of lag on some devices, and it is recommended that you modify it." In response to triggering the jump control 334, the first space that exceeds the safety threshold is displayed.

[0172] Figure 16 shows a schematic diagram of a first space provided by an exemplary embodiment of the present application. A first virtual environment interface 350 displays a top-down view of the first space in the virtual environment. The minimum bounding rectangle of the first virtual item in the first space is outlined with dashed lines. This minimum bounding rectangle is obtained by partitioning the first space using a K-dimensional tree (KD Tree) and is used to indicate the density of the first virtual items in the first space. A second virtual environment interface 360 ​​displays an observation of the first space, with the first virtual items in the first space displayed in a three-dimensional perspective. A third virtual environment interface 370 displays a highlight marker 372 of the first space. The highlight marker is highlighted, also known as a hotspot. However, displaying the highlight marker in a filled pattern, flashing, or other manner is not excluded. For example, the schematic diagram of the first space displayed on the terminal may only display the first virtual item in the first space, without displaying the minimum bounding rectangle of the first virtual item outlined with dashed lines in Figure 16. This is not a limitation of this embodiment. In Figure 16, by displaying the first space, it is possible to quickly locate virtual spaces in the virtual environment that are at risk of not being rendered, guiding users to use the UGC editor to make targeted adjustments to the virtual environment. Exemplarily, the virtual environment is detected by triggering a detection control. If a first control has a rendering display risk, a jump control is displayed to provide a functional entry for displaying the first space. If no rendering display risk exists, a detection result text is displayed to indicate that no risk has been found.

[0173] In one implementation, the prompt message may be displayed in response to the amount of computing resources occupied by virtual items in the virtual environment reaching a preset threshold. For example, when customizing a virtual environment in a build interface, if the computing resources occupied by virtual items created in the virtual environment exceed the preset threshold, a determination is made as to whether the number of first virtual items in a first space of the virtual environment exceeds the threshold.

[0174] In one implementation, the prompt information is a prompt information displayed for the first space in response to a detection operation on the virtual environment. For example, the detection operation is a triggering operation of a detection tool control in the construction interface of the UGC editor. The detection tool control provides a functional entry for detecting rendering display risks of the virtual environment during the construction process of the virtual environment.

[0175] Exemplarily, the prompt information is prompt information indicating that the number of vertices of the collision body of the first virtual item in the first space exceeds a quantity threshold, and / or prompt information indicating that the data volume of the texture resource of the first virtual item exceeds a quantity threshold.

[0176] Furthermore, the prompt information also includes prompt information specific to global data within the virtual environment, such as the excessive number of virtual items in the aforementioned virtual environment, the excessive number of motion devices bound to virtual items for movement, and the excessive number of motion devices. As can be seen, the prompt information includes both global prompt information within the virtual environment and prompt information specific to the first space within the virtual environment, thereby providing prompts regarding rendering and display risks within the virtual environment at different spatial granularities.

[0177] In this example, the hotspot areas in Figure 16 represent voxel-based scene partitioning. By partitioning the virtual environment, each voxel block in the virtual environment is considered a sampling area. Each voxel block stores performance information for various factors, including at least one of the following parameters: the number of virtual items, the number of motion devices, the overlay of translucent materials, the overlay of hard-transparent materials, and collision bodies. The parameter information in each voxel is then used to calculate a resource usage score, resulting in a first space with rendering and display risks.

[0178] In the example, the parameter information in the voxels of the virtual environment may include rendering information, such as material information, and the material situation is predicted by ray sampling inside the voxel to facilitate the counting of the number of mesh and translucent materials in the scene. For example, the collection information counts the number of original facets inside the voxel to estimate the number of geometric facets on the same screen. The voxels of the virtual environment may include the density of collision bodies inside the voxel, which is used to find physically dense areas in the scene. The voxels of the virtual environment may also include the number of movable objects inside the voxel.

[0179] In one implementation, at least two levels of candidate collision bodies provided by the UGC editor are set during the offline editing phase. Taking two levels of candidate collision bodies as an example, FIG17 shows a schematic diagram of a method for setting collision bodies for virtual items provided by an exemplary embodiment of the present application. The first editing process 702 is used to instruct the first-level candidate collision body to be stored as complex collision data 702a. Specifically, the complex collision data 702a is used to indicate at least one of the bounding sphere set, bounding box set, capture set, convex hull set, and basic body set of the first-level candidate collision body. The second editing process 704 is used to instruct the second-level candidate collision body to be stored as simplified collision data 704a. Specifically, the simplified collision data 704a is used to indicate at least one of the bounding sphere simplified set, bounding box simplified set, capture simplified set, convex hull simplified set, and basic body simplified set of the second-level candidate collision body. The third editing process 706 is an editing process for the visualization GPU shader, and the collision visualization GPU shader 706a is generated through the editing process and saved to a storage device.

[0180] In the building interface provided by the UGC editor, through the interactive interface, any one of the at least two levels of candidate collision bodies provided by the UGC editor is selected through the setting operation 710, and the complex collision data 702a or the simplified collision data 704a corresponding to the setting operation 710 is displayed, and the collision visualization GPU shader 706a is called to display the collision body of the virtual object.

[0181] Illustratively, model collision configuration information 712 is used to store any one of the at least two levels of candidate collision bodies indicated by setting operation 710. Model collision configuration information 712 is used to determine whether collision visualization GPU shader 706a executes a collision visualization program based on complex collision data 702a or reduced collision data 704a. Illustratively, during the runtime phase of the virtual environment, data required for collision detection is determined to be initialized 722 based on model collision configuration information 712, and collision detection 724 is performed on the virtual scene based on complex collision data 702a or reduced collision data 704a.

[0182] FIG18 shows a flow chart of a method for setting a collision body of a virtual item provided by an exemplary embodiment of the present application. The method includes:

[0183] Step 752: The user interface sends the collision type to the data optimization model.

[0184] Exemplarily, the data optimization model is used to store the collision type of the virtual item, where the collision type is attribute information of the virtual item.

[0185] Step 754: The data optimization model modifies the collision type flag of the virtual item.

[0186] Exemplarily, the data optimization model modifies the collision type flag of the virtual item based on the collision type sent by the user interface (UI).

[0187] Step 756: The UGC editor performs a test run on the virtual environment.

[0188] Exemplarily, the UGC editor provides a trial play function for trial running the virtual environment.

[0189] Step 758: The UGC editor sends a start trial event to the data optimization model.

[0190] The UGC editor sends a start trial play event to the data optimization model, instructing the model to set the collision detection of the virtual item using the attribute information of the virtual item.

[0191] Step 760: The data optimization model uses the collision type flag of the virtual item.

[0192] Exemplarily, the data optimization model performs collision detection on virtual items in the virtual environment based on the collision type flag of the virtual items.

[0193] Step 762: The UGC editor ends the trial run on the virtual environment.

[0194] The UGC Editor stops the trial run of the virtual environment and ends the trial function.

[0195] Step 764: The UGC editor sends an end trial event to the data optimization model.

[0196] The UGC editor sends an end trial play event to the data optimization model, instructing the data optimization model to enter an editing state for the collision type flag of the virtual item.

[0197] Step 766: The data optimization model resets the collision type flag of the virtual item.

[0198] Exemplarily, the data optimization model stops performing collision detection on the virtual environment and resets the editing state of the collision type flag of the virtual item.

[0199] FIG19 shows a flow chart of a method for setting a collision body of a virtual item provided by an exemplary embodiment of the present application. The method includes:

[0200] Step 782: Determine whether there is a collision body.

[0201] Exemplarily, if there is no collision body, step 784 is executed; if there is a collision body, step 786 is executed.

[0202] Step 784: Create the virtual object in a collision-free manner.

[0203] Exemplarily, the virtual item is created in a collision-free manner, which indicates that no collision detection is performed on the virtual item.

[0204] Step 786: Get the collision type.

[0205] Exemplarily, the collision type includes a primitive collision mode and a simplified collision mode. Exemplarily, the primitive collision mode corresponds to a first-level candidate collision body, and the simplified collision mode corresponds to a second-level candidate collision body. Exemplarily, the collision type is determined by setting a field.

[0206] Step 788: Determine whether to create the virtual item in the original collision mode.

[0207] Exemplarily, whether to create the virtual item in the original collision mode is determined by the obtained collision type. Exemplarily, if the virtual item is created in the original collision mode, step 792 is executed; if the virtual item is not created in the original collision mode, step 790 is executed.

[0208] Step 790: Call the custom primitive to determine the collision body.

[0209] Exemplarily, the custom primitive is used to encapsulate minimalist collision data, and the minimalist collision corresponds to the custom primitive for collision in the mesh. Exemplarily, the custom primitive is called by setting the Use field of the custom primitive to Yes.

[0210] Step 792: Stop calling the custom primitive.

[0211] Exemplarily, complex collision corresponds to a primitive body in the mesh that collides, and calling the custom primitive body to determine the collision body is stopped. Exemplarily, stopping calling the custom primitive body is achieved by setting the use field of the custom primitive body to false.

[0212] In summary, the method provided in the embodiments of the present application expands the method for determining collision bodies for virtual items by providing at least two levels of candidate collision bodies with different computing resource usage for virtual items. By assigning at least two levels of candidate collision bodies to different numbers of vertices, the at least two levels of candidate collision bodies correspond to different computing resource usages. This adjusts the computing resource usage based on the different numbers of vertices, thereby achieving the goal of flexibly configuring collision bodies for terminals with different computing capabilities.

[0213] Those skilled in the art will appreciate that the above embodiments may be implemented independently, or the above embodiments may be freely combined to form new embodiments to implement the method for setting a collision body of a virtual item of the present application.

[0214] FIG20 shows a block diagram of a device for setting a collision body of a virtual item provided by an exemplary embodiment of the present application. The device runs a game program, which has a UGC editor. The UGC editor is used to customize the virtual environment. The device includes:

[0215] A display module 810 is configured to display a construction interface of the UGC editor, wherein the construction interface includes at least one virtual item for constructing a virtual environment, and the UGC editor provides at least two levels of candidate collision bodies for the virtual item;

[0216] An acquisition module 820 is configured to acquire a setting operation for the virtual item, wherein the setting operation is configured to instruct to determine a first candidate collision body among the at least two levels of candidate collision bodies as a collision body for the virtual item;

[0217] The display module 810 is further configured to display the collision body of the virtual item in response to the setting operation;

[0218] Among them, the number of vertices of the i-th level candidate collision body in the at least two levels of candidate collision bodies is a first number, the number of vertices of the i+1-th level candidate collision body in the at least two levels of candidate collision bodies is a second number, the first number is greater than the second number, and i is a positive integer less than the number of the candidate collision bodies.

[0219] In one implementation of the embodiment, the setting operation includes a first triggering operation on a first selection control and a second triggering operation on a collision body viewing control;

[0220] The display module 810 is further configured to:

[0221] In response to the first trigger operation, displaying the collision body viewing control of the virtual object, wherein the collision body viewing control is used to provide a functional entry for viewing the first candidate collision body corresponding to the first selection control;

[0222] In response to the second triggering operation on the collision volume viewing control, displaying the collision volume of the virtual item;

[0223] The building interface includes at least two candidate selection controls, the at least two candidate selection controls include the first selection control, and the at least two candidate selection controls correspond to the at least two levels of candidate collision bodies in a one-to-one manner.

[0224] In one implementation of the embodiment, the virtual item is an item created in the virtual environment; the display module 810 is further configured to:

[0225] In response to the setting operation, the collision volume is displayed superimposed on the virtual item in the virtual environment.

[0226] In one implementation of the embodiment, the virtual item is a candidate item provided by the building interface; the display module 810 is further configured to:

[0227] In response to the setting operation, an initial label of the virtual item is displayed as a first label, where the first label is used to indicate that the virtual item corresponds to the collision body.

[0228] In one implementation of the embodiment, the acquisition module 820 is further configured to create an environment building item in the virtual environment in response to acquiring a creation operation for the virtual item, wherein the environment building item is of the same type as the virtual item;

[0229] The display module 810 is further configured to display a collision body of the environment building item in response to obtaining a viewing operation on the environment building item.

[0230] In one implementation of the embodiment, the vertices of the collision body include at least one of the following:

[0231] The vertex position of the collision body belongs to a subset of the vertex position of the virtual object;

[0232] In a case where a first plane on which at least three vertices of the collision body are located passes through the virtual item, a maximum distance between a first vertex of the virtual item and the first plane is less than a first distance threshold, and the first vertex is located at any vertex on a first side of the first plane;

[0233] When a second plane where at least three vertices of the collision body are located does not pass through the virtual object, a minimum distance between a second vertex of the virtual object and the second plane is less than a second distance threshold, and the second vertex is any vertex on the virtual object;

[0234] The distance between any two vertices of the collision body is greater than a third distance threshold.

[0235] In one implementation of the embodiment, the collision body includes at least one of a cuboid collision body, a spherical collision body, and a polygonal facet;

[0236] In the case where the collision body includes the rectangular parallelepiped collision body, the vertices of the collision body include the vertices of the rectangular parallelepiped collision body;

[0237] In the case where the collision body includes the spherical collision body, the vertices of the collision body include vertices of the spherical collision body on the coordinate axes of a three-dimensional coordinate system, and the three-dimensional coordinate system is established with the center of the spherical collision body as the origin;

[0238] In the case where the surface of the collision body includes the polygonal patch, the vertices of the collision body include the vertices of the polygonal patch.

[0239] In one implementation of the embodiment, the acquisition module 820 is further configured to:

[0240] Acquire a combination operation for at least two virtual models, where the combination operation is used to instruct to group the at least two virtual models;

[0241] The display module 810 is further configured to:

[0242] In response to the combination operation, a building interface including the virtual item is displayed, where the virtual item is a combination obtained by grouping the at least two virtual models.

[0243] In one implementation of the embodiment, the collision body of the virtual item is a cuboid collision body, the vertices of the collision body are the vertices of the cuboid collision body, the bottom surface of the cuboid collision body is the minimum circumscribed rectangle of the projection of the virtual item in the vertical direction, and the height of the cuboid collision body is the height of the virtual item;

[0244] Alternatively, the vertices of the collision volume of the virtual object are vertices on the surface of a three-dimensional region formed by the collision volumes of at least the two virtual models.

[0245] In one implementation of the embodiment, the apparatus further includes:

[0246] The processing module 830 is configured to move the position of the virtual object in the virtual environment in response to a drag operation on the collision body.

[0247] In one implementation of the embodiment, the display module 810 is further configured to:

[0248] When the quantity of the first virtual items in the first space of the virtual environment exceeds a quantity threshold, prompt information is displayed, where the prompt information is warning information that the quantity of the first virtual items exceeds the quantity threshold.

[0249] In one implementation of the embodiment, the display module 810 is further configured to:

[0250] When the number of vertices of the collision body of the first virtual object exceeds the number threshold, displaying the prompt information;

[0251] or,

[0252] When the data volume of the texture resource of the first virtual item exceeds the quantity threshold, the prompt information is displayed.

[0253] In one implementation of the embodiment, the display mode of the prompt information includes at least one of the following:

[0254] Displayed with a highlighted mark in the first space;

[0255] Displayed as a pop-up window;

[0256] Displayed in bubble format;

[0257] Displayed as a pop-up message card.

[0258] It should be noted that the device provided in the above embodiment only uses the division of the above-mentioned functional modules as an example to implement its functions. In actual applications, the above-mentioned functions can be assigned to different functional modules according to actual needs, that is, the content structure of the device can be divided into different functional modules to complete all or part of the functions described above.

[0259] Regarding the device in the above embodiment, the specific manner in which each module performs operations has been described in detail in the embodiment of the method; the technical effects achieved by each module performing operations are the same as the technical effects in the embodiment of the method, and will not be elaborated here.

[0260] An embodiment of the present application further provides a computer device comprising: a processor and a memory, wherein a computer program is stored in the memory; the processor is configured to execute the computer program in the memory to implement the method for setting a collision body of a virtual item provided in the above-mentioned method embodiments.

[0261] FIG21 shows a block diagram of a terminal structure provided by an exemplary embodiment of the present application. Terminal 1900 may be a smartphone, tablet computer, MP3 player (Moving Picture Experts Group Audio Layer III), MP4 player (Moving Picture Experts Group Audio Layer IV), laptop computer, or desktop computer. Terminal 1900 may also be referred to as user equipment, portable terminal, laptop terminal, desktop terminal, or other similar names.

[0262] Typically, terminal 1900 includes: a processor 1901 and a memory 1902. Processor 1901 may include one or more processing cores, such as a quad-core processor or an octa-core processor. Processor 1901 may be implemented in at least one of the following hardware forms: a DSP (Digital Signal Processing), an FPGA (Field-Programmable Gate Array), or a PLA (Programmable Logic Array). Processor 1901 may also include a main processor and a coprocessor. The main processor is a processor for processing data in the awake state, also known as a CPU (Central Processing Unit); the coprocessor is a low-power processor for processing data in the standby state. In some embodiments, processor 1901 may be integrated with a GPU (Graphics Processing Unit), which is responsible for rendering and drawing the content required to be displayed on the display screen. In some embodiments, processor 1901 may also include an AI (Artificial Intelligence) processor, which is responsible for processing computing operations related to machine learning.

[0263] Memory 1902 may include one or more computer-readable storage media, which may be non-transitory. Memory 1902 may also include high-speed random access memory and non-volatile memory, such as one or more disk storage devices and flash memory storage devices. In some embodiments, the non-transitory computer-readable storage medium in memory 1902 is used to store at least one instruction, which is used to be executed by processor 1901 to implement the method for setting the collision body of the virtual item provided in the method embodiment of the present application.

[0264] In some embodiments, terminal 1900 further includes a peripheral device interface 1903 and at least one peripheral device. The processor 1901, memory 1902, and peripheral device interface 1903 may be connected via a bus or signal lines. Each peripheral device may be connected to peripheral device interface 1903 via a bus, signal lines, or circuit boards. Specifically, the peripheral device includes at least one of a radio frequency circuit 1904, a touchscreen display 1905, a camera assembly 1906, an audio circuit 1907, and a power supply 1908.

[0265] In some embodiments, the terminal 1900 further includes one or more sensors 1909 . The one or more sensors 1909 include, but are not limited to, an acceleration sensor 1910 , a gyroscope sensor 1911 , a pressure sensor 1912 , an optical sensor 1913 , and a proximity sensor 1914 .

[0266] Those skilled in the art will appreciate that the above structure does not limit the terminal 1900 , and the terminal 1900 may include more or fewer components than shown in the figure, or combine certain components, or adopt a different component arrangement.

[0267] In an exemplary embodiment, a chip is further provided. The chip includes a programmable logic circuit and / or program instructions. When the chip runs on a computer device, it is used to implement the method for setting the collision body of the virtual item described in the above aspects.

[0268] In an exemplary embodiment, a computer program product is also provided, comprising computer-readable instructions stored in a computer-readable storage medium. A processor of a computer device reads the computer-readable instructions from the computer-readable storage medium and executes the instructions to implement the method for setting a collision volume for a virtual item provided in each of the above method embodiments.

[0269] In an exemplary embodiment, a computer-readable storage medium is further provided, in which a computer program is stored. The computer program is loaded and executed by a processor to implement the method for setting a collision body of a virtual item provided in the above-mentioned method embodiments.

[0270] Those skilled in the art will understand that all or part of the steps to implement the above embodiments may be accomplished by hardware, or by a program to instruct the relevant hardware, and the program may be stored in a computer-readable storage medium, which may be a read-only memory, a disk, or an optical disk, etc.

[0271] Those skilled in the art will appreciate that in one or more of the above examples, the functions described in the embodiments of the present application can be implemented using hardware, software, firmware, or any combination thereof. When implemented using software, these functions can be stored in a computer-readable medium or transmitted as one or more instructions or codes on a computer-readable medium. Computer-readable media include computer storage media and communication media, wherein communication media include any media that facilitates the transmission of computer programs from one place to another. The storage medium can be any available medium that can be accessed by a general-purpose or special-purpose computer.

[0272] The above descriptions are merely some embodiments of the present application and are not intended to limit the present application. Any modifications, equivalent replacements, improvements, etc. made within the spirit and principles of the present application shall be included in the scope of protection of the present application.

Claims

1. A method for setting a collision body of a virtual item, the method being executed by a terminal, the terminal running a game program, the game program having a UGC editor, the UGC editor being used at least for customizing a virtual environment, the method comprising: Displaying a construction interface of the UGC editor, wherein the construction interface includes at least one virtual item for building a virtual environment, and the UGC editor provides at least two levels of candidate collision bodies for the virtual item; Acquire a setting operation for the virtual item, the setting operation being used to instruct to determine a first candidate collision body among the at least two levels of candidate collision bodies as a collision body of the virtual item; In response to the setting operation, displaying the collision volume of the virtual item; Among them, the number of vertices of the i-th level candidate collision body in the at least two levels of candidate collision bodies is a first number, the number of vertices of the i+1-th level candidate collision body in the at least two levels of candidate collision bodies is a second number, the first number is greater than the second number, and i is a positive integer less than the number of the candidate collision bodies.

2. The method according to claim 1, wherein: The setting operation includes a first trigger operation for a first selection control and a second trigger operation for a collision body viewing control; In response to the setting operation, displaying the collision body of the virtual item includes: In response to the first trigger operation, displaying the collision body viewing control of the virtual object, wherein the collision body viewing control is used to provide a functional entry for viewing the first candidate collision body corresponding to the first selection control; In response to the second trigger operation on the collision volume viewing control, displaying the collision volume of the virtual item; The building interface includes at least two candidate selection controls, the at least two candidate selection controls include the first selection control, and the at least two candidate selection controls correspond to the at least two levels of candidate collision bodies in a one-to-one manner.

3. The method according to claim 1 or 2, wherein: The virtual item is an item created in the virtual environment; the collision body displaying the virtual item includes: The collision volume is displayed superimposed on the virtual object in the virtual environment.

4. The method according to claim 1 or 2, wherein: The virtual item is a candidate item provided by the building interface; the collision body displaying the virtual item includes: An initial label for displaying the virtual item is a first label, and the first label is used to indicate that the virtual item corresponds to the collision body.

5. The method according to claim 4, wherein: The method further comprises: In response to obtaining a creation operation for the virtual item, creating an environment building item in the virtual environment, the environment building item and the virtual item being of the same type; In response to obtaining a viewing operation on the environment building item, a collision body of the environment building item is displayed.

6. The method according to any one of claims 1 to 5, wherein: The vertices of the collision body include at least one of the following: The vertex position of the collision body belongs to a subset of the vertex position of the virtual object; In the case where a first plane where at least three vertices of the collision body are located passes through the virtual object, a maximum distance between a first vertex of the virtual object and the first plane is less than a first distance threshold, and the first vertex is located at any vertex on a first side of the first plane; When the second plane where at least three vertices of the collision body are located does not pass through the virtual object, the minimum distance between the second vertex of the virtual object and the second plane is less than a second distance threshold, and the second vertex is any vertex on the virtual object; The distance between any two vertices of the collision body is greater than a third distance threshold.

7. The method according to any one of claims 1 to 5, wherein: The collision body includes at least one of a cuboid collision body, a spherical collision body, and a polygonal face; In the case where the collision body includes the rectangular parallelepiped collision body, the vertices of the collision body include the vertices of the rectangular parallelepiped collision body; In the case where the collision body includes the spherical collision body, the vertices of the collision body include vertices of the spherical collision body on the coordinate axes of a three-dimensional coordinate system, and the three-dimensional coordinate system is established with the center of the spherical collision body as the origin; In the case where the surface of the collision body includes the polygonal patch, the vertices of the collision body include the vertices of the polygonal patch.

8. The method according to any one of claims 1 to 5, wherein: The method further comprises: Acquire a combination operation for at least two virtual models, where the combination operation is used to instruct to group the at least two virtual models; The display of the UGC editor construction interface includes: In response to the combination operation, a building interface including the virtual item is displayed, where the virtual item is a combination of the at least two virtual models.

9. The method according to claim 8, wherein: The collision body of the virtual object is a cuboid collision body, the vertices of the collision body are the vertices of the cuboid collision body, the bottom surface of the cuboid collision body is the minimum circumscribed rectangle of the projection of the virtual object in the vertical direction, and the height of the cuboid collision body is the height of the virtual object; Alternatively, the vertices of the collision volume of the virtual object are vertices on the surface of a three-dimensional region formed by the collision volumes of the at least two virtual models.

10. The method according to any one of claims 1 to 5, wherein: The method further comprises: In response to a drag operation on the collision volume, the position of the virtual object in the virtual environment is moved.

11. The method according to any one of claims 1 to 5, wherein: The method further comprises: When the quantity of the first virtual items in the first space of the virtual environment exceeds a quantity threshold, prompt information is displayed, where the prompt information is warning information that the quantity of the first virtual items exceeds the quantity threshold.

12. The method according to claim 11, wherein: When the quantity of the first virtual items in the first space of the virtual environment exceeds the quantity threshold, displaying prompt information includes: When the number of vertices of the collision body of the first virtual object exceeds the number threshold, displaying the prompt information; or, When the data volume of the texture resource of the first virtual item exceeds the quantity threshold, the prompt information is displayed.

13. The method according to claim 11, wherein: The display mode of the prompt information includes at least one of the following: Displaying with a highlighted mark of the first space; Display in pop-up window; Displayed as bubbles; Displayed as a pop-up message card.

14. A device for setting a collision body of a virtual object, wherein: The device runs a game program, the game program has a UGC editor, and the UGC editor is at least used for customizing and creating a virtual environment. The device includes: A display module, used for displaying a construction interface of the UGC editor, wherein the construction interface includes at least one virtual item for building a virtual environment, and the UGC editor provides at least two levels of candidate collision bodies for the virtual item; An acquisition module, configured to acquire a setting operation for the virtual item, wherein the setting operation is used to instruct to determine a first candidate collision body among the at least two levels of candidate collision bodies as a collision body of the virtual item; The display module is further configured to display the collision body of the virtual item in response to the setting operation; Among them, the number of vertices of the i-th level candidate collision body in the at least two levels of candidate collision bodies is a first number, the number of vertices of the i+1-th level candidate collision body in the at least two levels of candidate collision bodies is a second number, the first number is greater than the second number, and i is a positive integer less than the number of the candidate collision bodies.

15. A computer device, wherein: The computer device includes: a processor and a memory, wherein the memory stores at least one program; the processor is used to execute the at least one program in the memory to implement the method for setting the collision body of the virtual item as described in any one of claims 1 to 13.

16. A computer-readable storage medium, wherein: The readable storage medium stores executable instructions, and the executable instructions are loaded and executed by a processor to implement the method for setting a collision body of a virtual item as described in any one of claims 1 to 13.

17. A computer program product, wherein: The computer program product includes computer-readable instructions, which are stored in a computer-readable storage medium. The processor reads and executes the computer-readable instructions from the computer-readable storage medium to implement the method for setting the collision body of the virtual item as described in any one of claims 1 to 13.

Citation Information

Patent Citations

  • Implementation method of unreal engine real-time collision generation assembly

    CN115982967A

  • Method and device for setting collision volume of virtual article, equipment and storage medium

    CN117180754A

  • Systems and Methods for Improved Collision Detection in Video Games

    US20220203237A1