Control method of virtual character, and its device, electronic device, and computer program

JP2025172870A5Pending Publication Date: 2026-06-10TENCENT TECHNOLOGY (SHENZHEN) CO LTD

Patent Information

Authority / Receiving Office
JP · JP
Patent Type
Applications
Current Assignee / Owner
TENCENT TECHNOLOGY (SHENZHEN) CO LTD
Filing Date
2025-08-28
Publication Date
2026-06-10

AI Technical Summary

Technical Problem

Existing methods for controlling virtual characters require users to operate multiple controllers, leading to low efficiency, wasted processing resources, and inefficient obstacle navigation due to unnecessary operations.

Method used

A virtual controller integrates movement direction and action commands, allowing one-handed operation by detecting target objects within a predetermined range to perform actions only when necessary, reducing unnecessary operations and processing waste.

Benefits of technology

Improves control efficiency and reduces processing resource waste by enabling one-handed operation and minimizing invalid actions in virtual environments.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure 00000000_0000_ABST
    Figure 00000000_0000_ABST
Patent Text Reader

Abstract

To provide a control method of a virtual character, its device, a storage medium, and an electronic device.SOLUTION: A method includes the steps of: displaying a virtual character and a virtual controller in a virtual scene in which the virtual controller is used for controlling the virtual character; performing control such that a virtual character travels within a virtual scene in response to operation executed to the virtual controller; and performing control such that the virtual controller is dragged to a first area in the virtual scene in a movement process of a virtual character, and the virtual character executes predetermined operation related to an object of a target when there is the object of the target within a fixed range around the virtual character.SELECTED DRAWING: Figure 2
Need to check novelty before this filing date? Find Prior Art

Description

[Technical Field]

[0001] This application claims priority to Chinese patent application No. 2021110583571, filed with the China Patent Office on September 9, 2021, entitled "Method, device, storage medium and electronic device for controlling virtual characters," the entire contents of which are incorporated herein by reference.

[0002] The present application relates to the field of computers, and more particularly to a method, device, storage medium and electronic device for controlling a virtual character. [Background technology]

[0003] In related applications, a user constantly controls a virtual character to perform different actions. For example, there are many obstacles, such as bunkers and buildings, in a virtual scene, and the user needs to control the virtual character to overcome various types of obstacles in the virtual scene. For example, the user can control the virtual character to overcome a low fence or directly climb over it and enter the building through a window. This type of operation of overcoming obstacles is very common in virtual scenes.

[0004] Currently, when a user controls a virtual character, the user needs to use different controllers to control the virtual character's movement direction and the execution of actions such as jumping. For example, the left hand needs to control the virtual character's movement direction with a joystick, and the right hand needs to touch and control a virtual button to control the virtual character to perform a jump action and overcome an obstacle. Summary of the Invention

[0005] The embodiments of the present application provide a method, device, storage medium, and electronic device for controlling a virtual character, in order to solve at least the technical problem of low efficiency in executing operations on a virtual character, avoid wasting processing resources of a terminal device, and improve the processing efficiency of the terminal device.

[0006] According to one aspect of an embodiment of the present application, there is provided a method for controlling a virtual character, the method being executed by an electronic device and including the steps of: displaying a virtual character and a virtual controller in a virtual scene, wherein the virtual controller is used to control the virtual character; controlling the virtual character to move within the virtual scene in response to an operation performed on the virtual controller; and, in the process of moving the virtual character, when the virtual controller is dragged to a first area within the virtual scene and a target object is located within a certain range around the virtual character, controlling the virtual character to perform a predetermined action associated with the target object.

[0007] According to another aspect of an embodiment of the present application, there is further provided a control device for a virtual character, the device including: a display module for displaying a virtual character and a virtual controller in a virtual scene, the virtual controller being used to control the virtual character; a first control module for controlling the virtual character to move within the virtual scene in response to an operation performed on the virtual controller; and a second control module for controlling the virtual character to perform a predetermined action associated with a target object when the virtual controller is dragged to a first area within the virtual scene and a target object is within a certain range of the virtual character during the movement of the virtual character.

[0008] According to another aspect of an embodiment of the present application, there is further provided a computer-readable storage medium having a computer program stored therein, the computer program being configured, when executed, to implement the above-described method for controlling a virtual character.

[0009] According to another aspect of an embodiment of the present application, there is further provided an electronic device including a storage device and a processor, wherein the storage device stores a computer program, and the processor is configured to implement the above-mentioned method for controlling a virtual character using the computer program.

[0010] An embodiment of the present application further provides a computer program product, the computer program product including computer instructions stored in a computer-readable storage medium, the computer instructions, when executed, performing the above-described method for controlling a virtual character. [Brief explanation of the drawings]

[0011] The drawings described herein are used to provide a further understanding of the present application and constitute a part of the present application, and the exemplary embodiments and their descriptions are used to interpret the present application but are not limiting the present application. [Figure 1] 1 is a schematic diagram of an application environment of a virtual character control method according to an embodiment of the present application; [Figure 2] 1 is a flow diagram of a method for controlling a virtual character according to an embodiment of the present application. [Figure 3] FIG. 1 is a schematic diagram of a virtual scene according to some embodiments of the present application. [Figure 4] FIG. 10 is a schematic diagram of another virtual scene according to some embodiments of the present application. [Figure 5] FIG. 1 is a schematic diagram of another virtual scene according to some embodiments of the present application. [Figure 6A] FIG. 1 is a schematic diagram of one-handed operation according to some embodiments of the present application. [Figure 6B] FIG. 1 is a schematic diagram of one-handed operation according to some embodiments of the present application. [Figure 6C] FIG. 1 is a schematic diagram of one-handed operation according to some embodiments of the present application. [Figure 7A] FIG. 10 is a schematic diagram of another one-handed operation according to some embodiments of the present application. [Figure 7B]FIG. 10 is a schematic diagram of another one-handed operation according to some embodiments of the present application. [Figure 7C] FIG. 10 is a schematic diagram of another one-handed operation according to some embodiments of the present application. [Figure 8] FIG. 1 is a schematic diagram of obstacle detection according to some embodiments of the present application. [Figure 9] FIG. 1 is a schematic diagram of a virtual scene according to some embodiments of the present application. [Figure 10] FIG. 1 is a schematic diagram of a feature setting interface according to some embodiments of the present application. [Figure 11] 1 is a flow diagram of a method for controlling a virtual character according to some embodiments of the present application. [Figure 12] 1 is a structural schematic diagram of a control device for a virtual character according to an embodiment of the present application; [Figure 13] 1 is a structural schematic diagram of an electronic device according to an embodiment of the present application; DETAILED DESCRIPTION OF THE INVENTION

[0012] In order to help those skilled in the art to better understand the solutions of the present application, the following will clearly and completely describe the technical solutions in the embodiments of the present application with reference to the drawings in the embodiments of the present application, and obviously, the described embodiments are only some but not all of the embodiments of the present application. Based on the embodiments of the present application, all other embodiments obtained by those skilled in the art without creative work shall fall within the protection scope of the present application.

[0013] As an explanation, the terms "first," "second," and the like in the specification, claims, and brief description of the drawings herein are used to distinguish between similar objects and are not necessarily used to describe a particular sequence or chronological order. It is understood that such terms, when used, may be interchanged under appropriate circumstances, such that the embodiments of the present application described herein can be performed in sequences other than those illustrated or described herein. Also, the terms "comprise," "have," and any variations thereof are intended to cover non-exclusive inclusions; for example, a process, method, system, product, or apparatus comprising a series of steps or units is not necessarily limited to the explicitly listed steps or units, but may include other steps or units not explicitly listed or inherent to the process, method, product, or apparatus.

[0014] In some virtual character control scenes, the left hand needs to use a joystick to control the moving direction of the virtual character, and the right hand needs to touch a virtual button to control the virtual character to perform a jumping action to overcome an obstacle, which is cumbersome for a user to operate with the left and right hands and inconvenient for controlling the virtual character, resulting in low efficiency of the user controlling the virtual character in the game.

[0015] In addition, some users may trigger a jumping action without aiming at an obstacle. In this case, the virtual character controlled by the user jumps back and forth without moving, and is unable to successfully overcome the obstacle. On the other hand, the virtual character is easily thrown off due to enemy attacks during the jumping back and forth. On the other hand, since the virtual character jumps back and forth without moving, but is unable to overcome the obstacle, several operations performed by the user are invalid, resulting in a problem of wasted operations. Several invalid operations waste processing resources of the terminal device and reduce the processing efficiency of the terminal device.

[0016] To address the above-mentioned issues, in an embodiment of the present application, an operation command for controlling a virtual character to perform a predetermined action associated with a target object in a virtual scene is generated by a trigger of a virtual controller, and the virtual controller can also control the movement direction of the virtual character. By integrating different operation triggers into a single virtual controller, the movement direction of the virtual character and the predetermined action can be controlled with one hand, allowing the user to conveniently control the virtual character with one hand and improving the efficiency of control over the virtual character. Repeated control operations by the user can be avoided, thereby reducing invalid operations and eliminating the need for the terminal device to waste a large amount of processing resources on processing these invalid operations, thereby improving the processing efficiency of the terminal device.

[0017] When an operation command for instructing a virtual character to perform a predetermined action is received, the virtual character is not immediately controlled to perform the predetermined action, but rather, the system first detects whether a target object is present within a predetermined range around the virtual character, and if the target object is present, the virtual character is controlled to perform the predetermined action associated with the target object. If the target object is not present, the virtual character continues to move in its current state. In this way, if there is no target object present around the virtual character, the virtual character is controlled to perform the predetermined action associated with the target object, thereby avoiding the problem of unnecessary operations. Furthermore, this avoids wasting processing resources of the terminal device and improves the processing efficiency of the terminal device.

[0018] According to one aspect of the present application, a method for controlling a virtual character is provided, and in one embodiment, the method for controlling a virtual character can be applied to, but is not limited to, the environment shown in Fig. 1. The system environment includes a user device 102, a network 110, and a server 112.

[0019] In some embodiments, the user device 102 includes a storage device 104, a processor 106, and a display device 108. The storage device is used for the virtual scene, virtual character, target object, and the like in the application. The processor is used for processing operation instructions, which may include, but are not limited to, instructing a virtual character to perform a predetermined action associated with the target object and controlling the movement direction of the virtual character. The display device may be used for displaying the virtual scene, virtual character, and the like. In this embodiment, the user device may be a user device provided with a target client terminal, which may include, but is not limited to, at least one of a mobile phone (e.g., an Android mobile phone, an iOS mobile phone, etc.), a laptop, a tablet, a palmtop computer, a mobile internet device (MID), a PAD, a desktop computer, a smart TV, and the like. The target client terminal may be, for example, a video client terminal, an instant messaging client terminal, a browser client terminal, and an education client terminal. The above network may include, but is not limited to, a wired network and a wireless network, where the wired network includes a local area network, a metropolitan area network, and a wide area network, and the wireless network includes Bluetooth, WIFI, and other networks for wireless communication. The above server may be a single server, a server cluster consisting of multiple servers, or a cloud server.

[0020] In some embodiments, the network 110 may include, but is not limited to, a wired network and a wireless network, where the wired network includes a local area network, a metropolitan area network, and a wide area network, and the wireless network includes Bluetooth, WIFI, and other networks for wireless communication.

[0021] In some embodiments, the server 112 may be a single server, a server cluster consisting of multiple servers, or a cloud server. The server includes a database 114 and a processing engine 116. The database is used to store data, including, but not limited to, virtual scenes, virtual characters, and target objects in the application. The processing engine is used to control virtual characters, including, but not limited to, controlling the movement of the virtual characters within the virtual scenes and controlling the virtual characters to perform predetermined actions associated with target objects. The above content is merely an example, and the present embodiment is not limited thereto.

[0022] In some embodiments, as shown in FIG. 2, the above-described method for controlling a virtual character can be applied to a target application, and the method includes the following steps:

[0023] Step S202: Displaying a virtual character and a virtual controller in a virtual scene, where the virtual controller is used to control the virtual character; Here, the virtual scene may be a scene in the target application, and the virtual character may be a user-controllable object in the virtual scene. The target application may be a game application such as a shooting game application, a parkour game application, or other application having an obstacle overcoming scene, and the type of application is not limited herein. In some embodiments, the virtual controller may be a virtual joystick, a virtual steering wheel, a virtual button, or the like. The user can control the virtual character with the virtual controller, including, but not limited to, controlling the movement of the virtual character within the virtual scene and controlling the virtual character to perform a predetermined action associated with a target object in the target application.

[0024] Step S204: Controlling the virtual character to move within the virtual scene in response to an operation performed on the virtual controller; Here, the virtual controller can control the virtual character to move within the virtual scene, including, but not limited to, movement methods such as walking and running, and can also control the direction of movement of the virtual character, including, but not limited to, movement leftward, movement rightward, movement forward, and movement backward.

[0025] Step S206: In the process of moving the virtual character, when the virtual controller is dragged into a first area and a target object is present within a certain range around the virtual character, the virtual character is controlled to perform a predetermined action associated with the target object.

[0026] Here, the first area is a display area in the virtual scene of the target application, and the user can preset the size and display position of the first area. The first area may also be called a judgment area. When the virtual controller is dragged into the judgment area, it detects whether a target object is present within a predetermined range around the virtual character. If the target object is present, the virtual character is controlled to perform a predetermined action associated with the target object. The target object may be an obstacle in the virtual scene, and the predetermined action associated with the target object may be an action to overcome the obstacle. The predetermined range may be set according to actual conditions, for example, within 5 meters or 10 meters from the virtual character. The predetermined range is within 5 meters from the virtual character. If a surmountable obstacle is present within 5 meters from the virtual character, the virtual character is controlled to perform an action to overcome the obstacle.

[0027] Here, taking the predetermined range as an example where it is within 5 meters from the virtual character, if it is detected that there is no target object (e.g., a jumpable obstacle) within 5 meters from the virtual character that can perform a predetermined action, the virtual character is controlled to continue to maintain its current movement state within the game scene. For example, the current movement state of the virtual character is running forward. When a virtual controller (e.g., a virtual joystick) is dragged into the determination area and it is detected that there is no target object (e.g., a jumpable obstacle) associated with the predetermined action within the predetermined range, the virtual character continues to maintain its forward running state.

[0028] In some embodiments, controlling the movement of the virtual character within the virtual scene in response to an operation performed on the virtual controller includes controlling a direction of movement of the virtual character based on a position of the virtual controller within the second region in response to an operation in which the virtual controller is dragged into the second region.

[0029] In one embodiment, the second area is an area for controlling the movement state of a virtual character. When the virtual controller is dragged into the second area, the movement direction of the virtual character can be controlled based on the position of the virtual controller in the second area. FIG. 3 shows a schematic diagram of a virtual scene according to some embodiments of the present application. In the embodiment shown in FIG. 3, the virtual controller is a virtual joystick and the target object is an obstacle. FIG. 3 includes a virtual character 300 and an obstacle 304, and the left side of FIG. 3 includes a virtual joystick 301 and a second area 302. A user controls the action performed by the virtual character using the virtual joystick 301. For example, when the virtual joystick 301 is located in the second area 302, the user can control the movement direction of the virtual character. When the virtual joystick 301 is located at the left arrow position on the left side of the second area 302, the virtual character is controlled to move leftward. When the virtual joystick 301 is located at the right arrow position on the right side of the second area 302, the virtual character is controlled to move rightward.

[0030] When the virtual controller is touch-controlled to move outside the second region, a first region is displayed in the virtual scene. FIG. 4 shows a schematic diagram of another virtual scene according to some embodiments of the present disclosure, taking as an example a virtual joystick as the virtual controller and an obstacle as the target object. The user controls the position of the virtual joystick 401 in the virtual scene by dragging it. As shown in FIG. 4, when it is detected that the virtual joystick 401 is being dragged outside the second region, a first region 402 is displayed in the virtual scene to indicate the location of the first region to the user. If the user continues to drag the virtual joystick 401 into the first region 402, it begins to detect whether there is an obstacle within a predetermined range of the virtual character. As shown in FIG. 5, the user can continue to drag the virtual joystick 501 to the first region 502. When the virtual joystick 501 is located in the first region 502, it starts to detect whether there is an obstacle within a predetermined range of the virtual character. If there is an obstacle, it controls the virtual character to perform an action to overcome the obstacle; if there is no obstacle, it controls the virtual character to continue performing the current moving state.

[0031] In the above embodiment, the virtual controller can not only control the movement direction of the virtual character but also control the virtual character to perform a predetermined action associated with a target object, allowing the user to realize one-handed operation. The efficiency of control operations on the virtual character is improved. Repeated control operations by the user can be avoided, thereby reducing invalid operations and eliminating the need for the terminal device to waste a large amount of processing resources to process these invalid operations, thereby improving the processing efficiency of the terminal device.

[0032] In some embodiments, the method further includes the steps of: displaying the first region when the virtual controller is dragged out of the second region; and acquiring an operation in which the virtual controller is dragged from the second region to the first region.

[0033] 6A to 6C are schematic diagrams illustrating one-handed operation according to some embodiments of the present application. As shown in FIG. 6A, when a user performs a touch control such as sliding a virtual joystick 601 into a second region 602, the movement direction of a virtual character can be controlled. As shown in FIG. 6B, when a user drags the virtual joystick 601 out of the second region 602, a first region 603 is displayed in the virtual scene. As shown in FIG. 6C, when the virtual controller moves upward along the Y axis into the first region 603, the current virtual scene begins to determine whether a target object (e.g., an obstacle) is present in front of the virtual character controlled by the user. If the target object is present, the virtual character determines whether a predetermined action associated with the target object exists (e.g., whether the obstacle is surmountable). If it is determined that a predetermined action associated with the target object exists, the virtual character controlled by the user begins to perform the predetermined action associated with the target object (e.g., an action to overcome the obstacle). If there is no predetermined action associated with the target object, for example, if it is determined that the obstacle is an insurmountable obstacle or there is no target object, the current determination is an invalid operation, and the virtual character controlled by the user does not perform the action associated with the target object and continues to maintain its current movement state in the virtual scene; for example, if before the determination, the virtual character was in a state of running forward, it continues to maintain the action of running forward, and continues to detect whether the virtual controller moves within the first region 603.

[0034] In this embodiment, when the virtual joystick 601 moves outside the second region 602, it is determined that the virtual joystick 601 has been dragged. In this case, the first region 603 is displayed, and an icon in the first region 603 is lit. The first region 603 is a trigger region for executing a predetermined action associated with a target object. Taking the example shown in FIG. 6B as an example, when the virtual joystick is dragged from the second region 602 to any position outside the second region 602, the first region 603 is displayed in the virtual scene. In this embodiment, when the virtual joystick is located in the second region 602, the movement direction of the virtual character can be controlled. In this case, the first region 603 is not displayed in the virtual scene. When the virtual joystick is dragged outside the second region 602, the first region 603 is displayed in the virtual scene. In this way, not only can the problem that several kinds of icons are displayed in the virtual scene and it is difficult for the user to distinguish between different types of icons be avoided, but also when the virtual joystick is dragged out of the second area 602, the first area 603 will be displayed in the virtual scene to show the user the location of the first area 603, and it is convenient for the user to control the virtual character to perform the action of overcoming obstacles.

[0035] In some embodiments, after the virtual controller is dragged from the second region to the first region, the method cancels displaying the first region if the virtual controller is dragged out of the first region.

[0036] In one embodiment, when a user drags a virtual controller into the first region, it is determined whether the virtual controller remains within the first region; in this case, if the virtual controller is dragged out of the first region, the display of the first region is canceled, i.e., the icon of the first region is turned off; in this case, the virtual character controlled by the user continues to maintain its current movement state in the virtual scene; for example, if the virtual character is in a state of running forward before the determination, it continues to maintain the forward running motion.

[0037] 7A-7C show schematic diagrams of other one-handed operations according to some embodiments of the present application. When the virtual joystick 701 is dragged into the first region 703, the current virtual scene begins to determine whether a target object is present in front of the user-controlled virtual character. If it is determined that a target object is present, the current virtual scene begins to determine whether a predetermined action associated with the target object exists. If it is determined that a predetermined action associated with the target object exists (e.g., an obstacle is surmountable), the user-controlled virtual character begins to perform the predetermined action associated with the target object (e.g., an action to overcome the obstacle). If it is determined that there is no predetermined action associated with the target object (e.g., an obstacle is insurmountable), or if it is determined that there is no target object, the current determination is an invalid operation, and the user-controlled virtual character does not perform the predetermined action associated with the target object and continues to maintain its current movement state in the virtual scene. For example, if the virtual character was running forward before the determination, it continues to maintain the forward running action, and continues to detect whether the virtual controller moves into the first region. If the user continues to drag the virtual controller out of the first region, the display of the first region in the virtual scene is canceled. If the user continues to drag the virtual controller into the second region 702, the movement direction of the virtual character (e.g., forward movement, leftward movement, rightward movement, backward movement, etc.) can be controlled based on the position of the virtual controller within the second region 702.

[0038] In some embodiments, the method further includes a step of controlling the virtual character to maintain a current movement state when the virtual controller is dragged into the first area and the target object is not within a certain range of the virtual character during the movement of the virtual character.

[0039] In one embodiment, the predetermined range may be predetermined. For example, the distance from the virtual character may be 5 meters, 10 meters, 15 meters, etc. The specific predetermined range may be determined according to actual circumstances. The user may control the virtual controller to move upward along the Y axis into a first region. After the virtual controller moves into the first region, it is determined whether a target object is within the predetermined range of the virtual character. If the target object is present, the virtual character is controlled to perform a predetermined action associated with the target object. If the target object is not present, the virtual character is controlled to continue performing its current movement state. For example, if the current movement state of the virtual character is running forward, the virtual character is controlled to continue running forward.

[0040] In some embodiments, when the virtual controller is located in the first region, the step of detecting whether the target object is within the predetermined range around the virtual character includes the step of detecting whether the target object is within the predetermined range around the virtual character when the length of time the virtual controller remains in the first region exceeds a first predetermined length of time.

[0041] In one embodiment, when the virtual controller is dragged into the first region, the controller starts detecting the length of time the virtual controller remains in the first region, and if the length of time the virtual controller remains in the first region exceeds a predetermined length of time, the controller starts detecting whether there is a target object within the predetermined range around the virtual character, which can be determined according to the actual situation and can be, for example, 3 seconds, 4 seconds, 5 seconds, etc.

[0042] Assuming that a user operates the virtual controller by touching the screen of a mobile phone, it is necessary to determine the length of time that the user's finger presses the virtual controller. In the event of a user's long press on the virtual controller, it is necessary to increase the monitoring of the length of time that the screen is long pressed. The calculation formula for the length of time that the screen is long pressed is the length of time that the screen is long pressed = the time when the screen is released - the time when the screen is pressed. The length of the first predetermined time is set to 0.3 seconds, and the time when the user releases the screen is 18:30:400 milliseconds. Assuming that the time of pressing is 18:30 and 0 milliseconds, the length of time the screen is pressed and held is 18:30 and 400 milliseconds - 18:30 and 0 milliseconds, i.e., 400 milliseconds, or 0.4 seconds. When monitoring the length of time the screen is pressed and held, if it is detected that the time the user pressed and held is 0.4 seconds, i.e., exceeds the first predetermined time length of 0.3 seconds, the current time length monitoring judgment is passed, and it begins to determine whether there is a target object in front of the virtual character controlled by the user in the current virtual scene.

[0043] In one embodiment, the virtual controller is dragged into the first region, and the system begins detecting whether a target object is present within a predetermined range around the virtual character. The predetermined range can be determined according to the actual situation. For example, if the virtual character's current movement state is moving forward, the predetermined range can be a predetermined distance in front of the virtual character, such as 1 meter or 2 meters. FIG. 8 shows a schematic diagram of target object detection according to some embodiments of the present application. Assuming the set range is 1 meter away from the virtual character, the virtual controller is dragged into the first region, and the virtual character maintains a state of moving forward and begins detecting whether a target object is present within 1 meter in front of the virtual character. If the target object is not detected, the system controls the virtual character to continue moving forward. If the system detects that a target object is present within 1 meter in front of the virtual character, the system controls the virtual character to perform a predetermined action associated with the target object. In this embodiment, if there is no target object within the predetermined range of the virtual character, the virtual character continues to execute the current movement state, thereby preventing the virtual character from executing an invalid action when there is no predetermined object, and avoiding the problem of too many invalid operations in the virtual scene.

[0044] In some embodiments, the method further includes, in the process of controlling the virtual character to perform a predetermined action associated with a target object, if the virtual controller moves outside the first area, canceling the control of the virtual character to perform the predetermined action and controlling the virtual character to return to a position where it will perform the predetermined action.

[0045] In one embodiment, when the virtual controller 900 is dragged into the first region, it detects whether a target object is present within the predetermined range. If the target object is present, it controls the virtual character to perform a predetermined action associated with the target object. During the process of the virtual character performing the predetermined action, if the virtual controller 900 moves outside the first region, the virtual character cancels the execution of the predetermined action, and the virtual character maintains its movement state before the predetermined action or remains stationary around the virtual target object. FIG. 9 is a schematic diagram of another virtual scene according to some embodiments of the present disclosure. As shown in FIG. 9, when the virtual controller 900 is located within the first region, if it detects that a target object is present within a predetermined range around the virtual character 901, in this embodiment, the indicated target object is a virtual obstacle 902, and the virtual character 901 is controlled to perform an action to overcome the obstacle 902. During the process of the virtual character performing the action to overcome the obstacle 902, if the virtual controller 900 moves outside the first region, the virtual character 901 cancels the action to overcome the obstacle 902.

[0046] In some embodiments, the method further includes obtaining a setting instruction in a setting interface of the application, and in response to the setting instruction, setting the size of the first area according to a size indicated in the setting instruction, and setting the first area at a position indicated in the setting instruction.

[0047] In one embodiment, before a user drags the virtual controller into the first area to cause the virtual character to perform a predetermined action associated with a target object, the user needs to preset relevant parameters for the first area. The user can select or cancel the use of the function according to their needs, and can operate the setting interface for the first area by saving and logging out using the touch control. FIG. 10 shows a schematic diagram of a function setting interface according to some embodiments of the present application. The setting system opens a function interface for setting the first area, which includes a first area 1001 and a second area 1002. The positions of the first area 1001 and the second area 1002 within the virtual scene can be set by dragging the first area 1001 and the second area 1002. The function interface further includes a parameter setting area 1003 for setting parameters such as the size and color of the button in the first area 1001. After the parameters and position of the first area 1001 are set and saved, the application can use the above-mentioned function set in the first area.

[0048] In one embodiment, the application is a game application. A user can click in the lobby or in the game to enter a setting interface. In the setting interface, the user can open a setting function page for "overcoming obstacles with the left hand." The user can then enter the operation settings for "overcoming obstacles with the left hand" and adjust the specific size of the first region corresponding to "overcoming obstacles with the left hand" on the Y axis, and simultaneously adjust the specific position of the first region corresponding to "overcoming obstacles with the left hand" on the Y axis. After adjusting the size and position of the first region corresponding to "overcoming obstacles with the left hand," the user can click the touch control in the first region to save the settings, which are then enabled in the game. The user can then drag the position of the virtual controller in the game to overcome obstacles with one hand (left hand). During the overtaking period, the user can control the virtual controller to move out of the first region with their finger to cancel the overtaking operation.

[0049] In some embodiments, the step of controlling the movement direction of the virtual character based on the position of the virtual controller within the second area includes the steps of: controlling the virtual character to move leftward when the virtual controller is in a left position within the second area; controlling the virtual character to move rightward when the virtual controller is in a right position within the second area; controlling the virtual character to move forward when the virtual controller is in an upper position within the second area; and controlling the virtual character to move backward when the virtual controller is in a lower position within the second area.

[0050] In one embodiment, multiple directional arrow markers may be provided at each directional position within the second area, and the markers may be used to indicate control over the direction of movement of the virtual character. For example, an upward arrow marker may be provided above the second area, and when the virtual controller is dragged to the upward arrow marker provided at the upper position of the second area, the virtual character may be controlled to move forward. When the virtual controller is dragged to the left arrow marker provided at the left side of the second area, the virtual character may be controlled to move leftward. When the virtual controller is dragged to the right arrow marker provided at the right side of the second area, the virtual character may be controlled to move rightward. When the virtual controller is dragged to the lower position of the second area, the virtual character may be controlled to move backward.

[0051] In some embodiments, controlling the virtual character to perform a predetermined action associated with the target object comprises controlling the virtual character to perform an action corresponding to a type of the target object such that the virtual character can climb from one side of the target object to the other side of the target object, the action comprising a jumping action or a climbing action.

[0052] In one embodiment, the virtual character may be controlled to perform a predetermined action associated with the target object based on the type of the target object. Examples of target object types include, but are not limited to, boxes, fences, and building windows. For a small box, actions corresponding to the target object type include jumping and climbing over. For example, the virtual character may jump over the target object through jumping and climbing over actions. For a tall target object such as a fence or a building window, an action corresponding to the target object type may be climbing over the target object. For example, the action of climbing over the target object is not limited to climbing over the target object, and depending on the actual scene setting, it may be climbing over from one side of the target object to the other side of the target object. In this embodiment, the action performed by the virtual character may be controlled based on the type of the target object. For a small target object, the virtual character may be controlled to perform a simple climbing over action such as jumping, and for a large target object, the virtual character may be controlled to perform a more difficult climbing over action such as climbing. In this way, the virtual character can be controlled to perform corresponding climbing actions based on the type of the target object, ultimately achieving the effect that the virtual scene is more suitable for the real scene and improving the user experience.

[0053] As an embodiment, FIG. 11 shows an overall flow chart according to some examples of the present application, which includes the following steps:

[0054] In step S1101, the virtual scene detects the position of the virtual controller within the virtual scene. Specifically, the user can move the virtual controller to any position within the virtual scene by dragging the virtual controller, including but not limited to the first region, the second region, and any region other than the first region and the second region.

[0055] In step S1102, it is determined whether the virtual controller stays in the first region, and the length of time the virtual controller stays in the first region is determined. If the length of time the virtual controller stays in the first region exceeds a predetermined length of time (which can be set arbitrarily, such as 3 seconds), step S1103 is executed; if the length of time the virtual controller stays in the first region is less than the predetermined length of time, step S1109 is executed.

[0056] Step S1103: Detect whether there is a target object within a predetermined range around the virtual character, where the predetermined range can be determined according to the actual situation, for example, within a predetermined distance from the virtual character, the predetermined distance can be 3 meters, 5 meters, etc., and can be determined according to the actual situation.

[0057] In step S1104, if it is detected that there is a target object within a predetermined range around the virtual character, it is determined whether the target object can be jumped over. If the target object can be jumped over, step S1105 is executed; if not, step S1109 is executed.

[0058] In step S1105, the virtual character is controlled to perform an action of climbing over the target object, such as jumping or climbing.

[0059] Step S1106: Continue to detect whether the virtual controller stays in the first region, and if the virtual controller still stays in the first region, execute step S1107; if the virtual controller does not stay in the first region, execute step S1108.

[0060] Step S1107: The virtual character completes the climbing action, and the virtual character climbs from one side of the target object to the other side.

[0061] In step S1108, the action of climbing over the target object is canceled, and the virtual character returns to the position it was in before climbing over the target object.

[0062] Step S1109: Continue to maintain the current moving state of the virtual character, and again detect whether the virtual controller stays in the predetermined first region.

[0063] For the sake of simplicity, the above-described method embodiments are all expressed as a combination of a series of operations. However, those skilled in the art should understand that the present application is not limited by the series of operations, since certain steps can be performed in other orders or simultaneously. Next, those skilled in the art should also understand that the embodiments described herein belong to the embodiments, and that the associated operations and modules are not necessarily required for the present application.

[0064] According to another aspect of the present application, there is further provided a virtual character control device for implementing the above-described virtual character control method. As shown in Fig. 12, the device includes: a display module 1202 for displaying a virtual character and a virtual controller in a virtual scene, the virtual controller being used to control the virtual character; a first control module 1204 for controlling the virtual character to move within the virtual scene in response to an operation performed on the virtual controller; and a second control module 1206 for controlling the virtual character to perform a predetermined action associated with a target object in response to the virtual controller being dragged into a first region within the virtual scene and when a target object is located within a certain range around the virtual character, during the process of moving the virtual character.

[0065] In some embodiments, the above device is further used to control the direction of movement of the virtual character based on the position of the virtual controller within a second region in response to an operation in which the virtual controller is dragged into the second region within the virtual scene.

[0066] In some embodiments, the device further comprises: displaying the first region when the virtual controller is dragged out of the second region; The virtual controller is used to obtain an operation of dragging from the second area to the first area.

[0067] In some embodiments, the apparatus is further adapted to cancel displaying the first region in response to the virtual controller being dragged out of the first region after the virtual controller has been dragged into the first region within the virtual scene.

[0068] In some embodiments, the above device is further used to control the virtual character to maintain its current movement state when the virtual controller is dragged into the first region during the movement of the virtual character and the target object is not within a certain range around the virtual character.

[0069] In some embodiments, the above device is further used to, in the process of controlling the virtual character to perform a predetermined action associated with the target object, if the virtual controller moves outside the first area, cancel the control of the virtual character to perform the predetermined action associated with the target object, and control the virtual character to return to a position where it will perform the predetermined action.

[0070] In some embodiments, the device further comprises: acquiring a configuration instruction at a configuration interface; In response to the setting command, the device is used to set the size of the first area according to the size indicated in the setting command, and to set the first area at the location indicated in the setting command.

[0071] In some embodiments, the above device is further used to control the virtual character to move leftward when the virtual controller is in a left position within the second area, to control the virtual character to move rightward when the virtual controller is in a right position within the second area, to control the virtual character to move forward when the virtual controller is in an upper position within the second area, and to control the virtual character to move backward when the virtual controller is in a lower position within the second area.

[0072] In some embodiments, the device is further used to control the virtual character to perform an action corresponding to a type of the target object, such that the virtual character can climb from one side of the target object to the other side of the target object, wherein the action includes a jumping action or a climbing action.

[0073] According to another aspect of the present application, there is further provided an electronic device for implementing the above-described virtual character control method, which may be the user device or the server shown in Fig. 1. In this embodiment, the electronic device is described as a server by way of example. As shown in Fig. 13, the electronic device includes a storage device 1302 and a processor 1304. The storage device 1302 stores a computer program, and the processor 1304 is configured to execute steps in any of the above-described method embodiments in accordance with the computer program.

[0074] In some embodiments, the electronic device may be located on at least one network device of a plurality of network devices of a computer network.

[0075] In some embodiments, the processor is configured to: displaying a virtual character and a virtual controller in a virtual scene, the virtual controller being used to control the virtual character; controlling the virtual character to move within the virtual scene in response to an operation performed on the virtual controller; In the process of moving the virtual character, the virtual controller is dragged to a first region in the virtual scene, and in response to a target object being within a certain range around the virtual character, the virtual character is controlled to perform a predetermined action associated with the target object.

[0076] In some embodiments, those skilled in the art will appreciate that the structure shown in FIG. 13 is merely exemplary, and the electronic device may be a user device such as a smartphone (e.g., an Android mobile phone, an iOS mobile phone, etc.), a tablet, a palmtop computer, a mobile internet device (MID), a PAD, etc. FIG. 13 does not limit the structure of the electronic device. For example, the electronic device may further include more or fewer assemblies (e.g., a network interface, etc.) than those shown in FIG. 13, or may have a different configuration than that shown in FIG. 13.

[0077] The storage device 1302 may be used to store software programs and modules, such as program instructions / modules corresponding to the virtual character control method and device of the present embodiment. The processor 1304 executes the software programs and modules stored in the storage device 1302 to perform various functional applications and data processing, i.e., to realize the virtual character control method. The storage device 1302 may include a high-speed random storage device and may also include non-volatile storage devices such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state storage devices. In some examples, the storage device 1302 may further include storage devices remote from the processor 1304, and these remote storage devices may be connected to the terminal via a network. Examples of such networks include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof. The storage device 1302 may specifically store information such as game scenes, virtual characters, and obstacles in the target game application, but is not limited to such information. 13, the storage device 1302 may include, but is not limited to, a display module 1202, a first control module 1204, and a second control module 1206 in the control device of the virtual character. It may also include, but is not limited to, other module units in the control device of the virtual character, which will not be described in detail in this example.

[0078] In some embodiments, the transmission device 1306 transmits and receives data over a network. Specific examples of the network may include a wired network and a wireless network. In one example, the transmission device 1306 includes a network interface controller (NIC), which can communicate with the Internet or a local area network by connecting to other network devices and routers via a network cable. In one example, the transmission device 1306 is a radio frequency (RF) module, which is used to communicate with the Internet wirelessly.

[0079] The electronic device further includes a display device 1308 for displaying the game scenes, virtual characters, obstacles, etc., and a connection bus 1310 for connecting the modular components of the electronic device.

[0080] In another embodiment, the terminal device or server may be a node in a distributed system, where the distributed system may be a blockchain system formed by connecting a plurality of nodes in the form of network communication, where the nodes may form a peer-to-peer (P2P) network, and any form of computing device, for example, a server, a terminal, or other electronic device, may become a node in the blockchain system by joining the peer-to-peer network.

[0081] According to one aspect of the present application, there is provided a computer program product or computer program, the computer program product or computer program comprising computer instructions stored in a computer-readable storage medium, the computer instructions being read by a processor of a computing device from the computer-readable storage medium, and the processor executing the computer instructions to perform the method provided by the various implementations above on the computing device, wherein the computer program, during execution, is configured to perform the steps of any of the method embodiments above.

[0082] In some embodiments, the computer-readable storage medium may be configured to store a computer program for performing the steps of the methods described in the above embodiments.

[0083] In some embodiments, those skilled in the art can understand that all or part of the steps in the various methods of the above embodiments are completed by instructing hardware associated with a terminal device through a program, and the program may be stored in a computer-readable storage medium, which may include a flash disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk, or an optical disk, etc.

[0084] The sequence numbers of the examples in this application above are for illustrative purposes only and do not represent advantages or disadvantages of the examples.

[0085] When the integrated unit in the above embodiments is realized in the form of a software functional unit and sold or used as an independent product, it can be stored in the above computer-readable storage medium. Based on this understanding, the essence of the technical solution of the present application, or a part that contributes to the prior art, or all or a part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium and includes a plurality of instructions for causing one or more computer devices (which may be a personal computer, a server, a network device, etc.) to execute all or a part of the steps of the methods described in each embodiment of the present application.

[0086] In the above embodiments of the present application, the description of each embodiment has its own emphasis, and for parts that are not explained in detail in one embodiment, reference can be made to the relevant descriptions of other embodiments.

[0087] In some embodiments provided in the present application, it can be understood that the disclosed client terminal can be realized in other ways. Here, the above-mentioned device embodiments are merely examples. For example, the division of the units is merely a division based on logical functions. In actual implementation, other division methods may exist. For example, multiple units or assemblies may be combined or integrated into another system, or some features may be ignored or not implemented. In other aspects, the shown or discussed mutual couplings or direct couplings or communication connections may be via multiple interfaces, and the indirect couplings or communication connections of units or modules may be electrical or other types.

[0088] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, i.e., they may be located in one place or distributed across multiple network units. Depending on actual needs, some or all of the units can be selected to achieve the objectives of the solutions of this embodiment.

[0089] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, each unit may exist physically separate, or two or more units may be integrated into one unit. The above-mentioned integrated units can be implemented in the form of hardware or a software functional unit.

[0090] It should be pointed out that the above contents are only some embodiments of the present application, and those skilled in the art can make some improvements and modifications without departing from the principles of the present application, and these improvements and modifications should also be considered as within the protection scope of the present application.

Claims

1. A method for controlling a virtual character executed by an electronic device, A step of displaying a virtual character and a virtual controller in a virtual scene, wherein the virtual controller is used to control the virtual character, The steps include controlling the virtual character to move within the virtual scene in response to an operation performed on the virtual controller, A method for controlling a virtual character, comprising the steps of: during the movement process of the virtual character, the virtual controller is dragged to a first region in the virtual scene, and in response to the presence of a target object within a certain range around the virtual character, the virtual character is controlled to perform a predetermined action associated with the target object, wherein the first region is located outside the surrounding region that encloses the position of the virtual controller in the virtual scene before being dragged, the target object is an obstacle in the virtual scene, and the predetermined action associated with the target object is an action to overcome the obstacle.

2. The step of controlling the virtual character to move within the virtual scene in response to an operation performed on the virtual controller is: The method according to claim 1, comprising the step of controlling the direction of movement of a virtual character based on the position of the virtual controller in the second region in response to an operation in which the virtual controller is dragged to a second region in the virtual scene, wherein the second region is located in the surrounding region.

3. When the virtual controller is dragged outside the second region, the steps include displaying the first region, The method according to claim 2, further comprising the step of acquiring an operation in which the virtual controller is dragged from the second region to the first region.

4. After the virtual controller is dragged to the first region in the virtual scene, the method The method according to claim 1, further comprising the step of canceling the display of the first region in response to the virtual controller being dragged outside the first region.

5. The method according to claim 1, further comprising the step of controlling the virtual character to maintain its current movement state if the virtual controller is dragged to the first region and there is no target object within a certain range around the virtual character.

6. The method according to claim 1, further comprising the step of controlling the virtual character to perform a predetermined action associated with the target object, wherein if the virtual controller moves outside the first region, the control of the virtual character to perform the predetermined action associated with the target object is canceled, and the virtual character is controlled to return to the position where the predetermined action is performed.

7. The step of obtaining a setting command at the setting interface, The method according to claim 1, further comprising the steps of: setting the size of the first region in accordance with the size indicated by the setting command in response to the setting command; and setting the first region at the position indicated by the setting command.

8. The step of controlling the direction of movement of the virtual character based on the position of the virtual controller in the second region is: If the virtual controller is located in the left position within the second region, the steps include controlling the virtual character to move to the left, If the virtual controller is located in the rightward position within the second region, the steps include controlling the virtual character to move to the right, If the virtual controller is located in an upper position within the second region, the steps include controlling the virtual character to move forward, The method according to claim 2, further comprising the step of controlling the virtual character to move backward if the virtual controller is located in a lower position within the second region.

9. The step of controlling the virtual character to perform a predetermined action associated with the target object is: The method according to claim 1, comprising the step of controlling the virtual character to perform an action corresponding to the type of the target object, such that the virtual character can climb over from one side of the target object to the other side of the target object, the action including a jump or a climb.

10. A control device for a virtual character, A display module for displaying virtual characters and virtual controllers in a virtual scene, wherein the virtual controller includes a display module used to control the virtual characters, A first control module for controlling the virtual character to move within the virtual scene in response to an operation performed on the virtual controller, A control device for a virtual character, comprising: a second control module for controlling the virtual character to perform a predetermined action associated with the target object when the virtual controller is dragged to a first region in the virtual scene and a target object is within a certain range around the virtual character, wherein the first region is located outside the surrounding region that surrounds the position of the virtual controller in the virtual scene before being dragged, the target object is an obstacle in the virtual scene, and the predetermined action associated with the target object is an action to overcome the obstacle.

11. An electronic device comprising a storage device and a processor, wherein a computer program is stored in the storage device and the processor is configured to carry out the method according to any one of claims 1 to 9 by the computer program.

12. A computer program that causes a computer to perform the method described in any one of claims 1 to 9.