Virtual object control method and device, equipment, storage medium and program product
By providing target controls and micro-operation control areas in the battle interface of the virtual scene, users can control the movement of virtual objects and realize peek actions by long pressing and pressing, solving the problem of low peek operation efficiency in the prior art and improving the interaction effect between users and virtual scenes.
Patent Information
- Application Number
- CN202311611640.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-11-28
- Publication Date
- 2025-05-30
AI Technical Summary
In the prior art, users need to control the movement of virtual objects multiple times to complete peek operations, resulting in low execution efficiency and low task completion, which affects the interaction effect between users and virtual scenes.
By providing target controls and micro-operation control areas in the battle interface of the virtual scene, users can control the movement of virtual objects by long pressing and pressing. When the duration of the long press operation reaches the preset duration and is cancelled, the virtual object automatically returns to the initial position to realize the peek action.
It simplifies the control process of virtual objects, improves the execution efficiency of peek operations, expands the interaction between users and virtual scenes, and improves the interaction effect.
Smart Images

Figure CN120053961A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the technical field of virtual worlds, and particularly to a method, apparatus, device, storage medium, and program product for controlling virtual objects. Background Art
[0002] In an application including a virtual scene, a peek operation is usually set, and a virtual object needs to perform a target task through the peek operation.
[0003] In the related art, the user can control the virtual object to move out first through a button, and then control the virtual object to move back through a button, so as to complete the peek operation and thus achieve the target task.
[0004] However, in the above solution, the user needs to control the movement of the user multiple times to complete the peek operation, which will reduce the execution efficiency of the peek action, and ultimately result in the failure to complete the target task or the low degree of task completion, thus affecting the interaction effect between the user and the virtual scene. Summary of the Invention
[0005] This application provides a method, apparatus, device, storage medium, and program product for controlling virtual objects. The technical solutions are as follows:
[0006] According to one aspect of this application, a method for controlling a virtual object is provided. The method includes:
[0007] Display a battle interface of the virtual scene. The battle interface includes a target control. The virtual scene includes a first virtual object. The target control is a control for controlling the movement of the first virtual object, and the target control includes one or more micro-operation control areas;
[0008] In response to receiving a long press operation on the target control, control the first virtual object to move in a first direction. The first direction is a direction associated with the operation position of the long press operation;
[0009] In response to the long press operation being cancelled before the continuous duration reaches a first preset duration, and the operation position of the long press operation is within a first area, control the first virtual object to return to the initial position. The first area is one of the one or more micro-operation control areas. The initial position is the position where the first virtual object is located at the start time of the long press operation.
[0010] According to another aspect of this application, a device for controlling a virtual object is provided. The device includes:
[0011] An interface display module for displaying a battle interface of a virtual scene, where the battle interface includes a target control; the virtual scene includes a first virtual object; the target control is a control for controlling the movement of the first virtual object, and the target control includes one or more micro-operation control areas;
[0012] A movement control module for controlling the first virtual object to move in a first direction in response to receiving a long-press operation on the target control; the first direction is a direction associated with the operation position of the long-press operation;
[0013] A return control module for controlling the first virtual object to return to its initial position in response to the long-press operation being cancelled before the continuous duration reaches a first preset duration and the operation position of the long-press operation being within a first area; the first area is one of the one or more micro-operation control areas; the initial position is the position where the first virtual object is located at the start moment of the long-press operation.
[0014] In some embodiments, the first direction is also associated with the control type of the target control.
[0015] In some embodiments, the movement control module is used to,
[0016] In response to the target control being a follow joystick control and the operation position of the long-press operation being within the first area, obtain the direction pre-corresponding to the first area as the first direction;
[0017] Based on the first direction, control the first virtual object to move.
[0018] In some embodiments, the movement control module is used to,
[0019] In response to the target control being a follow joystick control and the operation position of the long-press operation being within the first area, obtain the direction pre-corresponding to the first area as the first direction;
[0020] Based on the first direction, control the first virtual object to move.
[0021] In some embodiments, the movement control module is used to,
[0022] In response to the target control being a fixed joystick control, obtain the direction from the center of the target control to the operation position of the long-press operation as the first direction;
[0023] Based on the first direction, control the first virtual object to move.
[0024] In some embodiments, the movement control module is configured to
[0025] The virtual scene further includes a second virtual object;
[0026] Controlling the first virtual object to move in a first direction in response to receiving a long - press operation on the target control includes:
[0027] In response to the first virtual object being in a state of locking the second virtual object and receiving a long - press operation on the target control, controlling the first virtual object to move in the first direction with an attitude facing the second virtual object.
[0028] In some embodiments, the return control module is configured to
[0029] In response to the first virtual object being in a state of locking the second virtual object, the long - press operation being cancelled before the continuous duration reaches a first preset duration, and the operation position of the long - press operation being within the first area, controlling the first virtual object to return to the initial position.
[0030] In some embodiments, the return control module is configured to
[0031] The response to the long - press operation being cancelled before the continuous duration reaches a first preset duration and the operation position of the long - press operation being within the first area includes:
[0032] In the case that there is a virtual obstacle within a specified range around the first virtual object, in response to the long - press operation being cancelled before the continuous duration reaches a first preset duration and the operation position of the long - press operation being within the first area, controlling the first virtual object to return to the initial position.
[0033] In some embodiments, the return control module is configured to
[0034] In the case that there is a virtual obstacle within a specified conical range in front of the first virtual object, in response to the long - press operation being cancelled before the continuous duration reaches a first preset duration and the operation position of the long - press operation being within the first area, controlling the first virtual object to return to the initial position.
[0035] In some embodiments, the device further includes:
[0036] An information prompt module, configured to display a prompt message on the battle interface in response to the continuous duration of the long - press operation not reaching the first preset duration, the long - press operation not being cancelled, and the operation position of the long - press operation being within the first area;
[0037] Wherein, the prompt information is used to prompt to release the long - press operation to trigger the first virtual object to return to the initial position.
[0038] In some embodiments, the displaying the prompt information in the battle interface includes at least one of the following:
[0039] Highlighting the first area;
[0040] Highlighting the first virtual object;
[0041] And, displaying a prompt icon corresponding to the first virtual object, where the prompt icon is used to prompt to release the long - press operation to trigger the first virtual object to return to the initial position.
[0042] According to another aspect of the present application, there is provided a computer device, which includes a processor and a memory. At least one instruction, at least one program, a code set or an instruction set is stored in the memory, and the at least one instruction, the at least one program, the code set or the instruction set is loaded and executed by the processor to implement the control method of the virtual object as described in the above aspect.
[0043] According to another aspect of the present application, there is provided a computer - readable storage medium, in which at least one instruction, at least one program, a code set or an instruction set is stored, and the at least one instruction, the at least one program, the code set or the instruction set is loaded and executed by a processor to implement the control method of the virtual object as described in the above aspect.
[0044] According to another aspect of the present application, there is provided a computer program product, which includes computer instructions. The computer instructions are stored in a computer - readable storage medium, and the processor reads and executes the computer instructions from the computer - readable storage medium to implement the control method of the virtual object as described in the above aspect.
[0045] The beneficial effects brought by the technical solution provided by the present application at least include:
[0046] In the battle interface for displaying a virtual scene, a target control and a first virtual object are displayed. The user controls the first virtual object to move by long-pressing in the micro-operation control area of the target control. Before the operation position of the long-press operation is still within the micro-operation control area and the long-press duration reaches the first preset duration, the long-press operation is cancelled, and the first virtual object is controlled to return to the position at the start moment of the long-press operation, the position where the first virtual object is located. In the above solution, the user can trigger the virtual object to automatically return to the initial position by performing a long-press operation on the control for movement control, that is, through a single touch operation on the control for movement control, the virtual object can be controlled to implement a virtual peek action, improving the execution efficiency of virtual actions, thereby expanding the way for the user to control the virtual object to interact with the virtual scene and enhancing the interaction effect between the user and the virtual scene. BRIEF DESCRIPTION OF THE DRAWINGS
[0047] To more clearly illustrate the technical solutions in the embodiments of the present application, the following will briefly introduce the drawings required for the description of the embodiments. Obviously, the drawings in the following description are only some embodiments of the present application. For those of ordinary skill in the art, without creative efforts, other drawings can be obtained based on these drawings.
[0048] Figure 1 is a block diagram of a computer system provided by an exemplary embodiment of the present application;
[0049] Figure 2 is an interface diagram of a virtual scene provided by an exemplary embodiment of the present application;
[0050] Figure 3 is a flowchart of a method for controlling a virtual object provided by an exemplary embodiment of the present application;
[0051] Figure 4 is an application schematic diagram of a follow rocker control involved in an exemplary embodiment of the present application;
[0052] Figure 5 is an application schematic diagram of a fixed rocker control involved in an exemplary embodiment of the present application;
[0053] Figure 6 is a flowchart of a method for controlling a virtual object provided by an exemplary embodiment of the present application;
[0054] Figure 7 is a schematic diagram of a first virtual object being locked involved in an exemplary embodiment of the present application;
[0055] Figure 8 is a flowchart of a method for controlling a virtual object provided by an exemplary embodiment of the present application;
[0056] Figure 9 It is a schematic diagram involving virtual objects in an exemplary embodiment of the present application;
[0057] Figure 10 It is an interface diagram of a virtual scene involved in an exemplary embodiment of the present application;
[0058] Figure 11 It is a flowchart of a follow - up joystick involved in an exemplary embodiment of the present application;
[0059] Figure 12 It is a schematic diagram of the peek operation of a follow - up joystick involved in an exemplary embodiment of the present application;
[0060] Figure 13 It is a schematic diagram of the corresponding relationship between actual finger operations and joystick performance involved in an exemplary embodiment of the present application;
[0061] Figure 14 It is a flowchart of a fixed joystick involved in an exemplary embodiment of the present application;
[0062] Figure 15 It is a schematic diagram of a joystick and a peek hot zone involved in an exemplary embodiment of the present application;
[0063] Figure 16 It is a schematic diagram of the peek operation of a fixed joystick involved in an exemplary embodiment of the present application;
[0064] Figure 17 It is a block diagram of a control device for virtual objects provided in an exemplary embodiment of the present application;
[0065] Figure 18 It is a block diagram of a control device for virtual objects provided in an exemplary embodiment of the present application;
[0066] Figure 19 It is a block diagram of a computer device provided in an exemplary embodiment of the present application.
[0067] The accompanying drawings here are incorporated into the specification and form a part of the specification, showing embodiments consistent with the present application, and are used together with the specification to explain the principles of the present application. Detailed Embodiments
[0068] To make the objectives, technical solutions, and advantages of the present application clearer, the following will further describe the embodiments of the present application in detail with reference to the accompanying drawings.
[0069] Exemplary embodiments will be described in detail herein, and examples thereof are shown in the accompanying drawings. When the following description refers to the accompanying drawings, unless otherwise indicated, the same numbers in different drawings represent the same or similar elements. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the present application. On the contrary, they are merely examples of apparatuses and methods consistent with some aspects of the present application as detailed in the appended claims.
[0070] The terms used in this disclosure are for the purpose of describing particular embodiments only and are not intended to limit the disclosure. The singular forms "a", "the", and "said" used in this disclosure and the appended claims are also intended to include the plural forms unless the context clearly dictates otherwise. It should also be understood that the term "and / or" as used herein refers to and encompasses any and all possible combinations of one or more of the associated listed items.
[0071] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data for analysis, stored data, displayed data, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties, and the collection, use, and processing of relevant data need to comply with the relevant laws, regulations, and standards of relevant countries and regions. For example, the object behaviors such as attack operations involved in this application are obtained under full authorization.
[0072] It should be understood that although the terms first, second, etc. may be used in this disclosure to describe various information, such information should not be limited to these terms. These terms are only used to distinguish the same type of information from each other. For example, without departing from the scope of this disclosure, the first parameter may also be referred to as the second parameter, and similarly, the second parameter may also be referred to as the first parameter. Depending on the context, the word "if" as used herein may be interpreted as "when" or "upon" or "in response to determining".
[0073] For ease of understanding, several terms related to this application are explained below.
[0074] 1) Virtual scene
[0075] A virtual scene is a virtual scene displayed (or provided) when an application runs on a terminal. The virtual scene can be a simulation environment scene of the real world, a semi-simulated and semi-fictional three-dimensional environment scene, or a purely fictional three-dimensional environment scene. The virtual scene can be any one of a two-dimensional virtual scene, a 2.5D virtual scene, and a three-dimensional virtual scene. The following embodiments take the virtual scene as a three-dimensional virtual scene as an example for illustration, but are not limited thereto. Optionally, the virtual scene can also be used for virtual scene battles between at least two virtual characters. Optionally, the virtual scene can also be used for battles between at least two virtual characters using virtual props. Optionally, the virtual scene can also be used for battles between at least two virtual characters using virtual props within a target area range, and the target area range will continuously decrease as time passes in the virtual scene.
[0076] A virtual scene is usually generated by an application in a computer device such as a terminal and is displayed based on the hardware in the terminal (such as a screen). The terminal can be a mobile terminal such as a smart phone, a tablet computer, or an e-book reader; or, the terminal can also be a personal computer device such as a laptop computer or a stationary computer.
[0077] 2) Virtual object
[0078] A virtual object refers to an active object in a virtual scene. The active object can be at least one of a virtual person, a virtual character, a virtual animal, and a virtual vehicle. Optionally, when the virtual scene is a three-dimensional virtual scene, the virtual object is a three-dimensional solid model created based on animation skeleton technology. Each virtual object has its own shape, volume, and orientation in the three-dimensional virtual scene and occupies a part of the space in the three-dimensional virtual scene.
[0079] 3) First-person shooting game
[0080] A first-person shooter game refers to a shooting game in which the user can view the game from a first-person perspective. The picture of the virtual environment in the game is the picture of observing the virtual environment from the perspective of the first virtual object. In the game, at least two virtual objects engage in a single-round battle mode in the virtual environment. For example, the virtual objects aim to survive in the virtual environment by avoiding the damage initiated by other virtual objects and the dangers existing in the virtual environment (such as a gas circle, a swamp, etc.). When the health value of a virtual object in the virtual environment reaches zero, the life of the virtual object in the virtual environment ends, and the last virtual object surviving in the virtual environment is the winning party. Optionally, the battle starts at the moment when the first client joins the battle and ends at the moment when the last client exits the battle. Each client can control one or more virtual objects in the virtual environment. Optionally, the competitive mode of the battle can include a single-player battle mode, a two-player team battle mode, or a multi-player group battle mode. The embodiments of the present application do not limit the battle mode.
[0081] 4) peek
[0082] Create an opportunity to shoot by quickly moving left and right at a corner or beside an obstacle. Because there will be a very short time to aim at distant enemies when quickly moving left and right horizontally, and because the speed of moving left and right horizontally is fast enough and the exposed part of the body is not large, it is not easy to be hit by the enemy.
[0083] 5) Fixed joystick
[0084] The joystick is fixed at the default position and does not change with the position of the hand. The character will move in the direction where the hand is located relative to the joystick.
[0085] 6) Follow joystick
[0086] Taking the position where the finger presses down as the center of the joystick, the character will move in the direction where the finger slides, but the UI (User Interface) of the joystick remains at the default position, only showing the direction of the character's movement.
[0087] Figure 1 The block diagram of the computer system provided by an exemplary embodiment of the present application is shown. The computer system 100 includes: a first terminal 110, a server 120, and a second terminal 130.
[0088] The first terminal 110 installs and runs a client 111 that supports virtual scenarios. The client 111 can be a multiplayer online battle program. When the first terminal runs the client 111, the user interface of the client 111 is displayed on the screen of the first terminal 110. The client 111 can be any one of a simulation program, a battle royale shooting game, a Virtual Reality (VR) application program, an Augmented Reality (AR) program, a three-dimensional map program, a virtual reality game, an augmented reality game, a First-Person Shooting Game (FPS), a Third-Personal Shooting Game (TPS), a Multiplayer Online Battle Arena Games (MOBA), and a Simulation Game (SLG). In this embodiment, the client 111 is taken as an FPS game for example. The first terminal 110 is a terminal used by the first user 112. The first user 112 uses the first terminal 110 to control the first virtual object located in the virtual scenario to perform activities. The first virtual object can be referred to as the virtual object of the first user 112. The activities of the first virtual object include, but are not limited to, at least one of moving, jumping, teleporting, releasing skills, using items, adjusting body postures, crawling, walking, running, cycling, flying, jumping, driving, picking up, shooting, attacking, and throwing. Schematically, the first virtual object is a first virtual object, such as a simulated character or an anime character.
[0089] The second terminal 130 installs and runs a client 131 that supports virtual scenarios. The client 131 can be a multiplayer online battle program. When the second terminal 130 runs the client 131, the user interface of the client 131 is displayed on the screen of the second terminal 130. The client can be any one of a simulation program, a battle royale shooting game, a VR application program, an AR program, a three-dimensional map program, a virtual reality game, an augmented reality game, an FPS, a TPS, a MOBA, and an SLG. In this embodiment, the client is taken as a MOBA game for example. The second terminal 130 is a terminal used by the second user 132. The second user 132 uses the second terminal 130 to control the second virtual object located in the virtual scenario to perform activities. The second virtual object can be referred to as the virtual object of the second user 132. Schematically, the second virtual object is a second virtual object, such as a simulated character or an anime character.
[0090] Optionally, the first virtual object and the second virtual object are in the same virtual scene. Optionally, the first virtual object and the second virtual object may belong to the same camp, the same team, the same organization, have a friendship relationship, or have temporary communication permissions. Optionally, the first virtual object and the second virtual object may belong to different camps, different teams, different organizations, or have a hostile relationship.
[0091] Optionally, the clients installed on the first terminal 110 and the second terminal 130 are the same, or the clients installed on the two terminals are of the same type on different operating system platforms (Android or iOS). The first terminal 110 can generally refer to one of multiple terminals, and the second terminal 130 can generally refer to another one of multiple terminals. This embodiment only takes the first terminal 110 and the second terminal 130 as examples for illustration. The device types of the first terminal 110 and the second terminal 130 are the same or different, and the device types include at least one of a smart phone, a tablet computer, an e-book reader, an MP3 player, an MP4 player, a laptop computer, and a desktop computer.
[0092] Figure 1 Only two terminals are shown in the figure, but in different embodiments, there are multiple other terminals 140 that can access the server 120. Optionally, there is also one or more terminals 140 that are the terminals corresponding to the developer. A development and editing platform for the client that supports the virtual scene is installed on the terminal 140. The developer can edit and update the client on the terminal 140, and transmit the updated client installation package to the server 120 through a wired or wireless network. The first terminal 110 and the second terminal 130 can download the client installation package from the server 120 to update the client.
[0093] The first terminal 110, the second terminal 130, and the other terminals 140 are connected to the server 120 through a wireless network or a wired network.
[0094] The server 120 includes at least one of a server, multiple servers, a cloud computing platform, and a virtualization center. The server 120 is used to provide background services for the client that supports the three-dimensional virtual scene. Optionally, the server 120 undertakes the main computing work, and the terminal undertakes the secondary computing work; or, the server 120 undertakes the secondary computing work, and the terminal undertakes the main computing work; or, a distributed computing architecture is adopted between the server 120 and the terminal for collaborative computing.
[0095] In a schematic example, the server 120 includes a processor 122, a user account database 123, a battle service module 124, and a user-oriented input / output interface (I / O interface) 125. Among them, the processor 122 is used to load the instructions stored in the server 121 and process the data in the user account database 123 and the battle service module 124; the user account database 123 is used to store the data of the user accounts used by the first terminal 110, the second terminal 130, and other terminals 140, such as the avatars of the user accounts, the nicknames of the user accounts, the combat power indexes of the user accounts, and the service areas where the user accounts are located; the battle service module 124 is used to provide multiple battle rooms for users to conduct battles, such as 1V1 battles, 3V3 battles, 5V5 battles, etc.; the user-oriented I / O interface 125 is used to establish communication with the first terminal 110 and / or the second terminal 130 through a wireless network or a wired network to exchange data.
[0096] The methods provided in the subsequent embodiments of this application can be, but are not limited to, applied to at least one of the following scenarios: virtual reality applications, 3D map programs, simulation programs, first-person shooting games (FPS), third-person shooting games (TPS), multiplayer online battle arena games (MOBA), multiplayer gunfight survival games, etc. The following embodiments are illustrated by examples of applications in games.
[0097] Figure 2 The interface diagram of the virtual scene provided by an exemplary embodiment of this application is shown; exemplarily, the battle interface 210 is the first-person perspective interface of the first virtual object controlled by the user. In the battle interface 210, a target control 212 and a sight positioning 213 are included. The target control 212 is used to control the movement of the first virtual object, and the sight positioning 213 is used to aim at the target object. Based on Figure 2 the interface shown, the solutions shown in the subsequent embodiments of this application can assist users in performing peek operations more conveniently and quickly.
[0098] Figure 3 The flowchart of the control method of the virtual object provided by an exemplary embodiment of this application is shown. This method can be executed by a computer device. The computer device can be Figure 1 the first terminal 110 and the second terminal 130 in the system shown, or the computer device can also be Figure 1 the server 120 in the system shown, or the computer device can also include the above Figure 1The first terminal 110, the server 120, and the second terminal 130 in the system shown; the method includes:
[0099] Step 310: Display a battle interface of the virtual scene, where the battle interface includes a target control; the virtual scene includes a first virtual object; the target control is a control for controlling the movement of the first virtual object, and the target control includes one or more micro-operation control areas.
[0100] Exemplarily, the first virtual object is a virtual object controlled by the user account logged in to the terminal, and the virtual scene is used to provide virtual tactical competitions between different virtual objects.
[0101] Exemplarily, the virtual scene may further include a second virtual object and virtual obstacles. The second virtual object may be a teammate / camp object of the first virtual object. That is to say, the first virtual object and the second virtual object may be in a cooperative relationship.
[0102] Exemplarily, the first virtual object and the second virtual object may belong to different teams / camps; the team / camp to which the second virtual object belongs and the team / camp to which the first virtual object belongs may be in an adversarial relationship, and this application does not impose any restrictions.
[0103] Exemplarily, the displayed battle interface of the virtual scene may be the perspective view of the first virtual object, that is, the scene view obtained by observing the virtual scene from the perspective of the first virtual object, which may be the first-person perspective or the third-person perspective.
[0104] Exemplarily, the first virtual object and the second virtual object belong to different virtual camps; the virtual camp to which the second virtual object belongs and the virtual camp to which the first virtual object belongs may be in a hostile relationship or a mutually neutral relationship, and this application does not impose any restrictions.
[0105] Wherein, the user can control the first virtual object to perform virtual actions.
[0106] Exemplarily, the implementation manners for the user to control the first virtual object to perform virtual actions include but are not limited to at least one of the following: clicking, swiping, rotating; for example: clicking on the touch screen or button, swiping on the touch screen or handle, rotating the terminal or handle.
[0107] The target control is a control for the user to control the movement of the first virtual object, and the target control includes one or more micro-operation control areas, and these micro-operation control areas may be set with corresponding direction information.
[0108] Step 320: In response to receiving a long-press operation on the target control, control the first virtual object to move in a first direction; the first direction is a direction associated with the operation position of the long-press operation.
[0109] In an embodiment of the present application, after a computer device receives a touch operation, it can start to detect whether the operation position of the touch operation moves. If the detection result shows that the distance moved by the operation position of the touch operation within a period of time is less than a certain threshold, it can be considered that the touch operation is a long - press operation.
[0110] Among them, when the computer device detects a long - press operation in the target control, it can control the first virtual object to move in the direction associated with the operation position of the long - press operation.
[0111] Step 330: In response to the long - press operation being cancelled before the continuous duration reaches the first preset duration and the operation position of the long - press operation is within the first area, control the first virtual object to return to the initial position; the first area is one of one or more micro - operation control areas; the initial position is the position where the first virtual object is located at the start time of the long - press operation.
[0112] Among them, in the case where the operation position of the above - mentioned long - press operation is within one of one or more micro - operation control areas, when the computer device detects a long - press operation in the target control and controls the first virtual object to move in the direction associated with the operation position of the long - press operation, it can also time the long - press operation. When the long - press operation is cancelled, it can compare the continuous duration of the long - press operation with the first preset duration. If the continuous duration of the long - press operation is less than the first preset duration, it can be considered that the user triggers a peek operation, and control the first virtual object to return to the initial position.
[0113] In summary, in an embodiment of the present application, in a battle interface for displaying a virtual scene, a target control and a first virtual object are displayed. The user controls the first virtual object to move by long - pressing on a micro - operation control area in the target control. When the operation position of the user's long - press operation is still within the micro - operation control area and the long - press duration reaches the first preset duration before the long - press operation is cancelled, the computer device controls the first virtual object to return to the position where the first virtual object is located at the start time of the long - press operation. In the above solution, the user can trigger the virtual object to return to the initial position by long - pressing on the control for movement control and through the duration of the long - press operation, that is, through a single touch operation on the control for movement control, the user can control the virtual object to implement a virtual peek action. This solution does not require the user to trigger peek through multiple operations, nor does it require setting additional controls. The operation method is simple and convenient, thereby improving the execution efficiency of virtual actions, further expanding the way for the user to control the virtual object to interact with the virtual scene, and improving the interaction effect between the user and the virtual scene.
[0114] Based on the above Figure 3In the illustrated embodiment, in a possible implementation, the first direction is also associated with the control type of the target control.
[0115] The types of the above-mentioned target controls include but are not limited to follow joysticks and fixed joysticks.
[0116] The type of the above-mentioned target control can be set by the developer during development or by the user before entering the battle scene.
[0117] In the embodiment of the present application, the first direction is associated with the control type of the target control, which can enable the above-mentioned peek trigger method to adapt to different types of target controls; at the same time, it also expands the way for the user to control the virtual object to interact with the virtual scene, improving the interaction effect between the user and the virtual scene.
[0118] In a possible implementation, in response to the target control being a follow joystick control and the operation position of the long press operation being within the first area, the direction pre-set corresponding to the first area is obtained as the first direction;
[0119] Based on the first direction, control the first virtual object to move.
[0120] Exemplarily, when the target control is a follow joystick control, each micro-operation control area included in the target control corresponds to a direction, which can be pre-set by the developer during development design or set before the user enters the battle scene; optionally, if the user does not make a setting, the direction can be the pre-set direction of the developer.
[0121] When the user long presses a certain micro-operation control area, the computer device can obtain the direction information corresponding to the area, that is, the above-mentioned first direction. After the computer device obtains the first direction information, it controls the virtual object to move along the first direction.
[0122] Please refer to Figure 4 , which shows an application schematic diagram of a follow joystick control involved in an exemplary embodiment of the present application.
[0123] In the virtual scene 410, there is a first virtual object 411 and a follow joystick control 412. The follow joystick control includes multiple micro-operation control areas. The user long presses the first area 413, and the computer device obtains that the direction corresponding to the first area 413 is left, and controls the first virtual object 411 to move to the left.
[0124] Optionally, when the target control is a follow joystick control, when the duration of the long press operation reaches the preset duration, the computer device controls the first virtual object to stop moving, and when the long press operation is cancelled, the virtual object stays at the current position, that is, it does not return to the initial position.
[0125] In the related art, when the type of the target control is a follow - up joystick, a single - click on the micro - operation control area in the target control may not trigger the movement of the virtual object. When the computer device detects that the user slides a finger on the screen, it controls the movement of the virtual object according to the sliding direction of the user's finger. However, in the solution shown in the embodiments of the present application, when the user long - presses the micro - operation control area of the target control, the movement of the first virtual object can be triggered. Moreover, the movement direction (i.e., the first direction) is a direction preset for the currently long - pressed micro - operation control area. And when the long - press operation is released and its duration does not reach the first preset duration, the computer device can control the virtual object to return to the initial position to complete the peek action.
[0126] In the embodiments of the present application, after presetting the direction for the micro - operation control area, the user only needs to long - press the micro - operation control area in the follow - up joystick control to control the virtual object to move in the corresponding direction, which improves the efficiency of controlling the movement of the virtual object. At the same time, according to the operation characteristics of the follow - up joystick control, different directions are set for different micro - operation control areas respectively, ensuring that the above - mentioned method of triggering the peek operation by long - pressing the movement control can be applied to the follow - up joystick control.
[0127] In a possible implementation manner, in response to the target control being a fixed joystick control, the direction from the center of the target control to the operation position of the long - press operation is obtained as the first direction;
[0128] Based on the first direction, the first virtual object is controlled to move.
[0129] Exemplarily, when the target control is a fixed joystick control, the user long - presses the control, and the computer device obtains the direction from the center of the target control to the operation position of the long - press operation, and controls the first virtual object to move in this direction.
[0130] Please refer to Figure 5 , which shows an application schematic diagram of the fixed joystick control involved in an exemplary embodiment of the present application.
[0131] In the virtual scene 510, it includes a first virtual object 411 and a follow - up joystick control 512. The follow - up joystick control includes multiple micro - operation control areas. The user long - presses the first area 513, and the computer device obtains the direction from the center 514 of the follow - up joystick control 512 to the long - press operation point 515, and controls the first virtual object 411 to move along this direction.
[0132] In the embodiments of the present application, after the user long-presses the follow joystick control, the computer device can obtain the direction in which the virtual object needs to move, and this direction is determined by the trigger point during the user's long-press operation, enabling the user to more precisely control the movement direction of the virtual object and improving the efficiency of the virtual object's movement. At the same time, for the operation characteristics of the fixed joystick control, the precise movement direction is determined by the precise operation position of the long-press operation, ensuring that the above-mentioned method of triggering the peek operation by long-pressing the movement control can be applied to the fixed joystick control.
[0133] In a possible implementation manner, in response to the duration of the long-press operation not reaching the first preset duration, and the long-press operation not being cancelled, and the operation position of the long-press operation being within the first area, a prompt message is displayed in the battle interface;
[0134] wherein, the prompt message is used to prompt the release of the long-press operation to trigger the first virtual object to return to the initial position.
[0135] The above-mentioned first preset duration is set by the developer during the development and design, and can be a fixed duration, such as 3 seconds.
[0136] In the embodiments of the present application, when the long-press operation meets the conditions that the long-press duration does not reach the first preset duration, the operation position of the long-press operation does not exceed the first area, and the long-press operation is not cancelled, a prompt message will appear to remind the user that they can trigger the virtual object to return by releasing the long-press operation. Through the prompt message, the user can more accurately complete the return operation of the virtual object, improving the execution efficiency and accuracy of the virtual object for virtual actions.
[0137] Exemplarily, displaying the prompt message in the battle interface includes at least one of the following:
[0138] Highlighting the first area; for example, the outline of the first area can be highlighted, or the entire first area can be highlighted;
[0139] Highlighting the first virtual object; for example, the outline of the first virtual object can be highlighted;
[0140] And, a prompt icon is displayed corresponding to the first virtual object, and the prompt icon is used to prompt the release of the long-press operation to trigger the first virtual object to return to the initial position. For example, the prompt icon can be displayed above the head of the first virtual object (such as displaying a progress bar, which can show the progress of the long-press duration increasing from 0 to the first preset duration).
[0141] In the embodiments of the present application, the style of the prompt message is expanded, enabling the user to more directly receive the prompt message, thereby more efficiently judging the time to release the long-press operation.
[0142] Based onFigure 3 For the embodiments shown, please refer to Figure 6 , which shows a flowchart of a method for controlling a virtual object provided by an exemplary embodiment of the present application. Among them, a second virtual object is further included in the above virtual scene; step 320 can be implemented as 320a, and step 330 can be implemented as 330a.
[0143] Step 320a: In response to the first virtual object being in a state of locking the second virtual object and receiving a long press operation on the target control, control the first virtual object to move in a first direction in a posture facing the second virtual object.
[0144] Exemplarily, the above locking operation can be performed by the user clicking on the second virtual object to lock it. After the second virtual object is locked, a highlight can appear to indicate that it has been locked.
[0145] Please refer to Figure 7 , which shows a schematic diagram of the first virtual object being locked involved in an exemplary embodiment of the present application.
[0146] This virtual scene takes the first perspective of the first virtual object as an example. In the battle interface 710, it includes a target control 212 and a second virtual object 714. When the user clicks on the second virtual object 714, a crosshair positioning 713 will appear, and at the same time, the second virtual object 714 will emit a highlight prompt.
[0147] Step 330a: In response to the first virtual object being in a state of locking the second virtual object, the long press operation is cancelled before the continuous duration reaches a first preset duration, and the operation position of the long press operation is within a first area, control the first virtual object to return to its initial position.
[0148] In the embodiments of the present application, for the case where a second virtual object appears in the scene, after locking the second virtual object, controlling the first virtual object to move in a first direction in a posture facing the second virtual object and complete the return action makes the movement and peek operations of the first virtual object more targeted, eliminating the need for the user to manually adjust the orientation of the first virtual object, simplifying the user operation, and improving the efficiency of the virtual object performing virtual actions.
[0149] Based on Figure 3 or Figure 6 For the embodiments shown, please refer to Figure 8 , which shows a flowchart of a method for controlling a virtual object provided by an exemplary embodiment of the present application. Among them, step 330 can be implemented as step 330b.
[0150] Step 330b: When there is a virtual obstacle within a specified range around the first virtual object, in response to the long-press operation being cancelled before the duration reaches the first preset duration and the operation position of the long-press operation is within the first area, control the first virtual object to return to its initial position.
[0151] In summary, in the embodiments of the present application, when there is a virtual obstacle within a specified range, the computer device can detect the duration of the user's long-press operation and the area of the long-press operation in the moving control to achieve the quick execution of the peek operation, making the execution of the peek operation more targeted, reducing unnecessary peek operation judgments and executions, and improving the processing efficiency of the computer device.
[0152] Exemplarily, when there is a virtual obstacle within a specified conical range in front of the first virtual object, in response to the long-press operation being cancelled before the duration reaches the first preset duration and the operation position of the long-press operation is within the first area, control the first virtual object to return to its initial position.
[0153] Please refer to Figure 9 , which shows a schematic diagram of a virtual object involved in an exemplary embodiment of the present application.
[0154] This virtual scenario takes the first-person perspective of the first virtual object as an example. In the battle interface 910, it includes a target control 912 and a virtual obstacle 914. There is a virtual obstacle within the specified conical range 920 in front of the first virtual object. When the user long-presses the target control 912 for the preset time of 3 seconds and the long-press operation is cancelled, the computer device controls the first virtual object to return to its initial position.
[0155] In the embodiments of the present application, when there is a virtual obstacle within a specified conical range in front of the first virtual object, the computer device can detect the duration of the user's long-press operation and the area of the long-press operation in the moving control to achieve the quick execution of the peek operation, making the execution of the peek operation more targeted, reducing unnecessary peek operation judgments and executions, and improving the processing efficiency of the computer device.
[0156] The solutions shown in the above embodiments of the present application can be applied to various first-person or third-person game scenarios. Exemplarily, taking the above virtual scenario as an example of an FPS mobile game, the application methods of the solutions shown in the above embodiments of the present application are introduced below.
[0157] Please refer to Figure 10 , which shows an interface diagram of a virtual scenario involved in an exemplary embodiment of the present application.
[0158] As Figure 10As shown, in the battle interface 1001, there are a target control 1002 and a calibration point 1004. This virtual scenario takes the first perspective of the first virtual object as an example.
[0159] Please refer to Figure 11 , which shows the flowchart of the follow joystick related to an exemplary embodiment of the present application.
[0160] Step 1, determine whether the player is pressing the peek hot zone. If so, go to Step 3; otherwise, go to Step 2 without any processing and the character does not move.
[0161] Step 3, determine whether the player is pressing the right peek area or the left peek area. If it is the right peek area, go to Step 4, the UI of the right peek area lights up, and the character moves directly to the right; if it is the left peek area, go to Step 5, the UI of the left peek area lights up, and the character moves directly to the left.
[0162] Step 6, determine whether the distance the player's finger slides is ≤ 12px. If so, go to Step 8; otherwise, go to Step 7, the peek area UI dims, and the character moves in the direction of the line connecting the finger center and the starting position where the player initially pressed the joystick.
[0163] Step 8, determine whether the player releases the hand. If so, go to Step 9; otherwise, go back to Step 6.
[0164] Step 9, determine whether the duration the player presses and holds is ≤ 1s. If so, go to Step 11, the peek area UI dims, triggering the peek operation, and the character moves to the initial position before the player presses and holds the joystick operation. Otherwise, go to Step 10, the peek area UI dims when the duration the player presses and holds > 1s, and after releasing the hand, the character directly stops moving.
[0165] Please refer to Figure 12 , which shows the schematic diagram of the peek operation of the follow joystick related to an exemplary embodiment of the present application.
[0166] When the player selects to follow the joystick, the player presses the left peek area, the left area and the arrow of the joystick light up. At the same time, the character moves to the left. If the player releases the hand within 1s after pressing the peek area and the sliding distance does not exceed 12px, then the peek operation is triggered, and the player will be pulled back to the position where the peek key was just pressed. If the player presses a non - peek area within the left - half - screen joystick hot zone but does not slide, that is, the sliding distance does not exceed 12px, the character remains stationary.
[0167] When the player slides the screen, that is, the interaction distance exceeds 12px but the peek operation is not triggered, the character moves in the direction of the line connecting the starting finger - pressing position and the current finger - pressing position, as Figure 13 Please refer toFigure 13 which shows a schematic diagram of the correspondence between actual finger operations and joystick performance involved in an exemplary embodiment of the present application. After releasing the finger, the character stops moving. For the follow joystick, anywhere on the left half of the screen where the player touches will trigger the response of the joystick. The starting position of the player's finger press corresponds to the center of the joystick, and the position of the joystick UI remains fixed.
[0168] Please refer to Figure 14 which shows a flowchart of a fixed joystick involved in an exemplary embodiment of the present application.
[0169] Step 1, determine whether the player is pressing on the joystick hot zone. The hot zone is shown as Figure 15 shown, which shows a schematic diagram of the joystick and peek hot zone involved in an exemplary embodiment of the present application.
[0170] If yes, go to Step 3, and the character moves in the direction of the line connecting the center of the finger and the center of the joystick; otherwise, go to Step 2, do nothing, and the character does not move.
[0171] Step 4, determine whether the player is pressing on the peek area within the joystick hot zone. If yes, go to Step 5. Otherwise, the character continues to move in the direction of the line connecting the finger and the center of the joystick.
[0172] Step 5, determine whether the player is pressing on the right peek area or the left peek area. If the player is pressing on the right peek area, go to Step 6, and the UI of the right peek area lights up. If the player is pressing on the left peek area, go to Step 7, and the UI of the left peek area lights up.
[0173] Step 8, determine whether the finger sliding distance is ≤ 12px. If yes, go to Step 10; otherwise, go to Step 9, the peek area dims, and the character continues to move in the direction of the line connecting the finger and the center of the joystick.
[0174] Step 10, determine whether the player has released the finger. If yes, go to Step 11; otherwise, start over from Step 8.
[0175] Step 11, determine whether the duration that the player presses on the peek area is ≤ 1s. If yes, go to Step 13, the UI of the peek area dims, and the peek operation is triggered, and the character moves to the initial position before the player presses the joystick operation. Otherwise, go to Step 12, the UI of the peek area dims when the player presses for more than 1s, and after releasing the finger, the character stops moving directly.
[0176] Please refer to Figure 16 which shows a schematic diagram of the peek operation of a fixed joystick involved in an exemplary embodiment of the present application.
[0177] When the player selects the fixed joystick, if the player holds down the left peek area, the left area of the joystick and the arrow light up. At the same time, the character moves in the direction of the line connecting the center of the finger and the center of the joystick. If the player releases the hand within 1 s after holding down the peek area and the sliding distance does not exceed 12 px, the peek operation is triggered, and the player will be pulled back to the position where the peek key was just pressed. If the player holds down the starting position of the joystick and is within the hot zone of the joystick but the peek operation is not triggered, the character will move normally in the direction of the line connecting the center of the finger and the center of the joystick and stop moving after releasing the hand.
[0178] In summary, in the embodiment of the present application, the conventional moving joystick is divided into left and right areas, and a long-press interaction method is added to help the player quickly achieve peek. When the player slides the joystick, it is a normal moving operation. When the player long-presses the left and right peek areas, the character will be pulled out in the corresponding direction. When the player long-presses for less than 1 s and then releases the hand, the character will move back. When the player long-presses for more than 1 s, the character will no longer move back, and it will become a normal moving operation. Without adding a button, the problem of difficult peek in FPS mobile games is solved. Assuming that it takes the player X seconds to slide the button to control the character to move out, then using the conventional joystick for a peek operation requires sliding for 2X seconds, and the player needs to slide out and then slide back. However, in the solution provided in the embodiment of the present application, the player only needs to hold down the peek button for X seconds to complete the peek operation, with shorter operation time and simpler operation steps.
[0179] Figure 17 The block diagram of a control device for a virtual object provided by an exemplary embodiment of the present application is shown.
[0180] The device includes:
[0181] An interface display module 1701, configured to display a battle interface of a virtual scene, where the battle interface includes a target control; the virtual scene includes a first virtual object; the target control is a control for controlling the first virtual object to move, and the target control includes one or more micro-operation control areas;
[0182] A movement control module 1702, configured to control the first virtual object to move in a first direction in response to receiving a long-press operation on the target control; the first direction is a direction associated with the operation position of the long-press operation;
[0183] A return control module 1703, configured to control the first virtual object to return to the initial position in response to the long-press operation being cancelled before the continuous duration reaches a first preset duration and the operation position of the long-press operation being within a first area; the first area is one of the one or more micro-operation control areas; the initial position is the position where the first virtual object is located at the start time of the long-press operation.
[0184] In some embodiments, the first direction is also associated with the control type of the target control.
[0185] In some embodiments, the movement control module 1702 is configured to
[0186] In response to the target control being a follow joystick control and the operation position of the long - press operation being within the first area, obtain the direction pre - set corresponding to the first area as the first direction;
[0187] Based on the first direction, control the first virtual object to move.
[0188] In some embodiments, the movement control module 1702 is configured to
[0189] In response to the target control being a fixed joystick control, obtain the direction from the center of the target control to the operation position of the long - press operation as the first direction;
[0190] Based on the first direction, control the first virtual object to move.
[0191] In some embodiments, the virtual scene further includes a second virtual object; the movement control module 1702 is configured to, in response to the first virtual object being in a state of locking the second virtual object and receiving a long - press operation on the target control, control the first virtual object to move in the first direction in a posture facing the second virtual object.
[0192] In some embodiments, the return control module 1703 is configured to, in response to the first virtual object being in a state of locking the second virtual object, the long - press operation being cancelled before the continuous duration reaches the first preset duration, and the operation position of the long - press operation being within the first area, control the first virtual object to return to the initial position.
[0193] In some embodiments, the return control module 1703 is configured to, when there is a virtual obstacle within a specified range around the first virtual object, in response to the long - press operation being cancelled before the continuous duration reaches the first preset duration, and the operation position of the long - press operation being within the first area, control the first virtual object to return to the initial position.
[0194] In some embodiments, the return control module 1703 is configured to, when there is a virtual obstacle within a specified conical range in front of the first virtual object, in response to the long - press operation being cancelled before the continuous duration reaches the first preset duration, and the operation position of the long - press operation being within the first area, control the first virtual object to return to the initial position.
[0195] In summary, in the embodiments of the present application, a target control and a first virtual object are displayed in a battle interface for displaying a virtual scene. The user controls the first virtual object to move by long pressing on a micro-operation control area in the target control. Before the operation position of the long press operation is still within the micro-operation control area and the duration of the long press reaches a first preset duration, the long press operation is cancelled, and the first virtual object is controlled to return to the position at the start moment of the long press operation, the position where the first virtual object is located; in the above solution, the user can trigger the virtual object to automatically return to the initial position by long pressing on the control for movement control, that is, through a single touch operation on the control for movement control, the virtual object can be controlled to implement a virtual peek action, improving the execution efficiency of the virtual action, thereby expanding the way for the user to control the virtual object to interact with the virtual scene and improving the interaction effect between the user and the virtual scene.
[0196] Based on Figure 17 the embodiments shown, please refer to Figure 18 , which shows a block diagram of a control device for a virtual object provided by an exemplary embodiment of the present application. The device further includes a prompt information module 1704:
[0197] The prompt information module 1704 is configured to display prompt information in the battle interface in response to the duration of the long press operation not reaching the first preset duration, and the long press operation not being cancelled, and the operation position of the long press operation being within the first area;
[0198] wherein the prompt information is used to prompt to release the long press operation to trigger the first virtual object to return to the initial position.
[0199] In some embodiments, displaying the prompt information in the battle interface includes at least one of the following:
[0200] Highlighting the first area;
[0201] Highlighting the first virtual object;
[0202] And, displaying a prompt icon corresponding to the first virtual object, where the prompt icon is used to prompt to release the long press operation to trigger the first virtual object to return to the initial position.
[0203] It should be noted that when the device provided in the above embodiments implements its functions, only the above-mentioned division of each functional module is used for illustration. In actual applications, the above functions can be allocated to different functional modules according to actual needs, that is, the content structure of the device is divided into different functional modules to complete all or part of the functions described above.
[0204] Regarding the device in the above embodiments, the specific manner in which each module performs operations has been described in detail in the embodiments related to the method; the technical effects obtained by each module performing operations are the same as those in the embodiments related to the method, and will not be elaborated here.
[0205] Figure 19 FIG. 4 shows a structural block diagram of a computer device 1900 provided by an exemplary embodiment of the present application. The computer device 1900 may be a portable mobile terminal, such as a smart phone or a tablet computer. The computer device 1900 may also be referred to by other names such as a user device or a portable terminal.
[0206] Generally, the computer device 1900 includes a processor 1901 and a memory 1902.
[0207] The processor 1901 may include one or more processing cores, such as a 4-core processor or an 8-core processor. The processor 1901 may be implemented in at least one hardware form of DSP (Digital Signal Processing), FPGA (Field Programmable Gate Array), or PLA (Programmable Logic Array). The processor 1901 may also include a main processor and a coprocessor. The main processor is a processor for processing data in the wake state, also known as the CPU (Central Processing Unit); the coprocessor is a low-power processor for processing data in the standby state. In some embodiments, the processor 1901 may be integrated with a GPU (Graphics Processing Unit), and the GPU is responsible for rendering and drawing the content to be displayed on the display screen. In some embodiments, the processor 1901 may also include an AI (Artificial Intelligence) processor, and the AI processor is used to process computational operations related to machine learning.
[0208] The memory 1902 may include one or more computer-readable storage media, and the computer-readable storage media may be tangible and non-transitory. The memory 1902 may also include a high-speed random access memory and a non-volatile memory, such as one or more disk storage devices or flash storage devices. In some embodiments, the non-transitory computer-readable storage media in the memory 1902 is used to store at least one instruction, and the at least one instruction is used to be executed by the processor 1901 to implement the control method of the virtual object provided in the embodiments of the present application.
[0209] In some embodiments, computer device 1900 may further optionally include: a peripheral device interface 1903 and at least one peripheral device. Specifically, the peripheral device includes at least one of: a radio frequency circuit 1904, a touch display screen 1905, a camera 1906, an audio circuit 1907, and a power supply 1908.
[0210] In some embodiments, computer device 1900 further includes one or more sensors 1909. The one or more sensors 1909 include, but are not limited to: an acceleration sensor 1910, a gyroscope sensor 1911, a pressure sensor 1912, an optical sensor 1913, and a proximity sensor 1914.
[0211] Those skilled in the art can understand that the structures shown above do not constitute a limitation on computer device 1900, and it may include more or fewer components than shown in the figure, or combine certain components, or adopt different component arrangements.
[0212] In an exemplary embodiment, a chip is further provided, and the chip includes programmable logic circuits and / or program instructions, which are used to implement the control method of the virtual object described in the above aspects when the chip runs on a computer device.
[0213] In an exemplary embodiment, a computer program product is further provided. The computer program product includes computer instructions, and the computer instructions are stored in a computer-readable storage medium. The processor of the computer device reads the computer instructions from the computer-readable storage medium, and the processor reads and executes the computer instructions to implement the control method of the virtual object provided by the above method embodiments.
[0214] In an exemplary embodiment, a computer-readable storage medium is further provided. A computer program is stored in the computer-readable storage medium, and the computer program is loaded and executed by a processor to implement the control method of the virtual object provided by the above method embodiments.
[0215] Those of ordinary skill in the art can understand that all or part of the steps to implement the above embodiments can be completed by hardware, or can be completed by a program instructing relevant hardware. The program can be stored in a computer-readable storage medium, and the storage medium mentioned above can be a read-only memory, a disk, an optical disc, etc.
[0216] Those skilled in the art should be able to realize that in one or more of the above examples, the functions described in the embodiments of the present application can be implemented by hardware, software, firmware, or any combination thereof. When implemented using software, these functions can be stored in a computer-readable medium or transmitted as one or more instructions or codes on a computer-readable medium. The computer-readable medium includes computer storage media and communication media, where the communication media includes any medium that facilitates the transmission of a computer program from one place to another. The storage media can be any available medium accessible by a general-purpose or special-purpose computer.
[0217] The above are only alternative embodiments of the present application and are not intended to limit the present application. Any modifications, equivalent replacements, improvements, etc. made within the spirit and principle of the present application shall be included within the protection scope of the present application.
Claims
1. A control method for a virtual object, characterized in that, the method includes: displaying a battle interface of a virtual scene, the battle interface including a target control; the virtual scene including a first virtual object; the target control being a control for controlling the movement of the first virtual object, and the target control including one or more micro-operation control areas; in response to receiving a long-press operation on the target control, controlling the first virtual object to move in a first direction; the first direction being a direction associated with the operation position of the long-press operation; in response to the long-press operation being cancelled before the continuous duration reaches a first preset duration, and the operation position of the long-press operation being within a first area, controlling the first virtual object to return to the initial position; the first area being one of the one or more micro-operation control areas; the initial position being the position where the first virtual object is located at the start moment of the long-press operation.
2. The method according to claim 1, characterized in that, the first direction is also associated with the control type of the target control.
3. The method according to claim 2, characterized in that, the step of in response to receiving a long-press operation on the target control, controlling the first virtual object to move in a first direction includes: in response to the target control being a follow joystick control and the operation position of the long-press operation being within the first area, obtaining the direction pre-set corresponding to the first area as the first direction; based on the first direction, controlling the first virtual object to move.
4. The method according to claim 2, characterized in that, the step of in response to receiving a long-press operation on the target control, controlling the first virtual object to move in a first direction includes: in response to the target control being a fixed joystick control, obtaining the direction from the center of the target control to the operation position of the long-press operation as the first direction; based on the first direction, controlling the first virtual object to move.
5. The method according to claim 1, characterized in that, the virtual scene further includes a second virtual object; the step of in response to receiving a long-press operation on the target control, controlling the first virtual object to move in a first direction includes: in response to the first virtual object being in a state of locking the second virtual object and receiving a long-press operation on the target control, controlling the first virtual object to move in the first direction in a posture facing the second virtual object.
6. The method according to claim 5, characterized in that, the step of in response to the long-press operation being cancelled before the continuous duration reaches a first preset duration, and the operation position of the long-press operation being within the first area, controlling the first virtual object to return to the initial position includes: in response to the first virtual object being in a state of locking the second virtual object, the long-press operation being cancelled before the continuous duration reaches a first preset duration, and the operation position of the long-press operation being within the first area, controlling the first virtual object to return to the initial position.
7. The method according to claim 1, Characterized in that, when the long - press operation is cancelled before the duration reaches a first preset duration, and the operation position of the long - press operation is within a first area, controlling the first virtual object to return to the initial position, includes: when there is a virtual obstacle within a specified range around the first virtual object, and the long - press operation is cancelled before the duration reaches the first preset duration, and the operation position of the long - press operation is within the first area, controlling the first virtual object to return to the initial position.
8. The method according to claim 7, Characterized in that, when there is a virtual obstacle within a specified range around the first virtual object, and the long - press operation is cancelled before the duration reaches the first preset duration, and the operation position of the long - press operation is within the first area, controlling the first virtual object to return to the initial position, includes: when there is a virtual obstacle within a specified conical range in front of the first virtual object, and the long - press operation is cancelled before the duration reaches the first preset duration, and the operation position of the long - press operation is within the first area, controlling the first virtual object to return to the initial position.
9. The method according to any one of claims 1 to 8, Characterized in that, the method further includes: when the duration of the long - press operation does not reach the first preset duration, and the long - press operation is not cancelled, and the operation position of the long - press operation is within the first area, displaying a prompt message on the battle interface; wherein, the prompt message is used to prompt to release the long - press operation to trigger the first virtual object to return to the initial position.
10. The method according to claim 9, Characterized in that, displaying the prompt message on the battle interface includes at least one of the following: highlighting the first area; highlighting the first virtual object; and, displaying a prompt icon corresponding to the first virtual object, the prompt icon being used to prompt to release the long - press operation to trigger the first virtual object to return to the initial position.
11. A control device for a virtual object, Characterized in that, the device includes: an interface display module, configured to display a battle interface of a virtual scene, the battle interface including a target control; the virtual scene includes a first virtual object; the target control is a control for moving the first virtual object, and the target control includes one or more micro - operation control areas; a movement control module, configured to control the first virtual object to move in a first direction in response to receiving a long - press operation on the target control; the first direction is a direction associated with the operation position of the long - press operation. A return control module, configured to control the first virtual object to return to its initial position in response to the long-press operation being cancelled before the duration reaches a first preset duration and the operation position of the long-press operation being within a first area; the first area is one of the one or more micro-operation control areas; the initial position is the position where the first virtual object is located at the start time of the long-press operation.
12. The apparatus according to claim 11, wherein, the apparatus further comprises: An information prompt module, configured to display a prompt message on the battle interface in response to the duration of the long-press operation not reaching the first preset duration, the long-press operation not being cancelled, and the operation position of the long-press operation being within the first area; wherein the prompt message is used to prompt to release the long-press operation to trigger the first virtual object to return to the initial position.
13. A computer device, wherein, the computer device comprises a processor and a memory, the memory stores at least one computer instruction, and the at least one computer instruction is loaded and executed by the processor to implement the control method of the virtual object according to any one of claims 1 to 10.
14. A computer-readable storage medium, wherein, the computer-readable storage medium stores at least one computer instruction, and the computer instruction is loaded and executed by a processor to implement the control method of the virtual object according to any one of claims 1 to 10.
15. A computer program product, wherein, the computer program product comprises computer instructions, the computer instructions are stored in a computer-readable storage medium; the computer instructions are read and executed by a processor of a computer device to implement the control method of the virtual object according to any one of claims 1 to 10.