A virtual component adjustment method and device, computer equipment and storage medium

By generating reference components in the game editing scene and performing movement and snapping operations, the problem of low efficiency in adjusting the position of virtual components is solved, and fast and efficient component placement is achieved.

CN117771678BActive Publication Date: 2026-07-28NETEASE (HANGZHOU) NETWORK CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
NETEASE (HANGZHOU) NETWORK CO LTD
Filing Date
2023-12-14
Publication Date
2026-07-28

AI Technical Summary

Technical Problem

During the game scene creation process, players need to adjust the position of virtual components multiple times to achieve proper placement, resulting in low placement efficiency.

Method used

By displaying a graphical user interface, a reference component is generated and its parameters are configured according to the distance parameter. The component can be moved and snapped in response to user operations, enabling rapid adjustment of the virtual component.

Benefits of technology

It improves the adjustment efficiency of virtual components, reduces the number of user operations, and increases placement efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117771678B_ABST
    Figure CN117771678B_ABST
Patent Text Reader

Abstract

This application discloses a method, apparatus, computer device, and storage medium for adjusting virtual components. This solution displays a graphical user interface including at least two virtual components. When a distance copying trigger operation is detected for the two virtual components, a reference component can be displayed between them. The width of the reference component corresponds to the distance between the two virtual components. Then, when a movement operation is detected for the reference component, the reference component is controlled to move. After moving, one side of the reference component becomes adjacent to a first target virtual component among the at least two virtual components. In response to the presence of a second target virtual component meeting the adsorption conditions on the other side of the reference component, the second target virtual component is adsorbed onto the other side of the reference component. This achieves rapid and accurate adjustment of the distance between virtual components, thereby improving the adjustment efficiency of virtual components.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of computer technology, specifically to a method, apparatus, computer device, and storage medium for adjusting virtual components. Background Technology

[0002] With the development of the internet, a large number of different types of games have emerged to meet users' daily entertainment needs.

[0003] In some games, players can create their own game scene based on their needs. For example, in parkour games, players can build parkour maps.

[0004] In related technologies, when creating a game scene, players select object components provided in the game and then place them one by one. However, when placing each object component, players need to adjust the positions between them, often requiring multiple adjustments to place the components in the correct positions, thus affecting the efficiency of object placement. Summary of the Invention

[0005] This application provides a method, apparatus, computer device, and storage medium for adjusting virtual components, which can improve the adjustment efficiency of virtual components.

[0006] This application provides a method for adjusting a virtual component, including:

[0007] The graphical user interface is displayed, which includes a game editing scene, and the game editing scene includes at least two virtual components;

[0008] In response to a first triggering operation, a reference component is generated based on the distance parameter corresponding to the virtual component corresponding to the first triggering operation, and the reference component is configured with a reference parameter corresponding to the distance parameter;

[0009] In response to a movement operation on the reference component, the reference component is controlled to move, and one side of the moved reference component is adjacent to a first target virtual component among the at least two virtual components;

[0010] In response to the presence of a second target virtual component that meets the adsorption conditions on the other side of the reference component, the second target virtual component is adsorbed to the other side of the reference component.

[0011] Accordingly, embodiments of this application also provide a device for adjusting virtual components, including:

[0012] A display unit is used to display a graphical user interface, the graphical user interface including a game editing scene, the game editing scene including at least two virtual components;

[0013] The first generation unit is configured to, in response to a first triggering operation, generate a reference component based on a distance parameter corresponding to a virtual component corresponding to the first triggering operation, wherein the reference component is configured with a reference parameter corresponding to the distance parameter;

[0014] A control unit is configured to control the reference component to move in response to a movement operation on the reference component, such that one side of the moved reference component is adjacent to a first target virtual component among the at least two virtual components.

[0015] An adsorption unit is configured to adsorb the second target virtual component to the other side of the reference component in response to the presence of a second target virtual component that meets the adsorption conditions on the other side of the reference component.

[0016] Accordingly, this application also provides a computer device, including a memory, a processor, and a computer program stored on the memory and executable on the processor, wherein the processor executes an adjustment method for any of the virtual components provided in this application.

[0017] Accordingly, embodiments of this application also provide a computer-readable storage medium storing multiple instructions adapted for loading by a processor to execute the above-described method for adjusting virtual components.

[0018] This application embodiment displays a graphical user interface including at least two virtual components. When a distance copy trigger operation is detected for the two virtual components, a reference component can be displayed between the two virtual components corresponding to the distance copy trigger operation. The width of the reference component corresponds to the distance between the two virtual components. Then, when a movement operation is detected for the reference component, the reference component is controlled to move. After the movement, one side of the reference component is adjacent to a first target virtual component among the at least two virtual components. In response to the existence of a second target virtual component that meets the adsorption conditions on the other side of the reference component, the second target virtual component is adsorbed to the other side of the reference component. This achieves fast and accurate adjustment of the distance between the virtual components, thereby improving the adjustment efficiency of the virtual components. Attached Figure Description

[0019] To more clearly illustrate the technical solutions in the embodiments of this application, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0020] Figure 1 This is a schematic diagram of a virtual component adjustment system provided in an embodiment of this application.

[0021] Figure 2 This is a flowchart illustrating a method for adjusting a virtual component as provided in an embodiment of this application.

[0022] Figure 3 This is a schematic diagram illustrating an application scenario of a virtual component adjustment method provided in an embodiment of this application.

[0023] Figure 4 This is a schematic diagram illustrating an application scenario of another method for adjusting virtual components provided in this application embodiment.

[0024] Figure 5 This is a schematic diagram illustrating an application scenario of another method for adjusting virtual components provided in this application embodiment.

[0025] Figure 6 This is a schematic diagram illustrating an application scenario of another method for adjusting virtual components provided in this application embodiment.

[0026] Figure 7 This is a schematic diagram illustrating an application scenario of another method for adjusting virtual components provided in this application embodiment.

[0027] Figure 8 This is a schematic diagram illustrating an application scenario of another method for adjusting virtual components provided in this application embodiment.

[0028] Figure 9 This is a schematic diagram illustrating an application scenario of another method for adjusting virtual components provided in this application embodiment.

[0029] Figure 10 This is a schematic diagram illustrating an application scenario of another method for adjusting virtual components provided in this application embodiment.

[0030] Figure 11 This is a schematic diagram illustrating an application scenario of another method for adjusting virtual components provided in this application embodiment.

[0031] Figure 12 This is a schematic diagram illustrating an application scenario of another method for adjusting virtual components provided in this application embodiment.

[0032] Figure 13 This is a schematic diagram illustrating an application scenario of another method for adjusting virtual components provided in this application embodiment.

[0033] Figure 14 This is a schematic diagram illustrating an application scenario of another method for adjusting virtual components provided in this application embodiment.

[0034] Figure 15 This is a schematic diagram illustrating an application scenario of another method for adjusting virtual components provided in this application embodiment.

[0035] Figure 16This is a schematic diagram illustrating an application scenario of another method for adjusting virtual components provided in this application embodiment.

[0036] Figure 17 This is a schematic diagram illustrating an application scenario of another method for adjusting virtual components provided in this application embodiment.

[0037] Figure 18 This is a schematic diagram illustrating an application scenario of another method for adjusting virtual components provided in this application embodiment.

[0038] Figure 19 This is a schematic diagram illustrating an application scenario of another method for adjusting virtual components provided in this application embodiment.

[0039] Figure 20 This is a schematic diagram illustrating an application scenario of another method for adjusting virtual components provided in this application embodiment.

[0040] Figure 21 This is a schematic diagram illustrating an application scenario of another method for adjusting virtual components provided in this application embodiment.

[0041] Figure 22 This is a schematic diagram illustrating an application scenario of another method for adjusting virtual components provided in this application embodiment.

[0042] Figure 23 This is a structural block diagram of a virtual component adjustment device provided in an embodiment of this application.

[0043] Figure 24 A schematic diagram of the structure of a computer device provided in an embodiment of this application. Detailed Implementation

[0044] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only a part of the embodiments of this application, and not all of the embodiments. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.

[0045] This application provides a method, apparatus, storage medium, and computer device for adjusting virtual components. Specifically, the method for adjusting virtual components in this application can be executed by a computer device, which can be a terminal or a server. The terminal can be a smartphone, tablet, laptop, touchscreen, game console, personal computer (PC), personal digital assistant (PDA), or other terminal device. The terminal can also include a client, which can be a game application client, a browser client carrying a game program, or an instant messaging client. The server can be an independent physical server, a server cluster or distributed system composed of multiple physical servers, or a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communication, middleware services, domain name services, security services, CDN (Content Delivery Network), and big data and artificial intelligence platforms.

[0046] For example, when the adjustment method of the virtual component is run on a terminal, the terminal device stores a game application and uses it to render a virtual scene in the game screen. The terminal device is used to interact with the user through a graphical user interface, such as by downloading, installing, and running the game application. The terminal device can provide the graphical user interface to the user in various ways, such as rendering it on the terminal device's display screen or presenting the graphical user interface through holographic projection. For example, the terminal device can include a touch screen and a processor. The touch screen is used to present the graphical user interface and receive operation commands generated by the user acting on the graphical user interface, which includes game screens. The processor is used to run the game, generate the graphical user interface, respond to operation commands, and control the display of the graphical user interface on the touch screen.

[0047] For example, when the adjustment method of the virtual component runs on a server, it can be cloud gaming. Cloud gaming refers to a gaming method based on cloud computing. In the cloud gaming operating mode, the main body running the game application and the main body displaying the game screen are separated. The storage and operation of the virtual component's adjustment method are completed on the cloud gaming server. The game screen display is completed on the cloud gaming client. The cloud gaming client is mainly used for receiving and sending game data and displaying the game screen. For example, the cloud gaming client can be a display device with data transmission capabilities close to the user, such as a mobile terminal, television, computer, PDA, personal digital assistant, etc., but the terminal device for processing game data is the cloud gaming server in the cloud. When playing the game, the user operates the cloud gaming client to send operation commands to the cloud gaming server. The cloud gaming server runs the game according to the operation commands, encodes and compresses the game screen and other data, returns it to the cloud gaming client through the network, and finally, the cloud gaming client decodes and outputs the game screen.

[0048] Please see Figure 1 , Figure 1 This is a schematic diagram of a virtual component adjustment system provided in an embodiment of this application. The system may include at least one terminal, at least one server, at least one database, and a network. The user's terminal can connect to servers of different games via the network. The terminal is any device with computing hardware capable of supporting and executing software products corresponding to the game. Additionally, the terminal has one or more multi-touch screens for sensing and obtaining input from touch or swipe operations performed by the user at multiple points on one or more touch displays. Furthermore, when the system includes multiple terminals, multiple servers, and multiple networks, different terminals can connect to each other through different networks and different servers. The network can be a wireless network or a wired network, such as a wireless local area network (WLAN), local area network (LAN), cellular network, 2G network, 3G network, 4G network, 5G network, etc. Additionally, different terminals 1000 can also connect to other terminals or servers using their own Bluetooth networks or hotspot networks. For example, multiple users can connect online through different terminals via appropriate networks and synchronize with each other to support multiplayer games. In addition, the system can include multiple databases coupled to different servers, and can continuously store information related to the game environment in the databases as different users play multiplayer games online.

[0049] This application provides a method for adjusting virtual components, which can be executed by a terminal or a server. This application example illustrates the method by which a virtual component is adjusted by a terminal. The terminal includes a touchscreen display and a processor. The touchscreen display is used to present a graphical user interface (GUI) and receive operation commands generated by the user interacting with the GUI. When the user operates the GUI through the touchscreen display, the GUI can control local content on the terminal in response to the received operation commands, or it can control content on a peer server in response to the received operation commands. For example, the operation commands generated by the user interacting with the GUI may include commands to launch a game application. The processor is configured to launch the game application after receiving the user's command to launch the game application. Furthermore, the processor is configured to render and draw the GUI associated with the game on the touchscreen display. The touchscreen display is a multi-touch sensitive screen capable of sensing touch or swipe operations performed simultaneously by multiple points on the screen. When the user performs touch operations on the GUI using their finger, the GUI, upon detecting the touch operation, controls different virtual objects in the game to perform actions corresponding to the touch operation. For example, the game can be any of the following: casual game, action game, role-playing game, strategy game, sports game, puzzle game, etc. The game may include a virtual environment. Furthermore, the virtual environment may include one or more virtual objects, such as virtual characters, controlled by the user (or player). Additionally, the virtual environment may include one or more obstacles, such as railings, ditches, walls, etc., to restrict the movement of virtual objects, for example, limiting the movement of one or more objects to a specific area within the virtual environment. Optionally, the virtual environment may also include one or more elements, such as skills, scores, character health status, energy, etc., to provide assistance to the player, offer virtual services, increase scores related to player performance, etc. Furthermore, the graphical user interface may present one or more indicators to provide guidance information to the player. For example, the game may include virtual objects controlled by the player and one or more other virtual objects (such as enemy characters). In one embodiment, one or more other virtual objects are controlled by other players in the game. For example, one or more other virtual objects may be computer-controlled, such as robots using artificial intelligence (AI) algorithms, enabling a human-computer interaction mode. For example, the virtual objects possess various skills or abilities that the player uses to achieve objectives. For example, virtual objects possess one or more weapons, items, tools, etc., that can be used to eliminate other objects in the game. Such skills or abilities can be activated by the player using one of several preset touch operations on the terminal's touchscreen display. The processor can be configured to respond to the operation commands generated by the user's touch operations to display the corresponding game screen.

[0050] It should be noted that, Figure 1 The schematic diagram of the virtual component adjustment system shown is merely an example. The image processing system and scenario described in this application embodiment are for the purpose of more clearly illustrating the technical solutions of this application embodiment and do not constitute a limitation on the technical solutions provided in this application embodiment. As those skilled in the art will know, with the evolution of the virtual component adjustment system and the emergence of new business scenarios, the technical solutions provided in this application embodiment are also applicable to similar technical problems.

[0051] To address the aforementioned problems, this application provides a first method, apparatus, computer device, and storage medium for adjusting virtual components, which can improve the efficiency of virtual component adjustment. These will be described in detail below. It should be noted that the order of description of the following embodiments is not intended to limit the preferred order of the embodiments.

[0052] This application provides a method for adjusting a virtual component, which can be executed by a terminal or a server. This application example illustrates the method for adjusting a virtual component by a terminal.

[0053] Please see Figure 2 , Figure 2 This is a flowchart illustrating a method for adjusting a virtual component according to an embodiment of this application. The specific flow of this method for adjusting a virtual component is as follows:

[0054] 101. Display the graphical user interface.

[0055] In this embodiment of the application, a graphical user interface is provided through the terminal. The graphical user interface can display a game editing scene. The game editing scene can be a virtual scene built by the current user in the target application. The game editing scene can include at least two virtual components, which can be used to construct the virtual scene.

[0056] In some embodiments, the target application can be a game application that provides gameplay with game scene creation, allowing users to build their desired game scenes for gameplay.

[0057] Virtual components can be virtual models, such as geometric models.

[0058] For example, please see Figure 3 , Figure 3 This is a schematic diagram illustrating an application scenario for a virtual component adjustment method provided in an embodiment of this application. Figure 3 The graphical user interface shown includes a game editing scene built by the user, which contains multiple virtual components.

[0059] 102. In response to the first trigger operation, generate a reference component based on the distance parameter corresponding to the virtual component corresponding to the first trigger operation.

[0060] The first trigger operation is used to determine the distance parameters corresponding to the virtual components in the game editing scene and to display the distance parameters in a concrete form.

[0061] The reference component refers to the component generated based on the distance parameter corresponding to the virtual component, which is a concrete representation of the distance.

[0062] In this embodiment, the reference component configuration may have a reference parameter corresponding to the distance parameter. For example, the reference parameter may be the width of the reference component. That is, the width of the reference component corresponds to the distance parameter of the virtual component.

[0063] In some embodiments, the reference component may be a cube, wherein the component shape of the reference component is at least partially configured with a width corresponding to the distance parameter. For example, the component shape of the reference component may include a width, a height, and a length, wherein the width may correspond to the distance parameter of the virtual component; the height may correspond to the height of the virtual component; and the length may extend infinitely parallel to the length direction of the virtual component.

[0064] For example, please see Figure 4 , Figure 4 This is a schematic diagram illustrating an application scenario of another virtual component adjustment method provided in an embodiment of this application. Figure 4 The graphical user interface shown displays a game editing scene, which may include virtual components and reference components generated based on the distance parameters of the virtual components.

[0065] The reference component can be a cube. When generating the reference component based on the distance parameter corresponding to the virtual component, the width w2 of the reference component can be determined based on the distance parameter corresponding to the virtual component, that is, the distance parameter corresponds to the width w2; the height h2 of the reference component can be determined based on the height h1 of the virtual component, that is, the height h1 and the height h2 are the same; and the length l2 of the reference component can be determined based on the direction axis corresponding to the length l1 of the component, that is, the length l2 is parallel to the direction axis of the length l1, and the length l2 can extend infinitely along the direction axis.

[0066] In this embodiment, the reference component is essentially a component that does not have any volume and is transparent in the virtual scene. The reference component is used to assist in adjusting the distance between virtual components in the virtual scene.

[0067] In some embodiments, to facilitate user operation, the step "in response to the first triggering operation, generate a reference component based on the distance parameter corresponding to the virtual component corresponding to the first triggering operation" may include the following operations:

[0068] In response to a touch operation between two virtual components, a reference component is displayed between the two virtual components corresponding to the copy trigger operation.

[0069] Touch operations can include various types, such as clicking, swiping, and pressing.

[0070] For example, please see Figure 5 , Figure 5 This is a schematic diagram illustrating an application scenario of another virtual component adjustment method provided in an embodiment of this application. Figure 5 In the graphical user interface shown above, the virtual scene includes virtual component A, virtual component B, and virtual component C. When a user's swipe action between virtual component A and virtual component B is detected, a reference component can be displayed between virtual component A and virtual component B, thus obtaining... Figure 5 The graphical user interface shown below, where the width of the reference component between virtual component A and virtual component B corresponds to the distance between virtual component A and virtual component B.

[0071] In some embodiments, to improve the accuracy of displaying the reference component, the step "in response to a first triggering operation, generating a reference component based on a distance parameter corresponding to the virtual component corresponding to the first triggering operation" may include the following operations:

[0072] The response acts on the first triggering operation between two virtual components;

[0073] Determine that the distance parameter between the two virtual components corresponding to the first trigger operation satisfies the first preset distance;

[0074] Display a reference component between two virtual components.

[0075] The first triggering operation that acts between two virtual components can include sliding operations between the two virtual components.

[0076] In this embodiment of the application, a first preset distance is preset, which can be used to determine whether the conditions for generating a reference component are met between two virtual components.

[0077] The distance parameter between the two virtual components corresponding to the first trigger operation satisfies the first preset distance, which may include the distance parameter being less than the first preset distance.

[0078] Specifically, when a sliding operation is detected between two virtual components, the distance between the two virtual components can be obtained as a distance parameter. Based on this distance parameter and a preset first distance, it can be determined whether a reference component can be generated between the two virtual components.

[0079] If the distance between the two virtual components corresponding to the first trigger operation is less than the first preset distance, it means that the two components meet the conditions for generating a reference component. Then, a reference component corresponding to the width and distance parameters can be generated and displayed between the two virtual components.

[0080] For example, please continue reading Figure 5 When a user is detected swiping between virtual component A and virtual component B, the distance between virtual component A and virtual component B is first calculated and compared with a first preset distance. If the distance is less than the first preset distance, a reference component can be displayed between virtual component A and virtual component B.

[0081] In some embodiments, the two virtual components corresponding to the first trigger operation can be on the same plane in the game editing scene.

[0082] In some embodiments, the method may further include the following steps:

[0083] It is determined that the distance parameter between the two virtual components corresponding to the first triggering operation does not meet the first preset distance;

[0084] Based on the virtual component that meets the second preset distance with the first trigger operation, a reference component with a preset width is generated.

[0085] Wherein, the distance parameter between the two virtual components corresponding to the first triggering operation does not meet the first preset distance, the distance parameter may be greater than the first preset distance.

[0086] In this embodiment of the application, if the distance between the two virtual components corresponding to the first triggering operation is greater than the first preset distance, the virtual component that is closer to the operation position of the first triggering operation can be selected from the two virtual components corresponding to the first triggering operation as the virtual component corresponding to the reference component to be generated.

[0087] Among them, the virtual component that meets the second preset distance with the first trigger operation can be a virtual component whose distance from the operation position of the first trigger operation is less than the second preset distance.

[0088] The preset width can be the virtual component associated with the reference component generated as needed. For example, the preset width can be the width of the virtual component, or it can be other pre-set fixed values, etc., which are not limited here.

[0089] For example, please see Figure 6 , Figure 6 This is a schematic diagram illustrating an application scenario of another virtual component adjustment method provided in an embodiment of this application. Figure 6 In the graphical user interface shown above, when a user's first trigger operation between virtual component A and virtual component B is detected, the distance between virtual component A and virtual component B is first calculated, and this distance is compared with a first preset distance. If the distance is greater than the first preset distance, then the first distance between virtual component A and the operation position O of the first trigger operation, and the second distance between virtual component B and the operation position O of the first trigger operation can be calculated.

[0090] Furthermore, by comparing the second preset distance with the first distance and the second distance respectively, it can be determined that the first distance is greater than the second preset distance and the second distance is less than the second preset distance. Therefore, it can be determined that the virtual component corresponding to the reference component to be generated is virtual component B. Then, a reference component with a preset width corresponding to virtual component B can be generated. This reference component can be displayed on the side corresponding to virtual component B in the first trigger operation. That is, we obtain... Figure 6 The graphical user interface shown below displays the generated reference component on one side of virtual component B.

[0091] In some embodiments, the step "in response to a first triggering operation, generating a reference component based on a distance parameter corresponding to the virtual component corresponding to the first triggering operation" may include the following operations:

[0092] In response to the first triggering operation applied to the virtual component, a reference component with a preset spacing is generated.

[0093] In the embodiments of this application, the first triggering operation acting on the virtual component may include a touch operation on the virtual component, such as clicking the virtual component, swiping the virtual component, etc.

[0094] The preset width can be the virtual component associated with the reference component generated as needed. For example, the preset width can be the width of the virtual component, or it can be other pre-set fixed values, etc., which are not limited here.

[0095] For example, please see Figure 7 , Figure 7 This is a schematic diagram illustrating an application scenario of another virtual component adjustment method provided in an embodiment of this application. Figure 7 The graphical user interface shown above displays a game editing scene. This scene can include virtual component A. When a sliding action on virtual component A is detected, a reference component of a preset width can be generated and displayed on one side of virtual component A. That is, we obtain... Figure 7The graphical user interface shown below displays a reference component in the game editing scene. The reference component is located on one side of virtual component A and adjacent to virtual component A.

[0096] 103. In response to a move operation on a reference component, control the reference component to move such that one side of the moved reference component is adjacent to a first target virtual component among at least two virtual components.

[0097] In this embodiment of the application, when the graphical user interface displays a reference component, the user can drag and drop the reference component to control its movement within the graphical user interface.

[0098] In this scenario, one side of the moved reference component is adjacent to the first target virtual component among at least two virtual components. That is, the move operation is used to move the reference component to a position adjacent to the first target virtual component.

[0099] The first target virtual component can be any one of the multiple virtual components in the virtual scene.

[0100] For example, please see Figure 8 , Figure 8 This is a schematic diagram illustrating an application scenario of another virtual component adjustment method provided in an embodiment of this application. Figure 8 The graphical user interface shown above displays a reference component between virtual component A and virtual component B. When a user's movement operation on the reference component is detected, the reference component is moved to the side of virtual component B and adjacent to it, thus determining virtual component B as the first target component. The position of the reference component in the virtual scene can then be updated, resulting in... Figure 8 The graphical user interface shown below displays a reference component adjacent to virtual component B.

[0101] For example, please see Figure 9 , Figure 9 This is a schematic diagram illustrating an application scenario of another virtual component adjustment method provided in an embodiment of this application. Figure 9 The graphical user interface shown above displays a reference component between virtual component A and virtual component B. When a user's movement operation on the reference component is detected, the reference component is moved to the side of virtual component C and adjacent to it, thus determining virtual component C as the first target component. The position of the reference component in the virtual scene can then be updated, resulting in... Figure 9 The graphical user interface shown below displays a reference component adjacent to virtual component C. Virtual components A, B, and C can be on the same horizontal plane within the virtual scene.

[0102] In some embodiments, to facilitate users in adjusting virtual components on different horizontal planes in a virtual scene, the reference component can be moved to one side of the virtual components on different horizontal planes.

[0103] For example, please see Figure 10 , Figure 10 This is a schematic diagram illustrating an application scenario of another virtual component adjustment method provided in an embodiment of this application. Figure 10 The graphical user interface shown above displays virtual component A, virtual component B, virtual component C, and virtual component D. Virtual components A, B, and C can be on the same horizontal plane in the virtual scene, while virtual component D is on another horizontal plane.

[0104] The graphical user interface displays a reference component between virtual component A and virtual component B. When a user's movement operation on the reference component is detected, the reference component is moved to the side of virtual component D and adjacent to it, thus determining virtual component D as the first target component. The position of the reference component in the virtual scene can then be updated, resulting in... Figure 10 The graphical user interface shown below displays a reference component adjacent to the virtual component D.

[0105] The position of the moved reference component overlaps with that of the virtual component C. However, since the reference component is a transparent component in the virtual scene, the display of the reference component and the virtual component in the virtual scene do not affect each other.

[0106] 104. In response to the presence of a second target virtual component that meets the adsorption conditions on the other side of the reference component, the second target virtual component is adsorbed to the other side of the reference component.

[0107] In this embodiment of the application, the adsorption conditions may include: being on the same horizontal plane as the reference component and the distance between the adsorption conditions and the reference component being less than a preset distance.

[0108] In some embodiments, the step "in response to the presence of a second target virtual component that meets the adsorption conditions on the other side of the reference component, adsorbing the second target virtual component to the other side of the reference component" may include the following operations:

[0109] If there is a second target virtual component on the other side of the reference component that is on the same horizontal plane as the reference component and the distance between the second target virtual component and the reference component is less than a preset distance, the second target virtual component will be attached to the other side of the reference component.

[0110] For example, please see Figure 11 , Figure 11 This is a schematic diagram illustrating an application scenario of another virtual component adjustment method provided in an embodiment of this application. Figure 11 In the graphical user interface shown above, the reference component is moved to a position adjacent to virtual component B based on the user's movement operation. At this time, virtual component B is located on one side of the reference component. Then, it can be determined that there is a virtual component C on the other side of the reference component at the same horizontal plane. The distance between the reference component and the virtual component is obtained. If this distance is less than a preset distance, virtual component C can be identified as the second target virtual component. Then, virtual component C is snapped to the other side of the reference component, resulting in... Figure 11 The graphical user interface shown below.

[0111] exist Figure 11 In the graphical user interface shown below, one side of the reference component is adjacent to virtual component B, and the other side is adjacent to virtual component C. This allows the distance between virtual component B and virtual component C to be automatically adjusted to be the same as the distance between virtual component A and virtual component B, making it convenient for users to adjust the distance between virtual components with the same spacing.

[0112] In some embodiments, if there is a third target virtual component on the other side of the reference component that is on the same horizontal plane as the reference component and is at a negative distance from the reference component, the third target virtual component can also be attached to the other side of the reference component.

[0113] For example, please see Figure 12 , Figure 12 This is a schematic diagram illustrating an application scenario of another virtual component adjustment method provided in an embodiment of this application. Figure 12 In the graphical user interface shown above, the reference component is moved to a position adjacent to virtual component B based on the user's movement operation. At this point, virtual component B is located on one side of the reference component. Then, it can be determined that there is a virtual component C on the other side of the reference component at the same horizontal plane. The distance between the reference component and the virtual component is obtained. If the distance is negative, virtual component C can be identified as the third target virtual component. Then, virtual component C is snapped to the other side of the reference component, resulting in... Figure 12 The graphical user interface shown below.

[0114] exist Figure 12 In the graphical user interface shown below, one side of the reference component is adjacent to virtual component B, and the other side is adjacent to virtual component C. This allows the distance between virtual component B and virtual component C to be automatically adjusted to be the same as the distance between virtual component A and virtual component B, making it convenient for users to adjust the distance between virtual components with the same spacing.

[0115] In some embodiments, the method may further include the following steps:

[0116] When there is no second target virtual component that meets the adsorption conditions on the other side of the reference component, a new virtual component is generated in the game editing scene in response to the virtual component creation operation for the graphical user interface;

[0117] The control will snap the newly created virtual component to the other side of the reference component.

[0118] Wherein, the absence of a second target virtual component that meets the adsorption conditions on the other side of the reference component may include: the absence of a second target virtual component on the other side of the reference component that is on the same horizontal plane as the reference component and whose distance from the reference component is less than a preset distance.

[0119] In this embodiment of the application, if there is no virtual component that meets the adsorption conditions on the other side of the reference component, the user can create a virtual component, and then the user-created virtual component can be adsorbed to the other side of the reference component.

[0120] The virtual component creation function can be used to add a virtual component in the game editing scene.

[0121] In some embodiments, to facilitate user creation of virtual components, the step "generating a new virtual component in the game editing scene in response to a virtual component creation operation for a graphical user interface" may include the following operations:

[0122] In response to the selection operation of creating a new virtual component among multiple preset virtual components, a new virtual component is generated on the other side of the reference component, which is on the same horizontal plane as the reference component and the distance between the reference component and the reference component is less than a preset distance.

[0123] The graphical user interface provides a virtual component selection area, which can include multiple preset virtual components. These preset virtual components can be virtual components provided in the target application for building virtual scenes.

[0124] For example, please see Figure 13 , Figure 13 This is a schematic diagram illustrating an application scenario of another virtual component adjustment method provided in an embodiment of this application. Figure 13The graphical user interface also provides a virtual component selection area. This area includes various virtual component types, such as structures, furniture, environments, mechanisms, and creatures. Each virtual component type can further include multiple subtypes; for example, under the structure type, it can include subtypes such as basic shapes, building materials, doors, windows, fences, and style plots. The component selection area can also display multiple preset virtual components, such as basic blocks, basic cylinders, spheres, and cones. The currently displayed preset virtual components can belong to the basic shape subtype within the structure type. Users can select desired preset virtual components in the virtual component selection area to build virtual scenes.

[0125] The selection operation can be used to select a preset virtual component from the virtual component selection area and add it to the virtual scene.

[0126] For example, please see Figure 14 , Figure 14 This is a schematic diagram illustrating an application scenario of another virtual component adjustment method provided in an embodiment of this application. Figure 14 In the graphical user interface shown above, when a user selects a basic cylinder in the virtual component selection area, a new basic cylinder component can be created on the other side of the reference component. This newly created basic cylinder component is on the same plane as the reference component and the distance between them is less than a preset distance, resulting in the following: Figure 14 The graphical user interface shown below displays a basic cylindrical component on the other side of the reference component, serving as a newly created virtual component.

[0127] In some embodiments, after generating a reference component according to the first triggering operation, when it is detected that the user has created a new virtual component at any position in the game editing scene, the newly created virtual component can be automatically adjusted to the other side of the reference component, at the same horizontal plane as the reference component, and at a position where the distance between the virtual component and the reference component is less than a preset distance.

[0128] For example, please see Figure 15 , Figure 15 This is a schematic diagram illustrating an application scenario of another virtual component adjustment method provided in an embodiment of this application. Figure 15 In the graphical user interface shown above, when the user slides the basic cylinder from the virtual component selection area into the game editing scene, a new basic cylinder component is created in the game editing scene. At this time, the newly created cylinder component is positioned at the end of the user's sliding operation. If this position does not meet the snapping conditions, the newly created basic cylinder component can be automatically snapped to the other side of the reference component, where it is on the same plane as the reference component and the distance between them is less than a preset distance. This results in the following... Figure 15The graphical user interface shown below shows a basic cylindrical component on the other side of the reference component. This basic cylindrical component is on the same plane as the reference component and the distance between them is less than a preset distance.

[0129] Furthermore, it can automatically control the snapping of newly created virtual components to the other side of the reference component.

[0130] For example, please see Figure 16 , Figure 16 This is a schematic diagram illustrating an application scenario of another virtual component adjustment method provided in an embodiment of this application. Figure 16 In the graphical user interface shown, the base cylindrical component is snapped to the other side of the reference component. One side of the reference component is adjacent to the virtual component B, and the other side is adjacent to the newly created base cylindrical component. This allows the distance between the virtual component B and the base cylindrical component to be automatically adjusted to be the same as the distance between the virtual component A and the virtual component B, making it convenient for users to adjust the distance between virtual components with the same spacing.

[0131] In some embodiments, to improve the adjustment effect of the virtual component, the step of "attaching the second target virtual component to the other side of the reference component" may include the following operations:

[0132] Align the second target virtual component with the first target virtual component;

[0133] The aligned second target virtual component is snapped to the other side of the reference component so that the second target virtual component is adjacent to the other side of the reference component.

[0134] Specifically, aligning the second target virtual component with the first target virtual component may include aligning the center of the second target virtual component with the center of the first target virtual component.

[0135] For example, please see Figure 17 , Figure 17 This is a schematic diagram illustrating an application scenario of another virtual component adjustment method provided in an embodiment of this application. Figure 17 In the graphical user interface shown above, virtual component C meets the snapping condition, but the center points of virtual component C and virtual component B are not on the same horizontal line. At this point, virtual component C can be adjusted so that its center point aligns with the center point of virtual component B, i.e., they are on the same horizontal line. Figure 17 The graphical user interface shown below has virtual component C and virtual component B aligned based on a center point.

[0136] Furthermore, the aligned virtual component C is snapped to the other side of the reference component.

[0137] For example, please see Figure 18 , Figure 18 This is a schematic diagram illustrating an application scenario of another virtual component adjustment method provided in an embodiment of this application. Figure 18 In the graphical user interface shown, the aligned virtual component C is snapped to the other side of the reference component. This allows for automatic adjustment of the distance between virtual component B and virtual component C to maintain the same distance as between virtual component A and virtual component B, while also adjusting the alignment between virtual components to improve the adjustment effect.

[0138] In some embodiments, to facilitate user readjustment of the virtual component snapped to one side of the reference component, the method may further include the following steps:

[0139] In response to a move operation targeting the second target virtual component, the snapping of the reference component onto the second target virtual component is canceled.

[0140] The movement operation can include dragging the second target virtual component in any direction.

[0141] For example, please see Figure 19 , Figure 19 This is a schematic diagram illustrating an application scenario of another virtual component adjustment method provided in an embodiment of this application. Figure 19 In the graphical user interface shown above, virtual component C is snapped to the other side of the reference component. When a drag operation on virtual component C is detected, the snapping of the reference component to virtual component C can be canceled. Then, based on the position where the drag operation stops, the position of virtual component C in the virtual scene is updated and displayed. This results in... Figure 19 The graphical user interface shown below shows a virtual component C detached from the reference component and moved to another location for display based on a move operation.

[0142] In some embodiments, the method may further include the following steps:

[0143] In response to a delete operation on the referenced component, delete the referenced component.

[0144] In this embodiment of the application, after the user has finished using the reference component, the reference component can be deleted to avoid accidental attachment caused by subsequent adjustments to the virtual scene.

[0145] The graphical user interface may also include a delete control, which can be used to trigger the deletion of a reference component.

[0146] For example, please see Figure 20 , Figure 20 This is a schematic diagram illustrating an application scenario of another virtual component adjustment method provided in an embodiment of this application. Figure 20The graphical user interface shown above displays a delete control. When a user touches the delete control, the delete reference component is triggered, resulting in... Figure 20 The graphical user interface shown below has had its reference components removed.

[0147] In some embodiments, the method may further include the following steps:

[0148] In response to a copy operation on a reference component, the copied reference component is displayed in the graphical user interface.

[0149] In this embodiment of the application, when a user builds a virtual scene, they need to place many virtual components. In order to facilitate the user to adjust the distance between multiple virtual components, multiple reference components can be copied.

[0150] The graphical user interface may also include a copy control, which can be used to trigger the copying of a reference component.

[0151] For example, please see Figure 21 , Figure 21 This is a schematic diagram illustrating an application scenario of another virtual component adjustment method provided in an embodiment of this application. Figure 21 The graphical user interface shown above displays a copy control. When a user touches the copy control, the copy reference component is triggered, resulting in a copy as shown below. Figure 21 The graphical user interface shown below displays a copied reference component, which the user can use to adjust the distance between other virtual components.

[0152] In some embodiments, to facilitate users in copying multiple reference components simultaneously, the copy control may also include a quantity setting sub-control, in which users can input the number of reference components they want to copy.

[0153] For example, please see Figure 22 , Figure 22 This is a schematic diagram illustrating an application scenario of another virtual component adjustment method provided in an embodiment of this application. Figure 22 The graphical user interface shown above displays a copy control, which includes a quantity setting sub-control. When a quantity of 3 is entered through the quantity setting sub-control, and then a touch operation is performed on the copy control, it can trigger the copying of 3 reference components, resulting in the following: Figure 22 The graphical user interface shown below displays three copied reference components, allowing users to adjust the distance between other virtual components using multiple copied reference components.

[0154] In this embodiment, when building a game scene, the user needs to place many virtual components in the game editing scene. Since the built game scene can be a three-dimensional scene, the multiple virtual components placed in the game editing scene can include virtual components on different planes. To facilitate the user to perform distance adjustment operations on virtual components in different planes simultaneously, multiple reference components can be copied, and the copied reference components can be moved to various planes in the game editing scene so that the spacing between virtual components in multiple planes can be adjusted simultaneously based on the copied reference components.

[0155] This application discloses a method for adjusting virtual components. The method includes: displaying a graphical user interface (GUI) including at least two virtual components; responding to a distance copy trigger operation for the two virtual components, displaying a reference component between the two virtual components corresponding to the distance copy trigger operation, the width of the reference component corresponding to the distance between the two virtual components; responding to a movement operation for the reference component, controlling the reference component to move, wherein one side of the moved reference component is adjacent to a first target virtual component among the at least two virtual components; and responding to the presence of a second target virtual component that meets the snapping conditions on the other side of the reference component, snapping the second target virtual component to the other side of the reference component. This improves the adjustment efficiency of virtual components.

[0156] To facilitate better implementation of the virtual component adjustment method provided in this application, this application also provides a virtual component adjustment device based on the above-described virtual component adjustment method. The meanings of the terms used are the same as in the virtual component adjustment method described above, and specific implementation details can be found in the descriptions within the method embodiments.

[0157] Please see Figure 23 , Figure 23 This application provides a structural block diagram of a virtual component adjustment device, which includes:

[0158] Display unit 301 is used to display a graphical user interface, the graphical user interface including a game editing scene, the game editing scene including at least two virtual components;

[0159] The first generation unit 302 is configured to generate a reference component in response to a first triggering operation, based on a distance parameter corresponding to the virtual component corresponding to the first triggering operation, wherein the reference component is configured with a reference parameter corresponding to the distance parameter.

[0160] A first control unit 303 is configured to, in response to a movement operation on the reference component, control the reference component to move such that one side of the moved reference component is adjacent to a first target virtual component among the at least two virtual components.

[0161] Adsorption unit 304 is used to adsorb the second target virtual component to the other side of the reference component in response to the presence of a second target virtual component that meets the adsorption conditions on the other side of the reference component.

[0162] In some embodiments, the adsorption unit 304 may include:

[0163] If there is a second target virtual component on the other side of the reference component that is on the same horizontal plane as the reference component and the distance between the second target virtual component and the reference component is less than a preset distance, the second target virtual component is attached to the other side of the reference component.

[0164] In some embodiments, the device may further include:

[0165] The second generation unit is used to generate a new virtual component in the game editing scene in response to a virtual component creation operation for the graphical user interface when there is no second target virtual component that meets the adsorption conditions on the other side of the reference component.

[0166] The second control unit is used to control the attachment of the newly created virtual component to the other side of the reference component.

[0167] In some embodiments, the second generation unit may include:

[0168] The first generation subunit is configured to, in response to a selection operation for the new virtual component among the plurality of preset virtual components, generate the new virtual component on the other side of the reference component, which is on the same horizontal plane as the reference component and at a distance less than a preset distance from the reference component.

[0169] In some embodiments, the adsorption unit 304 may include:

[0170] A control subunit is used to control the alignment of the second target virtual component with the first target virtual component;

[0171] An adsorption subunit is used to adsorb the aligned second target virtual component to the other side of the reference component, so that the second target virtual component is adjacent to the other side of the reference component.

[0172] In some embodiments, the first generation unit 302 may include:

[0173] The response subunit is used to respond to the first triggering operation between two virtual components;

[0174] A determination subunit is used to determine whether the distance parameter between the two virtual components corresponding to the first triggering operation satisfies a first preset distance.

[0175] The display subunit is used to display the reference component between the two virtual components.

[0176] In some embodiments, the device may further include:

[0177] A determining unit is configured to determine that the distance parameter between the two virtual components corresponding to the first triggering operation does not meet the first preset distance.

[0178] The second generation unit is used to generate a reference component of a preset width based on a virtual component that satisfies a second preset distance from the first triggering operation.

[0179] In some embodiments, the first generation unit 302 may include:

[0180] The second generation subunit is used to generate a reference component with a preset spacing in response to a first trigger operation applied to the virtual component.

[0181] In some embodiments, the device may further include:

[0182] A deletion unit is configured to delete the reference component in response to a deletion operation on the reference component.

[0183] In some embodiments, the device may further include:

[0184] A cancellation unit is configured to cancel the attachment of the reference component to the second target virtual component in response to a movement operation on the second target virtual component.

[0185] In some embodiments, the device may further include:

[0186] A copying unit is configured to display the copied reference component in the graphical user interface in response to a copying operation on the reference component.

[0187] This application discloses a virtual component adjustment device. A graphical user interface (GUI) is displayed via a display unit 301. The GUI includes a game editing scene, which contains at least two virtual components. A first generation unit 302, responding to a first trigger operation, generates a reference component based on a distance parameter corresponding to the virtual component. The reference component is configured with a reference parameter corresponding to the distance parameter. A first control unit 303, responding to a movement operation on the reference component, controls the reference component to move, and one side of the moved reference component becomes adjacent to a first target virtual component among the at least two virtual components. An adsorption unit 304, responding to the presence of a second target virtual component meeting adsorption conditions on the other side of the reference component, adsorbs the second target virtual component to the other side of the reference component. This improves the adjustment efficiency of the virtual components.

[0188] Accordingly, embodiments of this application also provide a computer device, which can be a terminal. For example... Figure 24 As shown, Figure 24 This is a schematic diagram of the structure of a computer device provided in an embodiment of this application. The computer device 600 includes a processor 601 with one or more processing cores, a memory 602 with one or more computer-readable storage media, and a computer program stored in the memory 602 and executable on the processor. The processor 601 and the memory 602 are electrically connected. Those skilled in the art will understand that the computer device structure shown in the figure does not constitute a limitation on the computer device, and may include more or fewer components than shown, or combine certain components, or have different component arrangements.

[0189] The processor 601 is the control center of the computer device 600. It connects various parts of the computer device 600 through various interfaces and lines. By running or loading software programs and / or modules stored in the memory 602, and calling data stored in the memory 602, it performs various functions of the computer device 600 and processes data, thereby monitoring the computer device 600 as a whole.

[0190] In this embodiment, the processor 601 in the computer device 600 loads the instructions corresponding to the processes of one or more applications into the memory 602 according to the following steps, and the processor 601 runs the applications stored in the memory 602 to achieve various functions:

[0191] Display a graphical user interface, which includes a game editing scene, and the game editing scene includes at least two virtual components;

[0192] In response to the first triggering operation, a reference component is generated based on the distance parameter corresponding to the virtual component corresponding to the first triggering operation. The reference component is configured with a reference parameter corresponding to the distance parameter.

[0193] In response to a move operation on a reference component, the reference component is controlled to move and one side of the moved reference component is adjacent to a first target virtual component among at least two virtual components;

[0194] In response to the presence of a second target virtual component that meets the adsorption conditions on the other side of the reference component, the second target virtual component is adsorbed to the other side of the reference component.

[0195] In some embodiments, in response to the presence of a second target virtual component meeting the adsorption conditions on the other side of the reference component, adsorbing the second target virtual component to the other side of the reference component includes:

[0196] If there is a second target virtual component on the other side of the reference component that is on the same horizontal plane as the reference component and the distance between the second target virtual component and the reference component is less than a preset distance, the second target virtual component will be attached to the other side of the reference component.

[0197] In some embodiments, the method further includes:

[0198] When there is no second target virtual component that meets the adsorption conditions on the other side of the reference component, a new virtual component is generated in the game editing scene in response to the virtual component creation operation for the graphical user interface;

[0199] The control will snap the newly created virtual component to the other side of the reference component.

[0200] In some embodiments, the graphical user interface includes a virtual component selection area, which includes a plurality of preset virtual components;

[0201] In response to the creation of virtual components for the graphical user interface, a new virtual component is generated in the game editing scene, including:

[0202] In response to the selection operation of creating a new virtual component among multiple preset virtual components, a new virtual component is generated on the other side of the reference component, which is on the same horizontal plane as the reference component and the distance between the reference component and the reference component is less than a preset distance.

[0203] In some embodiments, attaching the second target virtual component to the other side of the reference component includes:

[0204] Align the second target virtual component with the first target virtual component;

[0205] The aligned second target virtual component is snapped to the other side of the reference component so that the second target virtual component is adjacent to the other side of the reference component.

[0206] In some embodiments, in response to a first triggering operation, a reference component is generated based on a distance parameter corresponding to the virtual component corresponding to the first triggering operation, including:

[0207] The response acts on the first triggering operation between two virtual components;

[0208] Determine that the distance parameter between the two virtual components corresponding to the first trigger operation satisfies the first preset distance;

[0209] Display a reference component between two virtual components.

[0210] In some embodiments, it also includes:

[0211] It is determined that the distance parameter between the two virtual components corresponding to the first triggering operation does not meet the first preset distance;

[0212] Based on the virtual component that meets the second preset distance with the first trigger operation, a reference component with a preset width is generated.

[0213] In some embodiments, in response to a first triggering operation, a reference component is generated based on a distance parameter corresponding to the virtual component corresponding to the first triggering operation, including:

[0214] In response to the first triggering operation applied to the virtual component, a reference component with a preset spacing is generated.

[0215] In some embodiments, the method further includes:

[0216] In response to a delete operation on the referenced component, delete the referenced component.

[0217] In some embodiments, the method further includes:

[0218] In response to a move operation targeting the second target virtual component, the snapping of the reference component onto the second target virtual component is canceled.

[0219] In some embodiments, the method further includes:

[0220] In response to a copy operation on a reference component, the copied reference component is displayed in the graphical user interface.

[0221] This solution displays a graphical user interface including at least two virtual components. When a distance copying trigger operation is detected for the two virtual components, a reference component can be displayed between the two virtual components corresponding to the distance copying trigger operation. The width of the reference component corresponds to the distance between the two virtual components. Then, when a movement operation is detected for the reference component, the reference component is controlled to move. After the movement, one side of the reference component is adjacent to a first target virtual component among the at least two virtual components. In response to the existence of a second target virtual component that meets the adsorption conditions on the other side of the reference component, the second target virtual component is adsorbed to the other side of the reference component. This achieves fast and accurate adjustment of the distance between virtual components, thereby improving the adjustment efficiency of virtual components.

[0222] For details on the implementation of each of the above operations, please refer to the previous examples, which will not be repeated here.

[0223] Optional, such as Figure 24 As shown, the computer device 600 also includes: a touch screen display 603, a radio frequency circuit 604, an audio circuit 605, an input unit 606, and a power supply 607. The processor 601 is electrically connected to the touch screen display 603, the radio frequency circuit 604, the audio circuit 605, the input unit 606, and the power supply 607. Those skilled in the art will understand that... Figure 24The computer device structure shown does not constitute a limitation on the computer device and may include more or fewer components than shown, or combine certain components, or have different component arrangements.

[0224] The touch display screen 603 can be used to display a graphical user interface (GUI) and receive operation commands generated by the user interacting with the GUI. The touch display screen 603 may include a display panel and a touch panel. The display panel can be used to display information input by the user or information provided to the user, as well as various graphical user interfaces of the computer device. These graphical user interfaces can be composed of graphics, text, icons, video, and any combination thereof. Optionally, the display panel can be configured using a liquid crystal display (LCD), organic light-emitting diode (OLED), or other similar technologies. The touch panel can be used to collect touch operations performed by the user on or near it (such as operations performed by the user using a finger, stylus, or any suitable object or accessory on or near the touch panel), generate corresponding operation commands, and execute the corresponding program according to the operation commands. Optionally, the touch panel may include two parts: a touch detection device and a touch controller. The touch detection device detects the user's touch location and the signal generated by the touch operation, transmitting the signal to the touch controller. The touch controller receives touch information from the touch detection device, converts it into touch point coordinates, and sends it to the processor 601. It can also receive and execute commands from the processor 601. The touch panel can cover the display panel. When the touch panel detects a touch operation on or near it, it transmits the information to the processor 601 to determine the type of touch event. Subsequently, the processor 601 provides corresponding visual output on the display panel based on the type of touch event. In this embodiment, the touch panel and the display panel can be integrated into the touch display screen 603 to achieve input and output functions. However, in some embodiments, the touch panel and the touch display screen 603 can be implemented as two independent components to achieve input and output functions. That is, the touch display screen 603 can also be used as part of the input unit 606 to achieve input functions.

[0225] The radio frequency circuit 604 can be used to transmit and receive radio frequency signals to establish wireless communication with network devices or other computer devices, and to transmit and receive signals with network devices or other computer devices.

[0226] Audio circuitry 605 can be used to provide an audio interface between a user and a computer device via a speaker and a microphone. Audio circuitry 605 can convert received audio data into electrical signals and transmit them to the speaker, where the speaker converts them into sound signals for output. Conversely, the microphone converts collected sound signals into electrical signals, which are then received by audio circuitry 605, converted back into audio data, and then processed by processor 601 before being transmitted via radio frequency circuitry 604 to, for example, another computer device, or output to memory 602 for further processing. Audio circuitry 605 may also include an earphone jack to facilitate communication between peripheral headphones and computer devices.

[0227] The input unit 606 can be used to receive input numbers, characters, or user characteristic information (such as fingerprints, iris, facial information, etc.), and to generate keyboard, mouse, joystick, optical, or trackball signal inputs related to user settings and function control.

[0228] Power supply 607 is used to supply power to various components of computer device 600. Optionally, power supply 607 can be logically connected to processor 601 through a power management system, thereby enabling functions such as charging, discharging, and power consumption management through the power management system. Power supply 607 may also include one or more DC or AC power supplies, recharging systems, power fault detection circuits, power converters or inverters, power status indicators, and other arbitrary components.

[0229] although Figure 24 As not shown in the diagram, computer device 600 may also include a camera, sensor, wireless fidelity module, Bluetooth module, etc., which will not be described in detail here.

[0230] In the above embodiments, the descriptions of each embodiment have different focuses. For parts not described in detail in a certain embodiment, please refer to the relevant descriptions in other embodiments.

[0231] As can be seen from the above, the computer device provided in this embodiment can display a graphical user interface, which includes a game editing scene, and the game editing scene includes at least two virtual components; in response to a first trigger operation, a reference component is generated according to the distance parameter corresponding to the virtual component corresponding to the first trigger operation, and the reference component is configured with a reference parameter corresponding to the distance parameter; in response to a movement operation on the reference component, the reference component is controlled to move, and one side of the moved reference component is adjacent to a first target virtual component among the at least two virtual components; in response to the existence of a second target virtual component that meets the adsorption conditions on the other side of the reference component, the second target virtual component is adsorbed to the other side of the reference component.

[0232] Those skilled in the art will understand that all or part of the steps in the various methods of the above embodiments can be performed by instructions, or by instructions controlling related hardware. These instructions can be stored in a computer-readable storage medium and loaded and executed by a processor.

[0233] Therefore, embodiments of this application provide a computer-readable storage medium storing a plurality of computer programs that can be loaded by a processor to execute steps in any of the virtual component adjustment methods provided in embodiments of this application. For example, the computer program can execute the following steps:

[0234] Display a graphical user interface, which includes a game editing scene, and the game editing scene includes at least two virtual components;

[0235] In response to the first triggering operation, a reference component is generated based on the distance parameter corresponding to the virtual component corresponding to the first triggering operation. The reference component is configured with a reference parameter corresponding to the distance parameter.

[0236] In response to a move operation on a reference component, the reference component is controlled to move and one side of the moved reference component is adjacent to a first target virtual component among at least two virtual components;

[0237] In response to the presence of a second target virtual component that meets the adsorption conditions on the other side of the reference component, the second target virtual component is adsorbed to the other side of the reference component.

[0238] In some embodiments, in response to the presence of a second target virtual component meeting the adsorption conditions on the other side of the reference component, adsorbing the second target virtual component to the other side of the reference component includes:

[0239] If there is a second target virtual component on the other side of the reference component that is on the same horizontal plane as the reference component and the distance between the second target virtual component and the reference component is less than a preset distance, the second target virtual component will be attached to the other side of the reference component.

[0240] In some embodiments, the method further includes:

[0241] When there is no second target virtual component that meets the adsorption conditions on the other side of the reference component, a new virtual component is generated in the game editing scene in response to the virtual component creation operation for the graphical user interface;

[0242] The control will snap the newly created virtual component to the other side of the reference component.

[0243] In some embodiments, the graphical user interface includes a virtual component selection area, which includes a plurality of preset virtual components;

[0244] In response to the creation of virtual components for the graphical user interface, a new virtual component is generated in the game editing scene, including:

[0245] In response to the selection operation of creating a new virtual component among multiple preset virtual components, a new virtual component is generated on the other side of the reference component, which is on the same horizontal plane as the reference component and the distance between the reference component and the reference component is less than a preset distance.

[0246] In some embodiments, attaching the second target virtual component to the other side of the reference component includes:

[0247] Align the second target virtual component with the first target virtual component;

[0248] The aligned second target virtual component is snapped to the other side of the reference component so that the second target virtual component is adjacent to the other side of the reference component.

[0249] In some embodiments, in response to a first triggering operation, a reference component is generated based on a distance parameter corresponding to the virtual component corresponding to the first triggering operation, including:

[0250] The response acts on the first triggering operation between two virtual components;

[0251] Determine that the distance parameter between the two virtual components corresponding to the first trigger operation satisfies the first preset distance;

[0252] Display a reference component between two virtual components.

[0253] In some embodiments, it also includes:

[0254] It is determined that the distance parameter between the two virtual components corresponding to the first triggering operation does not meet the first preset distance;

[0255] Based on the virtual component that meets the second preset distance with the first trigger operation, a reference component with a preset width is generated.

[0256] In some embodiments, in response to a first triggering operation, a reference component is generated based on a distance parameter corresponding to the virtual component corresponding to the first triggering operation, including:

[0257] In response to the first triggering operation applied to the virtual component, a reference component with a preset spacing is generated.

[0258] In some embodiments, the method further includes:

[0259] In response to a delete operation on the referenced component, delete the referenced component.

[0260] In some embodiments, the method further includes:

[0261] In response to a move operation targeting the second target virtual component, the snapping of the reference component onto the second target virtual component is canceled.

[0262] In some embodiments, the method further includes:

[0263] In response to a copy operation on a reference component, the copied reference component is displayed in the graphical user interface.

[0264] This solution displays a graphical user interface including at least two virtual components. When a distance copying trigger operation is detected for the two virtual components, a reference component can be displayed between the two virtual components corresponding to the distance copying trigger operation. The width of the reference component corresponds to the distance between the two virtual components. Then, when a movement operation is detected for the reference component, the reference component is controlled to move. After the movement, one side of the reference component is adjacent to a first target virtual component among the at least two virtual components. In response to the existence of a second target virtual component that meets the adsorption conditions on the other side of the reference component, the second target virtual component is adsorbed to the other side of the reference component. This achieves fast and accurate adjustment of the distance between virtual components, thereby improving the adjustment efficiency of virtual components.

[0265] For details on the implementation of each of the above operations, please refer to the previous examples, which will not be repeated here.

[0266] The storage medium may include: read-only memory (ROM), random access memory (RAM), disk or optical disk, etc.

[0267] Since the computer program stored in the storage medium can execute the steps in any of the virtual component adjustment methods provided in the embodiments of this application, the beneficial effects that any of the virtual component adjustment methods provided in the embodiments of this application can achieve can be realized. For details, please refer to the previous embodiments, which will not be repeated here.

[0268] The above provides a detailed description of a method, apparatus, storage medium, and computer device for adjusting a virtual component according to embodiments of this application. Specific examples have been used to illustrate the principles and implementation methods of this application. The descriptions of the above embodiments are only for the purpose of helping to understand the method and core ideas of this application. At the same time, for those skilled in the art, there will be changes in the specific implementation methods and application scope based on the ideas of this application. Therefore, the content of this specification should not be construed as a limitation of this application.

Claims

1. A method for adjusting a virtual component, characterized in that, include: The graphical user interface is displayed, which includes a game editing scene, and the game editing scene includes at least two virtual components; In response to a first triggering operation, a reference component is generated based on the distance parameter corresponding to the virtual component corresponding to the first triggering operation, and the reference component is configured with a reference parameter corresponding to the distance parameter; In response to a movement operation on the reference component, the reference component is controlled to move, and one side of the moved reference component is adjacent to a first target virtual component among the at least two virtual components; In response to the presence of a second target virtual component that meets the adsorption conditions on the other side of the reference component, the second target virtual component is adsorbed to the other side of the reference component.

2. The method according to claim 1, characterized in that, The step of adsorbing the second target virtual component to the other side of the reference component in response to the presence of a second target virtual component that meets the adsorption conditions includes: If there is a second target virtual component on the other side of the reference component that is on the same horizontal plane as the reference component and the distance between the second target virtual component and the reference component is less than a preset distance, the second target virtual component is attached to the other side of the reference component.

3. The method according to claim 1, characterized in that, The method further includes: When there is no second target virtual component that meets the adsorption conditions on the other side of the reference component, a new virtual component is generated in the game editing scene in response to the virtual component creation operation for the graphical user interface; The control snaps the newly created virtual component to the other side of the reference component.

4. The method according to claim 3, characterized in that, The graphical user interface includes a virtual component selection area, which includes multiple preset virtual components. The step of generating a new virtual component in the game editing scene in response to a virtual component creation operation for the graphical user interface includes: In response to the selection operation of the newly created virtual component among the plurality of preset virtual components, the newly created virtual component is generated on the other side of the reference component, which is on the same horizontal plane as the reference component and the distance between the reference component and the reference component is less than a preset distance.

5. The method according to claim 1, characterized in that, The step of attaching the second target virtual component to the other side of the reference component includes: Control the alignment of the second target virtual component with the first target virtual component; The aligned second target virtual component is snapped to the other side of the reference component so that the second target virtual component is adjacent to the other side of the reference component.

6. The method according to claim 1, characterized in that, The step of generating a reference component in response to a first triggering operation, based on the distance parameter corresponding to the virtual component corresponding to the first triggering operation, includes: The response acts on the first triggering operation between two virtual components; Determine that the distance parameter between the two virtual components corresponding to the first triggering operation satisfies the first preset distance; A reference component is displayed between the two virtual components.

7. The method according to claim 6, characterized in that, Also includes: It is determined that the distance parameter between the two virtual components corresponding to the first triggering operation does not meet the first preset distance; Based on the virtual component that meets the second preset distance with the first triggering operation, a reference component with a preset width is generated.

8. The method according to claim 1, characterized in that, The step of generating a reference component in response to a first triggering operation, based on the distance parameter corresponding to the virtual component corresponding to the first triggering operation, includes: In response to the first triggering operation applied to the virtual component, a reference component with a preset spacing is generated.

9. The method according to claim 1, characterized in that, The method further includes: In response to a deletion operation on the reference component, the reference component is deleted.

10. The method according to claim 1, characterized in that, The method further includes: In response to a movement operation targeting the second target virtual component, the snapping of the reference component onto the second target virtual component is canceled.

11. The method according to claim 1, characterized in that, The method further includes: In response to a copy operation on the reference component, the copied reference component is displayed in the graphical user interface.

12. An adjustment device for a virtual component, characterized in that, The device includes: A display unit is used to display a graphical user interface, the graphical user interface including a game editing scene, the game editing scene including at least two virtual components; The first generation unit is configured to, in response to a first triggering operation, generate a reference component based on a distance parameter corresponding to a virtual component corresponding to the first triggering operation, wherein the reference component is configured with a reference parameter corresponding to the distance parameter; A first control unit is configured to control the reference component to move in response to a movement operation on the reference component, such that one side of the moved reference component is adjacent to a first target virtual component among the at least two virtual components. An adsorption unit is configured to adsorb the second target virtual component to the other side of the reference component in response to the presence of a second target virtual component that meets the adsorption conditions on the other side of the reference component.

13. A computer device comprising a memory, a processor, and a computer program stored in the memory and running on the processor, wherein, When the processor executes the program, it implements the method for adjusting the virtual components as described in any one of claims 1 to 11.

14. A storage medium, characterized in that, The storage medium stores a plurality of instructions adapted for loading by a processor to execute the adjustment method of the virtual component according to any one of claims 1 to 11.