Target locking method and apparatus, electronic device, and storage medium
A target locking method and apparatus, an electronic device, and a storage medium are provided. The target locking method includes: determining an anchor point position on a graphical user interface on which a plurality of virtual objects are displayed, determining a plurality of target virtual objects corresponding to a target skill from the plurality of virtual objects, according to a relative position of each virtual object to the anchor point position and the target skill, and displaying a locking mark on the target virtual objects.
1 . A target locking method, comprising:
determining, by a terminal, an anchor point position, wherein a graphical user interface is provided by the terminal, and a plurality of virtual objects are displayed on the graphical user interface;
determining, from the plurality of virtual objects, a plurality of target virtual objects corresponding to a target skill, according to a relative position of each virtual object to the anchor point position and the target skill, wherein the target skill comprises a plurality of skills; and
displaying a locking mark on a target virtual object,
wherein displaying the locking mark on the target virtual object comprises:
displaying the locking mark corresponding to a type of the target virtual object on the target virtual object, according to the type of the target virtual object;
displaying a same locking mark for a same type of target virtual objects corresponding to the plurality of skills, according to types of the target virtual objects;
in response to determining that the target virtual objects corresponding to the plurality of skills comprise different quantities of the virtual objects of the same type, determining a quantity of the skills superimposed on each target virtual object, according to the type of each target virtual object; and
displaying a superimposition effect of the locking mark on each target virtual object, according to the quantity of the skills superimposed on each target virtual object.
2 . The method according to claim 1 , further comprising:
in response to a release instruction for the target skill, releasing the target skill to the target virtual object.
3 . The method according to claim 1 , further comprising:
displaying the locking mark, on the target skill displayed on the graphical user interface.
4 . The method according to claim 1 , wherein displaying the same locking mark, for the same type of the target virtual objects corresponding to the plurality of target skills, according to the types of the target virtual objects further comprises:
in response to determining that the target virtual objects corresponding to the plurality of skills comprise a same quantity of the virtual objects of the same type, displaying the same locking mark, for the same type of the target virtual objects corresponding to the plurality of skills, according to the type of each target virtual object.
5 . The method according to claim 1 , wherein the superimposition effect comprises at least one of: a deformation of the locking mark, or addition of an indicator.
6 . The method according to claim 1 , wherein displaying the locking mark corresponding to the type of the target virtual object, at a position corresponding to the target virtual object, according to the type of the target virtual object, further comprises:
in response to determining that target virtual objects corresponding to the plurality of skills comprise different types of the virtual objects, displaying different locking marks, for different types of the target virtual objects corresponding to the plurality of skills, according to the type of each target virtual object.
7 . The method according to claim 1 , wherein displaying the locking mark corresponding to the type of the target virtual object on the target virtual object further comprises:
in response to determining that target virtual objects corresponding to different skills in the plurality of skills comprise a plurality of same virtual objects, displaying the locking marks corresponding to the different skills, on the same virtual objects.
8 . The method according to claim 1 , comprising:
in response to a strengthened touch operation for the target skill, displaying a strengthened effect of the locking mark.
9 . The method according to claim 8 , wherein displaying the strengthened effect of the locking mark comprises:
in response to determining that a long-press operation is set as the strengthened touch operation, after a duration for the long-press operation, highlighting the locking mark on a locked virtual object corresponding to the target skill.
10 . The method according to claim 1 , wherein displaying the locking mark on the target virtual object further comprises:
displaying the locking mark, at a geometric center of a bounding box on the target virtual object.
11 . The method according to claim 1 , wherein the anchor point position comprises: a reference point in a virtual scenario, a preset position on the graphical user interface, or a crosshair of a controlled virtual object in a game scenario.
12 . The method according to claim 11 , wherein the crosshair comprises a point on the graphical user interface; and wherein determining the anchor point position comprises:
in response to determining that the target virtual object is locked, emitting a logical ray into the virtual scenario through the crosshair, so as to perform collision detection to confirm the target virtual object.
13 . The method according to claim 11 , wherein determining the plurality of target virtual objects corresponding to the target skill, from the plurality of virtual objects, comprises:
in response to determining that the target skill is a group attack against all types of the virtual objects within a range, determining the virtual objects within the range as the target virtual objects by comparing whether a distance between each virtual object and the anchor point in the virtual scenario is within a set range required by the target skill.
14 . The method according to claim 1 , wherein the locking mark comprises at least one of: a stroke highlight effect, a skin material with a warning color, a text prompt, and a pattern mark.
15 . An electronic device, comprising: a processor, a storage medium, and a bus, wherein the storage medium stores program instructions executable by the processor, wherein when the electronic device is running, the processor and the storage medium communicate via the bus, and the processor executes the program instructions to perform steps of a target locking method, with the target locking method comprising:
determining, by the electronic device, an anchor point position, wherein a graphical user interface is provided by the electronic device, and a plurality of virtual objects are displayed on the graphical user interface;
determining, from the plurality of virtual objects, a plurality of target virtual objects corresponding to a target skill according to a relative position of each virtual object to the anchor point position and the target skill, wherein the target skill comprises a plurality of skills; and
displaying a locking mark on a target virtual object,
wherein displaying the locking mark on the target virtual object comprises:
displaying the locking mark corresponding to a type of the target virtual object on the target virtual object, according to the type of the target virtual object;
displaying a same locking mark for a same type of target virtual objects corresponding to the plurality of skills, according to types of the target virtual objects;
in response to determining that the target virtual objects corresponding to the plurality of skills comprise different quantities of the virtual objects of the same type, determining a quantity of the skills superimposed on each target virtual object, according to the type of each target virtual object; and
displaying a superimposition effect of the locking mark on each target virtual object, according to the quantity of the skills superimposed on each target virtual object.
16 . A non-transitory computer-readable storage medium, storing a computer program thereon, wherein the computer program, when executed by a processor, performs steps of a target locking method, with the target locking method comprising:
determining, by a terminal, an anchor point position, wherein a graphical user interface is provided by the terminal, and a plurality of virtual objects are displayed on the graphical user interface;
determining, from the plurality of virtual objects, a plurality of target virtual objects corresponding to a target skill, according to a relative position of each virtual object to the anchor point position and the target skill, wherein the target skill comprises a plurality of skills; and
displaying a locking mark on a target virtual object,
wherein displaying the locking mark on the target virtual object comprises:
displaying the locking mark corresponding to a type of the target virtual object on the target virtual object, according to the type of the target virtual object;
displaying a same locking mark for a same type of target virtual objects corresponding to the plurality of skills, according to types of the target virtual objects; and
in response to determining that the target virtual objects corresponding to the plurality of skills comprise different quantities of the virtual objects of the same type, determining a quantity of the skills superimposed on each target virtual object, according to the type of each target virtual object; and
displaying a superimposition effect of the locking mark on each target virtual object, according to the quantity of the skills superimposed on each target virtual object.