Virtual object interaction method and apparatus, device, medium, and product

WO2026158001A1PCT designated stage Publication Date: 2026-07-30TENCENT TECHNOLOGY (SHENZHEN) CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
WO · WO
Patent Type
Applications
Current Assignee / Owner
TENCENT TECHNOLOGY (SHENZHEN) CO LTD
Filing Date
2026-01-07
Publication Date
2026-07-30

Smart Images

  • Figure CN2026071107_30072026_PF_FP_ABST
    Figure CN2026071107_30072026_PF_FP_ABST
Patent Text Reader

Abstract

Disclosed in the present invention is a virtual object interaction method, comprising: displaying at least two virtual objects, the at least two virtual objects including a first virtual object located at a first position and a second virtual object located at a second position (210); in response to a drag operation on the first virtual object, controlling the first virtual object in a dragged state to move along with the drag operation (220); and in response to dragging the first virtual object to the second position, canceling the dragged state of the first virtual object, displaying the first virtual object on a second virtual grid, and displaying the second virtual object in a dragged state (230). Also disclosed in the present invention are a virtual object interaction apparatus, a device, a medium, and a product.
Need to check novelty before this filing date? Find Prior Art

Description

Interaction methods, devices, equipment, media, and products for virtual objects

[0001] This application claims priority to Chinese Patent Application No. 202510121626.6, filed on January 24, 2025, entitled “Interaction Method, Apparatus, Device, Medium and Product of Virtual Objects”, the entire contents of which are incorporated herein by reference. Technical Field

[0002] This application relates to the field of human-computer interaction, and in particular to a method, apparatus, device, medium and product for interacting with virtual objects. Background Technology

[0003] In many game genres, such as strategy games, simulation games, and role-playing games, players often need to select and rearrange multiple virtual objects. For example, players may need to swap the positions of multiple virtual objects in a virtual scene to adjust their layout.

[0004] In related technologies, when a player needs to swap the positions of multiple virtual objects, they typically need to press and hold virtual object A and drag it to the target location. Releasing the button swaps virtual object A with virtual object B at the target location. Similarly, if the player needs to swap virtual object B with other virtual objects, they need to repeat the above steps.

[0005] While this method is intuitive, it becomes cumbersome and inefficient when dealing with multiple virtual objects. Summary of the Invention

[0006] This application provides a method, apparatus, device, medium, and product for interacting with virtual objects, the technical solution of which is as follows:

[0007] According to one aspect of this application, a method for interacting with a virtual object is provided, executed by a computer device, the method comprising:

[0008] Display at least two virtual objects, the at least two virtual objects including a first virtual object located in a first position and a second virtual object located in a second position;

[0009] In response to a drag operation on the first virtual object, the first virtual object in the dragged state is controlled to move following the drag operation;

[0010] In response to dragging the first virtual object to the second position, canceling the dragged state of the first virtual object, displaying the first virtual object at the second position; and displaying the second virtual object in the dragged state.

[0011] According to one aspect of this application, an interaction device for virtual objects is provided, the device comprising:

[0012] A display module is used to display at least two virtual objects, the at least two virtual objects including a first virtual object located at a first position and a second virtual object located at a second position;

[0013] The control module is configured to respond to a drag operation on the first virtual object and control the first virtual object in the dragged state to move following the drag operation;

[0014] A display module is configured to, in response to dragging the first virtual object to the second position, cancel the dragged state of the first virtual object and display the first virtual object at the second position; and display a second virtual object in the dragged state. According to one aspect of this application, a computer device is provided, the computer device including a processor and a memory, the memory storing a computer program, the computer program being loaded and executed by the processor to implement a method for interacting with virtual objects.

[0015] According to one aspect of this application, a computer-readable storage medium is provided having a computer program stored thereon, which, when executed by a processor, implements a method for interacting with virtual objects.

[0016] According to one aspect of this application, a computer program product is provided, the computer program product comprising a computer program stored in a computer-readable storage medium; the computer program being read from and executed by a processor of a computer device from the computer-readable storage medium, causing the computer device to perform an interaction method for virtual objects.

[0017] The beneficial effects of the technical solution provided in this application include at least the following:

[0018] When dragging the first virtual object to place it in the second position where the second virtual object is located, the display modes of the first and second virtual objects are swapped. The display state of the first virtual object is updated to show it as placed in the second position, and the display state of the second virtual object is updated to show it as being dragged (which can be understood as a floating state or a state that moves with the user's dragging operation). Compared to related technologies that directly swap the virtual objects in the first and second positions, in this case, the user can still continue to drag the second virtual object, which is in the dragged state, to further determine its storage position. This allows a single drag operation to support changes in the storage positions of at least two virtual objects, and these changes are not limited to swapping the storage positions of these two virtual objects. In scenarios where the user needs to change the storage positions of multiple virtual objects, this eliminates the need for the user to repeatedly swap the storage positions of two virtual objects, reducing some of the drag operations required to swap the storage positions of virtual objects.

[0019] From the perspective of computer devices, a single drag-and-drop operation supports changes in the storage location of at least two virtual objects, reducing the number of drag-and-drop operations performed by the user on the computer device and the number of times the computer device performs trigger checks for drag-and-drop operations, thereby reducing the computational resource consumption for trigger checks. Attached Figure Description

[0020] Figure 1 shows an architecture diagram of a computer system provided in an exemplary embodiment of this application;

[0021] Figure 2 shows a flowchart of a virtual object interaction method provided in an exemplary embodiment of this application;

[0022] Figure 3 illustrates a schematic diagram of an interaction method for virtual objects provided in an exemplary embodiment of this application;

[0023] Figure 4 shows a schematic diagram of an interaction method for virtual objects provided in an exemplary embodiment of this application;

[0024] Figure 5 shows a schematic diagram of an interaction method for virtual objects provided in an exemplary embodiment of this application;

[0025] Figure 6 illustrates a schematic diagram of an interaction method for virtual objects provided in an exemplary embodiment of this application;

[0026] Figure 7 illustrates a schematic diagram of an interaction method for virtual objects provided in an exemplary embodiment of this application;

[0027] Figure 8 shows a flowchart of a virtual object interaction method provided in an exemplary embodiment of this application;

[0028] Figure 9 shows a flowchart of an interactive method for virtual objects provided in an exemplary embodiment of this application;

[0029] Figure 10 shows a flowchart of a virtual object interaction method provided in an exemplary embodiment of this application;

[0030] Figure 11 shows a flowchart of a virtual object interaction method provided in an exemplary embodiment of this application;

[0031] Figure 12 shows a structural block diagram of a virtual object interaction device provided in an exemplary embodiment of this application;

[0032] Figure 13 shows a schematic diagram of the structure of a computer device provided in an exemplary embodiment of this application. Detailed Implementation

[0033] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, stored data, displayed data, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of related data must comply with the relevant laws, regulations and standards of the relevant countries and regions. For example, the settings and operation information involved in this application were obtained with full authorization.

[0034] First, let me introduce the relevant terms used in this application:

[0035] A virtual container is a space or area used to hold at least one virtual object. This virtual container can exist as a physical entity within the virtual environment, such as a virtual crafting table, virtual furniture, virtual shelves, virtual chessboard, etc. However, it can also exist without a physical entity within the virtual environment, instead appearing as a virtual backpack, virtual equipment bar, virtual item bar, etc., which requires user interaction to open. In other words, a virtual container can also be an area within the user interface. Virtual containers can store virtual objects for extended periods, or they can temporarily hold virtual objects. Virtual containers can also be used to transform a first virtual object placed within them into a second virtual object, such as transforming an egg into a fried egg, wood into planks, stone into bricks, etc. This transformation can be one virtual object into one virtual object, multiple virtual objects into one virtual object, or one virtual object into multiple virtual objects. Multiple virtual objects can be the same type of virtual object, such as transforming a piece of wood into two planks, a stone into four bricks, four bricks into a stone wall, two planks into a wooden floor, etc. Multiple virtual objects can also be different virtual objects, such as transforming a piece of wood and a stone into an axe, a branch and a rope into a slingshot, an egg into a fried egg and a pile of eggshells, a chicken into a pile of chicken meat and a pile of bones, and so on. This transformation process can be called a manufacturing process or a processing process, etc. Optionally, a virtual container typically includes at least one virtual cell, which is used to display virtual objects stored in the virtual container, or, the virtual cell is used to display the first or second virtual object that the virtual container will transform. Optionally, the virtual cells in the virtual container have priorities; when a virtual object is used, the virtual object in the higher-priority virtual cell will be used first; when transforming a virtual object, the first or second virtual object in the higher-priority virtual cell will be transformed first.

[0036] Virtual chessboard: This refers to a virtual chessboard displayed (or provided) by an application when it runs on a terminal. The virtual chessboard can be a simulation of a real chessboard, a semi-simulated / semi-virtual chessboard, or a purely virtual chessboard. The virtual chessboard can be any of a two-dimensional, 2.5-dimensional, or three-dimensional virtual chessboard; this application does not limit the specific type of virtual chessboard.

[0037] Virtual functional facilities refer to facilities used to provide virtual items for virtual pets, such as virtual furniture. Depending on the type of virtual items provided, virtual functional facilities can be further subdivided, such as virtual food stalls for providing food to virtual pets, virtual medicine stations for providing medicine to virtual pets, and so on.

[0038] Virtual Crafting Station: Virtual furniture used to create virtual props.

[0039] Virtual object: An object in a virtual environment. A virtual object includes at least one of the following: virtual item, virtual character, virtual pet.

[0040] Virtual Character: A movable object in a virtual environment. This movable object can be at least one of virtual animals or anime characters. Optionally, when the virtual environment is a three-dimensional virtual environment, the virtual character can be a three-dimensional virtual model. Each virtual character has its own shape and volume in the three-dimensional virtual environment and occupies a portion of the space within the three-dimensional virtual environment. Optionally, the virtual character is a three-dimensional object constructed based on three-dimensional human skeleton technology. This virtual character achieves different external appearances by wearing different skins. In some implementations, the virtual character can also be implemented using a 2.5D or 2D model; this application does not limit this. Different types of virtual characters can have different names. For example, in some games that support pet raising, the virtual character can be a virtual pet; in some strategy games, the virtual character can be a virtual chess piece, and so on.

[0041] Virtual pet: refers to a controllable, movable object in a virtual world. Optionally, the virtual pet is controlled by artificial intelligence (AI), or by a state machine, or by other players. This application does not limit this. A virtual pet can be a virtual creature, virtual animal, virtual monster, virtual sprite, etc., for example, a movable object displayed in a three-dimensional virtual world in the form of an animal or other form. The virtual pet can be subjected to at least one of the interactive operations performed by the controlling virtual character, such as capturing, raising, and leveling up. The virtual pet can assist the controlling virtual character in at least one of the interactive operations, such as gathering, fighting, and altering terrain.

[0042] Main virtual character: refers to the virtual character that the player plays in the virtual world.

[0043] Virtual objects: In applications (such as game applications), virtual objects are visible, touchable, and interactive virtual characters. Some virtual objects have their own shape and volume in the virtual environment, occupying a portion of the space within the virtual environment; these virtual objects are generally not stackable in the virtual environment. Other virtual objects do not occupy space in the virtual environment, existing similarly to air, and can be stacked with non-stackable virtual objects. Furthermore, in some applications, all virtual objects can be stacked; this application does not limit this. A virtual object can be a virtual object that has a physical form in the virtual environment, that is, a model of a virtual object existing in the virtual environment; or, a virtual object can also be a virtual object that does not have a physical form in the virtual environment, that is, an image only displayed on the user interface.

[0044] Figure 1 illustrates an architecture diagram of a computer system provided in an exemplary embodiment of this application. The computer system may include a terminal 110 and a server 120. The terminal 110 may be at least one of a smartphone, tablet, e-book reader, MP3 player, MP4 player, laptop, and desktop computer. Optionally, the terminal 110 may have a client 130 running that supports a virtual environment. This client 130 may be any of the following: open-world game, role-playing game, simulation game, adventure game, casual competitive game, MMO (Massive Multiplayer Online) game, board game, MOBA (Multiplayer Online Battle Arena) game, SLG (Simulation Game), virtual reality application, 3D mapping application, FPS (First-Person Shooter) game, multiplayer shooting survival game, casual game, party game, sandbox game, virtual reality (VR) application, or augmented reality (AR) application. In this embodiment, the client 130 is an open-world game as an example. Terminal 110 is a terminal used by the user. The user uses terminal 110 to control a main virtual character located in the virtual environment. The main virtual character can be referred to as the user's virtual character, the virtual character controlled by the user, the first virtual character, etc. The activities of the main virtual character include, but are not limited to: moving, jumping, teleporting, releasing skills, using items, adjusting body posture, crawling, walking, running, riding, flying, jumping, driving, picking up, shooting, attacking, throwing, interacting with virtual items, talking, accepting quests, capturing virtual pets, controlling virtual pets, raising virtual pets, using virtual pets to fight, arranging virtual pets to harvest, arranging virtual pets to manufacture, arranging virtual pets to produce, placing virtual items that virtual pets can use, using throwing items, and attacking other virtual characters. In some strategy games, such as turn-based chess games like auto chess, where the client 130 is used, the user does not control a main virtual character in the virtual environment using the terminal 110. Instead, the user controls virtual pieces from a top-down perspective. During the preparation and / or battle phases of the game, the user uses the terminal 110 to purchase new virtual pieces or sell existing ones. Alternatively, during the preparation phase, the user uses the terminal to place virtual pieces in the battle area of ​​the virtual chessboard, such as dragging the first virtual piece and placing it on a virtual square. During the battle phase, the client 130 automatically controls the virtual pieces to fight based on their attributes, skills, and layout in the battle area.

[0045] Server 120 includes at least one of the following: a single server, multiple servers, a server cluster, a cloud computing platform, and a virtualization center. Server 120 is used to provide backend services to clients 130 that support virtual environments.

[0046] In some embodiments, only one terminal is shown in Figure 1, but in different embodiments, multiple other terminals can access the server 120. Optionally, the master virtual character and other virtual characters are in the same virtual environment. Optionally, the master virtual character and other virtual characters may belong to the same faction, the same team, the same organization, have a friend relationship, or have temporary communication permissions.

[0047] Terminal 110 and server 120 can communicate with each other via a network. This network can be a wired network or a wireless network. It should be noted that in some embodiments, server 120 and terminal 110 are the same device.

[0048] For example, the replacement operation of virtual objects is illustrated by taking virtual objects in two virtual containers as an example.

[0049] The virtual container can be at least one of the following: a virtual crafting table, virtual furniture, a virtual box, a virtual backpack, or a virtual chessboard. As shown in part (1) of Figure 1, a virtual backpack 10 and a virtual treatment table 11 are displayed. Both the virtual backpack 10 and the virtual treatment table 11 include at least two positions for placing virtual items, such as at least two virtual grids, each of which is used to place a virtual item. Optionally, each virtual grid has a priority, such as the earlier the virtual grid, the higher its priority.

[0050] In some scenarios, users need to add virtual medicines from the virtual backpack 10 to the virtual treatment table 11 for use by their virtual pets. Users may also want their virtual pets to prioritize using virtual medicines with lower manufacturing costs. In this case, the user might need to place the first virtual medicine 13, located in the first virtual slot 12 of the virtual backpack 10, into the second virtual slot 15 where the second virtual medicine 14 is located in the current virtual treatment table 11, and place the second virtual medicine 14 into the third virtual slot 17 where the current third virtual medicine 16 is located. The flag 18 indicates support for exchanging the positions of virtual items placed between the virtual backpack 10 and the virtual treatment table 11; that is, it supports placing virtual items from the virtual backpack 10 into virtual slots in the virtual treatment table 11, and it supports placing virtual items from the virtual treatment table 11 into the virtual backpack 10.

[0051] When a user needs to place the first virtual medicine 13 in the virtual backpack 10 into the second virtual grid 15 where the second virtual medicine 14 is located in the current virtual treatment table 11, and place the second virtual medicine 14 into the third virtual grid 17 where the current third virtual medicine 16 is located, the method shown in the embodiments of this application can be used to shorten the interaction process and improve efficiency.

[0052] Specifically, firstly, the first virtual medicine 13 located in the first virtual cell 12 of the virtual backpack 10 is selected, and the first virtual medicine 13 in the selected state is displayed. The first virtual medicine 13 in the selected state will change position according to the user's drag operation. The user can drag it above the second virtual cell 15 where the second virtual medicine 14 is located. At this time, the replacement indicator control 19 is displayed. The replacement indicator control 19 displays a progress bar and / or countdown, as shown in part (2) of Figure 1. In addition, when dragging the first virtual medicine 13, the first virtual medicine 20 in the first state can be displayed on the first virtual cell 12. This is to indicate the original virtual cell where the first virtual medicine 20 (i.e., the first operation object of the drag operation) is located. The first virtual medicine 20 in the first state is more transparent or less transparent than the first virtual object in the normal state (i.e., the first virtual medicine 13 shown in part (1) of Figure 1); or, the first virtual medicine 20 in the first state is a semi-transparent mask added to the first virtual object in the normal state, such as a black semi-transparent mask, a gray semi-transparent mask, etc. This method is designed to assist users in determining, during subsequent replacement processes, which virtual grid the dragged virtual object will be placed on if they release the button directly, or which virtual grid the replaced virtual object will be replaced on if they replace it directly. When the progress bar reaches 100% and / or the countdown becomes 0, the first virtual medicine 13 located in the second virtual grid 15 is displayed, as well as the second virtual medicine 14 in the selected state, as shown in part (3) of Figure 1; at this time, the user can continue to drag the second virtual medicine 14 above the third virtual grid 17 where the third virtual medicine 16 is located, and the replacement indicator control 19 is displayed again. When the progress bar reaches 100% and / or the countdown becomes 0, the second virtual medicine 14 located in the third virtual grid 17 is displayed, as well as the third virtual medicine 16 in the selected state; if the user does not want to continue exchanging, they can think of The selected third virtual medicine 16 is dragged to an empty virtual grid and released. This will display that the third virtual medicine 16 is placed in the first virtual grid 12 of the virtual backpack 10. Alternatively, the user can move the third virtual medicine 16 to any empty virtual grid and release. This will display that the third virtual medicine 16 is placed in that empty virtual grid. Alternatively, the user can move the third virtual medicine 16 to a virtual grid where other virtual objects are placed. This will display that the third virtual medicine 16 is placed in that virtual grid, and the other virtual objects will be placed in the first virtual grid 12. This achieves the swapping of the placement positions of the four items.

[0053] Figure 2 shows a flowchart of an interaction method for a virtual object provided in an exemplary embodiment of this application. This method can be executed by a computer device, which can be implemented as a terminal, such as the terminal shown in Figure 1. The method includes:

[0054] Step 210: Display at least two virtual objects, including a first virtual object located in a first position and a second virtual object located in a second position.

[0055] In some embodiments, the aforementioned position can be implemented as a divided virtual grid or as a point. Illustratively, taking the aforementioned position as a virtual grid as an example, at least two virtual objects include a first virtual object located on a first virtual grid and a second virtual object located on a second virtual grid. That is, the first position includes the location of the first virtual grid, and the second position includes the location of the second virtual grid.

[0056] Display at least two virtual objects, each of which is located on at least one virtual cell. In some embodiments, each virtual object occupies one virtual cell, or each virtual object occupies multiple virtual cells. Different virtual objects may occupy the same or different number of virtual cells, and the arrangement of the virtual cells occupied by different virtual objects may be the same or different.

[0057] Optionally, displaying at least two virtual objects refers to displaying models of at least two virtual objects. For example, in a client that supports displaying 3D models, displaying at least two virtual objects can mean displaying 3D models of at least two virtual objects located in the virtual environment; similarly, in other clients, such as clients that support displaying 2.5D models or clients that support displaying 2D models, the displayed at least two virtual objects can be 2.5D or 2D models of the virtual objects. In some other optional embodiments, displaying at least two virtual objects can also mean displaying display images corresponding to at least two virtual objects, where the display image of each of the at least two virtual objects is used to demonstrate the appearance of the virtual object. The display image of each of the at least two virtual objects can be a 2D image obtained by rendering the model (such as a 3D model) of the virtual object, or it can be a 2D image designed by an artist for the virtual object. For the sake of simplicity, in the following description of embodiments, "models of at least two virtual objects" and "display images of at least two virtual objects" are generally referred to as "at least two virtual objects".

[0058] Optionally, the virtual grid is located in a virtual environment, meaning the virtual grid has an entity within the virtual environment. The first virtual object located on the first virtual grid and the second virtual object located on the second virtual grid refer to the models of the first virtual object on the first virtual grid and the second virtual object on the second virtual grid, respectively, within the virtual environment. For example, a virtual chessboard is displayed in the virtual environment, divided into a playing area and a preparation area. Both the playing area and the preparation area include at least one virtual grid (also called a virtual chess piece). Both the first and second virtual objects are virtual chess pieces. The first virtual object located on the first virtual grid is the first virtual chess piece standing within the first virtual grid; the second virtual object located on the second virtual grid is the second virtual chess piece standing within the second virtual grid. Since the size and shape of the virtual chess pieces are usually not fixed, there may be instances where parts of a virtual chess piece's model are displayed on other virtual grids. Therefore, the virtual grid where the virtual chess piece is located is determined based on the foot of the virtual chess piece, or the lower half of the virtual chess piece.

[0059] Optionally, the virtual grid is located in the user interface, meaning the virtual grid does not exist as a physical entity in the virtual environment but is directly displayed on the user interface. Typically, when the virtual grid is in the user interface, the user cannot directly control the main virtual character or other virtual objects to interact with the virtual grid; instead, they need to manually interact with it through actions such as clicking, swiping, long-pressing, button presses, and voice commands. The first virtual object located in the first virtual grid and the second virtual object located in the second virtual grid refer to the display images of the first virtual object displayed in the first virtual grid and the second virtual object displayed in the second virtual grid. For example, when a user opens a virtual backpack, a virtual backpack display area is displayed on the user interface, and this virtual backpack display area includes at least two virtual grids. Displaying a virtual object's image on a virtual grid indicates that the virtual object is placed in the corresponding space. Users can retrieve the virtual object from their virtual inventory by interacting with the image. For example, the virtual object's model can be displayed in the virtual environment. To enhance realism, an animation of the main virtual character retrieving the virtual object from the inventory can be shown. Alternatively, users can use the virtual object by interacting with its image. For instance, if the virtual object is a virtual medicine used to increase the main virtual character's health, after the user clicks to use it, the virtual medicine on the grid can be de-displayed, or the quantity of the virtual medicine in the grid can be decreased by 1 to indicate that the virtual medicine has been used. Simultaneously, the main virtual character's health can be increased to indicate that the virtual medicine has been used. Furthermore, users can change the virtual object's position in the virtual inventory by interacting with its image, such as dragging the image to another virtual grid, and so on.

[0060] Optionally, a virtual grid is a grid used to place virtual objects; or, a virtual grid is a grid used to display virtual objects. A virtual grid can support placing one virtual object, or supporting placing multiple virtual objects of the same type, or supporting displaying one virtual object, or supporting displaying multiple virtual objects of the same type. Optionally, when multiple virtual objects are placed or displayed in a virtual grid, the virtual grid also displays the number of virtual objects, which indicates the number of virtual objects currently stored in the virtual grid.

[0061] Step 220: In response to a drag operation on the first virtual object, control the first virtual object in the dragged state to move following the drag operation.

[0062] Specifically, in response to a drag operation on a first virtual object, the first virtual object in the dragged state is displayed, and the first virtual object in the dragged state is controlled to move following the drag operation.

[0063] The "dragged state" refers to the state in which the first virtual object moves following the drag operation. Optionally, the first virtual object in the dragged state can also be called the first virtual object in the selected state. Optionally, controlling the first virtual object in the dragged state to move following the drag operation can be understood as controlling the model of the first virtual object in the dragged state to move following the drag operation, or it can be understood as controlling the display image of the first virtual object in the dragged state to move following the drag operation. Optionally, the drag operation is performed by the user through the terminal's display screen (which is a touch-enabled display screen, also known as a touch screen) or an external interactive device (such as a mouse, keyboard, electronic stylus, game controller, etc.). Illustratively, when the touch point intersects with the first virtual object, the touch points during the dragging process are continuously collected, or the touch points during the dragging process are collected at target time intervals, and the position information of the first virtual object is updated based on the touch points. This position information can be three-dimensional coordinates in the virtual environment or two-dimensional coordinates on the user interface.

[0064] Optionally, in response to a drag operation on the first virtual object, the display of the first virtual object on the first virtual grid can be canceled, or the first virtual object in a first state can be displayed on the first virtual grid. The first state indicates that the first virtual object is in a dragged state, or it indicates that the first virtual object is in an uninteractive state. The first virtual object in the first state is more transparent than the first virtual object in the normal state, or its transparency is higher; or, the first virtual object in the first state has a semi-transparent overlay added to it, such as a black semi-transparent overlay, a gray semi-transparent overlay, etc. Displaying the first virtual object in the first state on the first virtual grid is to identify the original virtual grid where the first virtual object is located, so that the user can determine which virtual grid the dragged virtual object will be placed on if the user releases the drag handle during subsequent replacements. Using the first virtual object in the first state to indicate the original virtual grid of the first virtual object enhances the display of relevant information and improves guidance during the interaction process.

[0065] Step 230: In response to dragging the first virtual object to the second position, cancel the dragged state of the first virtual object, display the first virtual object at the second position; and display the second virtual object in the dragged state.

[0066] In some embodiments, in response to a drag operation of dragging a first virtual object to a second position where a second virtual object is placed, the dragged state of the first virtual object is canceled, and the first virtual object is displayed at the second position; and the second virtual object in the dragged state is displayed. Illustratively, in response to a drag operation of dragging a first virtual object to a second virtual grid where a second virtual object is placed, the dragged state of the first virtual object is canceled, and the first virtual object is displayed on the second virtual grid; and the second virtual object in the dragged state is displayed.

[0067] In response to a drag operation that places the first virtual object onto the second virtual grid where the second virtual object is placed, the display states of the first and second virtual objects are swapped. This means the first virtual object is now displayed on the second virtual grid, or its display state is updated to show it as being on the second virtual grid, or as being placed on the second virtual grid. Similarly, displaying the second virtual object in a dragged state means updating its display state to show it as being dragged. Before the drag operation, the second virtual object was displayed as being on the second virtual grid, and the first virtual object was in a dragged state. In other words, the states of the first and second virtual objects are swapped. Placing the first virtual object on the second virtual grid and having it occupy the second virtual grid does not only exchange their positions but also their states. Players can continue to adjust the position of the second virtual object by dragging it. Optionally, when determining whether the first virtual object overlaps with the second virtual grid, it can be done by determining whether the touch point is located in the area corresponding to the second virtual grid; or, it can be determined whether the first virtual object is located in the area corresponding to the second virtual grid, where the center coordinates of the first virtual object are determined based on the touch point, or the upper right corner coordinates of the first virtual object are determined based on the touch point, and so on.

[0068] In summary, the method provided in this application, when dragging a first virtual object to place it on a second virtual grid containing a second virtual object, swaps the display modes of the first and second virtual objects. Specifically, it updates the display state of the first virtual object to show it as placed on the second virtual grid, and updates the display state of the second virtual object to show it as dragged. This allows a single drag operation to support changes in the storage positions of at least two virtual objects, and these changes are not limited to swapping the storage positions of these two virtual objects. In scenarios where a user needs to change the storage positions of multiple virtual objects, this method eliminates the need for multiple swaps between the storage positions of two virtual objects, reducing the number of drag operations required to re-drag virtual objects that need to have their storage positions swapped.

[0069] For example, virtual object A is placed on virtual grid 1, virtual object B is placed on virtual grid 2, and virtual object C is placed on virtual grid 3. In related technologies, to place virtual object A on virtual grid 2 and virtual object B on virtual grid 3, virtual object A must first be dragged to virtual grid 2 and the drag operation ended (e.g., releasing the button or physical button), thus swapping the positions of virtual object A and virtual object B. That is, virtual object A is placed on virtual grid 2, and virtual object B is placed on virtual grid 1. Then, virtual object B, currently in virtual grid 1, is dragged to virtual grid 3 where virtual object C is placed, and the drag operation is ended, thus swapping the positions of virtual object B and virtual object C. The method shown in this application embodiment only requires the user to drag virtual object A onto virtual grid 2 where virtual object B is placed. Without ending the dragging operation, virtual object A and the dragged virtual object B will be displayed on virtual grid 2. The user can then continue the dragging operation to drag the dragged virtual object B onto virtual grid 3 where virtual object C is placed to achieve the aforementioned goal. Alternatively, the method shown in this application embodiment can be understood as updating the storage location of virtual object A to the dragged virtual location after virtual object A is dragged, rather than the original virtual grid where virtual object A was stored. This allows for dragging multiple virtual objects in a single operation, improving human-computer interaction efficiency and avoiding the user repeatedly selecting a virtual object, simplifying the dragging process and enhancing the user experience.

[0070] The following section will further explain the interaction methods for virtual objects.

[0071] In some embodiments, step 230 can be implemented as follows: in response to dragging the first virtual object to the second virtual grid, if a first condition is met, cancel the dragging operation of the first virtual object. Optionally, in response to dragging the first virtual object to the second virtual grid where the second virtual object is placed, if a first condition is met, cancel the dragging state of the first virtual object, display the first virtual object on the second virtual grid, and display the second virtual object in the dragging state; wherein the first condition includes at least one of the following: the overlap ratio between the first virtual object and the second virtual grid reaches a ratio threshold; the overlap time between the first virtual object and the second virtual grid reaches a time threshold.

[0072] Optionally, the overlap time refers to the duration of overlap between the first virtual object and the second virtual grid, that is, the duration of overlap between the model of the first virtual object and the model of the second virtual grid, or the duration of overlap between the display image of the first virtual object and the second virtual grid, or the duration of overlap between the model of the first virtual object and the model of the second virtual grid reaching a certain ratio threshold, or the duration of overlap between the display image of the first virtual object and the second virtual grid reaching a certain ratio threshold. This overlap time can be the time starting from the moment the overlap ratio reaches the ratio threshold, or the cumulative time during the drag operation when the overlap ratio reaches the ratio threshold. In other words, reaching the ratio threshold can be used as a criterion for determining whether the overlap is valid, and the overlap time is the valid overlap time. For example, if the time threshold is 1 second, during a user's dragging operation, the first virtual object is dragged onto the second virtual grid, satisfying the overlap ratio reaching the threshold and remaining there for 0.5 seconds. However, due to an accidental misoperation, the first virtual object is moved, causing the overlap ratio to fall below the threshold. If the overlap time is the time counted from the moment the overlap ratio reaches the threshold, then when the user drags the first virtual object again to make its overlap ratio with the second virtual grid reach the threshold, the timer needs to restart from 0 seconds. If the overlap time can be the cumulative time during the dragging operation when the overlap ratio reaches the threshold, then when the user drags the first virtual object again to make its overlap ratio with the second virtual grid reach the threshold, the timer will continue from 0.5 seconds.

[0073] In some embodiments, in response to dragging a first virtual object to a second virtual grid, at least one of a progress bar and a countdown is displayed, the progress bar indicating the ratio of the overlap time to a time threshold, and the countdown indicating the difference between the time threshold and the overlap time; if a first condition is met, the dragging state of the first virtual object is canceled, and the first virtual object is displayed on the second virtual grid; and the second virtual object in the dragging state is displayed; wherein the first condition includes at least one of the following: the progress displayed by the progress bar reaches a progress threshold, such as: the progress displayed by the progress bar reaches 100%; the countdown reaches a timing requirement, such as the countdown is 0.

[0074] Optionally, the progress bar is used to indicate the ratio of the overlap time to a time threshold, or the progress of switching the display states of the first virtual object and the second virtual object, or the progress of placing the first virtual object onto the second virtual grid. Optionally, the countdown timer is used to indicate the difference between the time threshold and the overlap time, or the progress bar is used to indicate the current overlap time. Optionally, the progress bar and the countdown timer are displayed using the same control, or the progress bar and the countdown timer are displayed using different controls. Optionally, the progress bar and / or the countdown timer are displayed around the periphery of the second virtual grid, or the progress bar and / or the countdown timer are displayed around the periphery of the first virtual object. The periphery is a circular area centered on the center of the second virtual grid or the first virtual object, the diameter or radius of which is usually set by the developer, such as 10mm; or the periphery is a square area centered on the center of the second virtual grid or the first virtual object, the side length or area of ​​which is usually set by the developer. However, in some embodiments, users are allowed to set the position of the displayed progress bar and / or countdown timer themselves, and this application embodiment does not limit this.

[0075] In some embodiments, in response to dragging a first virtual object to a second virtual grid, if the overlap ratio between the first virtual object and the second virtual grid reaches a ratio threshold, at least one of a progress bar and a countdown is displayed.

[0076] Optionally, the validity of the drag operation is determined based on whether the overlap ratio between the first virtual object and the second virtual grid reaches a ratio threshold. That is, when the overlap ratio between the first virtual object and the second virtual grid reaches the ratio threshold, the drag operation is determined to be valid, and at least one of the progress bar and countdown is displayed; when the overlap ratio between the first virtual object and the second virtual grid does not reach the ratio threshold, the drag operation is determined to be invalid, and at least one of the progress bar and countdown is not displayed.

[0077] In summary, the method provided in this application further illustrates conditional judgment of interactive operations on virtual objects. Only when a first condition is met is the display state of the first and second virtual objects exchanged using the method shown in this application, which simplifies the drag-and-drop replacement or drag-and-drop placement process. This conditional simplification allows users appropriate time to determine whether simplified drag-and-drop replacement or simplified drag-and-drop placement is necessary, avoiding a poor experience for novice users unfamiliar with the process. Furthermore, conditional judgment based on overlap time and / or overlap ratio can prevent erroneous operations caused by unconditionally triggering simplified drag-and-drop replacement (or simplified drag-and-drop placement), improving the accuracy of the interaction. Especially regarding the conditional judgment of overlap area, determining the virtual grid selected by the user based on the overlap area better reflects the user's needs and helps improve accuracy.

[0078] Furthermore, during the simplified judgment process based on conditional judgment, displaying a progress bar and / or countdown timer to the user intuitively informs them of the operation's progress and remaining time. This visual and temporal feedback allows users to better immerse themselves in the game or application's interaction, enhancing their sense of engagement. This feedback mechanism makes users feel like they are part of the interaction process, rather than passively waiting. Moreover, the display of the progress bar and countdown timer clearly informs users that the operation is in progress, thus avoiding errors caused by accidental actions (such as repeated clicks or cancellations).

[0079] Furthermore, given that the first condition includes the overlap ratio and overlap time, the system determines whether the user needs to interact based on the overlap ratio. Only after confirming that the user needs to interact with the virtual grid is the progress bar and / or countdown displayed. This allows the user to control the overlap more precisely, thereby improving the precision of the operation and further avoiding the possibility of misoperation, thus preventing a bad experience caused by misoperation.

[0080] Furthermore, by setting a first condition for simplified drag-and-drop replacement (or simplified drag-and-drop placement), the methods shown in this application embodiment can be compatible with the replacement methods shown in related technologies. This expands the interaction methods for virtual objects based on the replacement methods of related technologies, thereby increasing the upper limit of interaction for virtual objects. However, it should be noted that when ensuring compatibility between the methods shown in this application embodiment and the replacement methods in related technologies, a judgment condition can be set for the replacement methods shown in related technologies, or a judgment condition can be set for both methods. This application embodiment does not limit this, but the protection scope of this application embodiment is not limited thereto.

[0081] Since the overlap ratio between the first virtual object and the second virtual grid varies depending on the different representations of the first virtual object and the second virtual grid, there are multiple ways to calculate the overlap ratio. The following is a brief introduction to some of these calculation methods.

[0082] (1) Calculate the ratio of the overlapping area of ​​the first virtual object's display image and the second virtual grid to the total area of ​​the second virtual grid.

[0083] For example, during the dragging process, the overlap area between the display image of the first virtual object and the second virtual grid is determined in real time, or at intervals of a target time period. The overlap ratio is calculated based on the overlap area: overlap ratio = overlap area / total area of ​​the second virtual grid. Here, the second virtual grid is a two-dimensional region, such as a rectangular region, or a two-dimensional graphic, such as a rectangle. Optionally, when a second virtual object is placed in the second virtual grid, the display image of the second virtual object is displayed on top of the second virtual grid. When confirming the overlap area, it can be considered as determining the overlap area between the display image of the first virtual object and the second virtual grid, or it can be considered as determining the overlap area between the display images of the first virtual object and the display images of the second virtual object.

[0084] (2) Calculate the ratio of the overlapping area of ​​the first virtual object's display image and the second virtual grid to the total area of ​​the first virtual object's display image.

[0085] For example, during the dragging process, the overlap area between the display image of the first virtual object and the second virtual grid is determined in real time, or at intervals of a target time period. After the overlap area is confirmed, the overlap ratio is calculated: overlap ratio = overlap area / total area of ​​the display image of the first virtual object.

[0086] The second virtual grid is either a two-dimensional region or a two-dimensional graphic.

[0087] (3) Calculate the ratio of the overlap volume between the model of the first virtual object and the second virtual grid to the total volume of the second virtual grid.

[0088] Optionally, the model of the first virtual object is a 3D model, and the second virtual grid is also a 3D model. The second virtual grid is a 3D model with a storage space, such as a 3D model of a 3D storage grid, which has storage space as its storage space. For example, during dragging, the overlap volume between the model of the first virtual object and the second virtual grid is determined in real time, or at intervals of a target time period. The overlap volume refers to the volume of the 3D model of the first virtual object within the storage space of the second virtual grid. The overlap ratio is calculated based on the overlap volume: overlap ratio = overlap volume / total volume of the second virtual grid. Optionally, the total volume of the second virtual grid is calculated in real time, or the total volume of the second virtual grid is a pre-set constant.

[0089] (4) Calculate the ratio of the overlap volume between the model of the first virtual object and the second virtual grid to the total volume of the first virtual object.

[0090] Optionally, the model of the first virtual object is a 3D model, and the second virtual grid is also a 3D model. For example, during the dragging process, the overlap volume between the model of the first virtual object and the second virtual grid is determined in real time, or the overlap volume is determined at intervals of a target time period. Here, the overlap volume refers to the volume of the 3D model of the first virtual object within the containment space of the second virtual grid. After confirming the overlap volume, the overlap ratio is calculated: overlap ratio = overlap volume / total volume of the first virtual object. Optionally, the total volume of the first virtual object is calculated in real time, or the total volume of the first virtual object is a pre-set constant.

[0091] (5) Calculate the ratio of the overlap area between the bottom surface of the first virtual object model and the second virtual grid to the total area of ​​the second virtual grid.

[0092] Optionally, the model of the first virtual object is a three-dimensional model. The second virtual grid is also a three-dimensional model, or, the second virtual grid is a two-dimensional region, or, the second virtual grid is a two-dimensional graphic. Optionally, when the second virtual grid is a two-dimensional region or a two-dimensional graphic, the angle between the second virtual grid and the bottom surface of the model of the first virtual object is less than 90°. When the second virtual grid is a three-dimensional model, it can be projected onto the bottom surface of the model of the first virtual object to obtain the projection surface of the second virtual grid. Optionally, the bottom surface of the model of the first virtual object refers to the bottom surface of the model of the first virtual object. If the first virtual object is a virtual character, the bottom surface of the model of the first virtual object may be the feet of the virtual character. Alternatively, the bottom surface of the model of the first virtual object refers to the projection surface of the model of the first virtual object after projection onto the bottom, which can be understood as the shadow surface obtained by using parallel light to illuminate the top of the model of the virtual object.

[0093] Optionally, if the second virtual grid (or the projection surface of the second virtual grid) is parallel to the bottom surface of the model of the first virtual object, the overlapping area between the bottom surface of the model of the first virtual object and the second virtual grid can be calculated by overlapping the second virtual grid with the bottom surface of the model of the first virtual object; if the second virtual grid is not parallel to the bottom surface of the model of the first virtual object, the second virtual grid can be projected onto the bottom surface of the model of the first virtual object to obtain the projection surface of the second virtual grid, and then the overlapping area between the bottom surface of the model of the first virtual object and the second virtual grid can be calculated, and so on.

[0094] For example, during the dragging process, the overlap area between the bottom surface of the first virtual object's model and the second virtual grid is determined in real-time or at intervals based on the target duration. The overlap ratio is calculated based on the overlap area: overlap ratio = overlap area / total area of ​​the second virtual object (or the projection surface of the second virtual object).

[0095] (6) Calculate the ratio of the overlap area between the bottom surface of the first virtual object model and the second virtual grid to the bottom surface area of ​​the first virtual object model.

[0096] For example, during the dragging process, the overlap area between the bottom surface of the first virtual object model and the second virtual grid is determined in real time or at intervals based on the target duration. The overlap ratio is calculated based on the overlap area, where overlap ratio = overlap area / bottom surface area of ​​the first virtual object model. The process of "determining the overlap area between the bottom surface of the first virtual object model and the second virtual grid" can be referred to the process shown in step (5) above, and will not be repeated here.

[0097] It should be noted that regarding the calculation method for the overlap ratio, since virtual objects can be two-dimensional, 2.5-dimensional, or three-dimensional, and virtual grids can also be two-dimensional, 2.5-dimensional, or three-dimensional, the overlap ratio can be calculated by calculating the overlap volume or the overlap area. For three-dimensional models, when calculating the overlap area, the three-dimensional model can be projected onto a projection plane, which can be the bottom surface of the model or the screen plane, where the screen plane refers to the plane used to display the virtual environment. When calculating the overlap ratio, the denominator can be the volume or area of ​​the virtual object, or the volume or area of ​​the virtual grid, etc. Therefore, the above only shows some methods for calculating the overlap ratio. Other methods for calculating the overlap ratio are not listed in this application embodiment, but the protection scope of this application embodiment is not limited thereto.

[0098] Furthermore, regarding the method for determining the overlap between virtual objects and virtual grids, as shown in Figure 3, when determining the virtual volume between a virtual object and a virtual grid, the method shown in part (1) of Figure 3 can be used to calculate the volume of the overlapping portion 32 between virtual grid 30 and virtual object 31; the method shown in part (2) of Figure 3 can be used to calculate the volume of the overlapping portion 34 between virtual grid 30 and the bounding box 33 of virtual object 31; the method shown in part (3) of Figure 3 can be used to calculate the volume of the overlapping portion 36 between the bounding box 35 of virtual grid 30 and virtual object 31; or the method shown in part (4) of Figure 3 can be used to calculate the volume of the overlapping portion 37 between the bounding box 35 of virtual grid 30 and the bounding box 33 of virtual object 31. The bounding box is a simplified representation of the geometric shape of the area occupied by the model in space. The bounding box can be a cuboid as shown in parts (2), (3) and (4) of Figure 3, but in some optional embodiments, the bounding box can also be other geometric shapes such as spheres and cubes.

[0099] For a second virtual object that is being dragged, the following scenarios exist depending on the user's different interactive operations.

[0100] Scenario 1: Swap the display state with the third virtual object. Scenario 2: Place the second virtual object on the third virtual grid. Scenario 3: Cancel dragging the second virtual object.

[0101] The three scenarios will be introduced below. It should be noted that the order of introduction does not indicate the superiority or inferiority of the various implementation methods.

[0102] Scenario 1: Swap the display state with the third virtual object.

[0103] In some embodiments, in response to dragging a second virtual object in a dragged state to a third position, the second virtual object is displayed at the third position, and a third virtual object in a dragged state is displayed. Illustratively, in response to a dragging operation of dragging a second virtual object in a dragged state to a third virtual cell where a third virtual object is placed, the dragged state of the second virtual object is canceled, and the second virtual object is displayed on the third virtual cell; and the third virtual object in a dragged state is displayed.

[0104] Optionally, for the drag operation of dragging the second virtual object in the dragged state to the third virtual grid where the third virtual object is placed, the drag operation of dragging the first virtual object in the dragged state to the second virtual grid where the second virtual object is placed can be referred to in the above step 230 and the optional embodiment corresponding to step 230, which will not be described again here.

[0105] That is, in some optional embodiments, in response to the dragging operation of dragging the i-th virtual object in the dragged state to the i+1 virtual cell where the i+1 virtual object is placed, the dragged state of the i-th virtual object is canceled, and the i-th virtual object is displayed on the i+1 virtual cell; and the i+1 virtual object in the dragged state is displayed, where i is a positive integer.

[0106] For example, taking virtual medicine as an example, as shown in part (1) of Figure 4, after the user replaces the display state of the first virtual medicine 13 and the second virtual medicine 14, the user continues to drag the second virtual medicine 14, which is in a dragged state, to the top of the third virtual cell 17 where the third virtual medicine 16 is located, as shown in part (2) of Figure 4, and the replacement indicator control 19 is displayed again. When the progress bar reaches 100% and / or the countdown becomes 0, as shown in part (3) of Figure 4, the second virtual medicine 14 located in the third virtual cell 17 is displayed, and the third virtual medicine 16, which is in a selected state, is also displayed.

[0107] In summary, the method provided in this application embodiment allows users to continue dragging a second virtual object and exchange display states with a third virtual object placed on a third virtual grid. That is, it supports simplified drag-and-drop replacement (or simplified dragging method) for at least three virtual objects, thereby enabling dragging processing of multiple virtual objects in a single drag operation, improving human-computer interaction efficiency, avoiding users from repeatedly selecting a virtual object, simplifying the dragging process, and enhancing user experience.

[0108] Scenario 2: Place the second virtual object on the third virtual grid.

[0109] In some embodiments, in response to dragging a second virtual object in a dragged state to a third position, the second virtual object is displayed at the third position, and the third virtual object is displayed at the first position. Illustratively, in response to a placement operation following dragging a second virtual object in a dragged state to the third virtual grid where the third virtual object is placed, the dragged state of the second virtual object is canceled, and the second virtual object is displayed on the third virtual grid; and the third virtual object is displayed on the first virtual grid.

[0110] Optionally, the placement operation of dragging the second virtual object to the third virtual cell where the third virtual object is placed can be implemented as follows: after dragging the second virtual object to the third virtual cell where the third virtual object is placed, release the button; or, after dragging the second virtual object to the third virtual cell where the third virtual object is placed, release the physical button (such as the left mouse button); or, after dragging the second virtual object to the third virtual cell where the third virtual object is placed, receive a trigger operation on the release control. The release control can be a visible control or a hidden control bound to a physical button (such as the right mouse button).

[0111] Optionally, in response to the placement operation after dragging the second virtual object to the third virtual grid, the storage positions of the second and third virtual objects are updated. The second virtual object is displayed on the third virtual grid, and the third virtual object is displayed on the first virtual grid. Since the first virtual object is dragged to the second virtual grid where the second virtual object is placed, and the display states of the first and second virtual objects are switched, the first virtual grid can be considered to belong to the second virtual object. The second virtual object is not displayed on the first virtual grid only because the user needs to continue dragging it.

[0112] Optionally, in response to the placement operation after dragging the second virtual object in a dragged state to the third virtual grid, the dragged state of the second virtual object is canceled, and the second virtual object is displayed on the third virtual grid; and displaying the third virtual object on the first virtual grid can also be understood as, in response to the placement operation after dragging the second virtual object in a dragged state to the third virtual grid where the third virtual object is placed, placing the second virtual object on the third virtual grid; and placing the third virtual object on the original virtual grid, where the original virtual grid is the virtual grid where the virtual object was first dragged in the current drag operation, and in the embodiments of this application, the original virtual grid is the first virtual grid.

[0113] For example, taking virtual medicine as an example, as shown in part (1) of Figure 5, after the user changes the display state of the first virtual medicine 13 and the second virtual medicine 14, the user continues to drag the second virtual medicine 14, which is in a dragged state, to the top of the third virtual cell 17 where the third virtual medicine 16 is located and ends the dragging operation, as shown in part (2) of Figure 5. At this time, the replacement indicator control 19 will not be displayed. After the user releases his finger, as shown in part (3) of Figure 5, the second virtual medicine 14 located in the third virtual cell 17 and the third virtual medicine 16 located in the first virtual cell 12 are displayed. Thus, the rotation operation of placing the first virtual medicine in the second virtual cell, the second virtual medicine in the third virtual cell, and the third virtual medicine in the first virtual cell is realized.

[0114] In summary, the method shown in the embodiments of this application provides an interactive scenario for ending a drag operation. That is, when the user wants to end the drag, the second virtual object currently being dragged is dragged to the third virtual grid, thereby placing the second virtual object on the third virtual grid and the third virtual object on the first virtual grid, thereby realizing the rotation of the virtual grids where multiple virtual objects are located, and improving the efficiency of the rotation operation for multiple virtual objects.

[0115] Scenario 3: Cancel dragging the second virtual object.

[0116] In some embodiments, the method further includes: displaying the second virtual object on the first virtual grid in response to a placement operation on the second virtual object in a dragged state.

[0117] Optionally, when placing the second virtual object, it can be placed at any position. If no free virtual grid is included, the second virtual object is displayed on the first virtual grid. Specifically, if the virtual container containing the first virtual grid does not contain any free virtual grids, the second virtual object is displayed on the first virtual grid. If free virtual grids are included, the second virtual object can be displayed on the free virtual grids; if the virtual container containing the first virtual grid includes free virtual grids, the second virtual object is displayed on the free virtual grids. Alternatively, the overlap ratio between the second virtual object and the free virtual grids is determined; if the overlap ratio meets the target ratio, the second virtual object is displayed on the free virtual grids; if the overlap ratio does not meet the target ratio, the second virtual object is displayed on the first virtual grid.

[0118] In response to a placement operation on a second virtual object that is in a dragged state, a virtual grid for placing the second virtual object is determined. This virtual grid can be a first virtual grid or an empty virtual grid that overlaps with the second virtual object.

[0119] For example, taking virtual medicine as an example, as shown in part (1) of Figure 6, after the user replaces the display state of the first virtual medicine 13 and the second virtual medicine 14, the user drags the second virtual medicine 14, which is in a dragged state, to a place without a virtual grid, as shown in part (2) of Figure 6. After the user releases their finger, as shown in part (3) of Figure 6, the second virtual medicine 14 located in the first virtual grid 12 is displayed, that is, the replacement operation of placing the first virtual medicine 13 on the second virtual grid and the second virtual medicine 14 on the first virtual grid 12 is realized.

[0120] For example, taking virtual medicine as an example, as shown in part (1) of Figure 7, after the user changes the display state of the first virtual medicine 13 and the second virtual medicine 14, the user drags the second virtual medicine 14, which is in a dragged state, to the empty virtual grid 20, as shown in part (2) of Figure 7. After the user releases their finger, as shown in part (3) of Figure 7, the second virtual medicine 14 located in the empty virtual grid 20 is displayed, that is, the placement operation of placing the first virtual medicine 13 in the second virtual grid and the second virtual medicine 14 in the empty virtual grid 20 is realized. It should be noted that when the first virtual medicine 13 in the first state was originally displayed on the first virtual grid 12, in response to the user's placement operation of the second virtual medicine 14 in the dragged state, the second virtual medicine 14 located in the empty virtual grid 20 is displayed, and the display of the first virtual medicine 13 in the first state on the first virtual grid 12 is canceled.

[0121] In summary, the method shown in the embodiments of this application provides another interactive scenario for ending a drag operation. That is, when the user wants to end the drag operation, the second virtual object currently being dragged is dragged to a place without virtual grids or an empty virtual grid, thereby placing the second virtual object on the first virtual grid or an empty virtual grid. This allows a single drag operation to change the virtual grids where multiple virtual objects are located, improving the efficiency of placing multiple virtual objects.

[0122] It should be noted that scenarios one, two, and three above can be implemented as independent embodiments or in combination. For example, scenarios one and two can be implemented in combination, where the user replaces the storage location of multiple virtual objects using the method shown in scenario one, and then ends the drag operation using the method shown in scenario two; or, scenarios one and three can be implemented in combination, where the user replaces the storage location of multiple virtual objects using the method shown in scenario one, and then ends the drag operation using the method shown in scenario three; or, scenarios one, two, and three can be implemented in combination, meaning that after the user replaces the storage location of multiple virtual objects using the method shown in scenario one, they can choose to end the drag operation using either the method shown in scenario two or scenario three, and so on.

[0123] In some optional embodiments, the first position corresponds to the first priority, the second position corresponds to the second priority, and the third position corresponds to the third priority, with the first, second, and third priorities being different priorities. Illustratively, the first virtual grid corresponds to the first priority, the second virtual grid corresponds to the second priority, and the third virtual grid corresponds to the third priority. That is, different virtual grids have different priorities. In this scenario, if a user unlocks a new ability and needs to rearrange the placement of virtual objects according to their different abilities, the method shown in this embodiment can be used to quickly change the storage location of virtual objects, thereby improving the interactive experience and efficiency. Optionally, the first virtual grid corresponds to the first priority, and the second virtual grid corresponds to the second priority, with the first and second priorities being different priorities. The priority is used to indicate the order in which virtual objects are used, or the order in which virtual objects are deployed, or the order in which virtual objects are manufactured, or the order in which virtual objects are upgraded.

[0124] In some embodiments, at least two virtual objects are located in the same virtual container; or, at least two virtual objects are located in at least two virtual containers, and at least one virtual object is placed in each of the at least two virtual containers; wherein, the virtual container includes at least one virtual cell, and each virtual cell in the at least one virtual cell is used to place a virtual object.

[0125] Optionally, the first virtual object and the second virtual object are located in the same virtual container; or, the first virtual object is located in the first virtual container and the second virtual object is located in the second virtual container; or, the first virtual object and the second virtual object are located in the first virtual container and the third virtual object is located in the second virtual container; or, the first virtual object is located in the first virtual container and the second virtual object and the third virtual object are located in the second virtual container, etc.

[0126] Optionally, the virtual container can be any of the following: a virtual equipment bar; a virtual backpack; a virtual crafting table; virtual furniture; a virtual shelf; a virtual taskbar; a virtual chessboard; or a virtual functional facility. Optionally, the first virtual container and the second virtual container can be the same type of virtual container or different types of virtual containers.

[0127] It should be noted that the virtual object interaction methods shown above are applicable to different types of applications and different usage scenarios of the same application. Specifically, these include adding virtual items from a virtual backpack to virtual functional facilities, equipping virtual items from a virtual backpack to a virtual equipment slot, moving virtual chess pieces on a virtual chessboard, and so on. The following describes the specific process of applying the virtual object interaction methods to the above scenarios. It should be noted that this application embodiment only lists some application scenarios of the virtual object interaction methods; other application scenarios are not listed in this application embodiment, but the scope of protection of this application is not limited thereto.

[0128] 1. Add virtual items from the virtual backpack to virtual functional facilities.

[0129] In some embodiments, the first position is located in the virtual backpack, and the second position is located in the virtual functional facility, that is, displaying the first virtual item located in the first position of the virtual backpack; and displaying the second virtual item located in the second position of the virtual functional facility. Corresponding to dragging the first virtual item to the second position in the virtual functional facility, canceling the dragged state of the first virtual item, displaying the first virtual item in the second position, and displaying the second virtual item in the dragged state.

[0130] Taking the first position as the first virtual grid and the second position as the second virtual grid as an example. The first virtual grid is located in the virtual backpack, and the first virtual object is the first virtual item; the second virtual grid is located in the virtual functional facility, and the second virtual object is the second virtual item; the virtual functional facility is used to provide virtual items for the virtual pet. As shown in Figure 8, step 210 can be implemented as step 211, step 220 can be implemented as step 221, and step 230 can be implemented as step 231.

[0131] Step 211: Display the first virtual item located in the first virtual slot of the virtual backpack and the second virtual item located in the second virtual slot of the virtual functional facility.

[0132] Optionally, the virtual backpack includes at least one virtual cell, displaying all or a portion of the virtual cells in the virtual backpack. The virtual functional facility includes at least one virtual cell, displaying all or a portion of the virtual cells in the virtual functional facility.

[0133] Optionally, each virtual cell in the virtual functional facility has a different priority. The priority indicates the priority at which the virtual objects in the virtual cell are used by the virtual pet, that is, the order in which the virtual pet uses the virtual objects in the virtual functional facility. Generally speaking, the virtual pet will prioritize using virtual items in the higher-priority virtual cells.

[0134] Step 221: In response to a drag operation on the first virtual prop, display the first virtual prop in the dragged state; and control the first virtual prop in the dragged state to move following the drag operation.

[0135] Optionally, the first virtual prop in the dragged state can also be referred to as the first virtual prop in the selected state.

[0136] Step 231: In response to dragging the first virtual prop to the second virtual grid in the virtual functional facility where the second virtual prop is placed, cancel the dragged state of the first virtual prop and display the first virtual prop on the second virtual grid; and display the second virtual prop in the dragged state.

[0137] Optionally, in response to a drag operation that drags the first virtual item to the second virtual grid where the second virtual item is placed, if a first condition is met, the dragged state of the first virtual item is canceled, and the first virtual item is displayed on the second virtual grid; and the second virtual item in the dragged state is displayed; wherein the first condition includes at least one of the following: the overlap ratio between the first virtual item and the second virtual grid reaches a ratio threshold; the overlap time between the first virtual item and the second virtual grid reaches a time threshold.

[0138] In some embodiments, in response to a drag operation of dragging a first virtual prop onto a second virtual grid where a second virtual prop is placed, at least one of a progress bar and a countdown timer is displayed. The progress bar indicates the ratio of the overlap time to a time threshold, and the countdown timer indicates the difference between the time threshold and the overlap time. If a first condition is met, the dragging state of the first virtual prop is cancelled, and the first virtual prop is displayed on the second virtual grid. The second virtual prop in the dragged state is also displayed. The first condition includes at least one of the following: the progress displayed by the progress bar reaches a progress threshold, such as 100%; the countdown timer reaches a timing requirement, such as a countdown of 0. In some embodiments, the first condition further includes the overlap ratio between the first virtual object and the second virtual grid reaching a ratio threshold. In response to a drag operation of dragging the first virtual prop onto the second virtual grid where the second virtual prop is placed, if the overlap ratio between the first virtual prop and the second virtual grid reaches the ratio threshold, at least one of a progress bar and a countdown timer is displayed.

[0139] In some embodiments, the virtual functional facility also displays a third virtual prop located in a third virtual grid; in response to a drag operation that drags a second virtual prop in a dragged state to the third virtual grid where the third virtual prop is placed, the second virtual prop is displayed on the third virtual grid; and the third virtual prop in a dragged state is displayed.

[0140] In some embodiments, in response to a placement operation following dragging a second virtual prop in a dragged state to a third virtual grid where a third virtual prop is placed, the second virtual prop is displayed on the third virtual grid; and the third virtual prop is displayed on the first virtual grid.

[0141] In some embodiments, the second virtual grid in the virtual functional facility corresponds to the second priority, and the third virtual grid corresponds to the third priority. The second priority and the third priority are different priorities. The priorities of each virtual grid in the virtual backpack do not affect the priorities of each virtual grid in the virtual functional facility. That is, there is no situation where the order of use of virtual items is determined based on the priorities of each virtual grid in the virtual backpack and the priorities of each virtual grid in the virtual functional facility.

[0142] In some embodiments, in response to a placement operation on a second virtual prop that is in a dragged state, the second virtual prop is displayed on the first virtual grid.

[0143] In summary, the method illustrated in this application demonstrates an interactive mode for virtual items during the process of adding virtual items from a virtual backpack to virtual functional facilities. It enables a single drag-and-drop operation to change the storage location of at least two virtual items, and this change is not limited to simply swapping the storage locations of these two virtual items. In scenarios where a user needs to change the storage location of multiple virtual items, this method eliminates the need for multiple swaps between the storage locations of two virtual items, reducing the amount of drag-and-drop operations required for resizing virtual items. This method is suitable for scenarios involving virtual items with significant configuration updates as the game progresses, such as those with technology trees or skill trees.

[0144] 2. Equip virtual items from the virtual backpack to the virtual equipment slot.

[0145] In some embodiments, the first position is located in the virtual backpack, the first virtual object is an unequipped first virtual item, and the second position is located in the virtual equipment bar, the second virtual object is an equipped second virtual item. The first virtual item in the first position of the virtual backpack and the second virtual item in the second position of the virtual equipment bar are displayed. In response to dragging the first virtual item to the second position of the virtual equipment bar, the dragged state of the first virtual item is canceled, the first virtual item is equipped in the second position, and the dragged second virtual item is displayed.

[0146] Taking the first position as the first virtual grid and the second position as the second virtual grid as an example. The first virtual grid is located in the virtual backpack, and the first virtual object is the first virtual item that is not equipped; the second virtual grid is located in the virtual equipment slot, and the second virtual object is the second virtual item that is equipped. As shown in Figure 9, the above step 210 can be implemented as step 212, the above step 220 can be implemented as step 222, and the above step 230 can be implemented as step 232.

[0147] Step 212: Display the first virtual item located in the first virtual slot of the virtual backpack and the second virtual item located in the second virtual slot of the virtual equipment bar.

[0148] Optionally, the virtual backpack includes at least one virtual slot, displaying all or a portion of the virtual slots in the virtual backpack. The virtual equipment slot includes at least one virtual slot, displaying all or a portion of the virtual slots in the virtual equipment slot.

[0149] Alternatively, virtual items such as virtual equipment, virtual accessories, etc.

[0150] Step 222: In response to a drag operation on the first virtual prop, display the first virtual prop in the dragged state; and control the first virtual prop in the dragged state to move following the drag operation.

[0151] Optionally, the first virtual prop in the dragged state can also be referred to as the first virtual prop in the selected state.

[0152] Step 232: In response to dragging the first virtual item to the second virtual slot in the virtual equipment bar where the second virtual item is placed, cancel the dragged state of the first virtual item, equip the first virtual item on the second virtual slot; and display the second virtual item in the dragged state.

[0153] Optionally, in response to a drag operation that drags the first virtual item to the second virtual grid where the second virtual item is placed, if a first condition is met, the dragged state of the first virtual item is canceled, and the first virtual item is displayed on the second virtual grid; and the second virtual item in the dragged state is displayed; wherein the first condition includes at least one of the following: the overlap ratio between the first virtual item and the second virtual grid reaches a ratio threshold; the overlap time between the first virtual item and the second virtual grid reaches a time threshold.

[0154] In some embodiments, in response to a drag operation of dragging a first virtual prop onto a second virtual grid where a second virtual prop is placed, at least one of a progress bar and a countdown timer is displayed. The progress bar indicates the ratio of the overlap time to a time threshold, and the countdown timer indicates the difference between the time threshold and the overlap time. If a first condition is met, the dragged state of the first virtual prop is canceled, and the first virtual prop is displayed on the second virtual grid. The second virtual prop in the dragged state is also displayed. The first condition includes at least one of the following: the progress displayed by the progress bar reaches a progress threshold, such as 100%; the countdown timer reaches a timing requirement, such as a countdown of 0.

[0155] In some embodiments, the first condition further includes the overlap ratio between the first virtual object and the second virtual grid reaching a ratio threshold; in response to a drag operation of dragging the first virtual prop onto the second virtual grid where the second virtual prop is placed, if the overlap ratio between the first virtual prop and the second virtual grid reaches the ratio threshold, at least one of a progress bar and a countdown is displayed.

[0156] In some embodiments, the virtual functional facility also displays a third virtual prop located in a third virtual grid; in response to a drag operation that drags a second virtual prop in a dragged state to the third virtual grid where the third virtual prop is placed, the second virtual prop is displayed on the third virtual grid; and the third virtual prop in a dragged state is displayed.

[0157] In some embodiments, in response to a placement operation following dragging a second virtual prop in a dragged state to a third virtual grid where a third virtual prop is placed, the second virtual prop is displayed on the third virtual grid; and the third virtual prop is displayed on the first virtual grid.

[0158] In some embodiments, the second virtual grid in the virtual functional facility corresponds to the second priority, and the third virtual grid corresponds to the third priority. The second priority and the third priority are different priorities. The priorities of each virtual grid in the virtual backpack do not affect the priorities of each virtual grid in the virtual functional facility. That is, there is no situation where the order of use of virtual items is determined based on the priorities of each virtual grid in the virtual backpack and the priorities of each virtual grid in the virtual functional facility.

[0159] In some embodiments, the method further includes: displaying the second virtual prop on the first virtual grid in response to a placement operation on the second virtual prop in a dragged state.

[0160] In summary, the method described in this application embodiment demonstrates that when equipping virtual items from a virtual backpack to a virtual equipment slot, a single drag operation can change the storage position of at least two virtual items, and this position change is not limited to simply swapping the storage positions of these two virtual items. In scenarios where a user needs to change the storage positions of multiple virtual items, this eliminates the need for the user to repeatedly swap the storage positions of two virtual items, reducing some of the drag operations required for re-dragging virtual items that need to be swapped. This method is applicable to scenarios where the virtual items equipped in the virtual equipment slot need to be frequently and in large quantities updated, such as finding a high-level storage box in the mid-game of a shooting game, or a major version update in an MMO game.

[0161] 3. Move the virtual chess pieces on the virtual chessboard.

[0162] In some embodiments, the first position and the second position are located on a virtual chessboard, the first virtual object is a first virtual chess piece, and the second virtual object is a second virtual chess piece. Then, the first virtual chess piece located at the first position on the virtual chessboard and the second virtual chess piece located at the second position on the virtual chessboard are displayed. In response to dragging the first virtual chess piece to the second position on the virtual chessboard, the dragged state of the first virtual chess piece is canceled, and the first virtual chess piece is displayed at the second position; and the second virtual chess piece in the dragged state is displayed.

[0163] Taking the first position as the first virtual square on the virtual chessboard and the second position as the second virtual square on the virtual chessboard as an example, the first and second virtual squares are located on the virtual chessboard, the first virtual object is the first virtual chess piece, and the second virtual object is the second virtual chess piece. As shown in Figure 10, the above step 210 can be implemented as step 213, the above step 220 can be implemented as step 223, and the above step 230 can be implemented as step 233.

[0164] Step 213: Display the first virtual piece located on the first virtual square of the virtual chessboard and the second virtual piece located on the second virtual square of the virtual chessboard.

[0165] Optionally, the virtual chessboard displays at least two virtual squares. The first virtual square can be located in the preparation area or the playing area, and the second virtual chess piece can also be located in either the preparation area or the playing area.

[0166] Optionally, the first virtual piece and the second virtual piece can be virtual pieces of the same type or virtual pieces of different types.

[0167] Step 223: In response to a drag operation on the first virtual piece, display the first virtual piece in the dragged state; and control the first virtual piece in the dragged state to move following the drag operation.

[0168] Optionally, the first virtual prop in the dragged state can also be referred to as the first virtual prop in the selected state.

[0169] Step 233: In response to dragging the first virtual piece to the second virtual square on the virtual chessboard where the second virtual piece is placed, cancel the dragged state of the first virtual piece and display the first virtual piece on the second virtual square; and display the second virtual piece that is in the dragged state.

[0170] Optionally, in response to a drag operation that moves a first virtual piece to a second virtual grid on which a second virtual piece is placed, if a first condition is met, the dragged state of the first virtual piece is canceled, and the first virtual piece is displayed on the second virtual grid; and the second virtual piece in the dragged state is displayed; wherein the first condition includes at least one of the following: the overlap ratio between the first virtual piece and the second virtual grid reaches a ratio threshold; the overlap time between the first virtual piece and the second virtual grid reaches a time threshold.

[0171] In some embodiments, in response to a drag operation that drags a first virtual piece onto a second virtual grid where a second virtual piece is placed, at least one of a progress bar and a countdown is displayed, the progress bar indicating the ratio of the overlap time to a time threshold, and the countdown indicating the difference between the time threshold and the overlap time; if a first condition is met, the dragged state of the first virtual piece is canceled, and the first virtual piece is displayed on the second virtual grid; and the second virtual piece in the dragged state is displayed; wherein the first condition includes at least one of the following: the progress displayed by the progress bar reaches a progress threshold, such as 100%; the countdown reaches a timing requirement, such as a countdown of 0.

[0172] In some embodiments, in response to a drag operation that moves a first virtual piece onto a second virtual grid where a second virtual piece is placed, at least one of a progress bar and a countdown is displayed if the overlap ratio between the first virtual piece and the second virtual grid reaches a threshold ratio.

[0173] In some embodiments, a third virtual chess piece located in a third virtual grid is also displayed in the virtual functional facility; the method further includes: displaying the second virtual chess piece on the third virtual grid in response to a drag operation that drags a second virtual chess piece in a dragged state to the third virtual grid where the third virtual chess piece is placed; and displaying the third virtual chess piece in a dragged state. In some embodiments, the second virtual chess piece is displayed on the third virtual grid in response to a placement operation that follows dragging the second virtual chess piece in a dragged state to the third virtual grid where the third virtual chess piece is placed; and the third virtual chess piece is displayed on the first virtual grid.

[0174] In some embodiments, the second virtual cell in the virtual functional facility corresponds to the second priority, and the third virtual cell corresponds to the third priority. The second priority and the third priority are different priorities. The priorities of each virtual cell in the virtual backpack do not affect the priorities of each virtual cell in the virtual functional facility. That is, there is no situation where the order of use of virtual pieces is determined based on the priorities of each virtual cell in the virtual backpack and the priorities of each virtual cell in the virtual functional facility.

[0175] In some embodiments, in response to a placement operation on a second virtual piece that is in a dragged state, the second virtual piece is displayed on the first virtual grid.

[0176] In summary, the method illustrated in this application demonstrates that when equipping a virtual chess piece from a virtual inventory to a virtual equipment slot, and dragging a first virtual chess piece to place it on a second virtual grid containing a second virtual chess piece, the display modes of the first and second virtual chess pieces are swapped. Specifically, the display state of the first virtual chess piece is updated to show it as placed on the second virtual grid, and the display state of the second virtual chess piece is updated to show it as being dragged. This allows a single drag operation to support changes in the storage positions of at least two virtual chess pieces, and these changes are not limited to swapping the storage positions of these two virtual chess pieces. In scenarios where a user needs to change the storage positions of multiple virtual chess pieces, this method eliminates the need for multiple swaps between the storage positions of two virtual chess pieces, reducing the number of drag operations required for users to re-drag virtual chess pieces that need to have their storage positions swapped.

[0177] Figure 11 shows a flowchart of an interactive method for virtual objects provided in an exemplary embodiment of this application.

[0178] Step 1: Press and hold object A. The client detects the user's press operation on object A and begins to identify whether it is a drag operation. Specifically, it detects whether the user is continuously moving their finger, that is, confirms the touch point at fixed intervals, and determines the direction and distance of the user's finger movement based on the touch point.

[0179] Step 2: Detect drag event for object A. If it is determined that the user is performing a drag operation, trigger a drag event for object A.

[0180] Step 3: Object A follows the finger's movement. The position of object A is updated based on the collected touch points. This means that object A is controlled to be dragged, and its position changes in real time as the dragging operation is displayed.

[0181] Step 4: Drag to a placeable area. When object A is in a placeable area (e.g., at the location of object B), a replacement operation is triggered. The replacement operation is categorized as direct replacement or continuous replacement depending on whether the user releases their finger. In some embodiments, if object A is not in a placeable area and the user has released their finger, object A is displayed back in its original position. If object A is not in a placeable area, Step 3 continues, that is, the position of object A is updated based on the movement of the user's finger.

[0182] Step 4 can be performed simultaneously with step 3.

[0183] Step 5: Release? If the user releases their hand, determine that the current replacement operation is a direct replacement and proceed to Step 6; if the user does not release their hand, determine that the current replacement operation is a continuous replacement and proceed to Step 8.

[0184] Step 6: Swap the positions of object A and object B. Release the button when object A is in the placeable area, and if object B is placed in the placeable area, swap the positions of object A and object B. Proceed to step 7 to end the process.

[0185] Step 7, process ends.

[0186] Step 8: A progress bar appears at object B to begin loading. If you do not release the button while it is in the placeable area, a progress bar will appear at the top of object B's interface and it will begin moving forward.

[0187] Step 9: Did the user release the hand within the target duration? Record the time it takes for the user to drag object A over object B. If the user holds the hand for the target duration (e.g., 0.6 seconds), meaning they did not release the hand within the target duration, proceed to step 10; if the user releases the hand within the target duration (e.g., 0.6 seconds), proceed to step 6, confirming a direct replacement.

[0188] Step 10: When the progress bar is full, object A has been successfully placed, and object B is now selected. When the progress bar is full, object A has been successfully replaced, and object B is now selected, meaning object B is automatically updated to appear below the user's finger. This can also be understood as replacing the display positions of the current objects A and B.

[0189] Step 11: Object B follows the finger's movement. The position of object B is updated based on the collected touch points. This means that object B is controlled to be dragged, and its position changes in real time as the dragging operation is displayed.

[0190] Step 12: Drag to the drop area. When object B is in the drop area (e.g., at object C), the replacement operation is triggered, and step 13 continues. The replacement operation is divided into direct replacement and continuous replacement depending on whether the user releases the drag.

[0191] If object B is not in the placeable area, continue with step 11, that is, continue to update the position of object B according to the movement of the user's finger.

[0192] Step 13: Release your hand? If the user releases their hand, determine that the current replacement operation is a direct replacement and continue to step 14; if the user does not move their hand, determine that the current replacement operation is a continuous replacement and proceed to step 16.

[0193] Step 14: Place object B at object C, and place object C at object A.

[0194] Step 15, process ends.

[0195] Step 16: A progress bar appears at object C to begin loading. If you do not release the button while it is in the placeable area, a progress bar will appear above object C's interface and it will begin moving forward.

[0196] Step 17: Did the user release the hand within the target duration? Record the time it takes for the user to drag object B over object C. If the user holds the hand for the target duration (e.g., 0.6 seconds), meaning the hand is not released within the target duration, proceed to step 18; if the hand is released within the target duration, proceed to step 14, confirming a direct replacement.

[0197] Step 18: The progress bar is full, object B has been successfully placed, and object C is now selected.

[0198] Step 19, and so on, until all object operations are completed. That is, based on the user's operation, repeat steps 3 to 10, or steps 11 to 18, until the process ends.

[0199] Furthermore, when all objects are selected in the process and released from an unplaceable area, they are automatically placed at the starting position, object A. A placeable area can be understood as an area containing virtual cells, or an area that supports placing virtual objects; an unplaceable area is an area without virtual cells, or an area that does not support placing virtual objects.

[0200] In summary, moving and replacing multiple objects within different areas is a very frequent experience in games. This application provides an innovative method for continuously replacing the positions of multiple objects. Compared to related technical solutions, this application offers a more convenient operation, and because the operation is continuous, the player's fingers and gaze do not need to move back and forth, resulting in a more user-friendly gaming experience.

[0201] Specifically, in games, it is often necessary to select, move, and replace multiple objects in different areas to customize their positions. The method provided in this embodiment allows for quick operations on multiple objects. Players can hold down object A and drag it to the target location. Once the progress bar is complete, object A is successfully placed at the target location, and object B at that location becomes selected. Players can then drag object B to the next target location and repeat the same operation, thus completing the continuous replacement and selection of multiple objects. This embodiment makes it easier to operate on multiple objects, greatly simplifying the placement and transfer of objects between one or more containers, and improving the gaming experience.

[0202] Figure 12 shows a structural block diagram of a virtual object interaction device provided in an embodiment of this application. This device has the function of implementing the above-described virtual object interaction method example; the function can be implemented by hardware or by hardware executing corresponding software. This device can be the terminal described above, or it can be installed within a terminal. As shown in Figure 12, the device includes a display module 310 and a control module 320.

[0203] Display module 310 is used to display at least two virtual objects, the at least two virtual objects including a first virtual object located at a first position and a second virtual object located at a second position;

[0204] Control module 320 is configured to respond to a drag operation on the first virtual object and control the first virtual object in the dragged state to move following the drag operation;

[0205] The display module 310 is further configured to, in response to dragging the first virtual object to the second position, cancel the dragged state of the first virtual object, display the first virtual object at the second position; and display the second virtual object in the dragged state.

[0206] In some embodiments, the first position includes the position of the first virtual grid;

[0207] The second position includes the location of the second virtual grid.

[0208] In some embodiments, the display module 310 is further configured to, in response to dragging the first virtual object to the second virtual grid, cancel the dragging state of the first virtual object and display the first virtual object on the second virtual grid if a first condition is met; and display the second virtual object in the dragging state; wherein the first condition includes at least one of the following: the overlap ratio between the first virtual object and the second virtual grid reaches a ratio threshold; the overlap time between the first virtual object and the second virtual grid reaches a time threshold.

[0209] In some embodiments, the display module 310 is further configured to, in response to dragging the first virtual object to the second virtual grid, display at least one of a progress bar and a countdown timer, the progress bar indicating the ratio of the overlap time to the time threshold, and the countdown timer indicating the difference between the time threshold and the overlap time; and, if the first condition is met, cancel the dragging state of the first virtual object and display the first virtual object on the second virtual grid; and display the second virtual object in the dragging state; wherein the first condition includes at least one of the following: the progress displayed by the progress bar reaches the progress threshold; and the countdown timer reaches the timing requirement.

[0210] In some embodiments, the display module 310 is further configured to, in response to dragging the first virtual object to the second virtual grid, display at least one of the progress bar and the countdown when the overlap ratio between the first virtual object and the second virtual grid reaches a shrinkage disproportion threshold.

[0211] In some embodiments, the at least two virtual objects further include a third virtual object located in a third virtual grid; the display module 310 is further configured to display the second virtual object at the third position in response to dragging the second virtual object in the dragged state to the third position; and to display the third virtual object in the dragged state.

[0212] In some embodiments, the at least two virtual objects further include a third virtual object located in a third virtual grid; the display module 310 is also configured to display the second virtual object at the third position in response to dragging the second virtual object in the dragged state to the third position; and to display the three virtual objects at the first position.

[0213] In some embodiments, the first position corresponds to a first priority, the second position corresponds to a second priority, and the third position corresponds to a third priority, wherein the first priority, the second priority, and the third priority are different priorities.

[0214] In some embodiments, the display module 310 is further configured to display the second virtual object at the first position in response to a placement operation on the second virtual object in the dragged state.

[0215] In some embodiments, the at least two virtual objects are located in the same virtual container; or, the at least two virtual objects are located in at least two virtual containers; wherein, the virtual container includes at least one virtual cell, and each virtual cell in the at least one virtual cell is used to place the virtual object.

[0216] In some embodiments, the virtual container is any of the following: a virtual equipment bar; a virtual backpack; a virtual crafting table; virtual furniture; a virtual shelf; a virtual taskbar; a virtual chessboard; or a virtual functional facility.

[0217] In some embodiments, the first location is in a virtual backpack, and the first virtual object is a first virtual item; the second location is in a virtual functional facility, and the second virtual object is a second virtual item; the virtual functional facility is used to provide virtual items for the virtual pet;

[0218] The display module 310 is also used to display a first virtual item located at a first position in the virtual backpack; and to display a second virtual item located at a second position in the virtual functional facility;

[0219] The control module 320 is also configured to, in response to a drag operation on the first virtual prop, display the first virtual prop in a dragged state; and control the first virtual prop in the dragged state to move following the drag operation;

[0220] The display module 310 is further configured to, in response to dragging the first virtual prop to a second position in the virtual functional facility, cancel the dragged state of the first virtual prop, display the first virtual prop at the second position; and display the second virtual prop in the dragged state.

[0221] In some embodiments, the first position is located in the virtual backpack, and the first virtual object is an unequipped first virtual item; the second position is located in the virtual equipment slot, and the second virtual object is an equipped second virtual item.

[0222] The display module 310 is also used to display a first virtual item located in the first position of the virtual backpack and a second virtual item located in the second position of the virtual equipment bar;

[0223] The control module 320 is also configured to, in response to a drag operation on the first virtual prop, display the first virtual prop in a dragged state; and control the first virtual prop in the dragged state to move following the drag operation;

[0224] The display module 310 is further configured to, in response to dragging the first virtual item to a second position in the virtual equipment bar, cancel the dragged state of the first virtual item, equip the first virtual item in the second position; and display the second virtual item in the dragged state.

[0225] In some embodiments, the first position and the second position are located on a virtual chessboard, the first virtual object is a first virtual chess piece, and the second virtual object is a second virtual chess piece;

[0226] The display module 310 is also used to display a first virtual chess piece located at a first position on the virtual chessboard and a second virtual chess piece located at a second position on the virtual chessboard;

[0227] Control module 320 is further configured to, in response to a drag operation on the first virtual piece, display the first virtual piece in a dragged state; and control the first virtual piece in the dragged state to move following the drag operation;

[0228] The display module 310 is further configured to, in response to dragging the first virtual chess piece to a second position on the virtual chessboard, cancel the dragged state of the first virtual chess piece, display the first virtual chess piece at the second position; and display the second virtual chess piece in the dragged state.

[0229] In summary, the device provided in this application, when dragging a first virtual object to place it on a second virtual grid containing a second virtual object, swaps the display modes of the first and second virtual objects. Specifically, it updates the display state of the first virtual object to show it as placed on the second virtual grid and updates the display state of the second virtual object to show it as dragged. This allows a single drag operation to support changes in the storage positions of at least two virtual objects, and these changes are not limited to swapping the storage positions of these two virtual objects. In scenarios where a user needs to change the storage positions of multiple virtual objects, this eliminates the need for the user to repeatedly swap the storage positions of two virtual objects, reducing some of the drag operations required to swap the storage positions of virtual objects.

[0230] This application also provides a computer device, which includes a processor and a memory. The memory stores at least one computer program, which is loaded and executed by the processor to implement the virtual object interaction method provided in the above-described method embodiments. Figure 13 shows a structural block diagram of a computer device 800 provided in an exemplary embodiment of this application. The computer device 800 may be a portable mobile terminal. The computer device 800 may also be referred to as a user device, portable terminal, or other names. Typically, the computer device 800 includes a processor 801 and a memory 802.

[0231] Processor 801 may include one or more processing cores, such as a quad-core processor, an octa-core processor, etc. Processor 801 may also include a main processor and a coprocessor. The main processor, also known as a CPU (Central Processing Unit), is used to process data in the wake-up state; the coprocessor is a low-power processor used to process data in the standby state. In some embodiments, processor 801 may integrate a GPU (Graphics Processing Unit), which is responsible for rendering and drawing the content required to be displayed on the screen. In some embodiments, processor 801 may also include an AI (Artificial Intelligence) processor, which is used to handle computational operations related to machine learning.

[0232] The memory 802 may include one or more computer-readable storage media, which may be tangible and non-transitory. In some embodiments, the non-transitory computer-readable storage media in the memory 802 are used to store at least one instruction, which is executed by the processor 801 to implement the virtual object interaction method provided in the embodiments of this application. In some embodiments, the computer device 800 may also optionally include a peripheral device interface 803 and at least one peripheral device. The processor 801, the memory 802, and the peripheral device interface 803 may be connected via a bus or signal line. Each peripheral device may be connected to the peripheral device interface 803 via a bus, signal line, or circuit board. Specifically, the peripheral device includes at least one of the following: a radio frequency circuit 804, a touch display screen 805, a camera assembly 806, an audio circuit 807, and a power supply 808. In some embodiments, the computer device 800 also includes one or more sensors 809. The one or more sensors 809 include, but are not limited to, an accelerometer 810, a gyroscope 811, a pressure sensor 812, an optical sensor 813, and a proximity sensor 814.

[0233] This application also provides a computer-readable storage medium storing at least one computer program, which is loaded and executed by a processor to implement the virtual object interaction method provided in the above-described method embodiments.

[0234] This application also provides a computer program product, which includes at least one computer program stored in a computer-readable storage medium; the at least one computer program is read from and executed by a processor of a computer device from the computer-readable storage medium, causing the computer device to perform the virtual object interaction method provided in the above method embodiments.

Claims

1. A method for interacting with a virtual object, executed by a computer device, the method comprising: Display at least two virtual objects, the at least two virtual objects including a first virtual object located in a first position and a second virtual object located in a second position; In response to a drag operation on the first virtual object, the first virtual object in the dragged state is controlled to move following the drag operation; In response to dragging the first virtual object to the second position, canceling the dragged state of the first virtual object, displaying the first virtual object at the second position; and displaying the second virtual object in the dragged state.

2. The method according to claim 1, wherein, The first position includes the position of the first virtual grid; The second position includes the location of the second virtual grid.

3. The method of claim 2, wherein, In response to dragging the first virtual object to the second position, the dragged state of the first virtual object is canceled, and the first virtual object is displayed at the second position; And displaying the second virtual object in a dragged state, including: In response to dragging the first virtual object to the second virtual grid, if a first condition is met, the dragged state of the first virtual object is canceled, and the first virtual object is displayed on the second virtual grid; and the second virtual object in the dragged state is displayed. The first condition includes at least one of the following: the overlap ratio between the first virtual object and the second virtual grid reaches a ratio threshold; the overlap time between the first virtual object and the second virtual grid reaches a time threshold.

4. The method according to any one of claims 1 to 3, wherein, The step of responding to dragging the first virtual object to the second virtual grid, and, if a first condition is met, canceling the dragging state of the first virtual object and displaying the first virtual object on the second virtual grid, includes: In response to dragging the first virtual object to the second virtual grid, at least one of a progress bar and a countdown is displayed, the progress bar indicating the proportion of the overlap time to the time threshold, and the countdown indicating the difference between the time threshold and the overlap time; If the first condition is met, cancel the dragging state of the first virtual object, display the first virtual object on the second virtual grid; and display the second virtual object that was in the dragging state. The first condition further includes at least one of the following: the progress displayed by the progress bar reaches the progress threshold; the countdown reaches the timing requirement.

5. The method according to any one of claims 1 to 4, wherein, The response to dragging the first virtual object to the second virtual grid, displaying at least one of a progress bar and a countdown, includes: In response to dragging the first virtual object to the second virtual grid, if the overlap ratio between the first virtual object and the second virtual grid reaches the ratio threshold, at least one of the progress bar and the countdown is displayed.

6. The method according to any one of claims 1 to 5, wherein, The at least two virtual objects also include a third virtual object located in a third position; The method further includes: In response to dragging the second virtual object in the dragged state to the third position, the second virtual object is displayed at the third position; and the third virtual object in the dragged state is displayed.

7. The method according to any one of claims 1 to 6, wherein, The at least two virtual objects also include a third virtual object located in the third virtual grid; The method further includes: In response to dragging the second virtual object, which is in a dragged state, to the third position, the second virtual object is displayed at the third position; and the third virtual object is displayed at the first position.

8. The method according to any one of claims 1 to 7, wherein, The first position corresponds to the first priority, the second position corresponds to the second priority, and the third position corresponds to the third priority. The first priority, the second priority, and the third priority are different priorities.

9. The method of any one of claims 1 to 8, wherein, The method further includes: In response to a placement operation on the second virtual object in the dragged state, the second virtual object is displayed at the first position.

10. The method of any one of claims 1 to 9, wherein, The at least two virtual objects are located in the same virtual container; or, the at least two virtual objects are located in at least two virtual containers; The virtual container includes at least one virtual cell, and each virtual cell in the at least one virtual cell is used to place the virtual object.

11. The method of any one of claims 1 to 10, wherein, The virtual container can be any of the following: virtual equipment bar; virtual backpack; virtual crafting table; virtual furniture; virtual shelf; virtual chessboard; or virtual functional facility.

12. The method of any one of claims 1 to 11, wherein, The first location is in the virtual backpack, and the first virtual object includes a first virtual item; the second location is in the virtual functional facility, and the second virtual object includes a second virtual item; the virtual functional facility is used to provide virtual items for the virtual pet; The display of at least two virtual objects includes: Display a first virtual item located at a first position in the virtual backpack; and display a second virtual item located at a second position in the virtual functional facility; The step of controlling the first virtual object in a dragged state to follow the drag operation in response to a drag operation includes: In response to a drag operation on the first virtual prop, the first virtual prop in a dragged state is displayed; and the first virtual prop in a dragged state is controlled to move following the drag operation. The step of responding to dragging the first virtual object to the second position, canceling the dragged state of the first virtual object, and displaying the first virtual object at the second position; and displaying the second virtual object in the dragged state includes: In response to dragging the first virtual prop to a second position in the virtual functional facility, the dragged state of the first virtual prop is canceled, and the first virtual prop is displayed at the second position; and the second virtual prop in the dragged state is displayed.

13. The method of any one of claims 1 to 12, wherein, The first location is in the virtual backpack, and the first virtual object is the first virtual item that is not equipped. The second position is located in the virtual equipment bar, and the second virtual object is the second virtual item that has been equipped. The display of at least two virtual objects includes: Displays a first virtual item located in a first position in the virtual backpack and a second virtual item located in a second position in the virtual equipment bar; The step of controlling the first virtual object in a dragged state to follow the drag operation in response to a drag operation includes: In response to a drag operation on the first virtual prop, the first virtual prop in a dragged state is displayed; and the first virtual prop in a dragged state is controlled to move following the drag operation. The step of responding to dragging the first virtual object to the second position, canceling the dragged state of the first virtual object, and displaying the first virtual object at the second position; and displaying the second virtual object in the dragged state includes: In response to dragging the first virtual item to the second position in the virtual equipment bar, cancel the dragged state of the first virtual item, equip the first virtual item in the second position; and display the second virtual item in the dragged state.

14. The method of any one of claims 1 to 13, wherein, The first position and the second position are located on a virtual chessboard, the first virtual object is the first virtual chess piece, and the second virtual object is the second virtual chess piece; The display of at least two virtual objects includes: Displays a first virtual chess piece located at a first position on the virtual chessboard and a second virtual chess piece located at a second position on the virtual chessboard; The step of controlling the first virtual object in a dragged state to follow the drag operation in response to a drag operation includes: In response to a drag operation on the first virtual piece, the first virtual piece in the dragged state is displayed; and the first virtual piece in the dragged state is controlled to move following the drag operation. The step of responding to dragging the first virtual object to the second position, canceling the dragged state of the first virtual object, and displaying the first virtual object at the second position; and displaying the second virtual object in the dragged state includes: In response to dragging the first virtual piece to the second position on the virtual chessboard, the dragged state of the first virtual piece is canceled, and the first virtual piece is displayed at the second position; and the second virtual piece in the dragged state is displayed.

15. An interactive device for a virtual object, the device comprising: A display module is used to display at least two virtual objects, the at least two virtual objects including a first virtual object located at a first position and a second virtual object located at a second position; The control module is configured to respond to a drag operation on the first virtual object and control the first virtual object in the dragged state to move following the drag operation; The display module is configured to, in response to dragging the first virtual object to the second position, cancel the dragged state of the first virtual object, display the first virtual object at the second position; and display the second virtual object in the dragged state.

16. A computer device comprising a processor and a memory, the memory storing a computer program, the computer program being loaded and executed by the processor to implement the interactive method of a virtual object as described in any one of claims 1 to 14.

17. A computer-readable storage medium having a computer program stored thereon, the computer program, when executed by a processor, implementing the method for interacting with a virtual object as described in any one of claims 1 to 14.

18. A computer program product comprising a computer program stored in a computer-readable storage medium; the computer program being read from and executed by a processor of a computer device, causing the computer device to perform an interaction method for a virtual object as described in any one of claims 1 to 14.