CN112870701B - Virtual character control method and device - Google Patents

Virtual character control method and device Download PDF

Info

Publication number
CN112870701B
CN112870701B CN202110280650.6A CN202110280650A CN112870701B CN 112870701 B CN112870701 B CN 112870701B CN 202110280650 A CN202110280650 A CN 202110280650A CN 112870701 B CN112870701 B CN 112870701B
Authority
CN
China
Prior art keywords
virtual character
detection result
control
target area
game scene
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.)
Active
Application number
CN202110280650.6A
Other languages
Chinese (zh)
Other versions
CN112870701A (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

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 virtual character control method and device. The method is applied to the mobile terminal, the mobile terminal obtains a graphical user interface through screen rendering of the electronic equipment, and the method comprises the following steps: responding to the locking operation instruction, and detecting whether the virtual character is positioned in a target area in the game scene to obtain a first detection result; determining a first movement direction of the virtual character based on the first detection result; the virtual character is controlled to automatically move in the game scene according to the first motion direction. The invention solves the technical problems that the thinking confusion is easy to generate and the control effect of the virtual character is affected by the manual control of the virtual character movement by a player in the related technology.

Description

Virtual character control method and device
Technical Field
The invention relates to the field of online games, in particular to a virtual character control method and device.
Background
In the current large-scale multi-player online shooting game (such as chicken-eating game), a game mechanism with a timing shrinkage safety area is often arranged, and if a player is out of the safety area for a long time, the player can cause 'exercise failure' and then the game is ended. Therefore, the player needs to pay frequent attention to the relative positions of the player and the safe area in the game process so as to confirm whether the player needs to move the positions in time or not to ensure that the game can continue.
However, in such games, a player often confirms the relative position and orientation of the player and the security area by viewing a small map, and adjusts the orientation of the virtual character in the game and runs based on the confirmation. In a practical experience, a player needs to manipulate a character model in a three-dimensional scene and view the result on a two-dimensional small map, which is a very unfriendly process for novice players who are not familiar with such games, and easily forgets to observe the small map to determine the direction and position or finds the correct running direction due to confusion, so that the game experience is poor.
In view of the above problems, no effective solution has been proposed at present.
Disclosure of Invention
The embodiment of the invention provides a method and a device for controlling a virtual character, which at least solve the technical problems that the movement of the virtual character is easily confused by thinking through manual control of a player in the related art, and the control effect of the virtual character is influenced.
According to an aspect of the embodiment of the present invention, there is provided a control method for a virtual character, a graphical user interface is obtained by screen rendering of an electronic device, the method including: responding to the locking operation instruction, and detecting whether the virtual character is positioned in a target area in the game scene to obtain a first detection result; determining a first movement direction of the virtual character based on the first detection result; the virtual character is controlled 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 includes: and under the condition that the first detection result is that the virtual character is positioned in the target area, the first movement direction is the current direction of the virtual character, wherein the initial direction is the direction 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 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 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 controlling the virtual character to automatically move in the game scene according to the first motion direction, 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 a direction in which the first position points to a target position in the target area as a second movement direction of the virtual character; the virtual character is controlled to move in accordance with the second direction of motion.
Alternatively, in the case where the movement of the virtual character to the target position is detected, the virtual character is controlled to stop moving automatically.
Optionally, in controlling the virtual character to automatically move in the game scene according to the first motion direction, 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 positioned 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 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 in a third movement direction based on the third detection result.
Optionally, determining whether to control the virtual character to move in the third direction of motion based on the third detection result includes: determining to control the virtual character to move according to a third movement direction when 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 moving automatically when the third detection result is that the second position is the same as the target position of the target area before updating.
Optionally, the graphical user interface comprises at least one locking operation control, and the method further comprises: and generating a locking operation instruction when the touch operation acted on the locking operation control is detected.
Optionally, the graphical user interface at least includes a movement control, and the touch operation applied to the lock operation control includes a sliding operation where the initial touch point is located on the movement control and the final touch point is located on the lock operation control.
Optionally, the method further comprises: and responding to the stopping instruction in the process of controlling the virtual character to automatically move in the game scene according to the first movement direction, and controlling the virtual character to stop automatically moving.
Optionally, the graphical user interface comprises a lock operation control, the method further comprising: and generating a stop 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 movement direction.
Optionally, the graphical user interface comprises at least one movement control, and the method further comprises: and when the sliding operation acting on the movement control is detected, generating a stop instruction, and controlling the virtual character to move in the game scene according to the sliding operation.
According to another aspect of the embodiment 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, detecting whether the virtual character is positioned in a target area in the game scene or not, and obtaining a first detection result; the determining module is used for determining a first movement direction of the virtual character based on a 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 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 device in which the computer readable storage medium is controlled to execute the above-mentioned virtual character control method.
According to another aspect of the embodiment of the present invention, there is further provided a processor, configured to execute a program, where the program executes the above-mentioned virtual character control method.
In the embodiment of the invention, the locking operation instruction is responded, whether the virtual character is located in the target area in the game scene is detected at first, a first detection result is obtained, and the first movement direction of the virtual character is determined based on the first detection result, so that the virtual character is controlled to move in the game scene automatically according to the first movement direction, and the virtual character is controlled to move into the target area.
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 embodiments of the invention and together with the description serve to explain the invention and do not constitute a limitation on 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 illustration of the direction of movement of an alternative avatar in the next safe area, in accordance with an embodiment of the present invention;
FIG. 2b is a schematic illustration of the direction of movement of an alternative avatar when not in the next safe area, in accordance with embodiments of the present invention;
FIG. 3 is a schematic illustration of the direction of motion of an alternative avatar moving to the next edge of a safe area, in accordance with an embodiment of the present invention;
fig. 4 is a schematic diagram of a control apparatus for a virtual character according to an embodiment of the present invention.
Detailed Description
In order that those skilled in the art will better understand the present invention, a technical solution in the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings in which it is apparent that the described embodiments are only some embodiments of the present invention, not all embodiments. All other embodiments, which can be made by those skilled in the art based on the embodiments of the present invention without making any inventive effort, shall fall within the scope of the present invention.
It should be noted that the terms "first," "second," and the like in the description and the claims of the present invention and the above figures are used for distinguishing between similar objects and not necessarily for describing a particular sequential or chronological order. It is to be understood that the data so used may be interchanged where appropriate such that the embodiments of the invention described herein may be implemented in sequences other than those illustrated or otherwise 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.
According to an embodiment of the present invention, there is provided a method of controlling a virtual character, it being noted that the steps shown in the flowchart of the drawings may be performed 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 performed in an order other than that shown or described herein.
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, a notebook personal computer and the like 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 through logging in the game client; the electronic device may also be a server, for example, a cloud server, on which a game client of an online shooting game is installed, and a player logs in the game client through his mobile terminal to play the online shooting game. Different games may be provided to the player with different graphical user interfaces that are displayed on the display screen of the mobile terminal, in which game scenes, skill controls, operational controls (e.g., movement controls that control movement of virtual characters), interactive controls (e.g., chat boxes, voice input controls, etc.), game settings controls, etc., as the invention is not specifically limited in this regard.
It should be noted that, the embodiment of the present invention is mainly directed to an online shooting game with a game mechanism in which a secure zone is shrunk in a timing manner, so that a player can view the current position of a virtual character and the position of the secure 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 including the steps of:
step S102, responding to the locking operation instruction, detecting whether the virtual character is positioned in a target area in the game scene, and obtaining a first detection result.
At present, a mobile terminal is often provided with a touch screen, and a player can interact with a graphical user interface directly in a mode of performing touch operation on the screen, so that different operation instructions can be detected; the mobile terminal is also provided with a microphone, and a player can 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 manner of shaking and rotating the mobile terminal, so that different operation instructions can be detected.
Based on the detected operation instruction, the virtual character may be controlled to perform a corresponding action, for example, after the motion operation instruction is detected, the virtual character may be controlled to move according to a motion direction corresponding to the motion operation instruction, and a movement condition of the virtual character may be displayed in the graphical user interface.
The locking operation instruction in the above steps may be a locking running instruction, which can help the player achieve the purpose of "running in the direction of the safe area by one key". When the player needs to control the virtual character to run into the safe area, the player can trigger the locking operation instruction in various different modes, for example, can trigger in a touch operation mode, can trigger in a voice control mode, a mobile terminal shaking mode, a mobile terminal rotating mode and the like.
In a first alternative embodiment, a lock running button may be provided on the graphical user interface for the player, and a corresponding function may be added to the button, so that the player may trigger the virtual character to automatically adjust the direction of movement, face the safe area, and lock running by clicking the button.
In a second alternative embodiment, a locked running area may be provided on the graphical user interface for the player, and corresponding functions may be added for the area, where during the game, the player may control the movement direction of the virtual character through the directional wheel, and by dragging an auxiliary operation control in the directional wheel (such as a circular control in the middle of the directional wheel) to move into the locked running area, trigger the virtual character to automatically adjust the movement direction, face the safe area, and lock running.
In a third alternative embodiment, a locked running voice command may be provided to the player, for example, the locked running voice command may be "auto running" so that the player may issue an "auto running" voice, and after recognition by voice, it is determined that the player inputs the locked running voice command, thereby triggering the avatar to automatically adjust the direction of movement, face the safe area, and lock running.
In a fourth alternative embodiment, an operation of shaking the mobile phone can be provided for the player, and corresponding functions are added in the operation, so that the player can trigger the virtual character to automatically adjust the movement direction, face the safety zone and lock running through shaking the mobile phone.
The target area in the above step may be a safe area in an online shooting game, in which a game mechanism with a timing contraction of the safe area is provided, and in order to provide a better game experience for a player, the target area may be an upcoming safe area (i.e. the next safe area), so as to achieve the purpose of controlling the virtual character to run toward the safe area in advance. The shape of the target area may be rectangular, circular, triangular, or the like, but is not limited thereto, and may be determined according to an actual game setting, and in the embodiment of the present invention, a circular shape is taken as an example for explanation.
It should be noted that, when the player triggers the locked running instruction, the virtual character may not run into the next safe area at this time, that is, the virtual character is located outside the target area, and the virtual character needs to be controlled to run toward the target area at this time; or, has already been run into the next safe zone, i.e. the virtual character is located within the target zone, at which time it is not necessary to control the virtual character to run towards the target zone. Therefore, before controlling the virtual character to lock towards the safe area to run, the current position of the virtual character can be acquired, the circle center position and the radius of the safe area are acquired, whether the virtual character is located in the target area or not is judged by judging whether the distance between the current position and the circle center position is larger than the radius, and then the running direction of the virtual character is determined based on the corresponding result.
Step S104, a first movement direction of the virtual character is determined based on the first detection result.
In an alternative embodiment, if it is detected that the avatar is located in the target area, the avatar may be considered to run towards the safe area in whichever direction it is running, and in order to simplify the control operation, only the running may be locked but the movement direction of the avatar is not adjusted, i.e. the first movement direction is the current direction of the avatar.
In another alternative embodiment, if the avatar is detected as being outside the target area, then, to ensure that the avatar can run into the safe area, the running may be locked and the direction of movement of the avatar may be adjusted, where the first direction of movement is the direction facing the safe area.
Step S106, the virtual character is controlled to automatically move in the game scene according to the first motion direction.
In an alternative embodiment, after determining the first direction of movement, the running may be locked, and the avatar may run in the first direction of movement, so that the avatar may automatically run into the safe area.
According to the embodiment of the invention, the locking operation instruction is responded, whether the virtual character is located in the target area in the game scene is detected at first, a first detection result is obtained, and the first movement direction of the virtual character is determined based on the first detection result, so that the virtual character is controlled to move in the game scene automatically according to the first movement direction, and the virtual character is controlled to move into the target area.
Optionally, in the above embodiment of the present invention, determining the first movement direction of the virtual character based on the first detection result includes: and when the first detection result is that the virtual character is positioned in the target area, the first movement direction is the current direction of the virtual character, wherein the current direction is the direction of the virtual character when the locking operation instruction is detected. Optionally, in the above embodiment of the present invention, determining the first movement 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, may be 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 center position 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 the running may be locked but the movement direction of the virtual character is not adjusted, at this time, since the virtual character may be moving or the virtual character is in a stationary state, the first movement direction may be determined as the current direction of the virtual character, that is, the first movement direction is the current direction of the virtual character, in order to control the movement of the virtual character without adjusting the movement direction. 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 when the player clicks the lock running button, the player locks running without adjusting the movement direction of the virtual character, and the movement direction of the virtual character 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 alternative embodiment, in the case that the first detection result is that the virtual character is located outside the target area, in order to ensure that the virtual character can run into the safe area, the running may be locked and the movement direction of the virtual character may be adjusted, at this time, the first movement 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 as the first movement direction, so that the virtual character may run toward the target position toward the target area. For example, as shown in fig. 2b, when the virtual character (as shown by the solid circle in the figure) is not in the next safe zone, and when the player clicks the lock running button, the virtual character is adjusted to face the center of the next safe zone and locked to run, and the movement direction of the virtual character is shown by the dotted line.
Optionally, in the above embodiment of the present invention, in 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 the game scene; determining a direction in which the first position points to a target position in the target area as a second movement direction of the virtual character; the virtual character is controlled to move in accordance with the second direction of motion.
The first position in the above step may be a position where the virtual character is located when it is detected that the virtual character moves to an 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, only the running is locked but the movement direction is not adjusted, and if the movement direction of the virtual character is not the center of the security area, the virtual character may run out of the security area after running for a certain period of time.
To avoid the above problem, in an alternative embodiment, during the process of locking running, whether the virtual character runs out of the safe area can be detected in real time, that is, whether the virtual character moves to the edge of the target area is detected, if so, the movement direction of the virtual character needs to be readjusted, and the virtual character is controlled to run towards the safe area. The control method at this time is the same as the case that the virtual character is located outside the target area as the above-mentioned 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 security area.
For example, as shown in fig. 3, in the case where it is detected that the virtual character is within the next safe zone, the running is locked, and when it runs to the edge of the next safe zone, the automatically adjusted direction runs toward the center of the next safe zone, and the movement direction of the virtual character is shown as a dotted line.
Alternatively, in the above-described embodiment of the present invention, in the case where the movement of the virtual character to the target position is detected, the virtual character is controlled to stop the automatic movement.
In an alternative embodiment, the movement direction of the virtual character is towards the target position, i.e. towards the center of the next safe zone, and the virtual character finally runs to the target position, at which point the virtual character has already run into the next safe zone, and the virtual character does not need to continue running, so that the virtual character can be controlled to stop moving automatically, and the final stop position is the center point of the next safe zone, and at this point the locked running function automatically ends.
Optionally, in the above embodiment of the present invention, in 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 positioned 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 position in the above step may be a position where the virtual character is located when the position update of the target area is detected.
In the online shooting game, the position of the safe area is updated regularly, so that the situation of updating the position of the safe area may occur during the locking running of the virtual character, and in this case, in order to achieve a better control effect, the virtual character needs to be controlled to run to the updated target area. The control process for controlling the virtual character to run to the updated target area is the same as that of the above embodiment, and will not be described herein.
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 direction of the virtual character, wherein the current direction is the direction of the virtual character when the position of the target area is detected to be updated; and under the condition that the second detection result is that the virtual character is positioned outside the updated target area, the third movement direction is a direction determined based on the current position of the virtual character and the updated target position in the 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 above 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 in a 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 updating, 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 firstly obtained, whether the current position is the central position of the safety area before updating is judged, if so, the virtual character is determined to stop running, and the virtual character is not controlled to run any more; if not, it is determined that the avatar can continue running, it is necessary to control the avatar to adjust the direction of movement and continue running toward the center of the updated safe zone.
Optionally, in the above embodiment of the present invention, determining whether to control the virtual character to move in 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 when 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 moving automatically when the third detection result is that the second position is the same as the target position of the target area before updating.
In an alternative embodiment, if the second position of the virtual character is different from the target position of the target area before updating, the virtual character is still in the locked running state, so that the running direction can be automatically adjusted again to run towards the center of the updated safe area; if the second position of the avatar is the same as the target position of the target area before updating, at which point the avatar has stopped running, no further lock running is needed, and thus the avatar running may no longer be controlled, i.e. it is determined to control the avatar to stop moving automatically.
Optionally, in the foregoing embodiment of the present invention, 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 acted on the locking operation control is detected.
The lock operation control in the above step may be a lock running button provided to the player on the graphical user interface. It should be noted that, currently, a locked running button is already provided on a graphical user interface of most online shooting games, and a player can implement automatic running of a virtual character by clicking the button. The invention can integrate the automatic correction function of the safe area direction 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 be the safe area and lock running after the button is clicked by a player.
The touch operation in the above step may be an operation acting on the lock operation control itself, for example, clicking, double clicking, long pressing, heavy pressing, etc., but is not limited thereto; the touch operation may be a sliding operation between a plurality of controls, for example, a sliding operation from a start of a control such as a move control to an end of a lock operation control, but is not limited thereto.
In an alternative embodiment, when the locking operation control is not triggered, the player may control the virtual character to move optionally through a directional wheel disc included in the graphical user interface, and after the player clicks the locking operation control, it may first determine whether the virtual character is located in the next security zone, and determine, based on the determination result, a movement direction of the virtual character, where the virtual character runs and locks according to the movement direction.
Optionally, in the above embodiment of the present invention, the graphical user interface includes at least one movement control, and the touch operation applied to the locking operation control includes a sliding operation where the initial touch point is located on the movement control and the final touch point is located on the locking operation control.
The movement control in the above steps may be a directional wheel provided to the player on a graphical user interface. It should be noted that, currently, a directional wheel is already provided on a graphical user interface of most online shooting games, and a player can control the running direction of a virtual character by dragging an auxiliary operation control (such as a circular control in the middle of the directional wheel) in the directional wheel. According to the invention, on the basis of the existing direction wheel disc, a locking running area can be added on the direction wheel disc, for example, the area where the existing locking operation control is located is used as the locking running area, and the automatic correction function of the direction of the safety area is fused in the area, so that after a player drags the auxiliary operation control to the locking running area, the virtual character can automatically adjust the orientation to be the safety area and lock running.
In an alternative embodiment, in the case that 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 determine whether the virtual character is located in the next safe area, and determine the movement direction of the virtual character based on the determination result, and the virtual character runs and locks according to the movement direction.
In another alternative embodiment, the player may generate a touch operation acting on the lock operation control by sliding from the area where the steering wheel disc is located to the area where the lock operation control is located, so that it may first determine whether the virtual character is located in the next security area, and determine, based on the determination result, the movement direction of the virtual character, and the virtual character runs and locks according to the movement direction.
Optionally, in the above embodiment of the present invention, the method further includes: and responding to the stopping instruction in the process of controlling the virtual character to automatically move in the game scene according to the first movement direction, 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 moving automatically, 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 may be instructions entered by the player's voice, for example, the player directly utters "stop automatic move" voice; or instructions generated by the player by shaking and rotating the mobile terminal again.
In an alternative embodiment, after controlling the avatar to automatically run to the safe area, if the player wishes to freely control the avatar, the player may generate a stop instruction in a preset manner, at which point the locked running state is disconnected, the avatar stops running, and stops in place.
Optionally, in the above embodiment of the present invention, the graphical user interface includes a lock operation control, and the method further includes: and generating a stop 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 movement direction.
In an alternative embodiment, after the player clicks the lock operation control to control the virtual character to run automatically to the safe area, 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 disconnected, the virtual character stops running, and stops in place.
Optionally, in the foregoing embodiment of the present invention, the graphical user interface includes at least one movement control, and the method further includes: and when the sliding operation acting on the movement control is detected, generating a stop instruction, and controlling the virtual character to move in the game scene according to the sliding operation.
In an alternative embodiment, after controlling the avatar to automatically run toward the safe area, if the player wishes to freely control the avatar, the player may drag the secondary operational controls in the directional wheel, at which point the locked running state is automatically disconnected and the running direction of the avatar is determined by the directional wheel.
According to the embodiment of the present invention, a device for controlling a virtual character is further provided, where the device may execute the method for controlling a virtual character in the foregoing embodiment, and the specific implementation scheme and application scenario are the same as those in the foregoing embodiment, and are not described herein.
Optionally, the graphical user interface is obtained by screen rendering of the electronic device.
Fig. 4 is a schematic view of a virtual character control apparatus according to an embodiment of the present invention, as shown in fig. 4, the apparatus including:
the detection module 42 is configured to detect whether the virtual character is located in a target area in the game scene in response to the locking operation instruction, so as to obtain a first detection result;
a determining module 44, configured to determine a first movement direction of the virtual character based on the first detection result;
the control module 46 is configured to control 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 a first determining unit configured to, when the first detection result is that the virtual character is located in the target area, determine that the first movement direction is a current direction of the virtual character, where the current direction is a direction of the virtual character when the lock 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, if the first detection result is that the virtual character is located outside the target area, determine a first movement direction 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 acquisition module is used for acquiring a first position of the virtual character in the game scene when detecting that the virtual character moves to the edge of the target area in the process of controlling the virtual character to automatically move in the game scene according to a first movement direction; the determining module is further used for determining that the direction of the first position pointing 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 avatar to stop moving automatically if it is detected that the avatar 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 the position update of the target area is detected in the process of controlling the virtual character to automatically move in the game scene according to the first movement direction; the detection module is also used for detecting whether the virtual character is positioned in the updated target area according to the second position to obtain a second detection result; the control module is also 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 also 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 determining module is further used for determining 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 a third movement direction if the third detection result is that the second position is different from the target position of the target area before updating; and a fourth determining unit configured to determine to control the virtual character to stop moving automatically, if the third detection result is that the second position is the same as the target position of the target area before updating.
Optionally, in the above embodiment of the present invention, the graphical user interface includes at least one locking operation control, and the apparatus further includes: the generation 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 control the virtual character to stop moving automatically in response to the stop instruction during controlling the virtual character to move automatically in the game scene according to the first movement direction.
Optionally, in the above embodiment of the present invention, the graphical user interface includes a lock operation control, and the apparatus further includes: the generation module is used for generating a stop instruction when 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 movement direction.
Optionally, in the foregoing embodiment of the present invention, the graphical user interface includes at least one movement control, and the apparatus further includes: the generation module is used for generating a stop 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, the computer-readable storage medium including a stored program, wherein when the program runs, a device on which the computer-readable storage medium is controlled to execute the virtual character control method in the above embodiment.
According to an embodiment of the present invention, there is also provided a processor, configured to execute a program, where the program executes the method for controlling a virtual character in the above embodiment.
In the foregoing embodiments of the present invention, the descriptions of the embodiments are emphasized, and for a portion of this disclosure that is not described in detail in this embodiment, reference is made to the related descriptions of other embodiments.
In the several embodiments provided in the present application, it should be understood that the disclosed technology content may be implemented in other manners. The above-described embodiments of the apparatus are merely exemplary, and the division of the units, for example, may be a logic function division, and may be implemented in another manner, for example, a plurality of units or components may be combined or may be integrated into another system, or some features may be omitted, or not performed. Alternatively, the coupling or direct coupling or communication connection shown or discussed with each other may be through some interfaces, units or modules, or may be in electrical or other forms.
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 may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
In addition, each functional unit in the embodiments of the present invention may be integrated in one processing unit, or each unit may exist alone physically, or two or more units may be integrated in one unit. The integrated units may be implemented in hardware or in software functional units.
The integrated units, if implemented in the form of software functional units and sold or used as stand-alone products, may be stored in a computer readable storage medium. Based on such understanding, the technical solution of the present invention may be embodied essentially or in part or all of the technical solution or in part in the form of a software product stored in a storage medium, including instructions for causing a computer device (which may be a personal computer, a server, or a network device, etc.) to perform 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, random Access Memory), a removable hard disk, a magnetic disk, or an optical disk, or other various media capable of storing program codes.
The foregoing is merely a preferred embodiment of the present invention and it should be noted that modifications and adaptations to those skilled in the art may be made without departing from the principles of the present invention, which are intended to be comprehended within the scope of the present invention.

Claims (15)

1. A method for controlling a virtual character, wherein a graphical user interface is obtained through screen rendering of an electronic device, the method comprising:
responding to the locking operation instruction, and detecting whether the virtual character is positioned in a target area in the game scene to obtain a first detection result;
determining a first movement direction of the virtual character based on the first detection result;
controlling the virtual character to automatically move in the game scene according to the first movement direction;
wherein 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 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, and the direction determined based on the current position of the virtual character and the target position in the target area is the direction in which the current position points to the target position.
2. The method of claim 1, wherein the determining a first direction of movement 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 direction of the virtual character, wherein the current direction is the direction of the virtual character when the locking operation instruction is detected.
3. The method of claim 2, wherein in controlling the virtual character to automatically move in the game scene according to 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 a direction in which the first position points to a target position in the target area as a second movement direction of the virtual character;
and controlling the virtual character to move according to the second movement direction.
4. A method according to claim 3, wherein in case movement of the avatar to the target position is detected, the avatar is controlled to stop moving automatically.
5. The method of claim 1, wherein in controlling the virtual character to automatically move in the game scene according to 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 positioned 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.
6. The method of claim 5, wherein after the obtaining the second location 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 movement direction based on the third detection result.
7. The method of claim 6, wherein the determining whether to control the virtual character to move in the third direction of motion based on the third detection result comprises:
Determining to control the virtual character to move according to the third movement direction when the third detection result is that the second position is different from the target position of the target area before updating;
and if the third detection result is that the second position is the same as the target position of the target area before updating, determining to control the virtual character to stop moving automatically.
8. The method of any one of claims 1 to 7, wherein the graphical user interface comprises at least one lock operation control, the method further comprising:
and generating the locking operation instruction when the touch operation acted on the locking operation control is detected.
9. The method of claim 8, wherein the graphical user interface comprises at least one movement control, and wherein 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.
10. The method according to any one of claims 1 to 7, further comprising:
and responding to a stopping instruction in the process of controlling the virtual character to automatically move in the game scene according to the first movement direction, and controlling the virtual character to stop automatically moving.
11. The method of claim 10, wherein the graphical user interface comprises a lock operation control, the method further comprising:
and generating the stop 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 movement direction.
12. The method of claim 10, wherein the graphical user interface comprises at least one movement control, the method further comprising:
and when the sliding operation acting on the movement control is detected, generating the stopping instruction, and controlling the virtual character to move in the game scene according to the sliding operation.
13. A control apparatus for a virtual character, wherein a graphical 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, detecting whether the virtual character is positioned in a target area in the game scene or not, and obtaining a first detection result;
a determining module, configured to determine a first motion direction of the virtual character based on the first detection result;
The control module is used for controlling the virtual character to automatically move in the game scene according to the first motion direction;
wherein the determining module comprises:
the direction determining unit is used for determining the first movement direction to be a direction determined based on the current position of the virtual character and the target position in the target area when the first detection result is that the virtual character is located outside 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, and the direction determined based on the current position of the virtual character and the target position in the target area is the direction in which the current position points to the target position.
14. A computer-readable storage medium, characterized in that the computer-readable storage medium comprises a stored program, wherein the program, when run, controls a device in which the computer-readable storage medium is located to execute the control method of the virtual character according to any one of claims 1 to 12.
15. A processor for running a program, wherein the program runs to execute the virtual character control method according to any one of claims 1 to 12.
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 CN112870701A (en) 2021-06-01
CN112870701B true 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)

Families Citing this family (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
CN114042315B (en) * 2021-10-29 2023-06-16 腾讯科技(深圳)有限公司 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

Also Published As

Publication number Publication date
CN112870701A (en) 2021-06-01

Similar Documents

Publication Publication Date Title
AU2021250929B2 (en) Virtual object control method and apparatus, device, and storage medium
CN107648847B (en) Information processing method and device, storage medium and electronic equipment
CN112870701B (en) Virtual character control method and device
US10967250B2 (en) Information processing method and apparatus, electronic device, and storage medium
US11890541B2 (en) Virtual object control method and apparatus, device, and storage medium
CN108654085B (en) Game virtual object control method and device, electronic equipment and storage medium
CN106780674B (en) Lens moving method and device
CN111228802B (en) Information prompting method and device, storage medium and electronic device
CN112619167A (en) Information processing method and device, computer equipment and medium
JP2023542148A (en) Method, apparatus, electronic device, and storage medium for controlling movement of virtual objects in a game
CN112402976A (en) Game role control method, terminal, readable storage medium and electronic device
CN113198177B (en) Game control display method and device, computer storage medium and electronic equipment
US20240149162A1 (en) In-game information prompting method and apparatus, electronic device and storage medium
CN112891943A (en) Lens processing method and device and readable storage medium
CN110772784B (en) Carrier control method and device, storage medium and electronic device
KR102495259B1 (en) Method and apparatus for targeting precisely at objects in on-line game
CN114904273A (en) Method and device for controlling virtual object in game, electronic equipment and storage medium
CN113769373A (en) Game operation sensitivity adjustment method and device, storage medium and electronic device
WO2024120030A1 (en) Virtual object placement method and apparatus, device, medium, and product
CN115671720A (en) Skill adjusting method and device, computer equipment and storage medium
CN110755846B (en) Game control method, game control device and terminal equipment
CN113082712B (en) Virtual character control method, device, computer equipment and storage medium
CN113440841A (en) Control method and device of virtual role, electronic equipment and readable storage medium
CN116688496A (en) Task prompting method and device, storage medium and electronic equipment
CN116999810A (en) Virtual object control method and device, storage medium and electronic equipment

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