Virtual object switching method, device, equipment, medium and program product

HK40069354BActive Publication Date: 2026-08-28TENCENT TECHNOLOGY (SHENZHEN) CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
HK42022059060
Authority / Receiving Office
HK · HK
Patent Type
Patents
Current Assignee / Owner
Filing Date
2022-08-25
Publication Date
2026-08-28

AI Technical Summary

Technical Problem

In existing technology, players need to touch the locking control multiple times to switch between locked enemy characters in the game, which is inefficient.

Method used

Virtual objects can be switched on a mobile device by swinging them, and the direction and amplitude of the swing can be confirmed by signals collected by motion sensors or cameras, enabling rapid switching of virtual objects.

Benefits of technology

It improves the efficiency of players switching locked targets, enriches the operation methods, and enhances the strategic nature of the game.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure 00000000_0000_ABST
    Figure 00000000_0000_ABST
Patent Text Reader

Abstract

The application discloses a virtual object switching method, device, equipment, medium and program product, and belongs to the virtual environment field. The method is applied to a mobile terminal, and the method comprises the following steps: displaying a first virtual object in a locked state and a second virtual object not in the locked state, wherein the locked state indicates that the behavior target of the locked virtual object becomes a master virtual object, and the master virtual object is a virtual object with control permission of the mobile terminal; receiving a swing operation, wherein the swing operation is an operation for swinging the body of the mobile terminal; and in the case that the swing operation matches the second virtual object, displaying that the virtual object in the locked state is switched from the first virtual object to the second virtual object. The above scheme not only enriches the operation mode of the user, but also improves the efficiency of the user in switching the locked target.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of virtual environments, and in particular to a method, apparatus, device, medium, and program product for switching virtual objects. Background Technology

[0002] In various games, players attack one enemy character from several enemy characters, and during the battle, players often need to switch the locked enemy character.

[0003] In related technologies, the player interface is equipped with a locking control. In response to the player's first touch of the locking control, the terminal automatically locks the first enemy character from several enemy characters. In response to the player's second touch of the locking control, the terminal switches the first enemy character to the second enemy character for locking according to a preset switching order.

[0004] However, the technology only switches the locked enemy character according to a preset switching order. If the enemy character the player wants to attack is at the end of the switching order, switching through the technology requires multiple touches of the locking control, which is inefficient. Summary of the Invention

[0005] This application provides a method, apparatus, device, medium, and program product for switching virtual objects, which improves the efficiency of switching locked targets. The technical solution is as follows:

[0006] According to one aspect of this application, a method for switching virtual objects is provided, the method being applied to a mobile terminal, the method comprising:

[0007] The display shows the first virtual object in a locked state and the second virtual object in an unlocked state. The locked state indicates that the locked virtual object becomes the behavior target of the master virtual object. The master virtual object is the virtual object that the mobile terminal has control over.

[0008] Receive shake operation, which is an operation used to shake the body of the mobile terminal;

[0009] When the swing operation matches the second virtual object, the virtual object that is in a locked state is switched from the first virtual object to the second virtual object.

[0010] According to another aspect of this application, a virtual object switching device is provided, the device comprising:

[0011] The display module is used to display the first virtual object in a locked state and the second virtual object in an unlocked state. The locked state indicates that the locked virtual object becomes the behavior target of the master virtual object. The master virtual object is a virtual object that the mobile terminal has control over.

[0012] The receiving module is used to receive the swinging operation, which is the operation of the swinging device.

[0013] The display module is also used to switch the display of the locked virtual object from the first virtual object to the second virtual object when the swinging operation matches the second virtual object.

[0014] According to one aspect of this application, a computer device is provided, the 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 virtual object switching method as described above.

[0015] According to another aspect of this application, a computer-readable storage medium is provided, the storage medium storing a computer program that is loaded and executed by a processor to implement the virtual object switching method as described above.

[0016] According to another aspect of this application, a computer program product is provided, the computer program product including computer instructions stored in a computer-readable storage medium. A processor of a computer device reads the computer instructions from the computer-readable storage medium, and executes the computer instructions, causing the computer device to perform the virtual object switching method provided in the above aspect.

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

[0018] Switching between locked virtual objects via a flick of the wrist avoids the need for multiple touches to switch targets, allowing users to quickly change their locked target. For example, while the user-controlled virtual character is engaged in a fierce battle with the first enemy character, the user notices a brief fatal weakness in the second enemy character. Attacking the second enemy character would defeat it. By flicking the wrist, the user can quickly switch from the locked virtual character (the first enemy character) to the second enemy character and launch an attack. Therefore, implementing a flick-to-switch target switching feature not only enriches the player's control methods but also improves the efficiency of target switching, thereby enhancing the game's strategic depth. Attached Figure Description

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

[0020] Figure 1 This application shows a structural block diagram of a computer system provided in an exemplary embodiment;

[0021] Figure 2 A flowchart illustrating a virtual object switching method provided in an exemplary embodiment of this application is shown;

[0022] Figure 3 This illustration shows a schematic diagram of a first virtual object in a locked state and a second virtual object in an unlocked state, provided in an exemplary embodiment of this application.

[0023] Figure 4 This illustration shows a schematic diagram of a prompt message for a swinging operation provided in an exemplary embodiment of this application;

[0024] Figure 5 This illustration shows a schematic diagram of a swing direction prompting message provided in an exemplary embodiment of this application;

[0025] Figure 6 A flowchart illustrating a virtual object switching method provided in another exemplary embodiment of this application is shown;

[0026] Figure 7 A schematic diagram illustrating the determination of the swing direction provided in an exemplary embodiment of this application is shown;

[0027] Figure 8 A flowchart illustrating a virtual object switching method provided in another exemplary embodiment of this application is shown;

[0028] Figure 9 A flowchart illustrating a virtual object switching method provided in another exemplary embodiment of this application is shown;

[0029] Figure 10 A schematic diagram illustrating the switching process of a virtual object provided in an exemplary embodiment of this application is shown;

[0030] Figure 11 A flowchart illustrating a virtual object switching method provided in another exemplary embodiment of this application is shown;

[0031] Figure 12 This invention provides a structural block diagram of a virtual object switching device according to an exemplary embodiment of the present application.

[0032] Figure 13 A structural block diagram of a computer device provided in an exemplary embodiment of this application is shown. Detailed Implementation

[0033] Exemplary embodiments will now be described in detail, examples of which are illustrated in the accompanying drawings. When the following description relates to the drawings, unless otherwise indicated, the same numbers in different drawings denote the same or similar elements. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with this application. Rather, they are merely examples of apparatuses and methods consistent with some aspects of this application as detailed in the appended claims.

[0034] It should be understood that "several" in this article refers to one or more, and "multiple" refers to two or more. "And / or" describes the relationship between related objects, indicating that three relationships can exist. For example, A and / or B can represent: A alone, A and B simultaneously, or B alone. The character " / " generally indicates that the preceding and following related objects have an "or" relationship.

[0035] First, a brief introduction to the terms used in the embodiments of this application:

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

[0037] Optionally, the virtual environment can provide a battle environment for virtual objects. For example, in a battle royale game, at least one virtual object engages in a single match within the virtual environment. The virtual object survives by avoiding attacks from enemy units and dangers present in the virtual environment (such as poison gas circles, swamps, etc.). When a virtual object's health points in the virtual environment reach zero, its life ends. The virtual object that successfully completes the level's route at the end wins. Each client can control one or more virtual objects within the virtual environment.

[0038] Virtual objects refer to movable objects in a virtual environment. These movable objects can be virtual characters, virtual animals, anime characters, etc., such as people and animals displayed in a 3D virtual environment. Optionally, virtual objects are 3D models created based on animation skeletal technology. Each virtual object has its own shape and volume in the 3D virtual environment and occupies a portion of the space in the 3D virtual environment.

[0039] Figure 1A structural block diagram of a computer system provided in an exemplary embodiment of this application is shown. The computer system 100 includes a mobile terminal 120 and a server 140.

[0040] A mobile terminal 120 has an application that supports a virtual environment installed and running. This application can be any of the following: a 3D map application, a side-scrolling shooter, a side-scrolling adventure game, a side-scrolling platformer, a side-scrolling strategy game, a virtual reality (VR) application, or an augmented reality (AR) application. The mobile terminal 120 is a mobile terminal used by the user, who uses the mobile terminal 120 to control a main virtual object located in the 3D virtual environment to perform activities, including but not limited to: adjusting body posture, walking, running, jumping, riding, driving, aiming, picking up, using throwable items, and attacking other virtual objects. For example, the main virtual object is a virtual character, such as a realistic or anime character. For example, the user controls the main virtual character's activities through UI controls on the virtual environment screen.

[0041] Mobile terminal 120 is connected to server 140 via wireless network or wired network.

[0042] Server 140 includes at least one of a single server, multiple servers, a cloud computing platform, and a virtualization center. Exemplarily, server 140 includes a processor 144 and a memory 142. Memory 142 further includes a receiving module 1421, a control module 1422, and a sending module 1423. The receiving module 1421 receives requests from applications, such as attacks on enemies; the control module 1422 controls the rendering of the virtual environment; and the sending module 1423 sends responses to applications, such as damage values ​​caused by an attack. Server 140 provides background services for applications supporting a 3D virtual environment. Optionally, server 140 performs the primary computing task, and mobile terminal 120 performs secondary computing tasks; or, server 140 performs secondary computing tasks, and mobile terminal 120 performs primary computing tasks.

[0043] Optionally, the above-mentioned application runs on different operating system platforms (Android or iOS). Optionally, the mobile terminal 140 running the application may be of the same or different device type, including at least one of the following: smartphone, smartwatch, smart TV, in-vehicle mobile terminal, wearable device, tablet computer, e-book reader, MP3 player, MP4 player, and laptop computer. The following embodiments use smartphones as an example.

[0044] Those skilled in the art will understand that the number of mobile terminals described above can be more or less. For example, there may be only one mobile terminal, or there may be dozens or hundreds of mobile terminals, or even more. This application does not limit the number or type of mobile terminals in its embodiments.

[0045] To improve the efficiency of switching locked targets, Figure 2 A flowchart illustrating a virtual object switching method provided in an exemplary embodiment of this application is shown, in which the method is applied to Figure 1 The method, illustrated by the mobile terminal 120 (or the application on the mobile terminal 120), includes:

[0046] Step 220: Display the first virtual object that is in a locked state and the second virtual object that is not in a locked state;

[0047] Locked State: The locked state indicates that the locked virtual object has become the target of the controlling virtual object's actions. The locked virtual object may subsequently be attacked by the controlling virtual object, such as the controlling virtual object slashing, firing, releasing projectiles, or unleashing attack skills at the locked virtual object. Alternatively, the controlling virtual object may move towards the locked virtual object, with the location of the locked virtual object serving as the controlling virtual object's destination. Or, the controlling virtual object may obtain detailed information about the locked virtual object, such as displaying detailed information about the locked virtual object, like "Artillery [Level 5] Attack Power 80 Defense Power 50," on the mobile terminal's screen after locking the virtual object. In this application, the locked state only indicates that the locked virtual object has become the target of the controlling virtual object's actions; this application does not limit the specific actions the controlling virtual object may take towards the locked virtual object.

[0048] Master virtual object: refers to a virtual object that the mobile terminal has control over. Under the control of the mobile terminal, the master virtual object can perform at least one of the following actions: adjusting body posture, walking, running, jumping, riding, driving, aiming, picking up, using throwable items, and attacking other virtual objects.

[0049] The first virtual object refers to a virtual object with the ability to move within the virtual environment. Optionally, the first virtual object may be a virtual object controlled by another user, or it may be an NPC (Non-player Character). The second virtual object also refers to a virtual object with the ability to move within the virtual environment. The first and second virtual objects are used only to distinguish between different virtual objects; that is, there may be a situation where the first virtual object is a virtual object controlled by another user (or an NPC), while the second virtual object is an NPC (or a virtual object controlled by another user).

[0050] Many games may employ two locking modes: active locking and passive locking. Active locking refers to the user actively controlling the main virtual object to lock onto a specific virtual object, while passive locking refers to locking onto a virtual object based on preset locking rules. For example, if a user actively selects a virtual object from among several surrounding virtual objects to attack, this is called active locking; if the user-controlled main virtual object is attacked by another virtual object in the vicinity, and is then passively targeted for further attack, this is passive locking. Users can switch between active and passive locking by performing corresponding operations.

[0051] In active locking mode, the mobile terminal's interface typically includes a lock indicator or visual lock effect to notify the user that the virtual object is currently locked. In passive locking mode, the mobile terminal's interface usually does not provide additional prompts; instead, the locking virtual object is directly visible on the interface as the controlling virtual object performs specific actions on it.

[0052] This application mainly describes how users switch between locking virtual objects in active locking mode.

[0053] In one embodiment, a first virtual object in a locked state and a second virtual object in an unlocked state are displayed on the mobile terminal. Illustratively, the first virtual object being locked is indicated on the mobile terminal by at least one of text, a lock indicator, and a lock visual effect. For example, adding a box around the outline of the first virtual object (lock indicator) to indicate successful locking, displaying a crosshair on the body of the first virtual object (lock indicator) to indicate successful locking, setting the first virtual object to display a blinking effect (lock visual effect), setting the first virtual object to display a magnification effect (lock visual effect), displaying a different color on the first virtual object than the second virtual object (lock visual effect), and so on.

[0054] Indicative Figure 3 The diagram illustrates a first virtual object being locked and a second virtual object being unlocked. The first virtual object 31 has a lock indicator 301, while the second virtual object 32 does not. The lock indicator 301 indicates that the virtual object is in a locked state.

[0055] Step 240, receive the swing operation;

[0056] Among them, the shaking operation is used to shake the body of the mobile terminal; in response to the user shaking the body of the mobile terminal, the mobile terminal receives the shaking operation.

[0057] Optionally, the mobile terminal receives the swinging operation via a built-in motion sensor. Illustratively, the motion sensor may be at least one of an accelerometer, a gyroscope, or a six-axis sensor (or a nine-axis sensor or a twelve-axis sensor) that fuses the accelerometer and gyroscope sensors.

[0058] Optionally, the mobile terminal confirms receipt of the shaking operation through the signal received by the antenna. Illustratively, this confirmation can be based on the amplitude and / or frequency changes between two adjacent received signals, or on the energy changes between two adjacent received signals. In response to the user shaking the mobile terminal, the impedance of two adjacent signals received by the antenna becomes inconsistent during transmission, resulting in inconsistent energy between the two signals. Optionally, the signal received by the antenna may be a Wi-Fi signal, a mobile network signal, a Bluetooth signal, etc.

[0059] Optionally, the mobile terminal confirms receipt of the flicking operation by using images captured by the camera. Illustratively, receipt of the flicking operation is confirmed by the similarity between two adjacent captured images.

[0060] In one embodiment, before receiving the shake operation, the mobile terminal's screen also displays a first-form locking control, which prompts the user to switch the locked virtual object via the shake operation. (Illustrative example) Figure 4 A first-form locking control 401 is shown, displaying a "shake phone" prompt pattern. In one embodiment, in response to the mobile terminal interface first displaying the first-form locking control for a preset duration, such as... Figure 4 As shown, the third form of the locking control is then displayed, such as... Figure 3 As shown, Figure 3 The third form of the locking control 302 is shown, which displays the text "Unlock".

[0061] Step 260: When the swinging operation matches the second virtual object, the virtual object in the locked state is switched from the first virtual object to the second virtual object.

[0062] In one embodiment, the mobile terminal determines a second virtual object matching the swinging operation based on the swinging direction and maximum acceleration during the swinging process obtained from the motion sensor. Then, the mobile terminal displays a second virtual object instead of the first virtual object, which is currently locked.

[0063] In one embodiment, the mobile terminal confirms receipt of a swing operation by generating a sudden change in the waveform of the signal received by the antenna. The swing direction is determined based on the changes in the waveform before and after the change. The swing amplitude is determined based on the energy change of the signal before and after the waveform change. The mobile terminal then determines a second virtual object based on the swing direction and amplitude.

[0064] In one embodiment, the mobile terminal determines the swing direction and amplitude of the swing operation based on the images captured by the camera at the start and end of the swing operation. Further, a second virtual object can be determined based on the swing direction and amplitude. The mobile terminal then switches the virtual object from the first virtual object to the second virtual object, which was previously displayed as locked.

[0065] Optionally, the mobile terminal displays a locked virtual object, switching from a first virtual object to a second virtual object, including at least one of the following methods:

[0066] • Display a lock indicator on the second virtual object, and cancel displaying the lock indicator on the first virtual object;

[0067] • Display the lock visual effect on the second virtual object, and cancel the lock visual effect on the first virtual object;

[0068] • Display prompts on the direction of the swing operation of the mobile terminal. The prompts may be in the form of at least one of graphics, arrows, and text.

[0069] Indicative Figure 5 This illustrates the interface of a mobile terminal switching a locked virtual object from a first virtual object to a second virtual object. (Refer to the reference.) Figure 3 As can be seen, the location of the locking indicator 301 has shifted from the first virtual object 31 to the second virtual object 32. Figure 5 An isosceles triangle 501 is also shown. The two legs of the isosceles triangle 501 are longer than the third side. The isosceles triangle 501 is used to indicate the direction of the swinging operation. At this time, the swinging direction is to the left.

[0070] In summary, using a flicking motion to switch locked virtual objects avoids the need for multiple touches of the lock control, allowing users to quickly switch targets. For example, while the user-controlled virtual character is engaged in a fierce battle with the first enemy character, the user notices a brief fatal weakness in the second enemy character. Attacking the second enemy character would defeat it. By flicking the motion, the user can switch the locked virtual character (the first enemy character) to the second enemy character and launch an attack. Therefore, implementing a flicking motion to switch targets not only enriches the player's control methods but also improves the efficiency of target switching, thereby enhancing the game's strategic depth.

[0071] To improve the efficiency of switching locked targets, Figure 6 A flowchart illustrating a virtual object switching method provided in an exemplary embodiment of this application is shown, in which the method is applied to Figure 2 The mobile terminal 120 shown is an example, and the method includes:

[0072] Step 620: Display the first virtual object that is in a locked state and the second virtual object that is not in a locked state;

[0073] In this context, the locked state indicates that the locked virtual object becomes the behavioral target of the master virtual object, which is a virtual object that the mobile terminal has control over. In one embodiment, the mobile terminal displays a first virtual object in a locked state and a second virtual object not in the locked state. Optionally, the first virtual object being locked can be indicated on the mobile terminal using at least one of text, a lock indicator, and a lock visual effect.

[0074] Step 640: Obtain the swing direction and swing acceleration of the swing operation through the motion sensor;

[0075] Among them, the swinging operation is used to swing the body of the mobile terminal.

[0076] In one embodiment, the mobile terminal obtains a first position at the start of the swinging operation using a motion sensor, and then obtains a second position at the end of the swinging operation using the motion sensor; based on the first and second positions, the mobile terminal determines the swinging direction.

[0077] To illustrate, the mobile terminal uses a gyroscope sensor to obtain the coordinates of its first position (x1, y1, z1) at the start of the swinging operation and the coordinates of its second position (x2, y2, z2) at the end of the swinging operation. The swinging direction can then be determined by calculating the coordinate vectors. For example, if the first position coordinates are (2, 0, 0) and the second position coordinates are (1, 0, 0), then the swinging direction is left.

[0078] Optionally, the mobile terminal may also determine the swing direction based on an accelerometer, or a six-axis sensor (or nine-axis sensor or twelve-axis sensor) obtained by fusing an accelerometer and a gyroscope sensor.

[0079] Indicative Figure 7 (a) shows how a mobile terminal determines the direction of a swing based on its final and initial positions when only a single swing is made; Figure 7 (b) shows how the mobile terminal determines the direction of the swing based on the final position and the initial position when making multiple swings.

[0080] In one embodiment, the mobile terminal determines the start time of the swing operation as the moment when the swing acceleration obtained by the motion sensor is greater than a first threshold. Then, the mobile terminal obtains the swing acceleration during the swing process. Finally, the mobile terminal determines the end time of the swing operation as the moment when the duration for which the swing acceleration obtained by the motion sensor is less than a second threshold reaches a duration threshold.

[0081] In illustrative terms, the mobile terminal obtains acceleration from an accelerometer, or a six-axis sensor (or nine-axis sensor or twelve-axis sensor) fused from an accelerometer and a gyroscope sensor.

[0082] Based on the above, the mobile terminal obtains the swing direction and swing acceleration of the swing operation.

[0083] Step 660: Based on the swing direction and swing acceleration, determine the second virtual object, and switch the virtual object in the locked state from the first virtual object to the second virtual object.

[0084] In one embodiment, the mobile terminal determines the number n of virtual objects existing in the swing direction with the first virtual object as the reference position in the virtual environment. When the value of n is equal to one, the mobile terminal determines one virtual object existing in the swing direction as the second virtual object; when the value of n is greater than one, based on the maximum value of the swing acceleration during the swing, the mobile terminal determines the second virtual object from the n virtual objects existing in the swing direction.

[0085] In one embodiment, when n is greater than one, the mobile terminal sets n acceleration intervals corresponding to the swing direction; based on the fact that the maximum value of the swing acceleration during the swing process falls within the i-th acceleration interval, the mobile terminal determines the i-th virtual object among the n virtual objects as the second virtual object. Here, the n virtual objects correspond one-to-one with the n acceleration intervals, the n virtual objects are sorted from closest to farthest from the first virtual object, and the n acceleration intervals are sorted from smallest to largest acceleration value. Here, n and i are positive integers.

[0086] Indicatively, the direction of the swing obtained by the motion sensor is left. There are two candidate virtual objects to the left of the first virtual object. The mobile terminal sets the two acceleration intervals corresponding to the left side as (0, 3) and (3, +∞) respectively. Based on the maximum value of the swing acceleration obtained by the motion sensor as 2, the first virtual object to the left of the first virtual object is determined to be the second virtual object.

[0087] In another embodiment, when n is greater than one, the mobile terminal acquires k preset acceleration intervals, where k is greater than n. Then, if the maximum value of the swing acceleration during the swinging process falls within the j-th acceleration interval and j is not greater than n, the j-th virtual object among the n virtual objects is determined as the second virtual object. If the maximum value of the swing acceleration falls within the j-th acceleration interval and j is greater than n, the n-th virtual object among the n virtual objects is determined as the second virtual object. The n virtual objects are sorted from closest to farthest from the first virtual object, and the k acceleration intervals are sorted from smallest to largest acceleration value. Here, k and j are positive integers.

[0088] Schematic illustration: When n is 3, the mobile terminal acquires 8 preset acceleration intervals, which are (0, 3), (3, 6), (6, 9), (9, 12), (12, 15), (15, 18), (18, 21), and (21, +∞). If the maximum value of the swing acceleration during the swing is 5 (falling into the 2nd acceleration interval), then the 2nd virtual object to the left of the first virtual object is determined to be the second virtual object. If the maximum value of the swing acceleration during the swing is 14 (falling into the 5th acceleration interval), then the 3rd virtual object to the left of the first virtual object is determined to be the second virtual object.

[0089] It can be noted that the aforementioned k acceleration intervals may be pre-set by the server supporting the application's operation, or they may be set by the user in the application. For example, the user may adjust the sensitivity of the swing operation in the application, which is to adjust the span and / or the number of acceleration intervals.

[0090] Based on the above, a second virtual object is identified in the virtual environment. After this, the mobile terminal displays a locked virtual object, which is changed from the first virtual object to the second virtual object. Possible display methods have been detailed in step 260 above and will not be repeated here.

[0091] In summary, by receiving the swing direction and acceleration of the swing operation through a motion sensor, determining the second virtual object based on the swing direction and acceleration, and finally switching the locked virtual object from the first virtual object to the second virtual object, a specific implementation method for switching the locked target based on the swing operation is provided, ensuring high efficiency in switching the locked target.

[0092] To improve the efficiency of switching locked targets, Figure 8 A flowchart illustrating a virtual object switching method provided in an exemplary embodiment of this application is shown, in which the method is applied to Figure 2 The mobile terminal 120 shown is an example, and the method includes:

[0093] Step 820: Display the first virtual object that is in a locked state and the second virtual object that is not in a locked state;

[0094] In this context, the locked state indicates that the locked virtual object becomes the behavioral target of the master virtual object, which is a virtual object that the mobile terminal has control over. In one embodiment, the mobile terminal displays a first virtual object in a locked state and a second virtual object not in the locked state. Optionally, the first virtual object being locked can be indicated on the mobile terminal using at least one of text, a lock indicator, and a lock visual effect.

[0095] Step 840: Determine the direction and amplitude of the swinging operation using images captured by the camera;

[0096] In one embodiment, the mobile terminal uses a camera to acquire a first image at the start of the swinging operation and a second image at the end of the swinging operation; then, based on the first and second images, feature point matching is performed to determine the swinging direction.

[0097] In one embodiment, the mobile terminal performs feature point tracking on images captured by a camera. Feature point tracking can employ a visual odometry-based tracking algorithm, which is not limited in this application. Optionally, the feature point tracking uses the KLT (Kanade-Lucas) optical flow tracking algorithm. Optionally, the feature point tracking uses ORB feature descriptors extracted based on the ORB (Oriented FAST and Rotated BRIEF) algorithm for feature point tracking. This application does not limit the specific algorithm used for feature point tracking.

[0098] In one embodiment, if the similarity between two adjacent frames acquired by the camera is less than a third threshold, the mobile terminal determines the previous frame of the two adjacent frames as the first image, and determines the moment of acquiring the first image as the start time of the shaking operation.

[0099] As an illustration, after acquiring an image through the camera, the mobile terminal calculates the similarity between two adjacent frames. Optionally, if the number of repeated feature points between two adjacent frames is less than a first threshold, i.e., the similarity between the two adjacent frames is considered to be less than a third threshold, then the previous frame in the two adjacent frames is determined as the first image.

[0100] Optionally, after the mobile terminal acquires an image through the camera, if it determines that the similarity between two adjacent frames is less than a third threshold, the counter is incremented by 1. If, within a first preset time period, the mobile terminal determines that the similarity between another pair of adjacent frames is also less than the third threshold, the counter is incremented by 1 again. If, within a second preset time period, the accumulated value of the counter reaches a preset value, it is determined that a shaking operation has been detected, and the first frame of the two adjacent frames that initially reached the third threshold is determined as the first image.

[0101] In one embodiment, if the similarity between two adjacent frames of images acquired by the camera is greater than a fourth threshold, the mobile terminal determines the latter frame of the two adjacent frames as the second image, and determines the moment of acquiring the second image as the end moment of the shaking operation.

[0102] As an illustration, after acquiring an image through the camera, the mobile terminal calculates the similarity between two adjacent frames. Optionally, if the number of repeated feature points between two adjacent frames is greater than a second threshold, that is, if the similarity between the two adjacent frames is considered to be greater than a fourth threshold, then the latter frame of the two adjacent frames is determined as the second image.

[0103] Optionally, after the mobile terminal acquires an image through the camera, if it determines that the similarity between two adjacent frames is greater than a fourth threshold, the counter is incremented by 1. If, within a third preset time period, the mobile terminal determines that the similarity between another pair of adjacent frames is also greater than the fourth threshold, the counter is incremented by 1 again. If, within a fourth preset time period, the accumulated value of the counter reaches a second preset value, it is determined that the shaking has stopped, and the next frame of the two adjacent frames that caused the counter to reach the second preset value is determined as the second image.

[0104] Based on the above, once the first and second images are obtained, the direction and amplitude of the swinging operation can be further determined.

[0105] Optionally, the mobile terminal can determine the swing direction of the swing operation based on the displacement direction of the feature points matched between the first and second images. Optionally, the amplitude of the swing operation can be mapped based on the similarity between the first and second images.

[0106] Step 860: Based on the swing direction and swing amplitude, determine the second virtual object, and switch the virtual object in the locked state from the first virtual object to the second virtual object.

[0107] In the virtual environment, the mobile terminal determines the number m of virtual objects existing in the swing direction with the first virtual object as the reference position; when the value of m is equal to one, the mobile terminal determines one virtual object existing in the swing direction as the second virtual object; when the value of m is greater than one, based on the swing amplitude during the swing, the mobile terminal determines the second virtual object from the m virtual objects existing in the swing direction.

[0108] Optionally, when the value of m is greater than one, the mobile terminal sets m amplitude intervals corresponding to the swing direction; based on the swing amplitude being within the p-th amplitude interval, the mobile terminal determines the p-th virtual object among the m virtual objects as the second virtual object. Here, the m virtual objects correspond one-to-one with the m amplitude intervals, the m virtual objects are sorted from closest to farthest from the first virtual object, and the m amplitude intervals are sorted from smallest to largest amplitude value.

[0109] Optionally, when the value of m is greater than one, the mobile terminal acquires R preset amplitude intervals, where R is greater than m. Then, when the swing amplitude is within the r-th amplitude interval and r is not greater than m, the r-th virtual object among the m virtual objects is determined as the second virtual object; when the swing amplitude is within the r-th amplitude interval and r is greater than m, the m-th virtual object among the m virtual objects is determined as the second virtual object. The m virtual objects are sorted from closest to farthest from the first virtual object, and the R amplitude intervals are sorted from smallest to largest amplitude value.

[0110] Where m, p, R and r are all positive integers.

[0111] Based on the above, the mobile terminal identifies the second virtual object in the virtual environment. After this, the mobile terminal switches the display of the locked virtual object from the first virtual object to the second virtual object. Possible display methods have been detailed in step 260 above and will not be repeated here.

[0112] In summary, by confirming the receipt of a swing operation through the built-in camera of the mobile terminal, determining the swing direction and amplitude based on the image captured by the camera, and identifying a second virtual object based on the swing direction and amplitude, the locked virtual object is finally switched from the first virtual object to the second virtual object. This provides a specific implementation method for switching the locked target based on the swing operation, ensuring high efficiency in switching the locked target.

[0113] To improve the efficiency of switching locked targets, Figure 9 This is a flowchart of a virtual object switching method provided in an exemplary embodiment of this application, in which the method is applied... Figure 1 The mobile terminal 120 shown is used as an example to illustrate the method, which includes:

[0114] Step 910: Display the second form of the locking control;

[0115] On the mobile terminal's interface, a second-form locking control is displayed. This second-form locking control is used by the main virtual object to lock the virtual object among the candidate virtual objects. (Refer to the reference.) Figure 10 (a), Figure 10 (a) shows a second form of the locking control 1001, schematically located in the lower right corner of the mobile terminal's interface, allowing users to quickly perform a locking operation.

[0116] Step 920: Display at least two virtual objects;

[0117] Among them, at least two virtual objects include a first virtual object that is not in a locked state. (Refer to the reference.) Figure 10 (a), at this time Figure 10 (a) shows 5 virtual objects.

[0118] Step 930: In response to the second-mode locking control receiving the first trigger operation, determine to perform the locking operation;

[0119] Optionally, the first triggering action includes at least one of long press trigger, single click trigger, double click trigger, drag trigger, and pressure trigger. Illustratively, in response to... Figure 10 In (a), the second-mode locking control 1001 receives the first trigger operation, and the mobile terminal determines to perform the locking operation.

[0120] Step 940: If the first virtual object meets the locking conditions, display the first virtual object in the locked state;

[0121] In one embodiment, displaying the first virtual object in a locked state when the first virtual object satisfies the locking condition includes at least one of the following methods:

[0122] • In a virtual environment, identify the virtual object with the smallest distance from the master virtual object among at least two virtual objects as the first virtual object, and display the first virtual object in a locked state;

[0123] • In a virtual environment, determine that among at least two virtual objects, the virtual object whose distance from the master virtual object is less than a distance threshold and whose orientation falls into the master virtual object is the first virtual object, and display the first virtual object in a locked state;

[0124] • In a virtual environment, the virtual object with the smallest absolute bio value among at least two virtual objects is identified as the first virtual object. The first virtual object is displayed as being in a locked state. The bio value is used to measure the wear and tear of the virtual object in the virtual environment, and the absolute bio value is the remaining bio value of the virtual object.

[0125] • In a virtual environment, the virtual object with the smallest relative bio value among at least two virtual objects is identified as the first virtual object. The first virtual object is displayed in a locked state. The relative bio value is the ratio of the remaining bio value of the virtual object to the complete bio value.

[0126] Reference Figure 10 Once the first virtual object meets the locking conditions, the mobile terminal's display interface will then... Figure 10 (a) Switch to Figure 10 (b)

[0127] Step 950: Display the locking control in its first form;

[0128] In response to the mobile terminal receiving a first trigger operation from the second-mode locking control 1001, the first virtual object 31 is locked among at least two virtual objects, and the mobile terminal's display interface changes from... Figure 10 (a) Switch to Figure 10 (b), in conjunction with reference Figure 10 (b) The first-mode locking control 401 prompts the user to switch the virtual object in the locked state by shaking it. Figure 10 (b) Also shown are a first virtual object 31, a second virtual object 32 and a lock indicator 301.

[0129] Step 960: Display the third form of the locking control;

[0130] After the first form of the lock control is displayed within a preset time, the third form of the lock control is displayed on the mobile terminal's interface. The third form of the lock control is used to unlock the first virtual object.

[0131] Indicative Figure 10 (c) shows the third form of the locking control 302.

[0132] If the mobile terminal receives the second trigger operation through the third-form locking control 302, the mobile terminal performs a unlock operation, and the mobile terminal interrupts the execution of the virtual object switching method. If the mobile terminal does not receive the second trigger operation through the third-form locking control 302, the following step 970 is executed.

[0133] Optionally, the second triggering action includes at least one of long press triggering, single click triggering, double click triggering, drag triggering, and pressure triggering.

[0134] Step 970: Display the first virtual object that is in a locked state and the second virtual object that is not in a locked state;

[0135] In one embodiment, the mobile terminal displays a first virtual object in a locked state and a second virtual object in an unlocked state. Optionally, the second virtual object is one of the at least two virtual objects mentioned in step 920 above.

[0136] Indicative Figure 10 (c) shows a first virtual object 31 in a locked state and a second virtual object 32 in an unlocked state, where the second virtual object is one of the at least two virtual objects in step 920 above.

[0137] Step 980, receive the swing operation;

[0138] Among them, the swinging operation refers to the operation of swinging the body of the mobile terminal.

[0139] Optionally, the mobile terminal receives the swinging operation through a built-in motion sensor, which includes an accelerometer, a gyroscope, and a six-axis sensor (or a nine-axis sensor or a twelve-axis sensor) fused together with the accelerometer and gyroscope.

[0140] Optionally, the mobile terminal confirms receipt of the flicking operation by using images captured by the camera. Illustratively, receipt of the flicking operation is confirmed by the similarity between two adjacent captured images.

[0141] Optionally, the mobile terminal confirms receipt of the swing operation by receiving the signal through the antenna. Illustratively, the mobile terminal confirms receipt of the swing operation by measuring the energy change between two consecutive received signals.

[0142] Optionally, the mobile terminal can receive the shaking operation through other sensors. For example, an optical sensor can confirm the receipt of the shaking operation by observing the change in light intensity caused by the shaking operation. It may also receive the shaking operation through temperature sensors, magnetic field sensors, etc.

[0143] Step 990: When the swinging operation matches the second virtual object, the virtual object in the locked state is switched from the first virtual object to the second virtual object.

[0144] In one embodiment, the mobile terminal determines a second virtual object matching the swinging operation based on the swinging direction and maximum acceleration during the swinging process obtained from the motion sensor. Then, the mobile terminal displays a second virtual object instead of the first virtual object, which is currently locked.

[0145] In one embodiment, the mobile terminal confirms receipt of a swing operation by generating a sudden change in the waveform of the signal received by the antenna. The swing direction is determined based on the changes in the waveform before and after the change. The swing amplitude is determined based on the energy change of the signal before and after the waveform change. The mobile terminal then determines a second virtual object based on the swing direction and amplitude. Afterward, the mobile terminal switches the display from the first virtual object to the second virtual object, which was previously locked.

[0146] In one embodiment, the mobile terminal determines the swing direction and amplitude of the swing operation based on the images captured by the camera at the start and end of the swing operation. Further, a second virtual object is determined based on the swing direction and amplitude. Then, the mobile terminal displays a second virtual object instead of the first virtual object, which is currently in a locked state.

[0147] Indicative Figure 10 (d) shows the second virtual object 32 in a locked state. It can be noted that... Figure 10 (d) also shows a cues graphic 501 indicating the direction of the swing.

[0148] It is worth noting that during or after the execution of steps 970 to 990, the mobile terminal may perform a de-locking operation in response to the third-mode locking control receiving a second trigger operation. After performing the de-locking operation, the mobile terminal stops switching the locking target.

[0149] In summary, by setting up a first-form locking control (with prompts for the swing operation), a second-form locking control (allowing for locking), and a third-form locking control (allowing for unlocking) on ​​the mobile terminal interface, and by setting prompts for the swing direction, the specific implementation of the virtual object switching method has been improved, making the switching method more in line with the user's operating habits.

[0150] To improve the efficiency of switching locked targets, Figure 11A flowchart illustrating a virtual object switching method provided in an exemplary embodiment of this application is shown, with an example of the method applied to a smartphone. The method includes:

[0151] Step 1101, Begin;

[0152] The phone begins the process of switching the locked target.

[0153] Step 1102: Determine whether the user clicked the target lock button on the main interface;

[0154] The phone determines whether the user has clicked the target lock button on the main screen. The target lock button is used to actively lock onto a target character on the main screen. When the phone is running an application, the target lock button is located in the lower right corner of the screen. Under normal circumstances, if there is no lockable target within a certain range of the player character, the user's action of triggering the target lock button will have no effect. If a lockable target exists within a certain range of the player character, the user's action of triggering the target lock button will activate the lock.

[0155] If the user clicks the target lock button on the main interface, proceed to step 1104; if the user does not click the target lock button on the main interface, proceed to step 1103.

[0156] Step 1103: Do not perform target lock switching;

[0157] If the phone does not receive a trigger operation from the target lock button, the phone will not perform a target lock switch. Optionally, trigger operations include long press, single click, double click, drag, and pressure trigger, etc.

[0158] Step 1104: Determine if there is a target that can be locked within the field of view;

[0159] If the phone receives a user's trigger action on the target lock button, the phone determines whether there is a lockable target within the player character's field of vision. If a lockable target exists, proceed to step 1106; otherwise, proceed to step 1105.

[0160] Step 1105: Do not perform target locking;

[0161] If the phone determines that there is no target to lock onto within the player character's field of vision, the phone will not perform target locking; that is, the phone will not lock onto virtual objects within the player character's field of vision.

[0162] Step 1106: The number of targets currently in the locked state is greater than 1;

[0163] The phone determines if the number of targets in the player character's field of view that meet the lock-on condition is greater than 1. If the number of targets meeting the lock-on condition is greater than 1, the phone will start a thread to switch the lock-on target based on the shake operation, that is, the phone will then execute step 1108. If the number of targets meeting the lock-on condition is equal to 1, the phone determines that it is currently unable to switch the lock-on target, that is, the phone will not start a thread to switch the lock-on target based on the shake operation, that is, the phone will then start step 1107.

[0164] Step 1107: Do not activate the accelerometer;

[0165] The phone's accelerometer sensor is not activated.

[0166] Step 1108: Activate the accelerometer;

[0167] If the number of targets currently matching the lock-on condition is greater than 1, the phone activates its accelerometer. The accelerometer can be used to determine the direction and acceleration of the subsequent swinging motion.

[0168] Step 1109: Did the phone experience any shaking?

[0169] The phone determines whether it has received a shaking operation. If so, it further determines the direction of the shaking operation. Otherwise, it proceeds to step 1110.

[0170] Step 1110: Do not perform target locking;

[0171] If the phone confirms that it has not received a shaking operation, it will not perform target locking.

[0172] Step 1111: The position after the swing is higher than the position before the swing;

[0173] After the phone confirms that a shaking operation has occurred, the phone's position after the shaking operation is upward compared to its position before the shaking operation.

[0174] Step 1112: The position after the swing is to the left compared to the position before the swing;

[0175] After the phone confirms that a shaking operation has occurred, the phone's position after the shaking operation is to the left of its position before the shaking operation.

[0176] Step 1113: The position after the swing is to the right compared to the position before the swing;

[0177] After the phone confirms that a shaking operation has occurred, the phone's position after the shaking operation is to the right compared to its position before the shaking operation.

[0178] Step 1114: The position after the swing is downward compared to the position before the swing;

[0179] After the phone confirms that a shaking operation has occurred, the phone's position after the shaking operation is lower than its position before the shaking operation.

[0180] Step 1115: Obtain the phone's swing acceleration value;

[0181] The phone acquires the swing acceleration value. Optionally, the phone acquires the maximum swing acceleration during the swing process via an accelerometer.

[0182] Step 1116: Determine the dynamic acceleration region where the swing acceleration is located;

[0183] The mobile phone determines the dynamic acceleration region where the swing acceleration is located, and determines the lock target after switching based on the dynamic acceleration region. Optionally, the mobile phone determines the dynamic acceleration region that matches the maximum value of the swing acceleration during the swing. Optionally, the mobile phone presets a certain number of dynamic acceleration regions, or the mobile phone sets the same number of dynamic acceleration regions as the number of virtual objects existing in the swing direction of the player character in the virtual environment.

[0184] Step 1117, lock the target and switch backward;

[0185] When the position after the swing is higher than the position before the swing, the mobile phone controls the target to switch backward.

[0186] Step 1118, lock onto the target and switch to the left;

[0187] When the position after the swing is to the left compared to the position before the swing, the phone controls the target lock to switch to the left.

[0188] Step 1119: Lock onto the target and switch to the right;

[0189] When the position after the swing is to the right compared to the position before the swing, the phone controls the target lock to switch to the right.

[0190] Step 1120: Lock onto the target and switch forward;

[0191] When the position after the swing is downward compared to the position before the swing, the mobile phone controls the target lock to switch forward.

[0192] Step 1121: Did the user click the "Cancel Lock" button?

[0193] The phone determines whether the user has clicked the unlock button. If the user clicks the unlock button, the phone stops switching virtual objects, disables the application's locking logic, and exits the locking process.

[0194] If the user clicks the unlock button, proceed to step 1122.

[0195] Step 1122, turn off the accelerometer;

[0196] The phone exits the lock process and turns off the accelerometer.

[0197] Figure 12 This is a structural block diagram of a virtual object switching device provided in an exemplary embodiment of this application. The device includes:

[0198] The display module 1201 is used to display a first virtual object in a locked state and a second virtual object in an unlocked state. The locked state indicates that the locked virtual object becomes the behavior target of the master virtual object. The master virtual object is a virtual object that the mobile terminal has control over.

[0199] The receiving module 1202 is used to receive the shaking operation, which is the operation of shaking the body of the mobile terminal;

[0200] The display module 1201 is also used to switch the display of the locked virtual object from the first virtual object to the second virtual object when the swinging operation matches the second virtual object.

[0201] In an optional embodiment, the display module 1201 is further configured to display a lock indicator on the second virtual object and to cancel the display of the lock indicator on the first virtual object.

[0202] In an optional embodiment, the display module 1201 is further configured to display a locking visual effect on the second virtual object and to cancel the display of the locking visual effect on the first virtual object.

[0203] In an optional embodiment, the display module 1201 is further configured to display prompt information indicating the direction of the swinging operation of the mobile terminal, wherein the prompt information is presented in the form of at least one of graphics, arrows, and text.

[0204] In an optional embodiment, the receiving module 1202 is further configured to acquire the swing direction and swing acceleration of the swing operation via a motion sensor.

[0205] In an optional embodiment, the display module 1201 is further configured to determine a second virtual object based on the swing direction and swing acceleration, and to display the virtual object in the locked state as the second virtual object switched from the first virtual object.

[0206] In an optional embodiment, the display module 1201 is further configured to determine, in the virtual environment, the number n of virtual objects existing in the swing direction with the first virtual object as the reference position.

[0207] In an optional embodiment, the display module 1201 is further configured to determine a virtual object existing in the swing direction as a second virtual object when the value of n is equal to one.

[0208] In an optional embodiment, the display module 1201 is further configured to determine a second virtual object from among n virtual objects existing in the swing direction, based on the maximum value of the swing acceleration during the swing process, when the value of n is greater than one.

[0209] In an optional embodiment, the display module 1201 is further configured to set n acceleration intervals corresponding to the swing direction when the value of n is greater than one.

[0210] In an optional embodiment, the display module 1201 is further configured to determine the i-th virtual object among n virtual objects as the second virtual object based on the fact that the maximum value of the swing acceleration during the swing process is in the i-th acceleration interval.

[0211] Among them, n virtual objects correspond one-to-one with n acceleration intervals, the n virtual objects are sorted from near to far from the first virtual object, and the n acceleration intervals are sorted from small to large acceleration values.

[0212] In an optional embodiment, the display module 1201 is further configured to obtain k preset acceleration intervals, where k is greater than n, when the value of n is greater than one.

[0213] In an optional embodiment, the display module 1201 is further configured to determine the j-th virtual object among n virtual objects as the second virtual object when the maximum value of the swing acceleration during the swinging process is in the j-th acceleration interval and j is not greater than n.

[0214] In an optional embodiment, the display module 1201 is further configured to determine the nth virtual object among the n virtual objects as the second virtual object when the maximum value of the swing acceleration is in the j-th acceleration interval and j is greater than n.

[0215] Among them, the n virtual objects are sorted from the closest to the farthest from the first virtual object, and the k acceleration intervals are sorted from the smallest to the largest acceleration value.

[0216] In an optional embodiment, the receiving module 1202 is further configured to acquire the first position of the mobile terminal at the start of the swinging operation via a motion sensor.

[0217] In an optional embodiment, the receiving module 1202 is further configured to acquire the second position of the mobile terminal at the end of the swinging operation via a motion sensor.

[0218] In an optional embodiment, the receiving module 1202 is further configured to determine the swing direction based on the first position and the second position.

[0219] In an optional embodiment, the receiving module 1202 is further configured to determine the moment when the swing acceleration obtained by the motion sensor is greater than a first threshold as the start moment of the swing operation.

[0220] In an optional embodiment, the receiving module 1202 is further configured to acquire the swing acceleration during the swinging process.

[0221] In an optional embodiment, the receiving module 1202 is further configured to determine the moment when the duration during which the swing acceleration obtained by the motion sensor is less than the second threshold reaches the duration threshold as the end moment of the swing operation.

[0222] In an optional embodiment, the receiving module 1202 is further configured to determine the swing direction and swing amplitude of the swing operation through the image captured by the camera.

[0223] In an optional embodiment, the display module 1201 is further configured to determine a second virtual object based on the swing direction and swing amplitude, and to display the virtual object in the locked state as switching from the first virtual object to the second virtual object.

[0224] In an optional embodiment, the display module 1201 is further configured to determine, in the virtual environment, the number m of virtual objects existing in the swing direction with the first virtual object as the reference position.

[0225] In an optional embodiment, the display module 1201 is further configured to determine a virtual object existing in the swing direction as a second virtual object when the value of m is equal to one.

[0226] In an optional embodiment, the display module 1201 is further configured to determine a second virtual object from among m virtual objects existing in the swing direction based on the swing amplitude during the swing process, when the value of m is greater than one.

[0227] In an optional embodiment, the receiving module 1202 is further configured to acquire a first image of the mobile terminal at the start of the swing operation via the camera of the mobile terminal.

[0228] In an optional embodiment, the receiving module 1202 is further configured to acquire a second image of the mobile terminal at the end of the swinging operation via the camera of the mobile terminal.

[0229] In an optional embodiment, the receiving module 1202 is further configured to perform feature point matching based on the first image and the second image to determine the swing direction.

[0230] In an optional embodiment, the receiving module 1202 is further configured to determine the previous frame of the first two adjacent frames as the first image when the similarity between the first two adjacent frames acquired by the camera is less than a third threshold, and to determine the moment when the first image is acquired as the start moment of the shaking operation.

[0231] In an optional embodiment, the receiving module 1202 is further configured to determine the latter frame of the two adjacent frames as the second image if the similarity between the two adjacent frames acquired by the camera is greater than a fourth threshold, and to determine the time of acquiring the second image as the end time of the shaking operation.

[0232] In an optional embodiment, the receiving module 1202 is further configured to determine the swing amplitude of the swing operation based on the similarity between the first image and the second image.

[0233] In an optional embodiment, the display module 1201 is further configured to display a first-form locking control, which is used to prompt the user to switch the virtual object in a locked state by a flicking operation.

[0234] In an optional embodiment, the display module 1201 is further configured to display at least two virtual objects, the at least two virtual objects including a first virtual object that is not in an locked state.

[0235] In an optional embodiment, the display module 1201 is further configured to display the first virtual object in a locked state when the first virtual object satisfies the locking condition.

[0236] In an optional embodiment, the display module 1201 is further configured to, in the virtual environment, determine the virtual object with the smallest distance from the master virtual object among at least two virtual objects as the first virtual object, and display the first virtual object in a locked state.

[0237] In an optional embodiment, the display module 1201 is further configured to, in the virtual environment, determine that among at least two virtual objects, the virtual object whose distance from the master virtual object is less than a distance threshold and whose orientation falls into the master virtual object is the first virtual object, and display the first virtual object in a locked state.

[0238] In an optional embodiment, the display module 1201 is further configured to, in the virtual environment, determine the virtual object that is at least two virtual objects whose distance from the master virtual object is less than a distance threshold and whose absolute biometric value is the smallest, as the first virtual object, and display the first virtual object in a locked state. The biometric value is used to measure the wear and tear of the virtual object in the virtual environment, and the absolute biometric value is the remaining biometric value of the virtual object.

[0239] In an optional embodiment, the display module 1201 is further configured to, in the virtual environment, determine the virtual object that is at least two virtual objects whose distance from the master virtual object is less than a distance threshold and whose relative bio value is the smallest as the first virtual object, and display the first virtual object in a locked state, wherein the relative bio value is the ratio of the remaining bio value of the virtual object to the complete bio value.

[0240] In an optional embodiment, the display module 1201 is also used to display a second-mode locking control.

[0241] In an optional embodiment, the display module 1201 is further configured to determine to perform a locking operation in response to the second-mode locking control receiving a first trigger operation.

[0242] In an optional embodiment, the display module 1201 is also used to display a third-form locking control.

[0243] In an optional embodiment, the display module 1201 is further configured to determine to perform a lock cancellation operation in response to the third-mode locking control receiving a second trigger operation.

[0244] In summary, the aforementioned device uses a flicking motion to switch between locked virtual objects, avoiding the need for multiple touches to switch targets and allowing users to quickly change locked targets. For example, while the user-controlled virtual character is engaged in a fierce battle with the first enemy character, the user notices a brief fatal weakness in the second enemy character. Attacking the second enemy character would defeat it. By flicking the motion, the user can switch the locked virtual character (the first enemy character) to the second enemy character and launch an attack. Therefore, implementing a flicking motion to switch locked targets not only enriches the player's control methods but also improves the efficiency of switching targets, thereby enhancing the game's strategic depth.

[0245] Figure 13 A structural block diagram of a computer device 1300 provided in an exemplary embodiment of this application is shown. The computer device 1300 may be a portable mobile terminal, such as a smartphone, tablet computer, MP3 player (Moving Picture Experts Group Audio Layer III), MP4 player (Moving Picture Experts Group Audio Layer IV), laptop computer, or desktop computer. The computer device 1300 may also be referred to as a user device, portable terminal, laptop terminal, desktop terminal, or other names.

[0246] Typically, computer device 1300 includes a processor 1301 and a memory 1302.

[0247] Processor 1301 may include one or more processing cores, such as a quad-core processor, an octa-core processor, etc. Processor 1301 may be implemented using at least one hardware form selected from DSP (Digital Signal Processing), FPGA (Field-Programmable Gate Array), and PLA (Programmable Logic Array). Processor 1301 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 1301 may integrate a GPU (Graphics Processing Unit), which is responsible for rendering and drawing the content to be displayed on the screen. In some embodiments, processor 1301 may also include an AI (Artificial Intelligence) processor, which is used to handle computational operations related to machine learning.

[0248] The memory 1302 may include one or more computer-readable storage media, which may be non-transitory. The memory 1302 may also include high-speed random access memory and non-volatile memory, such as one or more disk storage devices or flash memory devices. In some embodiments, the non-transitory computer-readable storage media in the memory 1302 are used to store at least one instruction, which is executed by the processor 1301 to implement the virtual object switching method provided in the method embodiments of this application.

[0249] In some embodiments, the computer device 1300 may also optionally include a peripheral device interface 1303 and at least one peripheral device. The processor 1301, memory 1302, and peripheral device interface 1303 can be connected via a bus or signal line. Each peripheral device can be connected to the peripheral device interface 1303 via a bus, signal line, or circuit board. For example, the peripheral device may include at least one of the following: a radio frequency circuit 1304, a display screen 1305, a camera assembly 1306, an audio circuit 1307, and a power supply 1308.

[0250] Peripheral device interface 1303 can be used to connect at least one I / O (Input / Output) related peripheral device to processor 1301 and memory 1302. In some embodiments, processor 1301, memory 1302 and peripheral device interface 1303 are integrated on the same chip or circuit board; in some other embodiments, any one or two of processor 1301, memory 1302 and peripheral device interface 1303 can be implemented on separate chips or circuit boards, which is not limited in this embodiment.

[0251] The radio frequency (RF) circuit 1304 is used to receive and transmit RF (Radio Frequency) signals, also known as electromagnetic signals. The RF circuit 1304 communicates with communication networks and other communication devices via electromagnetic signals. The RF circuit 1304 converts electrical signals into electromagnetic signals for transmission, or converts received electromagnetic signals back into electrical signals. Optionally, the RF circuit 1304 includes: an antenna system, an RF transceiver, one or more amplifiers, a tuner, an oscillator, a digital signal processor, a codec chipset, a user identity module card, etc. The RF circuit 1304 can communicate with other terminals through at least one wireless communication protocol. This wireless communication protocol includes, but is not limited to: the World Wide Web, metropolitan area networks, intranets, various generations of mobile communication networks (2G, 3G, 4G, and 13G), wireless local area networks, and / or WiFi (Wireless Fidelity) networks. In some embodiments, the RF circuit 1304 may also include circuitry related to NFC (Near Field Communication), which is not limited in this application.

[0252] Display screen 1305 is used to display a UI (User Interface). This UI may include graphics, text, icons, videos, and any combination thereof. When display screen 1305 is a touch display screen, it also has the ability to collect touch signals on or above its surface. These touch signals can be input as control signals to processor 1301 for processing. In this case, display screen 1305 can also be used to provide virtual buttons and / or a virtual keyboard, also known as soft buttons and / or a soft keyboard. In some embodiments, display screen 1305 may be a single screen disposed on the front panel of computer device 1300; in other embodiments, display screen 1305 may be at least two screens, disposed on different surfaces of computer device 1300 or in a folded design; in still other embodiments, display screen 1305 may be a flexible display screen disposed on a curved or folded surface of computer device 1300. Furthermore, display screen 1305 may also be configured as a non-rectangular, irregular shape, i.e., a non-rectangular screen. The display screen 1305 can be made of materials such as LCD (Liquid Crystal Display) and OLED (Organic Light-Emitting Diode).

[0253] The camera assembly 1306 is used to acquire images or videos. Optionally, the camera assembly 1306 includes a front-facing camera and a rear-facing camera. Typically, the front-facing camera is located on the front panel of the terminal, and the rear-facing camera is located on the back of the terminal. In some embodiments, there are at least two rear-facing cameras, which are any one of a main camera, a depth-sensing camera, a wide-angle camera, and a telephoto camera, to achieve background blurring by fusion of the main camera and the depth-sensing camera, panoramic shooting by fusion of the main camera and the wide-angle camera, VR (Virtual Reality) shooting, or other fusion shooting functions. In some embodiments, the camera assembly 1306 may also include a flash. The flash can be a single-color temperature flash or a dual-color temperature flash. A dual-color temperature flash refers to a combination of a warm-light flash and a cool-light flash, which can be used for light compensation at different color temperatures.

[0254] The audio circuit 1307 may include a microphone and a speaker. The microphone is used to collect sound waves from the user and the environment, converting the sound waves into electrical signals that are input to the processor 1301 for processing, or input to the radio frequency circuit 1304 for voice communication. For stereo sound acquisition or noise reduction purposes, multiple microphones may be used, each located at a different part of the computer device 1300. The microphone may also be an array microphone or an omnidirectional microphone. The speaker is used to convert electrical signals from the processor 1301 or the radio frequency circuit 1304 into sound waves. The speaker may be a conventional diaphragm speaker or a piezoelectric ceramic speaker. When the speaker is a piezoelectric ceramic speaker, it can convert electrical signals not only into audible sound waves but also into inaudible sound waves for purposes such as distance measurement. In some embodiments, the audio circuit 1307 may also include a headphone jack.

[0255] Power supply 1308 is used to supply power to the various components in computer device 1300. Power supply 1308 can be AC ​​power, DC power, a disposable battery, or a rechargeable battery. When power supply 1308 includes a rechargeable battery, the rechargeable battery can be a wired rechargeable battery or a wireless rechargeable battery. A wired rechargeable battery is a battery that is charged via a wired line, and a wireless rechargeable battery is a battery that is charged via a wireless coil. The rechargeable battery can also be used to support fast charging technology.

[0256] In some embodiments, the computer device 1300 further includes one or more sensors 1309. The one or more sensors 1309 include, but are not limited to, an accelerometer 1310, a gyroscope 1311, a pressure sensor 1312, an optical sensor 1313, and a proximity sensor 1314.

[0257] Accelerometer 1310 can detect the magnitude of acceleration along the three coordinate axes of a coordinate system established by computer device 1300. For example, accelerometer 1310 can be used to detect the components of gravitational acceleration along the three coordinate axes. Processor 1301 can control display screen 1305 to display the user interface in either a landscape or portrait view based on the gravitational acceleration signal acquired by accelerometer 1310. Accelerometer 1310 can also be used for games or for acquiring user motion data.

[0258] The gyroscope sensor 1311 can detect the orientation and rotation angle of the computer device 1300. The gyroscope sensor 1311 can work in conjunction with the accelerometer sensor 1310 to acquire the user's 3D movements on the computer device 1300. Based on the data acquired by the gyroscope sensor 1311, the processor 1301 can perform the following functions: motion sensing (e.g., changing the UI based on the user's tilt), image stabilization during shooting, game control, and inertial navigation.

[0259] Pressure sensor 1312 is disposed on the side bezel of computer device 1300 and / or on the lower layer of display screen 1305. When pressure sensor 1312 is disposed on the side bezel of computer device 1300, it can detect the user's grip signal on computer device 1300, and processor 1301 performs left / right hand recognition or quick operation based on the grip signal collected by pressure sensor 1312. When pressure sensor 1312 is disposed on the lower layer of display screen 1305, processor 1301 controls operable controls on the UI interface based on the user's pressure operation on display screen 1305. Operable controls include at least one of button controls, scroll bar controls, icon controls, and menu controls.

[0260] Optical sensor 1313 is used to collect ambient light intensity. In one embodiment, processor 1301 can control the display brightness of display screen 1305 based on the ambient light intensity collected by optical sensor 1313. For example, when the ambient light intensity is high, the display brightness of display screen 1305 is increased; when the ambient light intensity is low, the display brightness of display screen 1305 is decreased. In another embodiment, processor 1301 can also dynamically adjust the shooting parameters of camera assembly 1306 based on the ambient light intensity collected by optical sensor 1313.

[0261] The proximity sensor 1314, also known as a distance sensor, is typically located on the front panel of the computer device 1300. The proximity sensor 1314 is used to detect the distance between the user and the front of the computer device 1300. In one embodiment, when the proximity sensor 1314 detects that the distance between the user and the front of the computer device 1300 is gradually decreasing, the processor 1301 controls the display screen 1305 to switch from a screen-on state to a screen-off state; when the proximity sensor 1314 detects that the distance between the user and the front of the computer device 1300 is gradually increasing, the processor 1301 controls the display screen 1305 to switch from a screen-off state to a screen-on state.

[0262] Those skilled in the art will understand that Figure 13 The structure shown does not constitute a limitation on the computer device 1300, and may include more or fewer components than shown, or combine certain components, or use different component arrangements.

[0263] This application also provides a computer-readable storage medium storing at least one instruction, at least one program, code set, or instruction set, wherein the at least one instruction, the at least one program, the code set, or the instruction set is loaded and executed by a processor to implement the virtual object switching method provided in the above method embodiments.

[0264] This application provides a computer program product or computer program that includes computer instructions stored in a computer-readable storage medium. A processor of a computer device reads the computer instructions from the computer-readable storage medium and executes the computer instructions, causing the computer device to perform the virtual object switching method provided in the above-described method embodiments.

[0265] The sequence numbers of the embodiments in this application are for descriptive purposes only and do not represent the superiority or inferiority of the embodiments.

[0266] Those skilled in the art will understand that all or part of the steps of the above embodiments can be implemented by hardware or by a program instructing related hardware. The program can be stored in a computer-readable storage medium, such as a read-only memory, a disk, or an optical disk.

[0267] The above description is merely an optional embodiment of this application and is not intended to limit this application. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of this application should be included within the protection scope of this application.

Claims

1. A method for switching virtual objects, characterized in that, The method is applied to a mobile terminal, and the method includes: The display shows a first virtual object in a locked state and a second virtual object not in the locked state. The locked state indicates that the locked virtual object becomes the behavioral target of the master virtual object, which is a virtual object that the mobile terminal has control over. The moment when the swing acceleration acquired by the motion sensor exceeds a first threshold is determined as the start moment of the swing operation; the first position of the mobile terminal at the start moment of the swing operation is acquired by the motion sensor; the moment when the duration for which the swing acceleration acquired by the motion sensor is less than a second threshold reaches a duration threshold is determined as the end moment of the swing operation; the second position of the mobile terminal at the end moment of the swing operation is acquired by the motion sensor; the swing direction is determined based on the first position and the second position; the swing acceleration during the swing process is acquired; the swing operation is an operation for swinging the body of the mobile terminal; In the virtual environment, the number n of virtual objects existing in the swing direction with the first virtual object as the reference position is determined, where n is a positive integer; when the value of n is equal to one, one virtual object existing in the swing direction is determined as the second virtual object; when the value of n is greater than one, n acceleration intervals corresponding to the swing direction are set; based on the fact that the maximum value of the swing acceleration during the swing process is in the i-th acceleration interval, the i-th virtual object among the n virtual objects is determined as the second virtual object; where i is a positive integer, the n virtual objects correspond one-to-one with the n acceleration intervals, the n virtual objects are sorted from near to far from the first virtual object, and the n acceleration intervals are sorted from small to large acceleration values; Display a lock indicator on the second virtual object and de-display the lock indicator on the first virtual object. The lock indicator is used to indicate the currently locked virtual object. The direction in which the lock indicator moves from the first virtual object to the second virtual object matches the direction of the swing operation.

2. The method according to claim 1, characterized in that, The method further includes: Display a lock visual effect on the second virtual object, and cancel the display of the lock visual effect on the first virtual object; In addition, the mobile terminal displays prompt information in the direction of the swinging operation, and the prompt information is presented in at least one of the following forms: graphics, arrows, and text.

3. The method according to claim 1, characterized in that, The method further includes: When the value of n is greater than one, obtain k preset acceleration intervals, where k is greater than n; If the maximum value of the swing acceleration during the swinging process is in the j-th acceleration interval and j is not greater than n, then the j-th virtual object among the n virtual objects is determined to be the second virtual object; If the maximum value of the swing acceleration is in the j-th acceleration interval and j is greater than n, then the n-th virtual object among the n virtual objects is determined to be the second virtual object; Where k and j are positive integers, the n virtual objects are sorted from closest to farthest from the first virtual object, and the k acceleration intervals are sorted from smallest to largest acceleration values.

4. The method according to claim 1, characterized in that, The method further includes: The direction and amplitude of the swinging operation are determined by the images captured by the camera. Based on the swing direction and the swing amplitude, the second virtual object is determined, and the virtual object in the locked state is switched from the first virtual object to the second virtual object.

5. The method according to claim 4, characterized in that, Determining the second virtual object based on the swing direction and the swing amplitude includes: In the virtual environment, the number m of virtual objects existing in the swing direction with the first virtual object as the reference position is determined, where m is a positive integer; When the value of m is equal to one, a virtual object existing in the swing direction is identified as the second virtual object; If the value of m is greater than one, the second virtual object is determined from among the m virtual objects existing in the swing direction based on the swing amplitude during the swing process.

6. The method according to claim 4, characterized in that, Determining the direction of the swinging motion using images captured by the camera includes: The mobile terminal's camera captures a first image of the mobile terminal at the start of the swinging operation. The mobile terminal's camera captures a second image of the mobile terminal at the end of the swinging operation. The direction of the swing is determined by feature point matching based on the first image and the second image.

7. The method according to claim 4, characterized in that, Determining the amplitude of the swinging operation using images captured by the camera includes: If the similarity between two adjacent frames acquired by the camera is less than a third threshold, the first frame in the two adjacent frames is determined as the first image, and the time when the first image is acquired is determined as the start time of the shaking operation. If the similarity between two adjacent frames acquired by the camera is greater than a fourth threshold, the next frame in the two adjacent frames is determined as the second image, and the time when the second image is acquired is determined as the end time of the swinging operation. The amplitude of the swinging operation is determined based on the similarity between the first image and the second image.

8. The method according to claim 1, characterized in that, The method further includes: The first form of the locking control is displayed, which is used to prompt the user to switch the virtual object in the locked state through the flicking operation.

9. The method according to claim 1, characterized in that, The method further includes: Display at least two virtual objects, the at least two virtual objects including a first virtual object that is not in the locked state; If the first virtual object meets the locking condition, the first virtual object in the locked state is displayed.

10. The method according to claim 9, characterized in that, Displaying the first virtual object in the locked state when the first virtual object meets the locking condition includes at least one of the following methods: In the virtual environment, the virtual object with the smallest distance from the master virtual object among the at least two virtual objects is identified as the first virtual object, and the first virtual object in the locked state is displayed. In the virtual environment, the virtual object that is less than a distance threshold from the master virtual object and falls into the orientation of the master virtual object is identified as the first virtual object, and the first virtual object in the locked state is displayed. In the virtual environment, the virtual object with the smallest absolute biometric value among the at least two virtual objects is identified as the first virtual object, and the distance between the virtual object and the master virtual object is less than the distance threshold. The first virtual object in the locked state is displayed. The biometric value is used to measure the wear and tear of the virtual object in the virtual environment. The absolute biometric value is the remaining biometric value of the virtual object. In the virtual environment, the virtual object with the smallest relative bio value among the at least two virtual objects is identified as the first virtual object, and the distance between it and the master virtual object is less than the distance threshold. The first virtual object in the locked state is then displayed. The relative bio value is the ratio of the remaining bio value to the complete bio value of the virtual object.

11. The method according to claim 9, characterized in that, The method further includes: Displays the second form of the lock control; In response to the second form of the locking control receiving the first trigger operation, it is determined to perform a locking operation.

12. The method according to claim 1, characterized in that, The method further includes: Displays a third-form locking control; In response to the third form of the locking control receiving a second trigger operation, it is determined to perform a lock cancellation operation.

13. A virtual object switching device, characterized in that, The device includes: The display module is used to display a first virtual object in a locked state and a second virtual object not in the locked state. The locked state indicates that the locked virtual object becomes the behavior target of the master virtual object. The master virtual object is a virtual object that the mobile terminal has control over. The receiving module is configured to: determine the start time of a swing operation as the moment when the swing acceleration acquired by the motion sensor exceeds a first threshold; acquire a first position of the mobile terminal at the start time of the swing operation using the motion sensor; determine the end time of the swing operation as the moment when the duration for which the swing acceleration acquired by the motion sensor is less than a second threshold reaches a duration threshold; acquire a second position of the mobile terminal at the end time of the swing operation using the motion sensor; determine the swing direction based on the first position and the second position; acquire the swing acceleration during the swing process; and the swing operation is an operation for swinging the device. The display module is further configured to: determine, in the virtual environment, the number n of virtual objects existing in the swinging direction with the first virtual object as the reference position, where n is a positive integer; when the value of n is equal to one, determine one virtual object existing in the swinging direction as the second virtual object; when the value of n is greater than one, set n acceleration intervals corresponding to the swinging direction; based on the maximum value of the swinging acceleration during the swinging process being in the i-th acceleration interval, determine the i-th virtual object among the n virtual objects as the second virtual object; where i is a positive integer, the n virtual objects correspond one-to-one with the n acceleration intervals, the n virtual objects are sorted from near to far from the first virtual object, and the n acceleration intervals are sorted from small to large acceleration values; display a locking indicator on the second virtual object, and cancel the display of the locking indicator on the first virtual object, the locking indicator being used to indicate the currently locked virtual object, and the transfer direction of the locking indicator from the first virtual object to the second virtual object matching the swinging direction of the swinging operation.

14. The apparatus according to claim 13, characterized in that, The display module is also used for: Display a lock visual effect on the second virtual object, and cancel the display of the lock visual effect on the first virtual object; In addition, the mobile terminal displays prompt information in the direction of the swinging operation, and the prompt information is presented in at least one of the following forms: graphics, arrows, and text.

15. The apparatus according to claim 13, characterized in that, The display module is also used for: When the value of n is greater than one, obtain k preset acceleration intervals, where k is greater than n; If the maximum value of the swing acceleration during the swinging process is in the j-th acceleration interval and j is not greater than n, then the j-th virtual object among the n virtual objects is determined to be the second virtual object; If the maximum value of the swing acceleration is in the j-th acceleration interval and j is greater than n, then the n-th virtual object among the n virtual objects is determined to be the second virtual object; Where k and j are positive integers, the n virtual objects are sorted from closest to farthest from the first virtual object, and the k acceleration intervals are sorted from smallest to largest acceleration values.

16. The apparatus according to claim 13, characterized in that, The receiving module is also used to determine the swing direction and swing amplitude of the swing operation through the image captured by the camera; The display module is further configured to determine the second virtual object based on the swing direction and the swing amplitude, and to display the virtual object in the locked state as the second virtual object switched from the first virtual object.

17. The apparatus according to claim 16, characterized in that, The display module is also used for: In the virtual environment, the number m of virtual objects existing in the swing direction with the first virtual object as the reference position is determined, where m is a positive integer; When the value of m is equal to one, a virtual object existing in the swing direction is identified as the second virtual object; If the value of m is greater than one, the second virtual object is determined from among the m virtual objects existing in the swing direction based on the swing amplitude during the swing process.

18. The apparatus according to claim 16, characterized in that, The receiving module is further configured to: The mobile terminal's camera captures a first image of the mobile terminal at the start of the swinging operation. The mobile terminal's camera captures a second image of the mobile terminal at the end of the swinging operation. The direction of the swing is determined by feature point matching based on the first image and the second image.

19. The apparatus according to claim 16, characterized in that, The receiving module is further configured to: If the similarity between two adjacent frames acquired by the camera is less than a third threshold, the first frame in the two adjacent frames is determined as the first image, and the time when the first image is acquired is determined as the start time of the shaking operation. If the similarity between two adjacent frames acquired by the camera is greater than a fourth threshold, the next frame in the two adjacent frames is determined as the second image, and the time when the second image is acquired is determined as the end time of the swinging operation. The amplitude of the swinging operation is determined based on the similarity between the first image and the second image.

20. The apparatus according to claim 13, characterized in that, The display module is also used to display a locking control in a first form, which is used to prompt the user to switch the virtual object in the locked state through the shaking operation.

21. The apparatus according to claim 13, characterized in that, The display module is also used to display at least two virtual objects, the at least two virtual objects including a first virtual object that is not in the locked state; The display module is further configured to display the first virtual object in the locked state when the first virtual object meets the locking conditions.

22. The apparatus according to claim 21, characterized in that, The display module is also configured to perform at least one of the following: In the virtual environment, the virtual object with the smallest distance from the master virtual object among the at least two virtual objects is identified as the first virtual object, and the first virtual object in the locked state is displayed. In the virtual environment, the virtual object that is less than a distance threshold from the master virtual object and falls into the orientation of the master virtual object is identified as the first virtual object, and the first virtual object in the locked state is displayed. In the virtual environment, the virtual object with the smallest absolute biometric value among the at least two virtual objects is identified as the first virtual object, and the distance between the virtual object and the master virtual object is less than the distance threshold. The first virtual object in the locked state is displayed. The biometric value is used to measure the wear and tear of the virtual object in the virtual environment. The absolute biometric value is the remaining biometric value of the virtual object. In the virtual environment, the virtual object with the smallest relative bio value among the at least two virtual objects is identified as the first virtual object, and the distance between it and the master virtual object is less than the distance threshold. The first virtual object in the locked state is then displayed. The relative bio value is the ratio of the remaining bio value to the complete bio value of the virtual object.

23. The apparatus according to claim 21, characterized in that, The display module is also used to display a second form of the locking control; The display module is further configured to determine to perform a locking operation in response to the second-mode locking control receiving a first trigger operation.

24. The apparatus according to claim 13, characterized in that, The display module is also used to display a third form of locking control; The display module is also configured to respond to the third form of the locking control receiving a second trigger operation and determine to perform a lock cancellation operation.

25. A computer device, characterized in that, The computer device includes a processor and a memory, the memory storing a computer program that is loaded and executed by the processor to implement the virtual object switching method as described in any one of claims 1 to 12.

26. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program that is loaded and executed by a processor to implement the virtual object switching method as described in any one of claims 1 to 12.

27. A computer program product, characterized in that, The computer program product includes computer instructions stored in a computer-readable storage medium, a processor of a computer device reading the computer instructions from the computer-readable storage medium, and the processor executing the computer instructions to cause the computer device to perform a method for switching virtual objects as described in any one of claims 1 to 12.