Search

US-12623148-B2 - Method and apparatus for controlling virtual object, and storage medium

US12623148B2US 12623148 B2US12623148 B2US 12623148B2US-12623148-B2

Abstract

A method and an apparatus for controlling a virtual object, a storage medium, and an electronic device. The method includes: obtaining an interactive operation in a virtual scene, the interactive operation being used for controlling a first virtual object to release a virtual prop at a target position; releasing the virtual prop at the target position, and displaying a target region triggered by the virtual prop in the virtual scene, the target region including the target position; and enhancing a target attribute of a virtual object in a first object group in the virtual scene in a case that the first virtual object is located in the target region, the first object group being an object group to which the first virtual object belongs.

Inventors

  • Zhihong Liu

Assignees

  • TENCENT TECHNOLOGY (SHENZHEN) COMPANY LIMITED

Dates

Publication Date
20260512
Application Date
20220916
Priority Date
20200918

Claims (20)

  1. 1 . A method performed by an electronic device, the method comprising: executing an augmented reality game application such that the virtual scene is outputted as a three-dimensional (3D) projection; obtaining an interactive operation in the virtual scene, the interactive operation being used for controlling a first virtual object to release a virtual prop at a target position that is at a distance from the virtual prop in the virtual scene; aiming the virtual prop toward the target position such that a line is extended from the virtual prop to the target position; releasing, via a trigger release, the virtual prop that is aimed towards the target position, and upon releasing the virtual prop, displaying in the virtual scene a target region triggered by the virtual prop in the virtual scene, the target region comprising the target position at the distance from the virtual prop and an area surrounding the target position; and enhancing a target attribute of a second virtual object in a first object group in the virtual scene in a case that the first virtual object is located in the target region, the first object group being an object group to which the first virtual object belongs.
  2. 2 . The method according to claim 1 , wherein the enhancing comprises: continuously enhancing the target attribute of the second virtual object in the first object group in the virtual scene in a case that the first virtual object remains in the target region, an enhancement parameter of the target attribute being in a positive correlation with a duration for which the first virtual object remains in the target region, and the enhancement parameter comprising at least one of an enhancement duration or an enhancement amplitude.
  3. 3 . The method according to claim 1 , wherein the enhancing comprises: enhancing the target attribute of the second virtual object in the first object group in the virtual scene according to an attribute parameter of the virtual prop, an enhancement parameter of the target attribute being in a positive correlation with the attribute parameter of the virtual prop, and the enhancement parameter comprising at least one of an enhancement duration or an enhancement amplitude.
  4. 4 . The method according to claim 1 , wherein the enhancing comprises: enhancing the target attribute of the second virtual object in the first object group in the virtual scene at a first amplitude in a case that a third virtual object is not located in the target region; and enhancing the target attribute of the second virtual object in the first object group in the virtual scene at a second amplitude in a case that the third virtual object is located in the target region, the second amplitude being greater than the first amplitude, the third virtual object being a virtual object in the first object group.
  5. 5 . The method according to claim 1 , wherein in a case that the target attribute of the second virtual object in the first object group is enhanced in the virtual scene, the method further comprises: displaying a target identifier corresponding to the second virtual object in the first object group in the virtual scene, the target identifier being used for indicating that the target attribute of the second virtual object in the first object group is being enhanced.
  6. 6 . The method according to claim 5 , wherein the displaying comprises: performing at least one of the following operations: marking the target identifier on the second virtual object in the first object group, and displaying the target identifier in the virtual scene; or displaying the target identifier corresponding to the second virtual object in the first object group in a map interface of the virtual scene.
  7. 7 . The method according to claim 1 , wherein in a case that the first virtual object is located in the target region, the method further comprises: performing at least one of the following operations: displaying at least one of an orientation identifier or a location identifier of the first virtual object in a virtual scene interface of a third virtual object in a second object group, the second object group being different from the first object group; or displaying at least one of the orientation identifier or the location identifier of the first virtual object in a map interface of the third virtual object in the second object group.
  8. 8 . The method according to claim 1 , wherein in a case that the target attribute of the second virtual object in the first object group is enhanced in the virtual scene, the method further comprises: stopping enhancing the target attribute of the second virtual object in the first object group in the virtual scene in a case that a stop condition is met, the stop condition comprising at least one of the following: the first virtual object leaves the target region; the first virtual object is located in the target region and the first virtual object is killed; the first virtual object is located in the target region and the first virtual object is attacked; a third virtual object in a second object group completes a target task in the virtual scene, the second object group being different from the first object group; the third virtual object in the second object group obtains a display picture in which the first virtual object is located in the target region; an existing duration of the target region reaches a preset duration; an attribute value of the target attribute reaches a maximum attribute value; or the target region stops displaying.
  9. 9 . The method according to claim 1 , wherein in a case that the target region triggered by the virtual prop is displayed in the virtual scene, the method further comprises: performing at least one of the following operations: stopping displaying the target region in the virtual scene in a case that the first virtual object leaves the target region; or stopping displaying the target region in the virtual scene in a case that the first virtual object is killed.
  10. 10 . The method according to claim 1 , wherein the enhancing comprises: performing at least one of the following operations: enhancing a first attribute of the second virtual object in the first object group in the virtual scene, the first attribute being a defense attribute, and the first attribute, when enhanced, reducing damage caused by an attack operation on the second virtual object in the first object group, the attack operation being performed by a third virtual object in a second object group, the first object group being different from the second object group; or enhancing a second attribute of the second virtual object in the first object group in the virtual scene, the second attribute being a movement attribute, and the second attribute, when enhanced, reducing a probability that the second virtual object in the first object group is hit by the attack operation.
  11. 11 . The method according to claim 1 , wherein the enhancing comprises: performing at least one of the following operations: increasing hit points of the second virtual object in the first object group in the virtual scene; improving defense power of the second virtual object in the first object group in the virtual scene; accelerating a movement speed of the second virtual object in the first object group in the virtual scene; or decreasing a negative status parameter of the second virtual object in the first object group in the virtual scene.
  12. 12 . The method according to claim 1 , wherein the enhancing comprises: determining a selection operation triggered by the first virtual object through the virtual prop; and enhancing, in the virtual scene, a target attribute of the second virtual object in the first object group that corresponds to the selection operation, different selection operations corresponding to different target attributes.
  13. 13 . The method according to claim 1 , wherein the releasing comprises: releasing the virtual prop at the target position in a case that the virtual prop is allowed to be released at the target position.
  14. 14 . The method according to claim 13 , further comprising: performing any one of the following operations: determining, in a case that the target position is a position on a virtual ground, that the virtual prop is allowed to be released at the target position; determining, in a case that the target position is the position on the virtual ground and there is no obstacle in the target region on the virtual ground, that the virtual prop is allowed to be released at the target position; or determining, in a case that the target position is the position on the virtual ground and there is an obstacle in the target region on the virtual ground, whether the obstacle meets a release condition of the virtual prop, and determining, in a case that the obstacle meets the release condition, that the virtual prop is allowed to be released at the target position.
  15. 15 . The method according to claim 14 , further comprising: emitting a ray in a direction where a crosshair of the virtual prop aims; and using a first obstacle colliding with the ray as the obstacle in the target region.
  16. 16 . The method according to claim 1 , further comprising: performing any one of the following operations: determining the target position according to a release manner of the virtual prop, the release manner comprising at least one of a crosshair, a direction, or a position; or determining the position of the first virtual object at which the first virtual object is controlled to release the virtual prop as the target position.
  17. 17 . The method according to claim 1 , further comprising: performing any one of the following operations: using a region centered on the target position as the target region; or using an effect display region in which the virtual prop is released as the target region.
  18. 18 . The method according to claim 1 , wherein the enhancing comprises: performing any one of the following operations: enhancing, in the virtual scene, a target attribute of a third virtual object in the first object group that is different from the first virtual object; simultaneously enhancing, in the virtual scene, a target attribute of the first virtual object and the target attribute of the third virtual object in the first object group that is different from the first virtual object; or enhancing, in the virtual scene, a target attribute of the third virtual object in the first object group that is not located in the target region.
  19. 19 . An apparatus comprising: at least one memory configured to store program code; and at least one processor configured to read the program code and operate as instructed by the program code, the program code comprising: executing code configured to cause the at least one processor to execute an augmented reality game application such that the virtual scene is outputted as a three-dimensional (3D) projection; aiming code configured to cause the at least one processor to aim the virtual prop toward the target position such that a line is extended from the virtual prop to the target position; first obtaining code configured to cause the at least one processor to obtain an interactive operation in the virtual scene, the interactive operation being used for controlling a first virtual object to release a virtual prop at a target position that is at a distance from the virtual prop in the virtual scene, the virtual scene displayed during execution of the augmented reality game application, the virtual scene displayed on a display screen of the electronic device that is a wearable head mount device or outputted as a three-dimensional (3D) projection by the electronic device; response code configured to cause the at least one processor to release, via a trigger release, the virtual prop that is aimed towards the target position, and upon releasing the virtual prop, display in the virtual scene a target region triggered by the virtual prop in the virtual scene, the target region comprising the target position at the distance from the virtual prop and an area surrounding the target position; and first enhancement code configured to cause the at least one processor to enhance a target attribute of a virtual object in a first object group in the virtual scene in a case that the first virtual object is located in the target region, the first object group being an object group to which the first virtual object belongs.
  20. 20 . A non-transitory computer-readable storage medium, storing computer program that when executed by at least one processor causes the at least one processor to: executing an augmented reality game application such that the virtual scene is outputted as a three-dimensional (3D) projection; obtain an interactive operation in the virtual scene, the interactive operation being used for controlling a first virtual object to release a virtual prop at a target position that is at a distance from the virtual prop in the virtual scene; aim the virtual prop toward the target position such that a line is extended from the virtual prop to the target position; release, via a trigger release, the virtual prop that is aimed towards the target position, and upon releasing the virtual prop, displaying in the virtual scene a target region triggered by the virtual prop in the virtual scene, the target region comprising the target position at the distance from the virtual prop and an area surrounding the target position; and enhance a target attribute of a second virtual object in a first object group in the virtual scene in a case that the first virtual object is located in the target region, the first object group being an object group to which the first virtual object belongs.

Description

CROSS-REFERENCE TO RELATED APPLICATION(S) This application is a continuation application of International Application No. PCT/CN2021/112846, filed on Aug. 16, 2021, which claims priority to Chinese Patent Application No. 202010988341.X filed with the China National Intellectual Property Administration on Sep. 18, 2020, the disclosures of which are incorporated by reference in their entireties. FIELD The disclosure relates to the field of computers, and specifically, to a method and apparatus for controlling a virtual object, a storage medium, and an electronic device. BACKGROUND In a virtual scene, a plurality of virtual props are often configured for a current virtual object controlled by a user. In the solution provided in the related art, another virtual object (different from the current virtual object) may only be affected by the virtual prop within an action range of the virtual prop, and the virtual prop does not have any effect in a case that the another virtual object is located beyond the action range of the virtual prop. In other words, in a case that the user intends to control the another virtual object by using the virtual prop, due to the operation having high operational limitation, the user needs to first control the current virtual object to move to ensure that the another virtual object is located with the action range of the virtual prop held by the current virtual object, and then release the virtual prop within the action range, thereby achieving controlling of the another virtual object. That is to say, other additional preparation operations are usually also required in a case that the another virtual object is controlled through the current virtual object, which increases operation complexity in a process of controlling the virtual object, resulting in low efficiency of controlling the virtual object. For the foregoing problem, no effective solution has been provided yet. SUMMARY An embodiment the disclosure may provide a method for controlling a virtual object, performed by an electronic device, the method including: obtaining an interactive operation in a virtual scene, the interactive operation being used for controlling a first virtual object to release a virtual prop at a target position; releasing the virtual prop at the target position, and displaying a target region triggered by the virtual prop in the virtual scene, the target region including the target position; and enhancing a target attribute of a virtual object in a first object group in the virtual scene in a case that the first virtual object is located in the target region, the first object group being an object group to which the first virtual object belongs. In some embodiments an apparatus for controlling a virtual object may be provided, the apparatus including: a first obtaining unit, configured to obtain an interactive operation in a virtual scene, the interactive operation being used for controlling a first virtual object to release a virtual prop at a target position; a response unit, configured to release the virtual prop at the target position, and display a target region triggered by the virtual prop in the virtual scene, the target region including the target position; and a first enhancement unit, configured to enhance a target attribute of a virtual object in a first object group in the virtual scene in a case that the first virtual object is located in the target region, the first object group being an object group to which the first virtual object belongs. Some embodiments may further provide a non-transitory computer-readable storage medium, storing a computer program, the computer program being configured to perform, when run, the method for controlling a virtual object provided. Some embodiments may further provide an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, the processor performing, through the computer program, the method for controlling a virtual object. BRIEF DESCRIPTION OF THE DRAWINGS To describe the technical solutions of example embodiments of this disclosure more clearly, the following briefly introduces the accompanying drawings for describing the example embodiments. The accompanying drawings in the following description show only some embodiments of the disclosure, and a person of ordinary skill in the art may still derive other drawings from these accompanying drawings without creative efforts. In addition, one of ordinary skill would understand that aspects of example embodiments may be combined together or implemented alone. FIG. 1 is a schematic diagram of an application environment of a method for controlling a virtual object according some embodiments. FIG. 2 is a schematic flowchart of a method for controlling a virtual object according to some embodiments. FIG. 3A is a schematic diagram of a target position according to some embodiments. FIG. 3B is a schematic diagram of a target position an