CN112870701A - Control method and device of virtual role - Google Patents

Control method and device of virtual role Download PDF

Info

Publication number
CN112870701A
CN112870701A CN202110280650.6A CN202110280650A CN112870701A CN 112870701 A CN112870701 A CN 112870701A CN 202110280650 A CN202110280650 A CN 202110280650A CN 112870701 A CN112870701 A CN 112870701A
Authority
CN
China
Prior art keywords
virtual character
detection result
control
target area
controlling
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN202110280650.6A
Other languages
Chinese (zh)
Other versions
CN112870701B (en
Inventor
侯文鹏
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Netease Hangzhou Network Co Ltd
Original Assignee
Netease Hangzhou Network Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Netease Hangzhou Network Co Ltd filed Critical Netease Hangzhou Network Co Ltd
Priority to CN202110280650.6A priority Critical patent/CN112870701B/en
Publication of CN112870701A publication Critical patent/CN112870701A/en
Application granted granted Critical
Publication of CN112870701B publication Critical patent/CN112870701B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • AHUMAN NECESSITIES
    • A63SPORTS; GAMES; AMUSEMENTS
    • A63FCARD, BOARD, OR ROULETTE GAMES; INDOOR GAMES USING SMALL MOVING PLAYING BODIES; VIDEO GAMES; GAMES NOT OTHERWISE PROVIDED FOR
    • A63F13/00Video games, i.e. games using an electronically generated display having two or more dimensions
    • A63F13/50Controlling the output signals based on the game progress
    • A63F13/52Controlling the output signals based on the game progress involving aspects of the displayed game scene
    • AHUMAN NECESSITIES
    • A63SPORTS; GAMES; AMUSEMENTS
    • A63FCARD, BOARD, OR ROULETTE GAMES; INDOOR GAMES USING SMALL MOVING PLAYING BODIES; VIDEO GAMES; GAMES NOT OTHERWISE PROVIDED FOR
    • A63F13/00Video games, i.e. games using an electronically generated display having two or more dimensions
    • A63F13/50Controlling the output signals based on the game progress
    • A63F13/53Controlling the output signals based on the game progress involving additional visual information provided to the game scene, e.g. by overlay to simulate a head-up display [HUD] or displaying a laser sight in a shooting game
    • A63F13/533Controlling the output signals based on the game progress involving additional visual information provided to the game scene, e.g. by overlay to simulate a head-up display [HUD] or displaying a laser sight in a shooting game for prompting the player, e.g. by displaying a game menu
    • AHUMAN NECESSITIES
    • A63SPORTS; GAMES; AMUSEMENTS
    • A63FCARD, BOARD, OR ROULETTE GAMES; INDOOR GAMES USING SMALL MOVING PLAYING BODIES; VIDEO GAMES; GAMES NOT OTHERWISE PROVIDED FOR
    • A63F13/00Video games, i.e. games using an electronically generated display having two or more dimensions
    • A63F13/50Controlling the output signals based on the game progress
    • A63F13/53Controlling the output signals based on the game progress involving additional visual information provided to the game scene, e.g. by overlay to simulate a head-up display [HUD] or displaying a laser sight in a shooting game
    • A63F13/537Controlling the output signals based on the game progress involving additional visual information provided to the game scene, e.g. by overlay to simulate a head-up display [HUD] or displaying a laser sight in a shooting game using indicators, e.g. showing the condition of a game character on screen
    • A63F13/5372Controlling the output signals based on the game progress involving additional visual information provided to the game scene, e.g. by overlay to simulate a head-up display [HUD] or displaying a laser sight in a shooting game using indicators, e.g. showing the condition of a game character on screen for tagging characters, objects or locations in the game scene, e.g. displaying a circle under the character controlled by the player

Landscapes

  • Engineering & Computer Science (AREA)
  • Multimedia (AREA)
  • Physics & Mathematics (AREA)
  • Optics & Photonics (AREA)
  • Processing Or Creating Images (AREA)
  • User Interface Of Digital Computer (AREA)

Abstract

The invention discloses a method and a device for controlling virtual roles. The method is applied to a mobile terminal, the mobile terminal obtains a graphical user interface through screen rendering of electronic equipment, and the method comprises the following steps: responding to a locking operation instruction, and detecting whether the virtual character is located in a target area in a game scene to obtain a first detection result; determining a first movement direction of the virtual character based on the first detection result; and controlling the virtual character to automatically move in the game scene according to the first motion direction. The invention solves the technical problems that thought confusion is easy to generate and the control effect of the virtual character is influenced by manually controlling the virtual character to move by a player in the related technology.

Description

Control method and device of virtual role
Technical Field
The invention relates to the field of online games, in particular to a method and a device for controlling virtual characters.
Background
At present, a large-scale multi-player online shooting game (such as a chicken game) is often provided with a game mechanism with a timing contraction safety zone, and if a player is outside the safety zone for a long time, a 'exercise failure' is caused, and then the game is ended. Therefore, during the game, the player needs to pay frequent attention to the relative position of the player and the safety zone to confirm whether the player needs to move the position in time to ensure that the game can continue.
However, in such games, players often view the small map to confirm their relative positions and orientations with respect to the security zone, and adjust the orientation of the virtual character in the game based on the relative positions and orientations. In actual experience, a player needs to manipulate a character model in a three-dimensional scene and view a result on a two-dimensional small map, which is a very unfriendly process for a novice player unfamiliar with the game, and the situation that the player forgets to observe the small map to determine the direction and the position or the situation that a correct running direction cannot be found due to thought confusion easily occurs, so that the game experience is poor.
In view of the above problems, no effective solution has been proposed.
Disclosure of Invention
The embodiment of the invention provides a method and a device for controlling a virtual character, which are used for at least solving the technical problems that thinking confusion is easily generated and the control effect of the virtual character is influenced by manually controlling the virtual character to move by a player in the related technology.
According to an aspect of an embodiment of the present invention, there is provided a method for controlling a virtual character, in which a graphical user interface is obtained by screen rendering of an electronic device, the method including: responding to a locking operation instruction, and detecting whether the virtual character is located in a target area in a game scene to obtain a first detection result; determining a first movement direction of the virtual character based on the first detection result; and controlling the virtual character to automatically move in the game scene according to the first motion direction.
Optionally, determining the first movement direction of the virtual character based on the first detection result comprises: and under the condition that the first detection result is that the virtual character is located in the target area, the first movement direction is the current orientation of the virtual character, wherein the initial direction is the orientation of the virtual character when the locking operation instruction is detected.
Optionally, determining the first movement direction of the virtual character based on the first detection result comprises: and under the condition that the first detection result is that the virtual character is located outside the target area, the first movement direction is a direction determined based on the current position of the virtual character and the target position in the target area, wherein the current position is the position of the virtual character in the game scene when the locking operation instruction is detected.
Optionally, the direction determined based on the current position of the virtual character and the target position in the target area is a direction in which the current position points to the target position.
Optionally, in the process of controlling the virtual character to automatically move in the game scene according to the first motion direction, the method further includes: when the virtual character is detected to move to the edge of the target area, acquiring a first position of the virtual character in a game scene; determining that the direction in which the first position points to the target position in the target area is a second movement direction of the virtual character; and controlling the virtual character to move according to the second motion direction.
Alternatively, in the case where it is detected that the virtual character moves to the target position, the virtual character is controlled to stop the automatic movement.
Optionally, in the process of controlling the virtual character to automatically move in the game scene according to the first motion direction, the method further includes: when the position update of the target area is detected, acquiring a second position of the virtual character in the game scene; detecting whether the virtual character is located in the updated target area according to the second position to obtain a second detection result; and determining a third movement direction of the virtual character based on the second detection result, and controlling the virtual character to automatically move in the game scene according to the third movement direction.
Optionally, after acquiring the second position of the virtual character in the game scene, the method further includes: detecting whether the second position is the same as the target position of the target area before updating to obtain a third detection result; and determining whether to control the virtual character to move according to the third movement direction based on the third detection result.
Optionally, the determining whether to control the virtual character to move according to the third movement direction based on the third detection result includes: determining to control the virtual character to move according to a third movement direction under the condition that the third detection result is that the second position is different from the target position of the target area before updating; and determining to control the virtual character to stop the automatic movement when the third detection result is that the second position is the same as the target position of the target area before the update.
Optionally, the graphical user interface includes at least one locking operation control, and the method further includes: and generating a locking operation instruction when the touch operation acting on the locking operation control is detected.
Optionally, the graphical user interface includes at least one mobile control, and the touch operation performed on the locking operation control includes a sliding operation in which the initial touch point is located on the mobile control and the final touch point is located on the locking operation control.
Optionally, the method further comprises: and in the process of controlling the virtual character to automatically move in the game scene according to the first movement direction, responding to the stop instruction and controlling the virtual character to stop automatically moving.
Optionally, the graphical user interface includes a locking operation control, and the method further includes: and in the process of controlling the virtual character to automatically move in the game scene according to the first motion direction, generating a stop instruction when detecting the touch operation acting on the locking operation control.
Optionally, the graphical user interface includes at least one movement control, and the method further includes: and when the sliding operation acting on the mobile control is detected, generating a stopping instruction, and controlling the virtual character to move in the game scene according to the sliding operation.
According to another aspect of the embodiments of the present invention, there is also provided a control apparatus for a virtual character, which obtains a graphical user interface through screen rendering of an electronic device, the apparatus including: the detection module is used for responding to the locking operation instruction and detecting whether the virtual character is located in a target area in a game scene to obtain a first detection result; a determination module for determining a first movement direction of the virtual character based on the first detection result; and the control module is used for controlling the virtual character to automatically move in the game scene according to the first movement direction.
According to another aspect of the embodiments of the present invention, there is also provided a computer-readable storage medium, where the computer-readable storage medium includes a stored program, and when the program runs, the apparatus on which the computer-readable storage medium is located is controlled to execute the above-mentioned control method for the virtual character.
According to another aspect of the embodiments of the present invention, there is also provided a processor, where the processor is configured to execute a program, where the program executes the control method for the virtual character.
In the embodiment of the invention, in response to the locking operation instruction, whether the virtual character is located in the target area in the game scene is detected firstly, a first detection result is obtained, a first movement direction of the virtual character is determined based on the first detection result, thereby controlling the virtual character to automatically move in the game scene according to the first motion direction, so that the virtual character moves to the target area, the virtual character is automatically controlled by locking the operation instruction without manual operation of a player, thereby avoiding thought confusion caused by the fact that effective relation matching cannot be formed between three dimensions and two dimensions, achieving the technical effects of simplifying the operation of the player and improving the experience of the player, and further, the technical problems that thought confusion is easily generated by manually controlling the virtual character to move through a player and the control effect of the virtual character is influenced in the related technology are solved.
Drawings
The accompanying drawings, which are included to provide a further understanding of the invention and are incorporated in and constitute a part of this application, illustrate embodiment(s) of the invention and together with the description serve to explain the invention without limiting the invention. In the drawings:
fig. 1 is a flowchart of a control method of a virtual character according to an embodiment of the present invention;
FIG. 2a is a schematic view of the direction of movement of an alternative avatar within the next safe zone, according to an embodiment of the present invention;
FIG. 2b is a schematic view of the direction of movement of an alternative avatar when not in the next safe zone, according to an embodiment of the present invention;
FIG. 3 is a schematic view of the direction of movement of an alternative avatar moving to the edge of the next safe area, in accordance with embodiments of the present invention;
fig. 4 is a schematic diagram of a control device of a virtual character according to an embodiment of the present invention.
Detailed Description
In order to make the technical solutions of the present invention better understood, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
It should be noted that the terms "first," "second," and the like in the description and claims of the present invention and in the drawings described above are used for distinguishing between similar elements and not necessarily for describing a particular sequential or chronological order. It is to be understood that the data so used is interchangeable under appropriate circumstances such that the embodiments of the invention described herein are capable of operation in sequences other than those illustrated or described herein. Furthermore, the terms "comprises," "comprising," and "having," and any variations thereof, are intended to cover a non-exclusive inclusion, such that a process, method, system, article, or apparatus that comprises a list of steps or elements is not necessarily limited to those steps or elements expressly listed, but may include other steps or elements not expressly listed or inherent to such process, method, article, or apparatus.
In accordance with an embodiment of the present invention, there is provided a method for controlling a virtual character, it should be noted that the steps shown in the flowchart of the drawings may be executed in a computer system such as a set of computer-executable instructions, and that although a logical order is shown in the flowchart, in some cases, the steps shown or described may be executed in an order different from that shown.
Optionally, the graphical user interface is obtained by screen rendering of the electronic device.
The electronic equipment can be terminals such as a smart phone, a tablet personal computer and a notebook computer used by a player, a game client of an online shooting game is installed on the mobile terminal, and the player plays the online shooting game by logging in the game client; the electronic device may also be a server, for example, a cloud server, on which a game client of the online shooting game is installed, and a player logs in the game client through his/her mobile terminal to play the online shooting game. Different games can be provided for the player with different graphical user interfaces, the interfaces are displayed on the display screen of the mobile terminal, and game scenes, skill controls, operation controls (for example, movement controls for controlling the movement of virtual characters), interaction controls (for example, chat boxes, voice input controls, etc.), game setting controls, etc. can be displayed in the graphical user interfaces, which is not limited in this invention.
It should be noted that the embodiment of the present invention is mainly directed to an online shooting game provided with a game mechanism with a timing contraction security zone, so that a player can view the current position of a virtual character and the position of the security zone in a small map displayed in a graphical user interface.
Fig. 1 is a flowchart of a method for controlling a virtual character according to an embodiment of the present invention, as shown in fig. 1, the method includes the following steps:
step S102, responding to the locking operation instruction, detecting whether the virtual character is located in a target area in the game scene, and obtaining a first detection result.
At present, a mobile terminal is often configured with a touch screen, and a player can directly interact with a graphical user interface in a touch operation mode on the screen, so that different operation instructions can be detected; the mobile terminal is also provided with a microphone, and a player can directly interact with the game client in a voice control mode, so that different operation instructions can be detected through voice recognition; the mobile terminal is also provided with different types of sensors, such as a gravity sensor and the like, and a player can directly interact with the mobile client in a mode of shaking and rotating the mobile terminal, so that different operation instructions can be detected.
Based on the detected operation instruction, the virtual character can be controlled to execute a corresponding action, for example, after the motion operation instruction is detected, the virtual character can be controlled to move according to a motion direction corresponding to the motion operation instruction, and the movement condition of the virtual character can be shown in the graphical user interface.
The locking operation instruction in the above steps may be a locking running instruction, which may help the player achieve the purpose of "running in the safe zone with one key". When a player needs to control a virtual character to run into a safe area, the player can trigger a locking operation instruction in various different modes, for example, the locking operation instruction can be triggered in a touch operation mode, or can be triggered in a voice control mode, a mobile terminal shaking mode, a mobile terminal rotating mode and the like.
In a first alternative embodiment, the player may be provided with a lock run button on the graphical user interface and add a corresponding function to the button so that the player may click on the button to trigger the avatar to automatically adjust the direction of motion, face the safe zone and lock the run.
In a second alternative embodiment, a locked running area may be provided to the player on the gui, and corresponding functions may be added to the area, and in the game, the player may control the moving direction of the virtual character through the direction wheel, and move into the locked running area by dragging the auxiliary control (e.g., the circular control in the middle of the direction wheel) in the direction wheel, and trigger the virtual character to automatically adjust the moving direction, face the safe area, and lock the running.
In a third alternative embodiment, the player may be provided with a lock-run voice command, for example, the lock-run voice command may be "auto run" so that the player may speak "auto run" and determine that the player inputs the lock-run voice command after passing through voice recognition, thereby triggering the virtual character to automatically adjust the direction of movement, face the safe zone, and lock the run.
In a fourth alternative embodiment, an operation of shaking the mobile phone may be provided to the player, and a corresponding function may be added to the operation, so that the player may trigger the virtual character to automatically adjust the moving direction, face the safe area, and lock the running by shaking the mobile phone.
The target area in the above steps may be a safety zone in an online shooting game, a game mechanism with a safety zone that contracts at regular time is set in the game, and in order to provide better game experience for a player, the target area here may be an upcoming safety zone (i.e. a next safety zone), so as to achieve the purpose of controlling the virtual character to run to the safety zone in advance. The shape of the target area may be a rectangle, a circle, a triangle, or the like, but is not limited thereto and may be determined according to the actual game setting.
It should be noted that, when the player triggers the lock running instruction, the virtual character may not run into the next safety zone at this time, that is, the virtual character is located outside the target area, and at this time, the virtual character needs to be controlled to run towards the target area; or, the next safe zone has been entered, i.e., the virtual character is located within the target zone, at which point it is not necessary to control the virtual character to run toward the target zone. Therefore, before controlling the virtual character to run locked to the safety zone, the current position of the virtual character may be first acquired, and the circle center position and the radius of the safety zone may be acquired, so that whether the virtual character is located within the target zone is determined by determining whether the distance between the current position and the circle center position is greater than the radius, and then the running direction of the virtual character is determined based on the corresponding result.
Step S104, determining a first movement direction of the virtual character based on the first detection result.
In an alternative embodiment, if it is detected that the virtual character is located within the target area, and the virtual character can be considered to run towards the safe zone regardless of the direction in which the virtual character runs, for the purpose of simplifying the control operation, the running can be locked but the direction of movement of the virtual character is not adjusted, that is, the first direction of movement is the current orientation of the virtual character.
In another alternative embodiment, if it is detected that the virtual character is outside the target area, then to ensure that the virtual character can run into the safety zone, the running may be locked and the direction of movement of the virtual character may be adjusted, where the first direction of movement is the direction facing the safety zone.
And step S106, controlling the virtual character to automatically move in the game scene according to the first motion direction.
In an alternative embodiment, after determining the first direction of motion, the running may be locked and the virtual character runs in the first direction of motion so that the virtual character may automatically run into a safe zone.
With the above-described embodiment of the present invention, in response to the lock operation instruction, it is first detected whether the virtual character is located within the target area in the game scene, a first detection result is obtained, and a first movement direction of the virtual character is determined based on the first detection result, thereby controlling the virtual character to automatically move in the game scene according to the first motion direction, so that the virtual character moves to the target area, the virtual character is automatically controlled by locking the operation instruction without manual operation of a player, thereby avoiding thought confusion caused by the fact that effective relation matching cannot be formed between three dimensions and two dimensions, achieving the technical effects of simplifying the operation of the player and improving the experience of the player, and further, the technical problems that thought confusion is easily generated by manually controlling the virtual character to move through a player and the control effect of the virtual character is influenced in the related technology are solved.
Optionally, in the foregoing embodiment of the present invention, determining the first movement direction of the virtual character based on the first detection result includes: and under the condition that the first detection result is that the virtual character is located in the target area, the first movement direction is the current orientation of the virtual character, wherein the current orientation is the orientation of the virtual character when the locking operation instruction is detected. Optionally, in the foregoing embodiment of the present invention, determining the first moving direction of the virtual character based on the first detection result further includes: and under the condition that the first detection result is that the virtual character is located outside the target area, the first movement direction is a direction determined based on the current position of the virtual character and the target position in the target area, wherein the current position is the position of the virtual character when the locking operation instruction is detected.
The target position in the above step may be any position in the target area, for example, a position closest to the virtual character, but is not limited thereto. In the embodiment of the present invention, in order to reduce the calculation amount, the position of the center of the target area may be used as the target position.
In an alternative embodiment, in the case that the first detection result is that the virtual character is located in the target area, only running may be locked without adjusting the movement direction of the virtual character, and at this time, since the virtual character may be moving or the virtual character is in a static state, in order to control the virtual character to move without adjusting the movement direction, it may be determined that the first movement direction is the current orientation of the virtual character, that is, the first movement direction is the direction that the virtual character currently faces. For example, as shown in FIG. 2a, when the virtual character (shown as a solid circle in the figure) is in the next safe zone, and the player clicks the lock run button, the running is locked without adjusting the moving direction of the virtual character, which is shown as a dotted line.
Further, the direction determined based on the current position of the virtual character and the target position in the target area is a direction in which the current position points to the target position.
In another optional embodiment, in order to ensure that the virtual character can run into the safety zone when the first detection result is that the virtual character is located outside the target zone, running may be locked and the moving direction of the virtual character may be adjusted, at this time, the first moving direction may be determined based on the current position and the target position of the virtual character, that is, the direction in which the current position points to the target position is determined to be the first moving direction, so that the virtual character may run toward the target zone facing the target position. For example, as shown in fig. 2b, when the virtual character (shown as a solid circle in the figure) is not located in the next safety zone, and the player clicks the run lock button, the virtual character is adjusted to the center of the next safety zone and the running is locked, and the moving direction of the virtual character is shown as a dotted line.
Optionally, in the foregoing embodiment of the present invention, in the process of controlling the virtual character to automatically move in the game scene according to the first movement direction, the method further includes: when the virtual character is detected to move to the edge of the target area, acquiring a first position of the virtual character in a game scene; determining that the direction in which the first position points to the target position in the target area is a second movement direction of the virtual character; and controlling the virtual character to move according to the second motion direction.
The first position in the above step may be a position where the virtual character is located when the virtual character is detected to move to the edge of the target area.
It should be noted that, in the case where it is detected that the virtual character is within the target area, and only the running is locked but the moving direction is not adjusted at this time, if the moving direction of the virtual character is not the center of the safety zone, the virtual character may run out of the safety zone after running for a while.
In order to avoid the above problem, in an alternative embodiment, it may be detected in real time during the locked running process whether the virtual character runs out of the safe area, that is, whether the virtual character moves to the edge of the target area, and if so, the movement direction of the virtual character needs to be readjusted to control the virtual character to run towards the safe area. The control method at this time is the same as the case where the virtual character is located outside the target area as the first detection result, that is, the direction in which the first position points to the target position may be determined as the second movement direction, and the virtual character is controlled to move according to the second movement direction, that is, the virtual character is adjusted to face the center of the next safety zone.
For example, as shown in fig. 3, in the case where it is detected that the virtual character is within the next safety zone, running is locked, and when running to the edge of the next safety zone, the direction is automatically adjusted to run toward the center of the next safety zone, and the moving direction of the virtual character is shown as a dotted line.
Optionally, in the above embodiment of the present invention, in a case where it is detected that the virtual character moves to the target position, the virtual character is controlled to stop automatically moving.
In an alternative embodiment, the moving direction of the virtual character is towards the target position, that is, towards the center of the next safety zone, the virtual character finally runs to the target position, at this time, the virtual character already runs to the next safety zone, the virtual character does not need to run continuously, therefore, the virtual character can be controlled to stop automatically moving, the finally stopped position is the center point of the next safety zone, and at this time, the locked running function is automatically ended.
Optionally, in the foregoing embodiment of the present invention, in the process of controlling the virtual character to automatically move in the game scene according to the first movement direction, the method further includes: when the position update of the target area is detected, acquiring a second position of the virtual character in the game scene; detecting whether the virtual character is located in the updated target area according to the second position to obtain a second detection result; and determining a third movement direction of the virtual character based on the second detection result, and controlling the virtual character to automatically move in the game scene according to the third movement direction.
The second location in the above step may be a location where the virtual character is located when the location update of the target area is detected.
In the online shooting game, the position of the safety zone is updated at regular time, so that the position of the safety zone may be updated during the running of the virtual character, and in this case, the virtual character needs to be controlled to run to the updated target area in order to achieve a better control effect. The control process for controlling the virtual character to run to the updated target area is the same as the above embodiment, and is not described herein again.
Further, when the second detection result is that the virtual character is located in the updated target area, the third movement direction is the current orientation of the virtual character, wherein the current orientation is the orientation of the virtual character when the position of the target area is detected to be updated; and under the condition that the virtual character is located outside the updated target area according to the second detection result, the third movement direction is a direction determined based on the current position of the virtual character and the target position in the updated target area, wherein the current position is the position of the virtual character in the game scene when the position of the target area is detected to be updated.
Optionally, in the foregoing embodiment of the present invention, after acquiring the second position of the virtual character in the game scene, the method further includes: detecting whether the second position is the same as the target position of the target area before updating to obtain a third detection result; and determining whether to control the virtual character to move according to the third movement direction based on the third detection result.
In addition, since the virtual character stops running after running to the target position of the target area before update, and the lock running function automatically ends, the virtual character cannot continue the lock running. On the basis, when the position of the target area is updated, the current position of the virtual character is obtained firstly, whether the current position is the central position of the safety zone before updating is judged, if yes, the virtual character is determined to stop running, and the virtual character is not controlled to run; if not, the virtual character is determined to be capable of continuing running, and the virtual character needs to be controlled to adjust the movement direction and continue running towards the center of the updated safety zone.
Optionally, in the foregoing embodiment of the present invention, determining whether to control the virtual character to move according to the third movement direction based on the third detection result includes: determining to control the virtual character to move according to a third movement direction under the condition that the third detection result is that the second position is different from the target position of the target area before updating; and determining to control the virtual character to stop the automatic movement when the third detection result is that the second position is the same as the target position of the target area before the update.
In an alternative embodiment, if the second position of the avatar is different from the target position of the target area before updating, the avatar is still in the locked running state, and thus the direction of motion can be automatically adjusted again to run toward the center of the updated safe zone; if the second position of the virtual character is the same as the target position of the target area before the update, at this time, the virtual character has stopped running, and there is no need to continue the locked running, and therefore, the virtual character may no longer be controlled to run, that is, it is determined that the virtual character is controlled to stop the automatic movement.
Optionally, in the foregoing embodiment of the present invention, the graphical user interface at least includes a locking operation control, and the method further includes: and generating a locking operation instruction when the touch operation acting on the locking operation control is detected.
The lock operation control in the above step may be a lock run button provided to the player on the graphic user interface. It should be noted that most online shooting-type games have been provided with a lock running button on the graphical user interface, and the player can automatically run the virtual character by clicking the button. The invention can integrate the safety zone direction automatic correction function into the locked running button on the basis of the existing locked running button, so that the virtual character can automatically adjust the direction to the safety zone and lock the running after the button is clicked by a player.
The touch operation in the above steps may be an operation acting on the locking operation control, such as, but not limited to, clicking, double clicking, long pressing, and re-pressing; the touch operation may also be a sliding operation between multiple controls, for example, but not limited to, a sliding operation from a control such as a mobile control to a control for a lock operation.
In an alternative embodiment, in a case where the locking operation control is not triggered, the player may control the virtual character to move freely through a direction wheel included in the graphical user interface, and after the player clicks the locking operation control, it may first be determined whether the virtual character is located in a next safety zone, and a movement direction of the virtual character is determined based on a result of the determination, and the virtual character runs and is locked according to the movement direction.
Optionally, in the foregoing embodiment of the present invention, the graphical user interface at least includes a moving control, which is used for the touch operation of the locking operation control, including a sliding operation in which the initial touch point is located on the moving control, and the final touch point is located on the locking operation control.
The movement control in the above step may be a directional wheel provided to the player on the graphical user interface. It should be noted that, currently, most online shooting games have a directional wheel provided on a graphical user interface, and a player can control the running direction of a virtual character by dragging an auxiliary operation control (e.g., a circular control in the middle of the directional wheel) in the directional wheel. According to the method, on the basis of the existing direction wheel, a locked running area can be added on the direction wheel, for example, the area where the existing locking operation control is located is used as the locked running area, and the safety zone direction automatic correction function is fused in the area, so that after a player drags the auxiliary operation control to the locked running area, the virtual character can automatically adjust the orientation to the safety zone and lock the running.
In an alternative embodiment, in a case where the auxiliary operation control in the direction wheel is not dragged to the locked running area, the player may control the virtual character to move at will by dragging the auxiliary operation control, and after the player drags the auxiliary operation control to the locked running area, it may first be determined whether the virtual character is located in a next safety zone, and a moving direction of the virtual character is determined based on the determination result, and the virtual character runs and is locked according to the moving direction.
In another alternative embodiment, the player may generate the touch operation acting on the locking operation control by sliding from the area where the direction wheel is located to the area where the locking operation control is located, so that whether the virtual character is located in the next safety zone may be first determined, and the movement direction of the virtual character is determined based on the determination result, and the virtual character runs and is locked according to the movement direction.
Optionally, in the above embodiment of the present invention, the method further includes: and in the process of controlling the virtual character to automatically move in the game scene according to the first movement direction, responding to the stop instruction and controlling the virtual character to stop automatically moving.
The stop instruction in the above step may be a preset instruction for controlling the virtual character to stop automatically moving, and may be an instruction generated by performing an operation on a screen of the mobile terminal, for example, clicking a lock operation control; or a command input by a voice of the player, for example, the player directly sends out a voice of 'stop automatic movement'; or an instruction generated by the player by shaking or rotating the mobile terminal again.
In an alternative embodiment, after controlling the virtual character to automatically run to the safe zone, if the player wishes to freely control the virtual character, the player may generate a stop command in a predetermined manner, in which case the locked running state is released and the virtual character stops running and stops at its place.
Optionally, in the foregoing embodiment of the present invention, the graphical user interface includes a locking operation control, and the method further includes: and in the process of controlling the virtual character to automatically move in the game scene according to the first motion direction, generating a stop instruction when detecting the touch operation acting on the locking operation control.
In an alternative embodiment, after the player clicks the lock operation control to control the virtual character to automatically run to the safe zone, if the player wishes to freely control the virtual character, the player may click the lock operation control again, at which point the lock running state is turned off and the virtual character stops running and stays in place.
Optionally, in the foregoing embodiment of the present invention, the graphical user interface at least includes a movement control, and the method further includes: and when the sliding operation acting on the mobile control is detected, generating a stopping instruction, and controlling the virtual character to move in the game scene according to the sliding operation.
In an alternative embodiment, after the control avatar is automatically running to the safe zone, if the player wishes to freely control the avatar, the player may drag the secondary operating controls in the directional wheel, at which point the locked running state is automatically disengaged, and the running direction of the avatar is determined by the directional wheel.
According to the embodiment of the present invention, there is also provided a control apparatus for a virtual character, where the apparatus can execute the control method for a virtual character in the foregoing embodiment, and a specific implementation scheme and an application scenario are the same as those in the foregoing embodiment, and are not described herein again.
Optionally, the graphical user interface is obtained by screen rendering of the electronic device.
Fig. 4 is a schematic diagram of a control apparatus of a virtual character according to an embodiment of the present invention, as shown in fig. 4, the apparatus including:
the detection module 42 is configured to respond to the locking operation instruction, and detect whether the virtual character is located in a target area in the game scene to obtain a first detection result;
a determination module 44 for determining a first movement direction of the virtual character based on the first detection result;
and a control module 46 for controlling the virtual character to automatically move in the game scene according to the first motion direction.
Optionally, in the foregoing embodiment of the present invention, the determining module includes: and the first determining unit is used for determining that the first movement direction is the current orientation of the virtual character under the condition that the first detection result is that the virtual character is located in the target area, wherein the current orientation is the orientation of the virtual character when the locking operation instruction is detected. Optionally, in the above embodiment of the present invention, the determining module further includes: and a second determining unit, configured to, when the first detection result is that the virtual character is located outside the target area, determine the first movement direction as a direction determined based on a current position of the virtual character and a target position in the target area, where the current position is a position of the virtual character when the lock operation instruction is detected.
Further, the direction determined based on the current position of the virtual character and the target position in the target area is a direction in which the current position points to the target position.
Optionally, in the above embodiment of the present invention, the apparatus further includes: the first obtaining module is used for obtaining a first position of the virtual character in the game scene when the virtual character is detected to move to the edge of the target area in the process of controlling the virtual character to automatically move in the game scene according to the first movement direction; the determining module is further configured to determine that a direction in which the first position points to the target position in the target area is a second movement direction of the virtual character; the control module is also used for controlling the virtual character to move according to the second motion direction.
Optionally, in the above embodiment of the present invention, the control module is further configured to control the virtual character to stop automatically moving when it is detected that the virtual character moves to the target position.
Optionally, in the above embodiment of the present invention, the apparatus further includes: the second acquisition module is used for acquiring a second position of the virtual character in the game scene when detecting the position update of the target area in the process of controlling the virtual character to automatically move in the game scene according to the first motion direction; the detection module is also used for detecting whether the virtual character is located in the updated target area according to the second position to obtain a second detection result; the control module is further used for determining a third movement direction of the virtual character based on the second detection result and controlling the virtual character to automatically move in the game scene according to the third movement direction.
Optionally, in the above embodiment of the present invention, the apparatus further includes: the detection module is further used for detecting whether the second position is the same as the target position of the target area before updating to obtain a third detection result; the determination module is further configured to determine whether to control the virtual character to move according to the third movement direction based on the third detection result.
Optionally, in the foregoing embodiment of the present invention, the determining module includes: a third determining unit, configured to determine to control the virtual character to move in the third movement direction when the third detection result indicates that the second position is different from the target position of the target area before the update; and a fourth determination unit configured to determine to control the virtual character to stop the automatic movement if the third detection result indicates that the second position is the same as the target position of the target area before the update.
Optionally, in the foregoing embodiment of the present invention, the graphical user interface at least includes a locking operation control, and the apparatus further includes: and the generating module is used for generating a locking operation instruction when the touch operation acting on the locking operation control is detected.
Optionally, in the above embodiment of the present invention, the control module is further configured to respond to the stop instruction to control the virtual character to stop automatically moving in the process of controlling the virtual character to automatically move in the game scene according to the first movement direction.
Optionally, in the foregoing embodiment of the present invention, the graphical user interface includes a locking operation control, and the apparatus further includes: and the generating module is used for generating a stopping instruction when the touch operation acting on the locking operation control is detected in the process of controlling the virtual character to automatically move in the game scene according to the first motion direction.
Optionally, in the foregoing embodiment of the present invention, the graphical user interface at least includes a movement control, and the apparatus further includes: the generating module is used for generating a stopping instruction when the sliding operation acting on the mobile control is detected; the control module is also used for controlling the virtual character to move in the game scene according to the sliding operation.
According to an embodiment of the present invention, there is also provided a computer-readable storage medium, where the computer-readable storage medium includes a stored program, and when the program runs, the apparatus where the computer-readable storage medium is located is controlled to execute the method for controlling a virtual role in the foregoing embodiments.
According to an embodiment of the present invention, there is further provided a processor, where the processor is configured to execute a program, where the program executes the control method for the virtual character in the foregoing embodiment when running.
In the above embodiments of the present invention, the descriptions of the respective embodiments have respective emphasis, and for parts that are not described in detail in a certain embodiment, reference may be made to related descriptions of other embodiments.
In the embodiments provided in the present application, it should be understood that the disclosed technology can be implemented in other ways. The above-described embodiments of the apparatus are merely illustrative, and for example, the division of the units may be a logical division, and in actual implementation, there may be another division, for example, multiple units or components may be combined or integrated into another system, or some features may be omitted, or not executed. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection through some interfaces, units or modules, and may be in an electrical or other form.
The units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiment.
In addition, functional units in the embodiments of the present invention may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit. The integrated unit can be realized in a form of hardware, and can also be realized in a form of a software functional unit.
The integrated unit, if implemented in the form of a software functional unit and sold or used as a stand-alone product, may be stored in a computer readable storage medium. Based on such understanding, the technical solution of the present invention may be embodied in the form of a software product, which is stored in a storage medium and includes instructions for causing a computer device (which may be a personal computer, a server, or a network device) to execute all or part of the steps of the method according to the embodiments of the present invention. And the aforementioned storage medium includes: a U-disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a removable hard disk, a magnetic or optical disk, and other various media capable of storing program codes.
The foregoing is only a preferred embodiment of the present invention, and it should be noted that, for those skilled in the art, various modifications and decorations can be made without departing from the principle of the present invention, and these modifications and decorations should also be regarded as the protection scope of the present invention.

Claims (17)

1. A method for controlling a virtual character, wherein a graphical user interface is rendered by a screen of an electronic device, the method comprising:
responding to a locking operation instruction, and detecting whether the virtual character is located in a target area in a game scene to obtain a first detection result;
determining a first movement direction of the virtual character based on the first detection result;
and controlling the virtual character to automatically move in the game scene according to the first motion direction.
2. The method of claim 1, wherein the determining the first direction of motion of the virtual character based on the first detection result comprises:
and when the first detection result is that the virtual character is located in the target area, the first movement direction is a current orientation of the virtual character, wherein the current orientation is the orientation of the virtual character when the locking operation instruction is detected.
3. The method of claim 1, wherein the determining the first direction of motion of the virtual character based on the first detection result comprises:
and when the first detection result indicates that the virtual character is located outside the target area, the first movement direction is a direction determined based on a current position of the virtual character and a target position in the target area, wherein the current position is a position of the virtual character in the game scene when the locking operation instruction is detected.
4. The method of claim 3, wherein the determined direction based on the current position of the virtual character and the target position in the target area is a direction in which the current position points to the target position.
5. The method of claim 2, wherein in controlling the virtual character to automatically move in the game scene in the first direction of motion, the method further comprises:
when the virtual character is detected to move to the edge of the target area, acquiring a first position of the virtual character in the game scene;
determining that a direction in which the first position points to a target position in the target area is a second movement direction of the virtual character;
and controlling the virtual character to move according to the second motion direction.
6. The method according to claim 4 or 5, wherein the virtual character is controlled to stop automatically moving in case of detecting that the virtual character moves to the target position.
7. The method of claim 1, wherein in controlling the virtual character to automatically move in the game scene in the first direction of motion, the method further comprises:
when the position update of the target area is detected, acquiring a second position of the virtual character in the game scene;
detecting whether the virtual character is located in the updated target area according to the second position to obtain a second detection result;
and determining a third movement direction of the virtual character based on the second detection result, and controlling the virtual character to automatically move in the game scene according to the third movement direction.
8. The method of claim 7, wherein after the obtaining the second position of the virtual character in the game scene, the method further comprises:
detecting whether the second position is the same as the target position of the target area before updating to obtain a third detection result;
and determining whether to control the virtual character to move according to the third motion direction based on the third detection result.
9. The method of claim 8, wherein the determining whether to control the virtual character to move in the third motion direction based on the third detection result comprises:
determining to control the virtual character to move according to the third movement direction under the condition that the third detection result is that the second position is different from the target position of the target area before updating;
and determining to control the virtual character to stop automatically moving when the third detection result is that the second position is the same as the target position of the target area before updating.
10. The method of any of claims 1-5 and 7-9, wherein the graphical user interface comprises at least one locking operation control, the method further comprising:
and generating the locking operation instruction when the touch operation acting on the locking operation control is detected.
11. The method of claim 10, wherein the gui comprises a movement control, and the touch operation performed on the lock operation control comprises a sliding operation in which a start touch point is located on the movement control and a final touch point is located on the lock operation control.
12. The method of any one of claims 1-5, 7-9, further comprising:
and in the process of controlling the virtual character to automatically move in the game scene according to the first movement direction, responding to a stop instruction, and controlling the virtual character to stop automatically moving.
13. The method of claim 12, wherein the graphical user interface includes a lock operation control, the method further comprising:
and in the process of controlling the virtual character to automatically move in the game scene according to the first motion direction, generating the stop instruction when the touch operation acting on the locking operation control is detected.
14. The method of claim 12, wherein the graphical user interface comprises at least one motion control, the method further comprising:
and when the sliding operation acting on the mobile control is detected, generating the stopping instruction, and controlling the virtual character to move in the game scene according to the sliding operation.
15. An apparatus for controlling a virtual character, wherein a graphic user interface is rendered through a screen of an electronic device, the apparatus comprising:
the detection module is used for responding to the locking operation instruction and detecting whether the virtual character is located in a target area in a game scene to obtain a first detection result;
a determination module for determining a first movement direction of the virtual character based on the first detection result;
and the control module is used for controlling the virtual character to automatically move in the game scene according to the first motion direction.
16. A computer-readable storage medium, comprising a stored program, wherein when the program runs, the computer-readable storage medium controls a device to execute the virtual character control method according to any one of claims 1 to 14.
17. A processor, characterized in that the processor is configured to execute a program, wherein the program executes a control method of a virtual character according to any one of claims 1 to 14.
CN202110280650.6A 2021-03-16 2021-03-16 Virtual character control method and device Active CN112870701B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110280650.6A CN112870701B (en) 2021-03-16 2021-03-16 Virtual character control method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110280650.6A CN112870701B (en) 2021-03-16 2021-03-16 Virtual character control method and device

Publications (2)

Publication Number Publication Date
CN112870701A true CN112870701A (en) 2021-06-01
CN112870701B CN112870701B (en) 2024-02-23

Family

ID=76042504

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110280650.6A Active CN112870701B (en) 2021-03-16 2021-03-16 Virtual character control method and device

Country Status (1)

Country Link
CN (1) CN112870701B (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113730912A (en) * 2021-09-03 2021-12-03 网易(杭州)网络有限公司 Target resource display control method and device and touch terminal
CN114042315A (en) * 2021-10-29 2022-02-15 腾讯科技(深圳)有限公司 Virtual scene-based graphic display method, device, equipment and medium

Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107930105A (en) * 2017-10-23 2018-04-20 网易(杭州)网络有限公司 Information processing method and device, storage medium, electronic equipment
CN110215691A (en) * 2019-07-17 2019-09-10 网易(杭州)网络有限公司 The control method for movement and device of virtual role in a kind of game
CN110812838A (en) * 2019-11-13 2020-02-21 网易(杭州)网络有限公司 Method and device for controlling virtual unit in game and electronic equipment
CN111659116A (en) * 2020-07-02 2020-09-15 腾讯科技(深圳)有限公司 Virtual vehicle control method, device, equipment and medium
CN111760268A (en) * 2020-07-06 2020-10-13 网易(杭州)网络有限公司 Path finding control method and device in game
WO2020233566A1 (en) * 2019-05-23 2020-11-26 腾讯科技(深圳)有限公司 Object jumping control method and apparatus, and computer device and storage medium
CN112402977A (en) * 2020-11-24 2021-02-26 网易(杭州)网络有限公司 Target virtual role locking method and device, processor and electronic device
WO2021036581A1 (en) * 2019-08-30 2021-03-04 腾讯科技(深圳)有限公司 Method for controlling virtual object, and related apparatus

Patent Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107930105A (en) * 2017-10-23 2018-04-20 网易(杭州)网络有限公司 Information processing method and device, storage medium, electronic equipment
WO2020233566A1 (en) * 2019-05-23 2020-11-26 腾讯科技(深圳)有限公司 Object jumping control method and apparatus, and computer device and storage medium
CN110215691A (en) * 2019-07-17 2019-09-10 网易(杭州)网络有限公司 The control method for movement and device of virtual role in a kind of game
WO2021036581A1 (en) * 2019-08-30 2021-03-04 腾讯科技(深圳)有限公司 Method for controlling virtual object, and related apparatus
CN110812838A (en) * 2019-11-13 2020-02-21 网易(杭州)网络有限公司 Method and device for controlling virtual unit in game and electronic equipment
CN111659116A (en) * 2020-07-02 2020-09-15 腾讯科技(深圳)有限公司 Virtual vehicle control method, device, equipment and medium
CN111760268A (en) * 2020-07-06 2020-10-13 网易(杭州)网络有限公司 Path finding control method and device in game
CN112402977A (en) * 2020-11-24 2021-02-26 网易(杭州)网络有限公司 Target virtual role locking method and device, processor and electronic device

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113730912A (en) * 2021-09-03 2021-12-03 网易(杭州)网络有限公司 Target resource display control method and device and touch terminal
CN114042315A (en) * 2021-10-29 2022-02-15 腾讯科技(深圳)有限公司 Virtual scene-based graphic display method, device, equipment and medium
WO2023071808A1 (en) * 2021-10-29 2023-05-04 腾讯科技(深圳)有限公司 Virtual scene-based graphic display method and apparatus, device, and medium
CN114042315B (en) * 2021-10-29 2023-06-16 腾讯科技(深圳)有限公司 Virtual scene-based graphic display method, device, equipment and medium

Also Published As

Publication number Publication date
CN112870701B (en) 2024-02-23

Similar Documents

Publication Publication Date Title
US10695674B2 (en) Information processing method and apparatus, storage medium and electronic device
US10500484B2 (en) Information processing method and apparatus, storage medium, and electronic device
CN107648847B (en) Information processing method and device, storage medium and electronic equipment
CN108355354B (en) Information processing method, device, terminal and storage medium
KR102034367B1 (en) Information processing method and terminal, and computer storage media
CN107823882B (en) Information processing method, information processing device, electronic equipment and storage medium
US10716997B2 (en) Information processing method and apparatus, electronic device, and storage medium
US11794096B2 (en) Information processing method
US10716996B2 (en) Information processing method and apparatus, electronic device, and storage medium
AU2021250929B2 (en) Virtual object control method and apparatus, device, and storage medium
US11446565B2 (en) In-game display control method and apparatus, storage medium processor, and terminal
WO2017054453A1 (en) Information processing method, terminal and computer storage medium
US11890541B2 (en) Virtual object control method and apparatus, device, and storage medium
US11511184B2 (en) In-game display control method and apparatus, storage medium processor, and terminal
JP2023542148A (en) Method, apparatus, electronic device, and storage medium for controlling movement of virtual objects in a game
CN112870701A (en) Control method and device of virtual role
CN112402976A (en) Game role control method, terminal, readable storage medium and electronic device
CN112619167A (en) Information processing method and device, computer equipment and medium
US20240149162A1 (en) In-game information prompting method and apparatus, electronic device and storage medium
CN110465084B (en) Game interface switching method and device, terminal equipment and storage medium
CN113663326B (en) Aiming method and device for game skills
CN115671720A (en) Skill adjusting method and device, computer equipment and storage medium
CN116999810A (en) Virtual object control method and device, storage medium and electronic equipment
CN117753007A (en) Interactive processing method and device for virtual scene, electronic equipment and storage medium
CN111729297A (en) Prop control method and device, computer equipment and medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant