Search

US-20260124542-A1 - COLLISION BODY CONFIGURATION FOR VIRTUAL ITEM

US20260124542A1US 20260124542 A1US20260124542 A1US 20260124542A1US-20260124542-A1

Abstract

In a collision body setting method of a virtual item, a construction interface of a user generated content (UGC) editor is output for display. The construction interface includes a virtual item construction element of a virtual item to be constructed in a virtual environment. The UGC editor is configured to generate at least two levels of candidate collision bodies for the virtual item. A setting operation that indicates a first level of candidate collision body among the at least two levels of candidate collision bodies to be associated with a collision body of the virtual item is obtained. The collision body of the virtual item is output for display based on the setting operation.

Inventors

  • Huiying LIN
  • Bing Liu
  • Zhenyu Li

Assignees

  • TENCENT TECHNOLOGY (SHENZHEN) COMPANY LIMITED

Dates

Publication Date
20260507
Application Date
20260105
Priority Date
20230912

Claims (20)

  1. 1 . A collision body setting method of a virtual item, the method comprising: outputting for display, by processing circuitry, a construction interface of a user generated content (UGC) editor, the construction interface including a virtual item construction element of a virtual item to be constructed in a virtual environment, the UGC editor generating at least two levels of candidate collision bodies for the virtual item; obtaining a setting operation that indicates a first level of candidate collision body among the at least two levels of candidate collision bodies to be associated with a collision body of the virtual item; and outputting for display the collision body of the virtual item based on the setting operation, wherein a quantity of vertices of an i th -level candidate collision body of the at least two levels of candidate collision bodies is a first quantity, a quantity of vertices of an (i+1) th -level candidate collision body of the at least two levels of candidate collision bodies is a second quantity, and the first quantity is greater than the second quantity, i being a positive integer smaller than a total quantity of the candidate collision bodies.
  2. 2 . The method according to claim 1 , wherein the obtaining the setting operation comprises: receiving a first trigger operation performed on a first selection control element of the construction interface; and receiving a second trigger operation performed on a collision body viewing control element of the construction interface, wherein the construction interface includes (i) the first selection control element corresponding to a first level of candidate collision body of the at least two levels of candidate collision bodies, and (ii) a second selection control element corresponding to a second level of candidate collision body of the at least two levels of candidate collision bodies.
  3. 3 . The method according to claim 1 , wherein the outputting for display the collision body of the virtual item comprises: outputting for display the collision body with the virtual item in the virtual environment.
  4. 4 . The method according to claim 1 , wherein the virtual item is a candidate item generated via the construction interface, and the outputting for display the collision body of the virtual item comprises: outputting for display an initial label of the virtual item, the initial label indicating the virtual item corresponds to the collision body.
  5. 5 . The method according to claim 1 , further comprising: adding the virtual item to the virtual environment based on a creation operation performed on the virtual item construction element in the construction interface; and outputting for display, based on a viewing operation performed on the virtual item added to the virtual environment, the collision body of the virtual item.
  6. 6 . The method according to claim 1 , wherein vertex positions of the collision body include a subset of vertex positions of the virtual item.
  7. 7 . The method according to claim 1 , wherein the collision body includes at least one of a cuboid collision body, a spherical collision body, and a polygonal surface patch; when the collision body includes the cuboid collision body, vertices of the collision body include vertices of the cuboid collision body; when the collision body includes the spherical collision body, vertices of the collision body include vertices of the spherical collision body on coordinate axes of a three-dimensional coordinate system, an origin of the three-dimensional coordinate system being a center of the spherical collision body; and when a surface of the collision body includes the polygonal surface patch, vertices of the collision body include vertices of the polygonal surface patch.
  8. 8 . The method according to claim 5 , further comprising: obtaining a combination operation performed on at least two virtual models, the combination operation indicating that the at least two virtual models are grouped; and outputting for display, based on the combination operation, a combined virtual item construction element of a combined virtual item obtained by grouping the at least two virtual models.
  9. 9 . The method according to claim 8 , wherein the combined virtual item is associated with a cuboid collision body, a bottom surface of the cuboid collision body being a minimum bounding rectangle of a projection of the combined virtual item in a vertical direction, and a height of the cuboid collision body being a height of the combined virtual item.
  10. 10 . The method according to claim 8 , wherein vertices of the collision body of the combined virtual item are vertices on a surface of a three-dimensional region formed by collision bodies of the at least two virtual models.
  11. 11 . The method according to claim 5 , further comprising: changing a position of the virtual item added to the virtual environment based on a dragging operation performed on the collision body of the virtual item.
  12. 12 . The method according to claim 5 , further comprising: outputting for display notification information based on a quantity of a plurality of virtual items in a first space of the virtual environment exceeding a quantity threshold, the notification information indicating that the quantity of virtual items exceeds the quantity threshold.
  13. 13 . The method according to claim 12 , wherein the outputting for display the notification information comprises: outputting for display the notification information based on a quantity of vertices of collision bodies respectively associated with the plurality of virtual items exceeding the quantity threshold; or outputting for display the notification information based on a data volume of texture resources of the plurality of virtual items exceeding the quantity threshold.
  14. 14 . An information processing apparatus, comprising: processing circuitry configured to: output for display a construction interface of a user generated content (UGC) editor, the construction interface including a virtual item construction element of a virtual item to be constructed in a virtual environment, the UGC editor being configured to generate at least two levels of candidate collision bodies for the virtual item; obtain a setting operation that indicates a first level of candidate collision body among the at least two levels of candidate collision bodies to be associated with a collision body of the virtual item; and output for display the collision body of the virtual item based on the setting operation, wherein a quantity of vertices of an i th -level candidate collision body of the at least two levels of candidate collision bodies is a first quantity, a quantity of vertices of an (i+1) th -level candidate collision body of the at least two levels of candidate collision bodies is a second quantity, and the first quantity is greater than the second quantity, i being a positive integer smaller than a total quantity of the candidate collision bodies.
  15. 15 . The apparatus according to claim 14 , wherein the processing circuitry is configured to: receive a first trigger operation performed on a first selection control element of the construction interface; and receive a second trigger operation performed on a collision body viewing control element of the construction interface, wherein the construction interface includes (i) the first selection control element corresponding to a first level of candidate collision body of the at least two levels of candidate collision bodies, and (ii) a second selection control element corresponding to a second level of candidate collision body of the at least two levels of candidate collision bodies.
  16. 16 . The apparatus according to claim 14 , wherein the processing circuitry is configured to: output for display the collision body with the virtual item in the virtual environment.
  17. 17 . The apparatus according to claim 14 , wherein the virtual item is a candidate item generated via the construction interface, and the processing circuitry is configured to: output for display an initial label of the virtual item, the initial label indicating the virtual item corresponds to the collision body.
  18. 18 . The apparatus according to claim 14 , wherein the processing circuitry is configured to: add the virtual item to the virtual environment based on a creation operation performed on the virtual item construction element in the construction interface; and output for display, based on a viewing operation performed on the virtual item added to the virtual environment, the collision body of the virtual item.
  19. 19 . The apparatus according to claim 14 , wherein vertex positions of the collision body include a subset of vertex positions of the virtual item.
  20. 20 . A non-transitory computer-readable storage medium storing instructions which, when executed by a processor, cause the processor to perform: outputting for display a construction interface of a user generated content (UGC) editor, the construction interface including a virtual item construction element of a virtual item to be constructed in a virtual environment, the UGC editor generating at least two levels of candidate collision bodies for the virtual item; obtaining a setting operation that indicates a first level of candidate collision body among the at least two levels of candidate collision bodies to be associated with a collision body of the virtual item; and outputting for display the collision body of the virtual item based on the setting operation, wherein a quantity of vertices of an i th -level candidate collision body of the at least two levels of candidate collision bodies is a first quantity, a quantity of vertices of an (i+1) th -level candidate collision body of the at least two levels of candidate collision bodies is a second quantity, and the first quantity is greater than the second quantity, i being a positive integer smaller than a total quantity of the candidate collision bodies.

Description

RELATED APPLICATIONS The present application is a continuation of International Application No. PCT/CN2024/117900, filed on September 10, 2024, which claims priority to Chinese Patent Application No. 202311177022.0, filed on September 12, 2023. The entire disclosures of the prior applications are hereby incorporated by reference. FIELD OF THE TECHNOLOGY This application relates to the field of computer technologies, including a collision body setting method of a virtual item. BACKGROUND OF THE DISCLOSURE Collision detection is used to detect whether a plurality of virtual items in a virtual environment intersect with each other. In related art, a collision body refers to a region of a virtual item in a virtual environment that participates in collision detection. The collision body of the virtual item is created according to a three-dimensional shape of the virtual item, whereby a physical collision in the real world is simulated for the virtual item in the virtual environment. However, the foregoing manner for setting a collision body is relatively simple. SUMMARY Aspects of this disclosure provide a method for setting a collision body of a virtual item, an information processing apparatus, and a non-transitory computer-readable storage medium. Examples of technical solutions of this disclosure may be implemented as follows: An aspect of this disclosure provides a collision body setting method of a virtual item. In the method, a construction interface of a user generated content (UGC) editor is output for display. The construction interface includes a virtual item construction element of a virtual item to be constructed in a virtual environment. The UGC editor generates at least two levels of candidate collision bodies for the virtual item. A setting operation that indicates a first level of candidate collision body among the at least two levels of candidate collision bodies to be associated with a collision body of the virtual item is obtained. The collision body of the virtual item is output for display based on the setting operation. A quantity of vertices of an ith-level candidate collision body of the at least two levels of candidate collision bodies is a first quantity. A quantity of vertices of an (i+1)th-level candidate collision body of the at least two levels of candidate collision bodies is a second quantity. The first quantity is greater than the second quantity, i being a positive integer smaller than a total quantity of the candidate collision bodies. An aspect of this disclosure provides an information processing apparatus. The apparatus includes processing circuitry configured to output for display a construction interface of a user generated content (UGC) editor. The construction interface includes a virtual item construction element of a virtual item to be constructed in a virtual environment. The UGC editor is configured to generate at least two levels of candidate collision bodies for the virtual item. The processing circuitry is configured to obtain a setting operation that indicates a first level of candidate collision body among the at least two levels of candidate collision bodies to be associated with a collision body of the virtual item. The processing circuitry is configured to output for display the collision body of the virtual item based on the setting operation. A quantity of vertices of an ith-level candidate collision body of the at least two levels of candidate collision bodies is a first quantity. A quantity of vertices of an (i+1)th-level candidate collision body of the at least two levels of candidate collision bodies is a second quantity. The first quantity is greater than the second quantity, i being a positive integer smaller than a total quantity of the candidate collision bodies. An aspect of this disclosure provides a collision body setting method of a virtual item. The method is performed by a terminal, the terminal runs a game program, the game program has a user-generated content (UGC) editor, and the UGC editor is at least configured to enable creation of a user-defined virtual environment. The method includes: displaying a construction interface of the UGC editor, the construction interface including at least one virtual item configured for constructing a virtual environment, and the UGC editor providing at least two levels of candidate collision bodies for the virtual item; obtaining a setting operation for the virtual item, the setting operation being configured for indicating that a first candidate collision body in the at least two levels of candidate collision bodies is determined as a collision body of the virtual item; and displaying the collision body of the virtual item in response to the setting operation, a quantity of vertexes of an ith-level candidate collision body in the at least two levels of candidate collision bodies being a first quantity, a quantity of vertexes of an (i+1)th-level candidate collision body in the at least two levels of cand