Virtual role control method and device, electronic equipment and readable storage medium

By using a virtual control to enable the movement of the player's virtual character and the dragging of the target virtual character, the problem of complex operation in existing technologies is solved, the playability and user experience of the game are improved, and the pressure on the screen information is reduced.

CN116764193BActive Publication Date: 2026-07-24NETEASE (HANGZHOU) NETWORK CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

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

AI Technical Summary

Technical Problem

Existing video games involve complex movements and dragging of virtual characters, resulting in low playability and fun, and placing a heavy burden on the information displayed on touchscreen devices.

Method used

The system uses a virtual control to move the player's virtual character and drag the target virtual character. Players can use the crosshair to move and aim at the target character, press to lock, and slide to execute the corresponding movement or dragging action.

Benefits of technology

It reduces operational complexity, enhances the game's playability and fun, improves the user experience, and reduces the information load on the terminal device's screen.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116764193B_ABST
    Figure CN116764193B_ABST
Patent Text Reader

Abstract

The application provides a virtual role control method and device, electronic equipment and a readable storage medium. A graphical user interface is provided through a terminal device. In response to a crosshair moving operation on the terminal device, the crosshair is aimed at a target virtual role. In response to a pressing operation on a virtual control, the crosshair is locked to the target virtual role. In response to a sliding operation on the virtual control, a first operation or a second operation is executed based on the sliding direction of the sliding operation. The first operation represents controlling a player virtual role controlled by the terminal device to move towards the target virtual role, and the second operation represents controlling the target virtual role to move towards the player virtual role. The movement of the player virtual role and the dragging of the target virtual role are realized through one virtual control, which can reduce the operation complexity, enhance the playability and interest of the game, improve the experience of the player, integrate virtual controls with different functions, and reduce the screen information bearing pressure of the terminal device.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of game technology, and in particular to a method, apparatus, electronic device, and readable storage medium for controlling virtual characters. Background Technology

[0002] In existing video games, players typically need to use different buttons to move their virtual character and drag the second virtual character. This makes the operation relatively complex, reduces the game's playability and fun, and results in a poor user experience.

[0003] Furthermore, if the terminal device is a touch device such as a mobile phone or tablet, the existing technology requires setting different virtual controls in the graphical user interface of the touch device to realize the movement of the player's virtual character and the dragging of the second virtual character. This results in too many virtual controls in the graphical user interface, increasing the screen information load of the touch device. Summary of the Invention

[0004] In view of this, the purpose of the present invention is to provide a method, device, electronic device and readable storage medium for controlling virtual characters, so as to realize the movement of the player's virtual character and the dragging of the second virtual character through a virtual control, which can reduce the complexity of operation, enhance the playability and fun of the game, improve the user experience, and reduce the screen information load of the touch device.

[0005] In a first aspect, embodiments of the present invention provide a method for controlling a virtual character, which provides a graphical user interface through a terminal device. The graphical user interface displays a crosshair, virtual controls, and at least one virtual character. The method includes: responding to a crosshair movement operation on the terminal device to align the crosshair with a target virtual character; responding to a press operation on a virtual control to lock the crosshair onto the target virtual character; and responding to a sliding operation on a virtual control to perform a first operation or a second operation based on the sliding direction of the sliding operation. The first operation represents the control of the terminal device to move the player's virtual character toward the target virtual character, and the second operation represents the control of the target virtual character to move toward the player's virtual character.

[0006] Secondly, embodiments of the present invention also provide a control device for a virtual character, which provides a graphical user interface through a terminal device. The graphical user interface displays a crosshair, virtual controls, and at least one virtual character. The device includes: a target virtual character alignment module, used to respond to a crosshair movement operation on the terminal device to align the crosshair with the target virtual character; a target virtual character locking module, used to respond to a press operation on the virtual controls to lock the crosshair with the target virtual character; and a virtual character movement module, used to respond to a sliding operation on the virtual controls and perform a first operation or a second operation based on the sliding direction of the sliding operation; wherein the first operation represents the player virtual character controlled by the terminal device moving towards the target virtual character, and the second operation represents the target virtual character moving towards the player virtual character.

[0007] Thirdly, embodiments of the present invention also provide an electronic device, including a processor and a memory, wherein the memory stores computer-executable instructions that can be executed by the processor, and the processor executes the computer-executable instructions to implement the steps of the above-described virtual character control method.

[0008] Fourthly, embodiments of the present invention also provide a computer-readable storage medium storing computer-executable instructions. When the computer-executable instructions are invoked and executed by a processor, the computer-executable instructions cause the processor to implement the steps of the above-described virtual character control method.

[0009] The embodiments of the present invention bring the following beneficial effects:

[0010] This invention provides a method, apparatus, electronic device, and readable storage medium for controlling a virtual character. The method responds to a crosshair movement operation on a terminal device, aligning the crosshair with a target virtual character; responds to a press operation on a virtual control, locking the crosshair onto the target virtual character; and responds to a slide operation on the virtual control, performing a first operation or a second operation based on the slide direction. The first operation represents the player's virtual character, controlled by the terminal device, moving towards the target virtual character, while the second operation represents the target virtual character moving towards the player's virtual character. This method uses a single virtual control to achieve movement of the player's virtual character and dragging of the target virtual character, reducing operational complexity, enhancing game playability and fun, improving the player's experience, and integrating virtual controls with different functions, thus reducing the screen information load on the terminal device.

[0011] Other features and advantages of this disclosure will be set forth in the following description, or some features and advantages may be inferred from the description or determined without doubt, or may be learned by practicing the techniques described above.

[0012] To make the above-mentioned objects, features and advantages of this disclosure more apparent and understandable, preferred embodiments are described below in detail with reference to the accompanying drawings. Attached Figure Description

[0013] To more clearly illustrate the specific embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the specific embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of the present invention. For those skilled in the art, other drawings can be obtained from these drawings without creative effort.

[0014] Figure 1 A schematic diagram of an implementation environment provided for an embodiment of the present invention;

[0015] Figure 2 A schematic diagram of a graphical user interface provided in an embodiment of the present invention;

[0016] Figure 3 A flowchart illustrating a method for controlling a virtual character, as provided in an embodiment of the present invention;

[0017] Figure 4 A flowchart illustrating another method for controlling a virtual character provided in an embodiment of the present invention;

[0018] Figure 5 A schematic diagram of a graphical user interface provided in an embodiment of the present invention;

[0019] Figure 6 A schematic diagram of another graphical user interface provided in an embodiment of the present invention;

[0020] Figure 7 A schematic diagram of another graphical user interface provided in an embodiment of the present invention;

[0021] Figure 8 A schematic diagram of another graphical user interface provided in an embodiment of the present invention;

[0022] Figure 9 This is a schematic diagram of the structure of a control device for a virtual character provided in an embodiment of the present invention;

[0023] Figure 10 This is a schematic diagram of the structure of another virtual character control device provided in an embodiment of the present invention;

[0024] Figure 11 This is a schematic diagram of the structure of an electronic device provided in an embodiment of the present invention. Detailed Implementation

[0025] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, the technical solutions of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.

[0026] Currently, in existing video games, players typically need to use different buttons to move their virtual character and drag the second virtual character. This operation is relatively complex, resulting in low playability and fun, and a poor user experience.

[0027] Furthermore, if the terminal device is a touch device such as a mobile phone or tablet, the existing technology requires setting different virtual controls in the graphical user interface of the touch device to realize the movement of the player's virtual character and the dragging of the second virtual character. This results in too many virtual controls in the graphical user interface, increasing the screen information load of the touch device.

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

[0029] (1) Game Scene

[0030] The game system can provide (or offer) a virtual game scene displayed when the application runs on a terminal device or server. Optionally, the game scene can be a simulation of the real world, a semi-simulated / semi-fictional virtual environment, or a purely fictional virtual environment. The game scene can be either a two-dimensional or three-dimensional virtual scene, and the virtual environment can be sky, land, ocean, etc., where the land includes environmental elements such as deserts and cities. The game scene is the scenario in which the user controls the virtual character and establishes complete game logic.

[0031] A virtual character refers to a controllable dynamic object in a virtual scene. Optionally, this dynamic object can be a virtual person, a virtual animal, etc. Virtual people include anime characters, game characters, etc. This virtual character is a character controlled by a player through an input device, or an artificial intelligence (AI) trained and set up for battle in a virtual environment, or a non-player character (NPC) set up for battle in a virtual scene. Optionally, this virtual character is a virtual person competing in a virtual scene. Optionally, the number of virtual characters in the virtual scene battle is preset or dynamically determined according to the number of clients joining the battle; this application embodiment does not limit this. In one possible implementation, the user can control the virtual character to move within the virtual scene, for example, controlling the virtual character to run, jump, crawl, etc., and can also control the virtual character to use skills and virtual items provided by the application to fight against other virtual characters.

[0032] (2) Player Role

[0033] A player character is a virtual character that can be controlled by a player and move around in a game environment. In some video games, they may also be called shikigami (spirit) characters or hero characters. Player characters can be at least one of the following forms: virtual characters, virtual animals, anime characters, virtual vehicles, etc.

[0034] (3) Game Interface

[0035] A game interface refers to the interface of an application provided or displayed through a graphical user interface (GUI). This interface includes a user interface (UI) for player interaction and a game screen. In optional implementations, the UI may include game controls (e.g., skill controls, movement controls, function controls), indicators (e.g., direction indicators, character indicators), information display areas (e.g., kill count, match time), or game setting controls (e.g., system settings, shop, coins). In optional implementations, the game screen is the display screen corresponding to the virtual scene shown on the terminal device. The game screen may include virtual characters such as game characters, NPC characters, and AI characters that execute game logic within the virtual scene.

[0036] Based on this, embodiments of the present invention provide a method, device, electronic device, and readable storage medium for controlling virtual characters. This technology can be applied to devices that enable human-computer interaction, such as mobile phones, tablets, computers, and servers, and is particularly suitable for mobile game scenarios.

[0037] To facilitate understanding of this embodiment, a method for controlling a virtual character disclosed in this embodiment of the invention will first be described in detail.

[0038] The virtual character control method in one embodiment of this disclosure can run on a terminal device or a server. The terminal device can be a local terminal device. When the virtual character control method runs on a server, the method can be implemented and executed based on a cloud interaction system, which includes a server and client devices.

[0039] In an optional implementation, various cloud applications, such as cloud gaming, can run under the cloud interaction system. Taking cloud gaming as an example, cloud gaming refers to a gaming method based on cloud computing. In the cloud gaming operating mode, the game program's execution and the game screen presentation are separated. The storage and execution of the virtual character's control methods are completed on the cloud gaming server. The client device is used for data reception, transmission, and game screen presentation. For example, the client device can be a display device with data transmission capabilities located close to the user, such as a mobile terminal, television, computer, or PDA; however, the terminal device for information processing is the cloud gaming server in the cloud. When playing the game, the player operates the client device to send operation commands to the cloud gaming server. The cloud gaming server runs the game according to the operation commands, encodes and compresses game screen data, returns it to the client device via the network, and finally, the client device decodes and outputs the game screen.

[0040] In an alternative implementation, the terminal device can be a local terminal device. Taking a game as an example, the local terminal device stores the game program and is used to display the game screen. The local terminal device is used to interact with the player through a graphical user interface, that is, conventionally downloading, installing, and running the game program via an electronic device. The local terminal device can provide the graphical user interface to the player in various ways, such as rendering it on the terminal's display screen, or providing it to the player through holographic projection. For example, the local terminal device can include a display screen for displaying the graphical user interface, which includes game screens, and a processor for running the game, generating the graphical user interface, and controlling the display of the graphical user interface on the display screen.

[0041] In one possible implementation, embodiments of the present invention provide a method for controlling a virtual character, which provides a graphical user interface (GUI) through a terminal device. The terminal device can be either the aforementioned local terminal device or a client device in the aforementioned cloud interaction system. The GUI provided by the terminal device includes at least a portion of the game scene, the player character, and other virtual characters in the same game; as in the aforementioned embodiments, the player can control their character to attack other virtual characters.

[0042] See Figure 1 The diagram illustrates an implementation environment. This environment may include a first terminal device, a server, and a second terminal device. The first and second terminal devices communicate with the server to achieve data communication. In this embodiment, the first and second terminal devices are each equipped with a client that executes the virtual character control method provided in this application, and the host is the server that executes the virtual character control method provided in this application. Through the client, the first and second terminal devices can communicate with the host.

[0043] Taking the first terminal device as an example, the first terminal device establishes communication with the host by running a client. In an optional implementation, the server establishes a game match based on the client's game request. The parameters of the game match can be determined based on the parameters in the received game request; for example, the game match parameters may include the number of participants and the character levels of the participants. When the first terminal device receives a response from the server, it displays the virtual scene corresponding to the game match through its graphical user interface. In an optional implementation, the server determines a target game match for the client from among multiple established game matches based on the client's game request. When the first terminal device receives a response from the server, it displays the virtual scene corresponding to the game match through its graphical user interface. The first terminal device is a device controlled by a first user, and the virtual character displayed in the graphical user interface of the first terminal device is the player character controlled by the first user. The first user inputs operation commands through the graphical user interface to control the player character to perform corresponding operations in the virtual scene.

[0044] Taking a second terminal device as an example, the second terminal device establishes communication with the host by running a client. In an optional implementation, the server establishes a game match based on the client's game request. The parameters of the game match can be determined based on the parameters in the received game request; for example, the game match parameters may include the number of participants and the character levels of the participants. When the second terminal device receives a response from the server, it displays the virtual scene corresponding to the game match through its graphical user interface. In an optional implementation, the server determines a target game match for the client from among multiple established game matches based on the client's game request. When the second terminal device receives a response from the server, it displays the virtual scene corresponding to the game match through its graphical user interface. The second terminal device is a device controlled by a second user, and the virtual character displayed in the graphical user interface of the second terminal device is the player character controlled by the second user. The second user inputs operation commands through the graphical user interface to control the player character to perform corresponding operations in the virtual scene.

[0045] The server performs data calculations based on the game data reported by the first terminal device and the second terminal device, and synchronizes the calculated game data to the first terminal device and the second terminal device, so that the first terminal device and the second terminal device control the rendering of the corresponding virtual scene and / or virtual character in the graphical user interface according to the synchronization data sent by the server.

[0046] In this embodiment, the virtual character controlled by the first terminal device and the virtual character controlled by the second terminal device are virtual characters in the same game. The virtual characters controlled by the first terminal device and the virtual characters controlled by the second terminal device may have the same character attributes or different character attributes.

[0047] It should be noted that the virtual characters in the current game can include two or more virtual characters, and different virtual characters can correspond to different terminal devices. In other words, in the current game, there are two or more terminal devices that send and synchronize game data with the host.

[0048] This embodiment provides a method for controlling a virtual character. The game in this embodiment can be a multiplayer game, and the terminal device in this embodiment can be a touch device with communication and human-computer interaction functions, such as a mobile phone or tablet computer.

[0049] This embodiment provides the game's graphical user interface through a terminal device, see [link to documentation]. Figure 2 The diagram shows a graphical user interface that can display a crosshair, virtual controls, and at least one virtual character through the graphical user interface of a terminal device.

[0050] The virtual characters displayed in the graphical user interface can be virtual characters controlled by the player (i.e., player virtual characters) or other virtual characters controlled by other players. Other virtual characters can include friendly virtual characters of the same faction as the player's own virtual character or enemy virtual characters of a different faction from the player's own virtual character.

[0051] Players can press or slide virtual controls displayed in the graphical user interface, and the terminal device can respond to the player's pressing or sliding operations to execute the corresponding control operations.

[0052] The crosshair displayed in the graphical user interface is usually fixed in the center of the interface. Players can adjust the game scene displayed in the graphical user interface by moving the crosshair, thereby achieving the purpose of aiming.

[0053] Based on the above description, see Figure 3 The flowchart shown illustrates a method for controlling a virtual character, which includes the following steps:

[0054] Step S302: Respond to the crosshair movement operation for the terminal device, and align the crosshair with the target virtual character.

[0055] The aforementioned aiming movement operations can include: swiping operations by the player on the graphical user interface (GUI) or tilting or rotating operations by the player on the terminal device. For example, a player can perform a swipe operation at any position on the GUI to move the game scene displayed on the GUI. Another example is that a player can tilt or rotate the terminal device; the gyroscope sensor in the terminal device can respond to the tilt or rotation operation, moving the game scene displayed on the GUI.

[0056] In response to the aforementioned crosshair movement operation, the terminal device can align the crosshair with a virtual character displayed in the graphical user interface, which is called the target virtual character. In this embodiment, the target virtual character is generally not the player's virtual character; it can be a friendly virtual character or an enemy virtual character. This embodiment does not impose any limitations on this.

[0057] Step S304: Respond to the press operation on the virtual control to lock the crosshair onto the target virtual character.

[0058] After the crosshair is aimed at the target virtual character, the player can press the virtual control, and the terminal device can respond to the pressing operation to lock the crosshair onto the target virtual character.

[0059] Locking onto a target virtual character can be understood as the graphical user interface continuously aiming at the target virtual character, meaning the crosshair remains focused on the target virtual character regardless of whether the player moves the crosshair. For example, after the crosshair is locked onto the target virtual character, if the target virtual character moves, the game scene displayed on the graphical user interface can automatically move with the target virtual character, thus keeping the crosshair focused on the target virtual character until the crosshair is released from lock.

[0060] Therefore, the terminal device can respond to the player's pressing operation on the virtual control, lock the crosshair onto the target virtual character, and keep the crosshair continuously aimed at the target virtual character, thereby facilitating the player to perform subsequent sliding operations on the virtual control and improving the player's experience.

[0061] Step S306: In response to a sliding operation on the virtual control, perform either a first operation or a second operation based on the sliding direction of the sliding operation.

[0062] The first operation represents the control terminal device controlling the player's virtual character to move towards the target virtual character, and the second operation represents the control terminal device controlling the target virtual character to move towards the player's virtual character.

[0063] After identifying the target virtual character, the player can perform a swipe operation on the virtual control. Specifically, the swipe operation can be achieved by first pressing the virtual control, and then swiping it. The terminal device can respond to this swipe operation, executing either a first operation or a second operation based on the swipe direction.

[0064] In some embodiments, a first operation or a second operation can be performed based on the sliding direction of the sliding operation, so that the distance between the player virtual character controlled by the terminal device and the target virtual character reaches the target distance.

[0065] For example, the target distance may include a first distance and a second distance. The first operation represents moving the player's virtual character controlled by the terminal device to within the first distance of the target virtual character, and the second operation represents moving the target virtual character to within the second distance of the player's virtual character.

[0066] If the swipe direction is upward, the terminal device can perform a first operation, instantly moving the player's virtual character to the vicinity of the target virtual character (i.e., within a first distance). For example, if the swipe direction is downward, the terminal device can perform a second operation, instantly dragging the target virtual character to the vicinity of the player's virtual character (i.e., within a second distance). The first distance may or may not be equal to the second distance; this embodiment does not impose any limitations on this.

[0067] This invention provides a method for controlling a virtual character. In response to a crosshair movement operation on a terminal device, the crosshair is aligned with a target virtual character; in response to a press operation on a virtual control, the crosshair is locked onto the target virtual character; in response to a slide operation on the virtual control, a first operation or a second operation is performed based on the slide direction. The first operation represents the player's virtual character, controlled by the terminal device, moving towards the target virtual character, and the second operation represents the target virtual character moving towards the player's virtual character. This method uses a single virtual control to achieve movement of the player's virtual character and dragging of the target virtual character, reducing operational complexity, enhancing game playability and fun, improving the player's experience, and integrating virtual controls with different functions, thus reducing the screen information load on the terminal device.

[0068] like Figure 4 The flowchart shown is for another virtual character control method in an optional embodiment. The virtual character control method in the optional embodiment includes the following steps:

[0069] Step S402: Respond to the crosshair movement operation for the terminal device, and align the crosshair with the target virtual character.

[0070] Players can perform swipe gestures at any point in the graphical user interface, or tilt and rotate the terminal device to move the crosshair. The terminal device can respond to these crosshair movement operations by moving the game scene displayed in the graphical user interface, thereby adjusting the target the crosshair is aimed at, allowing the crosshair to be aimed at a target virtual character other than the player-controlled virtual character.

[0071] See Figure 5 The diagram shown is a graphical user interface. Figure 5 The image shows the crosshair located in the center of the graphical user interface, the virtual controls in the lower right corner of the graphical user interface, the player's virtual character, and virtual character A and virtual character B. For example... Figure 5 As shown, if the crosshair is aimed at virtual character A, then virtual character A can be the target virtual character.

[0072] Step S404: Respond to the press operation of the virtual button to lock the crosshair onto the target virtual character.

[0073] In some embodiments, after the crosshair locks onto the target virtual character, the terminal device can generate locking feedback; wherein the locking feedback includes at least one of the following: sound feedback, vibration feedback, and animation feedback.

[0074] After the crosshair locks onto the target virtual character, the terminal device can generate locking feedback, such as: sound feedback with a prompt sound, vibration feedback from the terminal device, or animation feedback.

[0075] The animation feedback can be targeted at the virtual character or at a virtual control. See also Figure 6 The diagram shows another graphical user interface. Figure 6 The locking feedback implemented in the middle is animated feedback, using different grayscale values ​​to cover the target virtual character and virtual controls.

[0076] Therefore, after the terminal device locks onto the target virtual character, it generates a lock feedback, notifying the player through sound, vibration, animation, etc.: the terminal device has locked onto the target virtual character, and the player can perform subsequent sliding operations on the virtual controls, thereby improving the player's experience.

[0077] Step S406: In response to a sliding operation on the virtual control, perform either a first operation or a second operation based on the sliding direction of the sliding operation.

[0078] In some embodiments, if the sliding direction of the sliding operation is a first direction, a first operation is performed; if the sliding direction of the sliding operation is a second direction, a second operation is performed; wherein the first direction is upward and the second direction is downward.

[0079] When a terminal device responds to a sliding operation on a virtual control, it can first determine whether the sliding direction is a first direction or a second direction, and then execute the first operation or the second operation according to the sliding direction.

[0080] See Figure 7 A schematic diagram of another graphical user interface is shown. Figure 8 The diagram shows another graphical user interface. Figure 7 The sliding operation shown is in the first direction of upward (i.e., the sliding operation is upward relative to the virtual control), and the terminal device performs the first operation. Figure 8 The sliding operation shown is a second direction, downward (i.e., the sliding operation is downward relative to the virtual control), and the terminal device performs the second operation.

[0081] In some embodiments, in addition to the sliding direction of the sliding operation, the sliding distance of the sliding operation can also be used as the basis for determining whether to perform the first operation or the second operation. For example, the sliding distance of the sliding operation is determined; if the sliding distance of the sliding operation is greater than a preset first distance threshold, the first operation or the second operation is performed based on the sliding direction of the sliding operation.

[0082] The sliding distance of a swipe operation can be understood as the distance the player's finger moves after pressing a virtual button.

[0083] If the swipe distance is less than or equal to the first distance threshold, it indicates a mis-touch by the player, and the terminal device may not execute the first or second operation. If the swipe distance is greater than the first distance threshold, it indicates no mis-touch by the player, and the terminal device may then execute the first or second operation based on the swipe direction.

[0084] Therefore, the terminal device can use the sliding distance of the swipe operation as the basis for determining whether to perform the first or second operation, thereby judging whether the player has made a mistake and improving the player's experience.

[0085] In some embodiments, in addition to the sliding direction of the sliding operation, the distance between the player's virtual character and the target virtual character can also be used as the basis for determining whether to perform the first operation or the second operation. For example, the distance between the player's virtual character controlled by the terminal device and the target virtual character can be determined; if the distance is less than or equal to a preset second distance threshold, the first operation or the second operation can be performed based on the sliding direction of the sliding operation.

[0086] Generally, there are upper limits, i.e., a second distance threshold, for both the distance the player's virtual character moves in the first operation and the distance the target virtual character moves in the second operation. Therefore, the terminal device can first determine the distance between the player's virtual character controlled by the terminal device and the target virtual character.

[0087] If the distance is less than or equal to the preset second distance threshold, it means that the distance has not exceeded the upper limit of the distance the player's virtual character moves in the first operation and the distance the target virtual character moves in the second operation. At this time, the terminal device can perform the first operation or the second operation based on the sliding direction of the sliding operation.

[0088] If the distance is greater than the second distance threshold, it means that the distance has exceeded the upper limit of the distance the player's virtual character moved in the first operation and the distance the target virtual character moved in the second operation. At this time, the terminal device may not execute the first or second operation; the terminal device may also control the movement of the player's virtual character or the target virtual character, but the distance the player's virtual character moves or the distance the target virtual character moves is the aforementioned second distance threshold. In this case, after the player's virtual character or the target virtual character moves, the distance between them is greater than the first distance or the second distance.

[0089] For example: the second distance threshold is 150, and the first and second distances are both 10. If the distance between the player's virtual character and the target virtual character before performing the first or second operation is 200, then this distance of 200 is greater than the second distance threshold of 150. In this case, the terminal device may choose not to perform the first or second operation, or it may control the player's virtual character or the target virtual character to move to the second distance threshold of 100. After moving, the distance between the player's virtual character and the target virtual character (200-150=50) is greater than the first or second distance of 10.

[0090] Therefore, the terminal device can use the distance between the player's virtual character and the target virtual character as a basis for determining whether to execute the first or second operation. The terminal device can determine whether the distance between the player's virtual character controlled by the terminal device and the target virtual character exceeds a second distance threshold, which serves as the upper limit for the movement of the player's virtual character and the target virtual character. When the distance is less than or equal to the second distance threshold, it means that the distance has not exceeded the upper limit for the movement of the player's virtual character and the target virtual character. The terminal device can then execute the first or second operation based on the swipe direction of the swipe operation, thereby improving the player's experience.

[0091] In some embodiments, the target speed of the player's virtual character or the target virtual character can be determined first based on the sliding distance. For example, the sliding distance of the sliding operation is determined, and the target speed is determined based on the sliding distance. The speed at which the player's virtual character moves toward the target virtual character is controlled based on the target speed, or the speed at which the target virtual character moves toward the player's virtual character is controlled based on the target speed.

[0092] For example, the terminal device can pre-set the correspondence between the sliding distance of a swipe operation and the target speed of the player's virtual character or the target virtual character. Generally, the further the sliding distance, the faster the target movement speed. The terminal device can determine the target speed corresponding to the sliding distance based on the above correspondence, and then control the player's virtual character to move to a first distance from the target virtual character at the target speed, or the target virtual character to move to a second distance from the player's virtual character at the target speed.

[0093] Therefore, the terminal device can control the target speed of the player's virtual character or the target virtual character based on the sliding distance of the sliding operation, thereby further enhancing the operability of the game and improving the player's experience.

[0094] In some embodiments, the target distance of the player's virtual character or the target virtual character can be determined first based on the sliding distance, for example: determining the sliding distance of the sliding operation; controlling the distance the player's virtual character moves toward the target virtual character based on the sliding distance, or controlling the distance the target virtual character moves toward the player's virtual character based on the sliding distance.

[0095] For example, the terminal device can pre-set the correspondence between the swipe distance of a sliding operation and the target distance of the player's virtual character or target virtual character. Generally, the further the swipe distance, the further the target distance. The terminal device can determine the target distance corresponding to the swipe distance based on the above correspondence, and then control the player's virtual character or target virtual character to move the target distance. It should be noted that the terminal device needs to ensure that after the player's virtual character or target virtual character moves the target distance, the distance between the target virtual character and the player's virtual character is less than a first distance or a second distance.

[0096] Therefore, the terminal device can control the target distance of the player's virtual character or the target virtual character based on the sliding distance of the swipe operation, thereby further enhancing the operability of the game and improving the player's experience.

[0097] In some embodiments, a first operation or a second operation can be performed based on the sliding direction of the sliding operation, so that the distance between the player virtual character controlled by the terminal device and the target virtual character reaches the target distance.

[0098] In some embodiments, in order to facilitate the player's control of the virtual character to attack the target virtual character as soon as possible after the player controls the virtual character or the target virtual character moves, the target distance can be less than the player's virtual character's attack distance.

[0099] Therefore, this embodiment can ensure that the distance between the target virtual character and the player virtual character after movement is less than the attack range of the player virtual character, thereby making it easier for the player to control the virtual character to attack the target virtual character as soon as possible, which can improve the player's experience.

[0100] Step S408: During the duration of the sliding operation, adjust the view of the graphical user interface based on the sliding operation.

[0101] While the player is continuously performing a swipe operation, the terminal device can adjust the view of the graphical user interface according to the swipe operation. For example, when the player performs an upward swipe operation, the terminal device can move the camera of the graphical user interface forward, so that the player can adjust the view of the graphical user interface according to their own needs, which can improve the player's experience.

[0102] The method provided in this embodiment of the invention enables the movement of the player's virtual character and the dragging of the target virtual character through a virtual control. This reduces operational complexity, enhances the playability and fun of the game, improves the player's experience, and can also integrate virtual controls with different functions, reducing the screen information load on the terminal device.

[0103] In this method, the terminal device can respond to the player's pressing operation on the virtual control, so that the crosshair locks onto the target virtual character and can keep the crosshair pointing at the target virtual character, thereby making it easier for the player to perform subsequent sliding operations on the virtual control and improving the player's experience.

[0104] In this method, after the terminal device locks onto the target virtual character, it generates a locking feedback, notifying the player through sound, vibration, animation, etc.: the terminal device has locked onto the target virtual character, and the player can perform subsequent sliding operations on the virtual controls, thereby improving the player's experience.

[0105] In this method, the terminal device can use the sliding distance of the swipe operation as the basis for determining whether to perform the first or second operation, thereby determining whether the player has made a mistake and improving the player's experience.

[0106] In this method, the terminal device can use the distance between the player's virtual character and the target virtual character as the basis for determining whether to execute the first or second operation. The terminal device can determine whether the distance between the player's virtual character controlled by the terminal device and the target virtual character exceeds a second distance threshold, which serves as the upper limit for the movement of the player's virtual character and the target virtual character. When the distance is less than or equal to the second distance threshold, it means that the distance has not exceeded the upper limit for the movement of the player's virtual character and the target virtual character, and the terminal device can execute the first or second operation based on the sliding direction of the swipe operation, thereby improving the player's experience.

[0107] In this method, the terminal device can control the target speed of the player's virtual character or the target virtual character based on the sliding distance of the sliding operation, thereby further enhancing the operability of the game and improving the player's experience.

[0108] In this method, the terminal device can control the target distance of the player's virtual character or the target virtual character based on the sliding distance of the sliding operation, thereby further enhancing the operability of the game and improving the player's experience.

[0109] This method ensures that the distance between the target virtual character and the player's virtual character after movement is less than the player's virtual character's attack range, thus making it easier for the player to control the virtual character to attack the target virtual character as quickly as possible, which can improve the player's experience.

[0110] Corresponding to the above method embodiments, this invention provides a control device for a virtual character, which provides a graphical user interface through a terminal device. The graphical user interface displays a crosshair, virtual controls, and at least one virtual character. Figure 9 The diagram shows a structural schematic of a control device for a virtual character. The control device for the virtual character includes:

[0111] The target virtual character alignment module 91 is used to respond to the crosshair movement operation for the terminal device and align the crosshair with the target virtual character.

[0112] The target virtual character locking module 92 is used to respond to the pressing operation of the virtual control and lock the crosshair onto the target virtual character;

[0113] The virtual character movement module 93 is used to respond to a sliding operation on a virtual control and to perform a first operation or a second operation based on the sliding direction of the sliding operation; wherein, the first operation represents the player's virtual character controlled by the control terminal device moving towards the target virtual character, and the second operation represents the target virtual character moving towards the player's virtual character.

[0114] This invention provides a control device for a virtual character. In response to a crosshair movement operation on a terminal device, the crosshair is aligned with a target virtual character; in response to a press operation on a virtual control, the crosshair is locked onto the target virtual character; and in response to a slide operation on the virtual control, a first operation or a second operation is performed based on the slide direction. The first operation represents the player's virtual character, controlled by the terminal device, moving towards the target virtual character, while the second operation represents the target virtual character moving towards the player's virtual character. This method uses a single virtual control to achieve movement of the player's virtual character and dragging of the target virtual character, reducing operational complexity, enhancing game playability and fun, improving the player's experience, and integrating virtual controls with different functions, thus reducing the screen information load on the terminal device.

[0115] In a feasible implementation plan, such as Figure 10 As shown, the above-mentioned device includes: a lock feedback generation module 94, which is used to generate lock feedback; wherein the lock feedback includes at least one of the following: sound feedback, vibration feedback, and animation feedback.

[0116] In one feasible implementation, the virtual character movement module is used to perform a first operation if the sliding direction of the sliding operation is a first direction, and to perform a second operation if the sliding direction of the sliding operation is a second direction; wherein the first direction is upward and the second direction is downward.

[0117] In one feasible implementation, the virtual character movement module is used to determine the sliding distance of the sliding operation; if the sliding distance of the sliding operation is greater than a preset first distance threshold, a first operation or a second operation is performed based on the sliding direction of the sliding operation.

[0118] In one feasible implementation, the aforementioned virtual character movement module is used to determine the distance between the player's virtual character controlled by the terminal device and the target virtual character; if the distance is less than or equal to a preset second distance threshold, a first operation or a second operation is performed based on the sliding direction of the sliding operation.

[0119] In one feasible implementation, the aforementioned virtual character movement module is further configured to determine the sliding distance of the sliding operation, determine the target speed based on the sliding distance, and control the speed at which the player's virtual character moves toward the target virtual character based on the target speed, or control the speed at which the target virtual character moves toward the player's virtual character based on the target speed.

[0120] In one feasible implementation, the aforementioned virtual character movement module is further configured to determine the sliding distance of the sliding operation; control the distance the player's virtual character moves toward the target virtual character based on the sliding distance, or control the distance the target virtual character moves toward the player's virtual character based on the sliding distance.

[0121] In one feasible implementation, the above-mentioned execution of the first operation or the second operation based on the sliding direction of the sliding operation includes: executing the first operation or the second operation based on the sliding direction of the sliding operation so that the distance between the player virtual character controlled by the terminal device and the target virtual character reaches the target distance.

[0122] In a feasible implementation, the aforementioned target distances are all less than the attack range of the player's virtual character.

[0123] In a feasible implementation plan, such as Figure 10 As shown, the above-mentioned device includes: a viewpoint adjustment module 95, used to adjust the viewpoint of the graphical user interface based on the sliding operation during the continuous sliding operation.

[0124] The virtual character control device provided in this embodiment of the invention has the same technical features as the virtual character control method provided in the above embodiments, so it can also solve the same technical problems and achieve the same technical effects.

[0125] This invention also provides an electronic device for operating the aforementioned control method for a virtual character; see [link to related documentation]. Figure 11 The diagram shows the structure of an electronic device, which includes a memory 100 and a processor 101. The memory 100 stores one or more computer instructions, which are executed by the processor 101 to perform the following steps:

[0126] In response to a crosshair movement operation on a terminal device, the crosshair is aligned with the target virtual character; in response to a press operation on a virtual control, the crosshair is locked onto the target virtual character; in response to a slide operation on a virtual control, a first operation or a second operation is performed based on the slide direction; wherein, the first operation represents the player virtual character controlled by the terminal device moving toward the target virtual character, and the second operation represents the target virtual character moving toward the player virtual character.

[0127] In an optional embodiment of the present invention, after the step of locking the crosshair onto the target virtual character, the method further includes: generating locking feedback; wherein the locking feedback includes at least one of the following: sound feedback, vibration feedback, and animation feedback.

[0128] In an optional embodiment of the present invention, the step of performing the first operation or the second operation based on the sliding direction of the sliding operation includes: if the sliding direction of the sliding operation is a first direction, performing the first operation; if the sliding direction of the sliding operation is a second direction, performing the second operation; wherein the first direction is upward and the second direction is downward.

[0129] In an optional embodiment of the present invention, the step of performing the first operation or the second operation based on the sliding direction of the sliding operation includes: determining the sliding distance of the sliding operation; if the sliding distance of the sliding operation is greater than a preset first distance threshold, performing the first operation or the second operation based on the sliding direction of the sliding operation.

[0130] In an optional embodiment of the present invention, the step of performing the first operation or the second operation based on the sliding direction of the sliding operation includes: determining the distance between the player virtual character controlled by the terminal device and the target virtual character; if the distance is less than or equal to a preset second distance threshold, performing the first operation or the second operation based on the sliding direction of the sliding operation.

[0131] In an optional embodiment of the present invention, the method further includes: determining the sliding distance of the sliding operation, determining the target speed based on the sliding distance; controlling the speed at which the player's virtual character moves toward the target virtual character according to the target speed, or controlling the speed at which the target virtual character moves toward the player's virtual character according to the target speed.

[0132] In an optional embodiment of the present invention, the method further includes: determining the sliding distance of the sliding operation; controlling the distance by which the player's virtual character moves toward the target virtual character based on the sliding distance, or controlling the distance by which the target virtual character moves toward the player's virtual character based on the sliding distance.

[0133] In an optional embodiment of the present invention, the above-mentioned execution of the first operation or the second operation based on the sliding direction of the sliding operation includes: executing the first operation or the second operation based on the sliding direction of the sliding operation so that the distance between the player virtual character controlled by the terminal device and the target virtual character reaches the target distance.

[0134] In an optional embodiment of the present invention, the target distances mentioned above are all less than the attack distance of the player's virtual character.

[0135] In an optional embodiment of the present invention, the method further includes: adjusting the viewpoint of the graphical user interface based on the sliding operation during the duration of the sliding operation.

[0136] In this embodiment, the system can respond to crosshair movement operations on the terminal device, aligning the crosshair with the target virtual character; respond to pressing operations on the virtual control, locking the crosshair onto the target virtual character; and respond to sliding operations on the virtual control, executing a first operation or a second operation based on the sliding direction. The first operation represents the player's virtual character, controlled by the terminal device, moving towards the target virtual character, while the second operation represents the target virtual character moving towards the player's virtual character. This method, by using a single virtual control to achieve movement of the player's virtual character and dragging of the target virtual character, reduces operational complexity, enhances game playability and fun, improves the player's experience, and integrates virtual controls with different functions, reducing the screen information load on the terminal device.

[0137] Furthermore, Figure 11 The electronic device shown also includes a bus 102 and a communication interface 103, with the processor 101, the communication interface 103 and the memory 100 connected via the bus 102.

[0138] The memory 100 may include high-speed random access memory (RAM) or non-volatile memory, such as at least one disk storage device. Communication between this system network element and at least one other network element is achieved through at least one communication interface 103 (which can be wired or wireless), such as the Internet, wide area network, local area network, or metropolitan area network. The bus 102 may be an ISA bus, PCI bus, or EISA bus, etc. The bus can be divided into address bus, data bus, control bus, etc. For ease of representation, Figure 11 The symbol is represented by a single double-headed arrow, but this does not mean that there is only one bus or one type of bus.

[0139] Processor 101 may be an integrated circuit chip with signal processing capabilities. In implementation, each step of the above method can be completed by the integrated logic circuitry in the hardware of processor 101 or by instructions in software form. Processor 101 can be a general-purpose processor, including a Central Processing Unit (CPU), a Network Processor (NP), etc.; it can also be a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), a Field-Programmable Gate Array (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, or discrete hardware components. It can implement or execute the methods, steps, and logic block diagrams disclosed in the embodiments of this invention. The general-purpose processor can be a microprocessor or any conventional processor. The steps of the methods disclosed in the embodiments of this invention can be directly manifested as execution by a hardware decoding processor, or execution by a combination of hardware and software modules in the decoding processor. The software module can reside in a readily available storage medium in the art, such as random access memory, flash memory, read-only memory, programmable read-only memory, electrically erasable programmable memory, or registers. This storage medium is located in memory 100, and processor 101 reads information from memory 100 and, in conjunction with its hardware, completes the steps of the method described in the foregoing embodiments.

[0140] This invention also provides a computer-readable storage medium storing computer-executable instructions. When these computer-executable instructions are invoked and executed by a processor, they cause the processor to implement the aforementioned virtual character control method, which can perform the following steps:

[0141] In response to a crosshair movement operation on a terminal device, the crosshair is aligned with the target virtual character; in response to a press operation on a virtual control, the crosshair is locked onto the target virtual character; in response to a slide operation on a virtual control, a first operation or a second operation is performed based on the slide direction; wherein, the first operation represents the player virtual character controlled by the terminal device moving toward the target virtual character, and the second operation represents the target virtual character moving toward the player virtual character.

[0142] In an optional embodiment of the present invention, after the step of locking the crosshair onto the target virtual character, the method further includes: generating locking feedback; wherein the locking feedback includes at least one of the following: sound feedback, vibration feedback, and animation feedback.

[0143] In an optional embodiment of the present invention, the step of performing the first operation or the second operation based on the sliding direction of the sliding operation includes: if the sliding direction of the sliding operation is a first direction, performing the first operation; if the sliding direction of the sliding operation is a second direction, performing the second operation; wherein the first direction is upward and the second direction is downward.

[0144] In an optional embodiment of the present invention, the step of performing the first operation or the second operation based on the sliding direction of the sliding operation includes: determining the sliding distance of the sliding operation; if the sliding distance of the sliding operation is greater than a preset first distance threshold, performing the first operation or the second operation based on the sliding direction of the sliding operation.

[0145] In an optional embodiment of the present invention, the step of performing the first operation or the second operation based on the sliding direction of the sliding operation includes: determining the distance between the player virtual character controlled by the terminal device and the target virtual character; if the distance is less than or equal to a preset second distance threshold, performing the first operation or the second operation based on the sliding direction of the sliding operation.

[0146] In an optional embodiment of the present invention, the method further includes: determining the sliding distance of the sliding operation, determining the target speed based on the sliding distance; controlling the speed at which the player's virtual character moves toward the target virtual character according to the target speed, or controlling the speed at which the target virtual character moves toward the player's virtual character according to the target speed.

[0147] In an optional embodiment of the present invention, the method further includes: determining the sliding distance of the sliding operation; controlling the distance by which the player's virtual character moves toward the target virtual character based on the sliding distance, or controlling the distance by which the target virtual character moves toward the player's virtual character based on the sliding distance.

[0148] In an optional embodiment of the present invention, the above-mentioned execution of the first operation or the second operation based on the sliding direction of the sliding operation includes: executing the first operation or the second operation based on the sliding direction of the sliding operation so that the distance between the player virtual character controlled by the terminal device and the target virtual character reaches the target distance.

[0149] In an optional embodiment of the present invention, the target distances mentioned above are all less than the attack distance of the player's virtual character.

[0150] In an optional embodiment of the present invention, the method further includes: adjusting the viewpoint of the graphical user interface based on the sliding operation during the duration of the sliding operation.

[0151] In this embodiment, the system can respond to crosshair movement operations on the terminal device, aligning the crosshair with the target virtual character; respond to pressing operations on the virtual control, locking the crosshair onto the target virtual character; and respond to sliding operations on the virtual control, executing a first operation or a second operation based on the sliding direction. The first operation represents the player's virtual character, controlled by the terminal device, moving towards the target virtual character, while the second operation represents the target virtual character moving towards the player's virtual character. This method, by using a single virtual control to achieve movement of the player's virtual character and dragging of the target virtual character, reduces operational complexity, enhances game playability and fun, improves the player's experience, and integrates virtual controls with different functions, reducing the screen information load on the terminal device.

[0152] The computer program products of the virtual character control method, device, electronic device, and readable storage medium provided in the embodiments of the present invention include a computer-readable storage medium storing program code. The instructions included in the program code can be used to execute the methods in the preceding method embodiments. For specific implementation, please refer to the method embodiments, which will not be repeated here.

[0153] Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the specific working process of the system and / or device described above can be referred to the corresponding process in the foregoing method embodiments, and will not be repeated here.

[0154] Furthermore, in the description of the embodiments of the present invention, unless otherwise explicitly specified and limited, the terms "installation," "connection," and "linking" should be interpreted broadly. For example, they can refer to a fixed connection, a detachable connection, or an integral connection; they can refer to a mechanical connection or an electrical connection; they can refer to a direct connection or an indirect connection through an intermediate medium; and they can refer to the internal connection of two components. Those skilled in the art can understand the specific meaning of the above terms in the present invention based on the specific circumstances.

[0155] If a function is implemented as a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this invention, or the part that contributes to the prior art, or a part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, electronic device, or network device, etc.) to execute all or part of the steps of the methods of the various embodiments of this invention. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.

[0156] In the description of this invention, it should be noted that the terms "center," "upper," "lower," "left," "right," "vertical," "horizontal," "inner," and "outer," etc., indicate the orientation or positional relationship based on the orientation or positional relationship shown in the accompanying drawings. They are used only for the convenience of describing the invention and for simplifying the description, and do not indicate or imply that the device or element referred to must have a specific orientation, or be constructed and operated in a specific orientation. Therefore, they should not be construed as limitations on the invention. Furthermore, the terms "first," "second," and "third" are used for descriptive purposes only and should not be construed as indicating or implying relative importance.

[0157] Finally, it should be noted that the above embodiments are merely specific implementations of the present invention, used to illustrate the technical solutions of the present invention, and not to limit it. The scope of protection of the present invention is not limited thereto. Although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that any person skilled in the art can still modify or easily conceive of changes to the technical solutions described in the foregoing embodiments within the technical scope disclosed in the present invention, or make equivalent substitutions for some of the technical features; and these modifications, changes, or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present invention, and should all be covered within the scope of protection of the present invention. Therefore, the scope of protection of the present invention should be determined by the scope of the claims.

Claims

1. A method for controlling a virtual character, characterized in that, The method includes providing a graphical user interface via a terminal device, the graphical user interface displaying a crosshair, virtual controls, and at least one virtual character; the method comprises: In response to a crosshair movement operation on the terminal device, the crosshair is aligned with the target virtual character; In response to a press operation on the virtual control, the crosshair locks onto the target virtual character; In response to a sliding operation on the virtual control, a first operation or a second operation is performed based on the sliding direction of the sliding operation; wherein, the first operation represents controlling the player virtual character controlled by the terminal device to move towards the target virtual character, and the second operation represents controlling the target virtual character to move towards the player virtual character; The step of performing a first operation or a second operation based on the sliding direction of the sliding operation includes: if the sliding direction of the sliding operation is a first direction, performing a first operation; if the sliding direction of the sliding operation is a second direction, performing a second operation.

2. The method according to claim 1, characterized in that, After the step of locking the crosshair onto the target virtual character, the method further includes: Generate locking feedback; wherein the locking feedback includes at least one of the following: sound feedback, vibration feedback, and animation feedback.

3. The method according to claim 1, characterized in that, The first direction is upward, and the second direction is downward.

4. The method according to claim 1, characterized in that, The steps of performing the first or second operation based on the sliding direction of the sliding operation include: Determine the sliding distance of the sliding operation; If the sliding distance of the sliding operation is greater than a preset first distance threshold, the first operation or the second operation is performed based on the sliding direction of the sliding operation.

5. The method according to claim 1, characterized in that, The steps of performing the first or second operation based on the sliding direction of the sliding operation include: Determine the distance between the player's virtual character controlled by the terminal device and the target virtual character; If the distance is less than or equal to a preset second distance threshold, perform either the first operation or the second operation based on the sliding direction of the sliding operation.

6. The method according to claim 1, characterized in that, The method further includes: Determine the sliding distance of the sliding operation, and determine the target speed based on the sliding distance; The player's virtual character can be controlled to move towards the target virtual character based on the target speed, or the target virtual character can be controlled to move towards the player's virtual character based on the target speed.

7. The method according to claim 6, characterized in that, The method further includes: Determine the sliding distance of the sliding operation; The distance the player's virtual character moves toward the target virtual character is controlled based on the sliding distance, or the distance the target virtual character moves toward the player's virtual character is controlled based on the sliding distance.

8. The method according to claim 1, characterized in that, The execution of the first or second operation based on the sliding direction of the sliding operation includes: The first or second operation is performed based on the sliding direction of the sliding operation, so that the distance between the player virtual character controlled by the terminal device and the target virtual character reaches the target distance.

9. The method according to claim 8, characterized in that, The target distance is less than the attack range of the player's virtual character.

10. The method according to claim 1, characterized in that, The method further includes: During the duration of the sliding operation, the viewpoint of the graphical user interface is adjusted based on the sliding operation.

11. A control device for a virtual character, characterized in that, A graphical user interface is provided via a terminal device, the graphical user interface displaying a crosshair, virtual controls, and at least one virtual character; the device includes: The target virtual character alignment module is used to respond to the crosshair movement operation of the terminal device and align the crosshair with the target virtual character. A target virtual character locking module is used to respond to a press operation on the virtual control, causing the crosshair to lock onto the target virtual character; A virtual character movement module is used to respond to a sliding operation on the virtual control and to perform a first operation or a second operation based on the sliding direction of the sliding operation; wherein, the first operation represents controlling the player virtual character controlled by the terminal device to move towards the target virtual character, and the second operation represents controlling the target virtual character to move towards the player virtual character; The virtual character movement module is configured to perform a first operation if the sliding direction of the sliding operation is a first direction, and to perform a second operation if the sliding direction of the sliding operation is a second direction.

12. An electronic device, characterized in that, The device includes a processor and a memory, the memory storing computer-executable instructions that can be executed by the processor, the processor executing the computer-executable instructions to implement the steps of the virtual character control method according to any one of claims 1-10.

13. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores computer-executable instructions, which, when invoked and executed by a processor, cause the processor to implement the steps of the virtual character control method according to any one of claims 1-10.