Method, device, storage medium and electronic device for interacting with virtual object
By displaying a snap-inable area and implementing crosshair locking and collision detection in shooting games, the problem of low target hit rate in close-range interactions is solved, improving the user's operating experience.
Patent Information
- Application Number
- CN202111004857.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-08-30
- Publication Date
- 2025-11-28
- Estimated Expiration
- 2041-08-30
AI Technical Summary
In shooting games, the target hit rate is low during close-range interactions, and the lack of consideration for distance and aiming leads to a reduced user experience.
By displaying a snap-in area on the graphical user interface, locking onto the target virtual object based on the crosshair orientation, snapping in response to a release operation, performing collision detection, and initiating interaction.
It improved the target hit rate of near-field interaction, enhanced the user experience, and optimized the operation process of near-field interaction skills.
Smart Images

Figure CN115721925B_ABST
Abstract
Description
Technical Field
[0001] This disclosure relates to the field of computer technology, and more specifically, to a method for interacting with virtual objects, a device for interacting with virtual objects, a computer-readable storage medium, and an electronic device. Background Technology
[0002] With the development of computer technology and the diversification of terminal functions, the types of games that can be played on terminals are increasing, and shooting games are one of the more popular types. In shooting games, the terminal displays a virtual scene on the interface, and virtual objects are displayed in the virtual scene. Users control these virtual objects to fight against other virtual objects through the terminal.
[0003] Because shooting games have a narrow field of view, require aiming when attacking targets, and virtual objects are generally positioned far away, long-range shooting becomes the main combat method. Correspondingly, users pay less attention to close-range combat.
[0004] Currently, when users control virtual objects to engage in close-range combat, they can directly attack the target virtual object by triggering melee skills. The entire close-range interaction process does not take into account distance and aiming issues, resulting in a low probability of hitting the target and thus reducing the user's operating experience.
[0005] It should be noted that the information disclosed in the background section above is only used to enhance the understanding of the background of this disclosure, and therefore may include information that does not constitute prior art known to those skilled in the art. Summary of the Invention
[0006] The purpose of this disclosure is to provide a method for interacting with virtual objects, a device for interacting with virtual objects, a computer-readable storage medium, and an electronic device, thereby overcoming, to at least some extent, the problem of low target hit rate during short-range interaction due to limitations in related technologies.
[0007] According to a first aspect of this disclosure, a method for interacting with virtual objects is provided, which provides a graphical user interface including a virtual scene and at least one proximity interaction skill control via a terminal device, the method comprising:
[0008] In response to a touch operation applied to the first proximity interaction skill control, an snap-in area is displayed on the graphical user interface;
[0009] Based on the orientation of the crosshair in the adsorption area, the target virtual object is locked in the virtual scene;
[0010] In response to the release operation applied to the first near-field interaction skill control, the target virtual object is attracted and locked.
[0011] perform collision detection on the adsorbed target virtual object, and initiate interaction with the target virtual object according to the detection result.
[0012] In an example embodiment of the present disclosure, the aiming at the target virtual object in the virtual scene according to the center-of-attraction in the adsorbable region comprises:
[0013] aiming at the target virtual object in the virtual scene according to the center-of-attraction in the adsorbable region;
[0014] locking the target virtual object when an angle between the target virtual object and the center-of-attraction meets a starting condition of a locking function.
[0015] In an example embodiment of the present disclosure, the aiming at the target virtual object in the virtual scene according to the center-of-attraction in the adsorbable region comprises:
[0016] controlling the center-of-attraction to accelerate deflection when a touch control operation that causes the center-of-attraction to approach the target virtual object is detected.
[0017] controlling the center-of-attraction to decelerate deflection when a touch control operation that causes the center-of-attraction to move away from the target virtual object is detected.
[0018] In an example embodiment of the present disclosure, the aiming at the target virtual object in the virtual scene according to the center-of-attraction in the adsorbable region further comprises:
[0019] controlling the center-of-attraction to move in the same direction as the target virtual object to aim at the target virtual object according to the center-of-attraction when the target virtual object is detected to move in a direction away from the center-of-attraction.
[0020] In an example embodiment of the present disclosure, the adsorbing the locked target virtual object in response to the release operation on the first close-range interaction skill control comprises:
[0021] controlling the first virtual object to move towards the locked target virtual object when the distance between the first virtual object and the target virtual object is detected to be greater than a first distance in response to the release operation on the first close-range interaction skill control.
[0022] In an example embodiment of the present disclosure, the controlling the first virtual object to move towards the locked target virtual object when the distance between the first virtual object and the target virtual object is detected to be greater than a first distance comprises:
[0023] detect a ray in a direction of a current orientation of the center of gravity when a distance between the first virtual object and a target virtual object is greater than a first distance;
[0024] control the first virtual object to move to the target virtual object when a first virtual object detected by the ray in the virtual scene is the target virtual object.
[0025] In an exemplary embodiment of the present disclosure, when a target virtual object is locked in the virtual scene according to the orientation of the center of gravity in the adsorbable region, the method further comprises:
[0026] display a charging progress control for triggering an interactive skill on the graphical user interface;
[0027] initiate an interaction with the target virtual object automatically when the charging progress control indicates that charging is complete.
[0028] In an exemplary embodiment of the present disclosure, a collision detection box is mounted on the first virtual object; and the collision detection on the adsorbed target virtual object and the initiation of the interaction with the target virtual object according to the detection result comprises:
[0029] detect a collision between the first virtual object and the target virtual object through the collision detection box;
[0030] adjust the interaction with the target virtual object according to the real-time detection result.
[0031] In an exemplary embodiment of the present disclosure, the method further comprises:
[0032] automatically search for the target virtual object in the virtual scene according to the orientation of the center of gravity of the adsorbable region;
[0033] identify the interface of the adsorbable region when the target virtual object appears in the adsorbable region.
[0034] In an exemplary embodiment of the present disclosure, the method further comprises:
[0035] automatically search for and lock the target virtual object in the virtual scene in response to a trigger operation on a second short-range interactive skill control;
[0036] adsorb the locked target virtual object to initiate an interaction with the target virtual object.
[0037] According to a second aspect of the present disclosure, an interactive device for virtual objects is provided, comprising:
[0038] The display module is configured to display an adsorbable area on the graphical user interface in response to a touch operation on the first close-range interaction skill control.
[0039] The locking module is configured to lock a target virtual object in the virtual scene according to a center of the adsorbable area.
[0040] The adsorbing module is configured to adsorb the locked target virtual object in response to a release operation on the first close-range interaction skill control.
[0041] The interaction module is configured to perform collision detection on the adsorbed target virtual object and initiate interaction with the target virtual object according to a detection result.
[0042] According to a third aspect of the present disclosure, a computer readable storage medium is provided, which stores a computer program. The computer program is executed by a processor to implement the method according to any one of the preceding aspects.
[0043] According to a fourth aspect of the present disclosure, an electronic device is provided, which includes a processor and a memory storing executable instructions of the processor. The processor is configured to execute the method according to any one of the preceding aspects by executing the executable instructions.
[0044] The example embodiments of the present disclosure can have the following partial or all beneficial effects:
[0045] In the virtual object interaction method provided by the example embodiments of the present disclosure, the adsorbable area is displayed on the graphical user interface in response to a touch operation on the first close-range interaction skill control. The target virtual object is locked in the virtual scene according to a center of the adsorbable area. The locked target virtual object is adsorbed in response to a release operation on the first close-range interaction skill control. Collision detection is performed on the adsorbed target virtual object, and interaction with the target virtual object is initiated according to a detection result. On the one hand, when a user controls a virtual object to initiate close-range interaction, the target virtual object can be aimed at, locked, and adsorbed, providing a new close-range interaction method. On the other hand, during close-range interaction, the target virtual object can be aimed at, locked, and adsorbed, which can improve the target hit rate and thus improve the user's operation experience. On the other hand, the adsorbed target can be determined according to real-time collision detection, further optimizing the user's operation experience of using the close-range interaction skill.
[0046] It should be understood that the foregoing general description and the following detailed description are only exemplary and explanatory, and are not limiting to the present disclosure. BRIEF DESCRIPTION OF DRAWINGS
[0047] The accompanying drawings, which are incorporated herein and form a part of the specification, illustrate embodiments consistent with the present disclosure and, together with the description, further serve to explain the principles of the present disclosure. It is to be understood that the drawings are designed solely for purposes of illustration to be used in conjunction with the description in specifying the present embodiments. As such, other drawings, having different numbers and labels from those of the drawing figures being discussed, can represent other embodiments consistent with the present disclosure, which are constructed in accordance with the principles of the present disclosure, but are not to be construed as limiting of the embodiments illustrated in the drawing figures.
[0048] Figure 1 A schematic diagram showing an exemplary system architecture of a virtual object interaction method and device to which embodiments of the present disclosure can be applied is shown;
[0049] Figure 2 A flowchart schematically showing a virtual object interaction method according to an embodiment of the present disclosure is shown;
[0050] Figure 3 A schematic diagram schematically showing a suckable area according to an embodiment of the present disclosure is shown;
[0051] Figure 4 A flowchart schematically showing a virtual object locking method according to an embodiment of the present disclosure is shown;
[0052] Figure 5 A schematic diagram schematically showing fan detection of a user's swipe operation when aiming assistance is provided according to an embodiment of the present disclosure is shown;
[0053] Figure 6 A schematic diagram schematically showing locking of a target virtual object within a suckable area according to an embodiment of the present disclosure is shown;
[0054] Figure 7 A flowchart schematically showing a target virtual object sucking method according to an embodiment of the present disclosure is shown;
[0055] Figure 8 A flowchart schematically showing a target virtual object interaction method according to an embodiment of the present disclosure is shown;
[0056] Figure 9 A schematic diagram schematically showing a graphical user interface according to an embodiment of the present disclosure is shown;
[0057] Figure 10 A block diagram schematically showing a virtual object interaction device according to an embodiment of the present disclosure is shown;
[0058] Figure 11 A structural schematic diagram of a computer system of an electronic device suitable for implementing embodiments of the present disclosure is shown. DETAILED DESCRIPTION
[0059] Example implementations are now described with reference to the drawings. Example implementations can be implemented in any of various forms, and are not limited to the examples described herein; rather, the example implementations are provided so that this disclosure will be thorough and complete, and will fully convey the scope of the example implementations to those skilled in the art. The described features, structures, or characteristics can be combined in one or more implementations. In the following description, numerous specific details are provided to give a thorough understanding of implementations of the disclosure. One skilled in the relevant art will recognize, however, that the implementations of the disclosure can be practiced without one or more of the specific details, or with other methods, components, materials, and so forth. In other instances, well-known structures have not been described in detail so as not to obscure the disclosure.
[0060] Furthermore, the accompanying drawings are only schematic and are non-limiting detailed representations of embodiments of the disclosure. Identical components have been given the same reference numerals in the various drawings and the same reference designators have been maintained where possible in the non-limiting and exemplary drawings and schematic representations, and correspondingly, have not necessarily been signified by the same reference numerals in the various drawings and schematic representations. Similarly, similar components in the various drawings and schematic representations are represented using similar designators. In the interest of clarity, not all components of the examples are shown and described. Additionally, some components are partially or fully concealed behind other components in the figures, which concealment is not necessarily indicative of an actual concealment arrangement. Furthermore, some components are shown and described as being formed from multiple parts, which parts are not necessarily indicative of an actual formation arrangement. It will be appreciated that in the development of any such actual implementation, numerous implementation-specific decisions can be made. These decisions can typically be based on specific operating conditions which can include an intended use of the implementation and other constraints, which will vary from implementation to implementation. To that end, a general purpose or specific computing device can be used with or to implement embodiments of the disclosure, or components thereof. Similarly, the same or equivalent physical implementations can be employed in different embodiments and described herein for purposes of explanation.
[0061] First, some nouns or terms appearing in the description of the embodiments of the disclosure are explained:
[0062] The virtual scene is a virtual scene displayed (or provided) by an application running on a terminal or a server. Optionally, the virtual scene is a simulated environment of the real world, or a semi-simulated and semi-fictional virtual environment, or a purely fictional virtual environment. The virtual scene can be any one of a two-dimensional virtual scene and a three-dimensional virtual scene, and the virtual environment can be a sky, a land, a sea, etc., wherein the land includes environmental elements such as a desert, a city, etc. The virtual scene is a scene in which a user controls a virtual object to complete game logic, for example, for a sandbox 3D shooting game, the virtual scene is a 3D game world for a player to control a virtual object to fight, and an example virtual scene can include at least one element of a mountain, a plain, a river, a lake, a sea, a desert, a sky, a plant, a building, a vehicle; for a 2D or 3D multiplayer online battle arena game, the virtual scene is a 2D or 3D terrain scene for a virtual object to fight, and an example virtual scene can include elements such as a canyon-style mountain, a line, a river, etc.
[0063] The virtual object refers to a dynamic object controllable in the virtual scene. Optionally, the dynamic object can be a virtual character, a virtual animal, an animation character, etc. The virtual object is a role controlled by a player through an input device, or an artificial intelligence (AI) set in a virtual environment battle, or a non-player character (NPC) set in a virtual scene battle. Optionally, the virtual object is a virtual character competing in the virtual scene. Optionally, the number of virtual objects in the virtual scene battle is preset, or is dynamically determined according to the number of clients joining the battle, which is not limited in the embodiments of the present disclosure. In a possible implementation manner, the user can control the virtual object to move in the virtual scene, for example, control the virtual object to run, jump, crawl, etc., and can also control the virtual object to use skills, virtual props, etc. provided by the application program to fight with other virtual objects.
[0064] Figure 1 A schematic diagram of a system architecture of an exemplary application environment of a virtual object interaction method and device to which embodiments of the present disclosure can be applied is shown.
[0065] As shown in Figure 1 , the system architecture 100 can include one or more of terminal devices 101, 102, 103, a network 104, and a server 105. The network 104 is used to provide a communication link medium between the terminal devices 101, 102, 103 and the server 105. The network 104 can include various connection types, such as wired, wireless communication links, or optical fiber cables, etc. Among them, the terminal devices 101, 102, 103 can be various electronic devices, including but not limited to desktop computers, portable computers, smart phones, and tablet computers, etc. Taking the terminal device 101 as an example, the terminal device 101 can install and run an application program supporting a virtual scene. Optionally, the application program can include a first person shooting (FPS) game, a third person shooting (TPS) game, a real-time strategy (RTS) game, a multiplayer online battle arena (MOBA) game, a massively multiplayer online role-playing game (MMORPG), etc. The application program can be any one of a first person shooting (FPS) game, a third person shooting game, or a multiplayer gunfighting survival game. When the terminal device 101 runs the application program, a graphical user interface of the application program can be displayed on a screen of the terminal device 101, and a virtual scene of a current stage of a game can be loaded and displayed in the application program based on a starting operation of a user in the graphical user interface. Specifically, the terminal device 101 can be configured to perform the following operations: in response to a touch operation on the first close-range interaction skill control, displaying a adsorbable area on the graphical user interface; locking a target virtual object in the virtual scene according to a center of the adsorbable area; in response to a release operation on the first close-range interaction skill control, adsorbing the locked target virtual object; performing collision detection on the adsorbed target virtual object, and initiating interaction with the target virtual object according to a detection result. It should be understood that Figure 1 The number of terminal devices, networks, and servers in FIG. 1 is merely illustrative. According to implementation needs, there can be any number of terminal devices, networks, and servers. For example, the server 105 can be one server or a server cluster composed of multiple servers, and can also be a cloud computing platform or a virtualization center. In addition, the server 105 can be configured to provide background services for an application program supporting a virtual scene.
[0066] The virtual object interaction method provided in the embodiments of the present disclosure is generally executed by one or more of the terminal devices 101, 102, and 103, and accordingly, the virtual object interaction apparatus is generally provided in the terminal devices 101, 102, and 103. However, it should be understood by those skilled in the art that the virtual object interaction method provided in the embodiments of the present disclosure can also be executed by the server 105, and accordingly, the virtual object interaction apparatus can also be provided in the server 105, which is not specially limited in the present exemplary embodiment.
[0067] The technical solutions of the embodiments of the present disclosure are described in detail as follows:
[0068] In a shooting game, a terminal displays a virtual scene in an interface, and displays a virtual object in the virtual scene, and a user controls the virtual object to fight with other virtual objects through the terminal. Because the field of view is narrow in the shooting game, aiming is often needed when attacking a target, and the positions of virtual objects are generally far away, so that long-range shooting becomes a main fighting mode, and accordingly, the user pays less attention to close-range fighting.
[0069] Currently, when a user controls a virtual object to engage in a melee battle, the user can directly attack a target virtual object by triggering a melee skill. In the whole process of the melee interaction, the distance and aiming problems are not considered, resulting in a low probability of hitting the target, thereby reducing the user's operation experience. For example, when there is no aiming time, it is difficult to hit the target. Or, when the distance to the target is far, it is difficult to hit the target and it is not possible to determine whether the target can be hit. Or, when the target moves, it is also difficult to hit the target.
[0070] Based on one or more of the above problems, the present example embodiment provides a virtual object interaction method, which can be applied to one or more of the above terminal devices 101, 102, and 103, or can be applied to the above server 105, which is not specially limited in the present example embodiment. The virtual object interaction method can be applied to a terminal device, and the terminal device is configured to provide a graphical user interface, which can include a virtual scene and at least one melee interaction skill control. For example, the graphical user interface can include a game view screen, which can include at least part of a game scene and at least part of a first virtual object and other virtual objects in the game scene. The terminal device can be a local terminal device or a client device in a cloud interaction system. Referring to Figure 2 As shown, the virtual object interaction method can include the following steps S210 to S240:
[0071] Step S210. In response to a touch operation on a first melee interaction skill control, a suctionable area is displayed on the graphical user interface;
[0072] Step S220. Lock a target virtual object in the virtual scene according to the center of the suctionable area;
[0073] Step S230. In response to a release operation on the first melee interaction skill control, the locked target virtual object is sucked;
[0074] Step S240. Perform collision detection on the sucked target virtual object, and initiate interaction with the target virtual object according to the detection result.
[0075] In the virtual object interaction method provided by the example embodiment of the present disclosure, by responding to the touch operation on the first close-range interaction skill control, a adsorbable area is displayed on the graphical user interface; a target virtual object in the virtual scene is locked according to the center of the adsorbable area; the locked target virtual object is adsorbed in response to the release operation on the first close-range interaction skill control; collision detection is performed on the adsorbed target virtual object, and interaction is initiated to the target virtual object according to the detection result. On the one hand, when the user controls the virtual object to initiate close-range interaction, the target virtual object can be aimed, locked and adsorbed, providing a new close-range interaction method; on the other hand, during the close-range interaction process, the target virtual object can be aimed, locked and adsorbed, which can improve the target hit rate and further improve the user's operation experience; on the other hand, the adsorbed target can be determined according to real-time collision detection, further optimizing the user's operation experience of using close-range interaction skills.
[0076] Next, the above steps of the example embodiment will be described in more detail.
[0077] In step S210, in response to the touch operation on the first close-range interaction skill control, an adsorbable area is displayed on the graphical user interface.
[0078] In the example embodiment of the present disclosure, the first person shooting game can be taken as an example for illustration, the first person shooting game refers to a shooting game in which the user can view the virtual environment in the first person perspective. The picture of the virtual environment in the game is a picture observed by the first virtual object in the first person perspective. Specifically, the terminal device is installed with an application program supporting the virtual scene, that is, the application program of the first person shooting game can be installed on the terminal device, so that when the terminal device runs the application program, the picture of the virtual scene observed in the first person perspective and a plurality of controls such as close-range interaction skill control, long-range shooting skill control and the like can be displayed on the screen of the terminal device. Among them, the user can control the first virtual object through the terminal device, and the virtual object interacting with the first virtual object is the target virtual object. It can be understood that the virtual object interaction method described in the present disclosure can also be applied to third person shooting games or multi-player gun battle survival games, etc., which are not limited in the present disclosure.
[0079] In a possible implementation, when the target virtual object is located in the first target interaction area, the user can perform a touch operation on the first short-range interaction skill control displayed on the screen of the terminal device to control the first virtual object to prepare to initiate interaction with the target virtual object. The first target interaction area can be a short-range interaction area determined by the first interaction radius. For example, the first interaction radius can be the physical distance between the first virtual object and the principal point, and the size of the first interaction radius can be configured according to actual requirements. The corresponding first target interaction area can be a conical region with the first interaction radius as the central axis.
[0080] In this example, the touch operation can be a long press, a sliding operation, or the like. In response to the touch operation, the terminal device can display an adsorbable area on the graphical user interface. The adsorbable area can be the first target interaction area in the three-dimensional space, but from the perspective of the user, the adsorbable area can be a two-dimensional planar area mapped from the first target interaction area in the three-dimensional space. When the target virtual object is located in the two-dimensional planar area, the first virtual object can initiate interaction with the target virtual object. Preferably, the adsorbable area can be a circular area mapped from the first target interaction area, and the outline of the circular area can be displayed on the screen of the terminal device. For example, the entire outline of the circular area can be displayed, or part of the outline of the circular area can be displayed. In other examples, the shape of the adsorbable area can also be pre-set by a person skilled in the art, and the present disclosure does not make a specific limitation in this regard.
[0081] Reference is made to Figure 3 As shown in FIG. 3, a schematic diagram of an adsorbable area in a virtual scene is shown, Figure 3 The example shown in FIG. 3 includes the first close-range interaction skill control 301, the adsorbable area 302, the target virtual object 303, and the principal point 304. Other skill controls are not shown in FIG. 3. Figure 3The first close-range interaction skill control 301 can be displayed on the graphical user interface. For example, if the touch operation is a long press operation, when the user performs a press operation on the first close-range interaction skill control 301 by using a finger, a suction area 302 can be displayed on the graphical user interface. During the process of continuously pressing the first close-range interaction skill control 301, the user can aim at, lock, and suck the target virtual object 303 in the suction area 302. The center position of the suction area 302 is a center 304, which can be used to help the user aim at the target, and the display style of the center 304 can be a small dot, a small circle, a small cross, or the like. In addition, the user can also set the display style of the center 304 according to the operation habit of the user. When the user ends the long press operation, that is, when the finger is removed from the interaction interface, the target virtual object 303 can be automatically aimed at by using the center 304, and the interaction with the target virtual object 303 can be initiated. In this method, the user can be provided with a real-time preview of the suction target range by triggering the first close-range interaction skill control, which helps the user to determine the suction area, so that the user can perform subsequent operations on the target virtual object according to the center direction of the suction area, and the operation experience of the user is improved.
[0082] In step S220, the target virtual object is locked in the virtual scene according to the center direction of the suction area.
[0083] The center direction of the suction area corresponds to the aiming direction of the first virtual object, that is, the center direction can be used to represent the aiming direction of the first virtual object. The aiming direction is the shooting direction of a virtual camera (equivalent to the eyes of the user) of the virtual scene for shooting the virtual scene to obtain a scene picture to be presented in the aiming interface, which is used to indicate the line-of-sight direction of the user.
[0084] The user can automatically find the target virtual object in the virtual scene according to the current direction of the center. When the target virtual object appears in the suction area corresponding to the current direction of the center, that is, when the user finds the target virtual object in the area, the interface of the suction area can be displayed in a marked manner, such as color change of the center, outline thickening of the suction area, or the like.
[0085] When the target virtual object is not found in the adsorbable region corresponding to the current orientation of the center of collimation, the user can perform a touch operation such as a sliding operation on the user interface to adjust the orientation of the center of collimation and find the target virtual object in the corresponding adsorbable region. For example, the adsorbable region corresponding to the current orientation of the center of collimation is region A, and when the target virtual object is not found in region A, the user can change the orientation of the center of collimation by performing a sliding operation on the screen of the terminal device. It should be noted that the scene picture in the adsorbable region corresponding to the orientation of the center of collimation at any moment is the scene picture obtained by the virtual camera shooting the virtual scene at that moment. Therefore, by changing the orientation of the center of collimation through a left or right sliding operation, the sliding operation actually controls the lens of the virtual camera to deflect to the right or left, that is, the orientation of the center of collimation is adjusted by controlling the game scene in the current game picture to move in the direction opposite to the user's sliding direction. After the lens of the virtual camera deflects, the adsorbable region corresponding to the current orientation of the center of collimation becomes region B, and the target virtual object is found in region B. Throughout the process, the orientation of the center of collimation can be continuously adjusted until the target virtual object is found in the adsorbable region. Similarly, when the user finds the target virtual object in the adsorbable region, the interface of the adsorbable region can be displayed in a marked manner, such as changing the color of the center of collimation, thickening the outline of the adsorbable region, and the like, to remind the user that the target virtual object has been found.
[0086] Reference Figure 4 As shown, the target virtual object in the adsorbable region can be locked according to steps S410 and S420.
[0087] Step S410. Aiming at the target virtual object in the virtual scene according to the orientation of the center of collimation in the adsorbable region.
[0088] In an example, when the target virtual object appears in the adsorbable region, the target virtual object can be located in the middle of the adsorbable region, or on the left or right side of the adsorbable region. If the target virtual object is located in the middle of the adsorbable region, the position of the center of collimation overlaps the position of the target virtual object at this time, indicating that the user or the first virtual object has aimed at the target virtual object at this time, and after aiming, the close combat interaction skill can be started and the target virtual object can be interacted with, such as hitting the virtual object. If the target virtual object is located on the left or right side of the adsorbable region, the target virtual object can be aimed at according to the center of collimation.
[0089] For example, if the target virtual object is located on the left or right of the adsorbable area, the user can change the orientation of the aiming center to aim at the target virtual object by sliding on the screen of the terminal device. Specifically, the terminal device can detect the position of the target virtual object in real time, and the direction of the sliding operation can be detected frame by frame. The direction of the sliding operation can be a sliding direction that makes the aiming center close to the target virtual object, or a sliding direction that makes the aiming center away from the target virtual object. When the direction of the sliding operation is detected frame by frame, the fan-shaped detection can be performed along the direction of the sliding operation, and it is determined whether the target virtual object is located in the corresponding fan-shaped area. If the target virtual object is located in the corresponding fan-shaped area, the lens deflection angle generated by the sliding operation can be increased or decreased according to the direction of the sliding operation. In this method, based on the sliding operation of the user on the screen of the terminal device and the position of the target virtual object, the aiming direction of the user or the first virtual object, that is, the aiming center, can be provided with incremental displacement, so that the user can aim at the target more easily.
[0090] Reference Figure 5 As shown in the figure, a schematic diagram of fan-shaped detection of the sliding operation of the user during aiming assistance is given. The direction of the sliding operation can be a sliding direction 305 that makes the aiming center 304 close to the target virtual object 303, that is, the current game scene moves to the left. The direction of the sliding operation can also be a sliding direction 306 that makes the aiming center 304 away from the target virtual object 303, that is, the current game scene moves to the right. When the sliding direction 305 is detected frame by frame, fan-shaped detection can be performed along the sliding direction 305, and it is determined whether the target virtual object 303 is located in the corresponding fan-shaped area 307, that is, whether the target appears in the game scene after moving to the left. If the target virtual object 303 is located in the fan-shaped area 307, since the sliding operation is to make the aiming center close to the target virtual object 303, the lens deflection angle can be increased (that is, the lens deflection is accelerated). When the sliding direction 306 is detected frame by frame, fan-shaped detection can be performed along the sliding direction 306, and it is determined whether the target virtual object 303 is located in the corresponding fan-shaped area 308. If the target virtual object 303 is not located in the fan-shaped area 308, since the sliding operation is to make the aiming center away from the target virtual object 303, the lens deflection angle can be reduced (that is, the lens deflection is decelerated).
[0091] For example, normally, a 100-pixel slide can result in a 20-degree lens deflection. In this example, when the slide operation causes the aiming point to move closer to the target virtual object, the lens deflection angle when the user slides 100 pixels can be magnified to 40 degrees. It can be understood that if the lens only needs to be deflected by 30 degrees to allow the aiming point to aim at the target virtual object, the lens deflection when the user slides 100 pixels can be intelligently magnified from 20 degrees to 30 degrees, instead of from 20 degrees to 40 degrees. When the slide operation causes the aiming point to move away from the target virtual object, the lens deflection angle when the user slides 100 pixels can be reduced to 10 degrees, and the user can perceive a small amount of friction when performing the slide operation.
[0092] In this example, in addition to the aiming assistance achieved by using the acceleration and deceleration of the lens deflection, a small amount of lens suction can also be provided for the user. For example, when the slide operation performed by the user is not directly aimed at the target virtual object, a small deflection vector can be intelligently added to the lens, so that the user can more accurately aim at the target.
[0093] In another example, during the aiming at the target virtual object, the target virtual object can move. For example, when it is detected that the target virtual object moves away from the aiming point, the aiming point can be controlled to move in the same direction as the target virtual object, for example, when the target virtual object moves to the left of the aiming point and away from the aiming point, the aiming point can automatically move to the left, but the displacement of the aiming point is reduced. In this method, the aiming point can automatically follow the target virtual object to move a distance, so as to facilitate the user to aim at the moving virtual object, thereby reducing the operation difficulty of the user.
[0094] Step S420. When the angle between the target virtual object and the direction of the aiming point meets the starting condition of the locking function, the target virtual object is locked.
[0095] Specifically, the terminal device can detect the position of the target virtual object in real time, the current direction of the aiming point is the viewing direction of the first virtual object, and the direction of the line between the first virtual object and the target virtual object is the direction of the line between the aiming point and the target virtual object. Whether the target virtual object meets the starting condition of the locking function can be determined according to the included angle between the current direction of the aiming point and the direction of the line. For example, when the included angle meets a preset angle, the locking function can be automatically started to lock the target virtual object. For example, when the included angle is less than or equal to 5 degrees, the target virtual object can be automatically locked.
[0096] When the target virtual object is locked, a charging progress control for triggering the interactive skill can also be displayed on the graphical user interface, and the interaction with the target virtual object can be automatically initiated when the charging progress control indicates that the charging is complete. The charging progress control can be in the form of at least one of a progress bar, a number, and a text. Preferably, when the user locks the target virtual object, a progress bar in the shape of a rectangular bar can be displayed above the target virtual object to display the charging state of the melee skill in the form of a progress bar. When the progress bar is full, the melee skill can be automatically triggered to enable the first-person virtual object to attack the target virtual object. It should be noted that the display position, shape, and color of the progress bar can be pre-set by a person skilled in the art according to actual needs, or can be set by the user according to his own operation habits. The progress bar can conveniently display the current state of the melee skill to the user, thereby improving the user experience.
[0097] Reference Figure 6 As shown in FIG. 3B, a schematic diagram of locking a target virtual object in the adsorbable area is shown. When the target virtual object 303 is located in the adsorbable area 302, the interface of the adsorbable area 302 changes, i.e., the outline of the adsorbable area 302 is thickened to indicate that there is an attack target in the adsorbable area 302 at this time. After the adsorbable area 302 assists in aiming at the target virtual object 303, and the angle between the target virtual object 303 and the center of the aiming circle 304 satisfies the preset angle, the locking function can be automatically started to lock the target virtual object 303. When the target virtual object 303 is locked, a circular ring progress bar can also be displayed above the target virtual object 303, and the timing number in the circular ring can be used to represent the charging stage of the melee skill. For example, Figure 6 The timing number currently displayed in the circular ring progress bar is 7s, and when the timing number is displayed as 10s, the charging of the melee skill is complete, and an attack can be automatically initiated to the target virtual object 303 at this time.
[0098] In step S230, the target virtual object locked by adsorption is released in response to a release operation acting on the first short-range interactive skill control.
[0099] In an optional example, if the touch operation of the user acting on the first short-range interactive skill control is a pressing operation, the corresponding release operation can be an operation of the finger leaving the interactive interface, i.e., the finger lifting operation. It should be noted that the touch operation and the release operation in this example are continuous operations that can last for a certain period of time.
[0100] After the target virtual object is aimed and locked, the terminal device can detect the current positions of the first virtual object and the target virtual object in real time, and determine the distance between the first virtual object and the target virtual object. If the distance between the first virtual object and the target virtual object is far, the first virtual object cannot hit the target virtual object by directly launching a melee attack on the target virtual object. Therefore, the example can provide a charge effect for the melee skill to solve the distance problem in the short-range interaction process.
[0101] For example, after the target virtual object is locked, the user can end the pressing operation, that is, the finger is lifted away from the interaction interface. In response to the operation of the user's finger being lifted, if the distance between the first virtual object and the target virtual object is greater than the first distance, the first virtual object can be controlled to quickly move to the locked target virtual object to attract the target virtual object.
[0102] Reference Figure 7 As shown, the target virtual object after being locked can be attracted according to steps S710 and S720.
[0103] Step S710. When it is detected that the distance between the first virtual object and the target virtual object is greater than the first distance, ray detection is performed in the direction of the current orientation of the center of the eye.
[0104] When the distance between the first virtual object and the target virtual object is greater than the first distance, in order to accurately hit the target virtual object, the first virtual object can automatically quickly move a distance to the target virtual object to attract the target virtual object and attack it. During the movement of the first virtual object to the target virtual object, ray detection can be performed in the direction of the current orientation of the center of the eye, that is, a ray is emitted from the current orientation of the center of the eye to detect whether there is a target in front.
[0105] Step S720. When the first virtual object detected by the ray in the virtual scene is the target virtual object, the first virtual object is controlled to move to the locked target virtual object.
[0106] During the movement of the first virtual object to the target virtual object, a ray can be continuously emitted from the current orientation of the center of the eye to detect whether there is a target in front. When the first virtual object in front detected by the ray is still the target virtual object, the first virtual object can continue to be controlled to quickly approach the target virtual object. For example, the first virtual object can move to the target virtual object at a first speed, where the first speed is greater than the moving speed of the first virtual object when the melee skill control is not triggered. The first virtual object can also move to the target virtual object at a first acceleration, and the first virtual object can also quickly approach the target virtual object by means of instantaneous movement.
[0107] When the first virtual object detected by the ray in the virtual scene is not the target virtual object, that is, other virtual objects appear between the first virtual object and the target virtual object in the process of moving to the target virtual object, the user can decide whether to adjust the adsorbed object. For example, the first virtual object can sprint to the other virtual object and perform a hitting action, and the adsorbed object at this time is changed from the target virtual object to the other virtual object appearing between the first virtual object and the target virtual object. In this example, the adsorbed object can be determined according to the real-time ray detection result by continuous forward ray detection, so as to avoid the unreasonable adsorption of the target in front due to the change of the target position or entanglement, and make the whole process more intelligent and more natural.
[0108] In another example embodiment, after the user aims at the target virtual object, the target virtual object can also not be locked, but the interaction with the target virtual object can be directly initiated. In addition, when the target virtual object is determined as the attack target and the distance between the first virtual object and the target virtual object is less than or equal to the second distance, that is, the distance between the first virtual object and the target virtual object is close, the first virtual object can hit the target virtual object without sprinting forward. At this time, the first virtual object can also not adsorb the target virtual object, but directly initiate the interaction with the target virtual object.
[0109] In step S240, collision detection is performed on the adsorbed target virtual object, and the interaction with the target virtual object is initiated according to the detection result.
[0110] After the user determines the target virtual object as the adsorbed object, the user can initiate a sprint to the target virtual object. The first virtual object is mounted with a collision detection box, which can be used to perform collision detection on the first virtual object and the target virtual object. During the sprinting process, the collision detection box can be used to continuously detect the collision between the target virtual object and the first virtual object, and according to the real-time detection result, it can be determined whether to trigger the collision in advance, that is, whether to release the close combat attack skill in advance, such as performing a hitting or chopping action.
[0111] Reference Figure 8 As shown, the interaction with the target virtual object can be initiated according to step S810 and step S820.
[0112] Step S810. Collision detection is performed on the first virtual object and the target virtual object by the collision detection box.
[0113] In an example, the collision detection box can be a bounding box, which refers to completely containing the combination of objects in a relatively simple closed space, and the use of bounding box can generally be used to accelerate certain specific detection processes. For example, to detect the overlapping relationship between objects, a rough detection can be performed by the bounding box of the object, and when two bounding boxes do not overlap, the corresponding two original objects must not intersect. In an example, a bounding box can be established for each skeletal model, i.e., for each virtual object, and whether a collision occurs between virtual objects can be determined by detecting whether the bounding boxes overlap. The bounding box can be an axis-aligned bounding box (AABB), an oriented bounding box (OBB), or the like. In an example, a static detection can be performed on the AABB box to detect whether two static bounding boxes intersect, and the detection result can be intersection or non-intersection. For the OBB box, the size and direction of the box can be determined according to the skeletal model of the virtual object, and specifically, the axes of the OBB box can be determined according to the distribution of the skeletal nodes in space. Whether the first virtual object collides with other virtual objects can be determined by detecting the collision between the OBB box and the OBB box. In other examples, the space can also be divided by spatial indexing to perform collision detection on virtual objects in the space, and by this method, unnecessary detection can be screened out, thereby improving the collision detection efficiency.
[0114] Step S820. Adjusting the interaction with the target virtual object according to the real-time detection result.
[0115] In the process of the first virtual object sprinting, if it is detected that the bounding boxes of the first virtual object and other virtual objects overlap, or the distance between the first virtual object and the target virtual object becomes smaller due to the change in the position of the target virtual object, the user can decide whether to trigger the collision in advance according to the detection result when the bounding boxes of the first virtual object and the target virtual object overlap. For example, the first virtual object can encounter other virtual objects in the process of sprinting towards the target virtual object, and when it is detected that the bounding boxes of the first virtual object and the virtual object overlap, the collision needs to be triggered in advance and the virtual object needs to be hit. The first virtual object can also be in the process of sprinting towards the target virtual object, and the target virtual object is always moving towards the first virtual object, and when it is detected that the bounding boxes of the first virtual object and the target virtual object overlap, the collision needs to be triggered in advance and the target virtual object needs to be hit. It can be understood that the first virtual object will use the sprinting action to continuously move quickly towards the target virtual object in the sprinting process, and when the user decides to trigger the collision in advance, the sprinting needs to be stopped immediately and switched to the hitting action.
[0116] In the example implementation of the present disclosure, a new melee operation mode is provided, which can support player aiming, locking and close-range suction of enemies in the process of short-range interaction, not only realizing the diversification of short-range interaction forms, but also optimizing the operation experience of users using short-range interaction skills. This melee operation mode is suitable for smaller melee attack range, for example, smaller short-range interaction radius, or smaller short-range interaction angle. The interaction angle refers to the included angle between the direction of the line connecting the first virtual object and the target virtual object and the current orientation of the first virtual object. When the short-range interaction radius is small, the left and right movements of the first virtual object will also cause a large change in the melee interaction angle, making it difficult to capture the target, and therefore, the aiming function needs to be provided for the user.
[0117] In another example implementation, when at least one virtual object appears in the second target interaction area, the user can perform a touch operation on the second short-range interaction skill control displayed on the screen of the terminal device to control the first virtual object to initiate interaction with the target virtual object. The touch operation can be a single click, double click, etc. The second target interaction area can be a short-range interaction area determined by a second interaction radius, and the second interaction radius is greater than the first interaction radius. When the distance between the first virtual object and the target virtual object belongs to short-range interaction but is relatively far, the range of melee attack is larger, or the immediacy requirement is higher, and there is no need to aim when initiating interaction with the target virtual object, the operation difficulty is lower.
[0118] For example, in response to the touch operation of the user on the second short-range interaction skill control, the terminal device can make the first virtual object automatically find and lock the optimal target in the second target interaction area, sprint to the optimal target and hit the target. The optimal target can be the virtual object closest to the first virtual object, the virtual object with the smallest interaction angle with the first virtual object, or the virtual object that meets both the closest distance and the smallest interaction angle. It should be noted that the first virtual object can actively track the target during the sprinting process, further reducing the operation difficulty.
[0119] In a specific example implementation, referring to Figure 9 , a schematic diagram of a graphical user interface is shown. The interface can include a game scene and virtual objects located in the game scene, and the game scene is not shown in Figure 9 . The player can control the first virtual object to move in the game scene. Figure 9 The interface shows a variety of skill controls, and the controls are displayed above the game scene.
[0120] For example, the first target interaction area for short-range interaction can be an attack range determined by an interaction radius of 5 meters, and the second target interaction area can be an attack range determined by an interaction radius of 10 meters. When the virtual object appears in different target interaction areas, the player can select different melee interaction skills. For example, when the virtual object appears in the first target interaction area, the player can select a first melee interaction skill and implement interaction through a first short-range interaction skill control. When the virtual object appears in the second target interaction area, the player can select a second melee interaction skill and implement interaction through a second short-range interaction skill control. When the player appears in an area outside the second target interaction area, such as an interaction radius greater than 10 meters, the player can select a long-range interaction skill and implement interaction through a long-range interaction skill control.
[0121] When the virtual object appears in the first target interaction area, the player can initiate an attack after aiming at the virtual object using the first short-range interaction skill. For example, the player can perform a long press operation on the first short-range interaction skill control 901, and when the player holds the skill control, a suction area 903 can be displayed in the graphical user interface. During the period when the player continuously holds the skill control, the virtual object 905 can be assisted in aiming through a center 904, so as to make it easier for the player to aim at the target. After determining the virtual object 905 as the attack target, the player can lock it or directly initiate an attack to it without locking. If the attack target is locked, a skill charging state progress bar can be displayed, and when the progress bar is full, the attack skill is automatically started and an attack is initiated to the target. If the attack target is not locked, the player can end the long press operation, such as lifting the finger, and then an attack is initiated to the target. Before initiating an attack to the virtual object 905, a sprint effect can be provided for the short-range interaction skill according to the distance between the first virtual object and the virtual object 905, that is, the first virtual object can sprint to the virtual object 905, so as to avoid the problem that the target cannot be hit due to the distance.
[0122] When the virtual object appears in the second target interaction area, the player can use the second short-range interaction skill to attack the optimal target in the second target interaction area. For example, the player can perform a touch operation on the second short-range interaction skill control 902, and when the player clicks the skill control, the first virtual object can automatically find and lock the optimal target in the second target interaction area and attack it. If the virtual object 906 and the virtual object 907 are located in the second target interaction area, it can be seen that the virtual object 906 is closer to the first virtual object than the virtual object 907, and the angle between the direction of the line connecting the virtual object 906 and the first virtual object and the current orientation of the first virtual object is smaller. Therefore, it can be determined that the virtual object 906 is the optimal target at the current time. It should be noted that the second short-range interaction skill is a short-range combat ability that takes effect immediately after being pressed, and can have a target detection function without additional aiming, which reduces the difficulty of the player's operation and improves the player's operation experience.
[0123] In the virtual object interaction method provided in the example embodiment of the present disclosure, the adsorption area is displayed on the graphical user interface in response to the touch operation on the first short-range interaction skill control; the target virtual object is locked in the virtual scene according to the orientation of the center of the adsorption area; the locked target virtual object is adsorbed in response to the release operation on the first short-range interaction skill control; and the adsorbed target virtual object is subjected to collision detection, and an interaction is initiated to the target virtual object according to the detection result. On the one hand, when the user controls the virtual object to initiate short-range interaction, the target virtual object is supported to be aimed, locked and adsorbed, providing a new short-range interaction method; on the other hand, during the short-range interaction process, the target virtual object is aimed, locked and adsorbed, which can improve the target hit rate and further improve the user's operation experience; on the other hand, the adsorbed target can be determined according to real-time collision detection, further optimizing the user's operation experience of using the short-range interaction skill.
[0124] It should be noted that although the steps of the method in the present disclosure are described in a specific order in the accompanying drawings, this does not require or imply that the steps must be performed in this specific order, or that all the steps shown must be performed to achieve the desired result. In addition or alternatively, some steps can be omitted, a plurality of steps can be combined into one step, and / or one step can be divided into a plurality of steps, etc.
[0125] Further, in the example embodiment, a virtual object interaction device is also provided. Referring to FIG. 10, Figure 10 As shown, the virtual object interaction device 1000 can include a display module 1010, a locking module 1020, an adsorption module 1030 and an interaction module 1040, wherein:
[0126] The display module 1010 is configured to display a adsorbable area on the graphical user interface in response to a touch operation on the first close-range interaction skill control.
[0127] The locking module 1020 is configured to lock a target virtual object in the virtual scene according to a center of aiming in the adsorbable area.
[0128] The adsorption module 1030 is configured to adsorb the locked target virtual object in response to a release operation on the first close-range interaction skill control.
[0129] The interaction module 1040 is configured to perform collision detection on the adsorbed target virtual object, and initiate interaction with the target virtual object according to a detection result.
[0130] In an optional implementation, the locking module 1020 includes:
[0131] The aiming unit is configured to aim the target virtual object in the virtual scene according to the center of aiming in the adsorbable area.
[0132] The locking unit is configured to lock the target virtual object when an angle between the target virtual object and the center of aiming meets a starting condition of a locking function.
[0133] In an optional implementation, the aiming unit includes:
[0134] The first aiming auxiliary subunit is configured to control the center of aiming to accelerate deflection when detecting a touch operation that causes the center of aiming to be close to the target virtual object.
[0135] The second aiming auxiliary subunit is configured to control the center of aiming to decelerate deflection when detecting a touch operation that causes the center of aiming to be away from the target virtual object.
[0136] In an optional implementation, the aiming unit further includes:
[0137] The third aiming auxiliary subunit is configured to control the center of aiming to move in the same direction as the target virtual object to aim the target virtual object according to the center of aiming when detecting that the target virtual object moves away from the center of aiming.
[0138] In an optional implementation, the adsorption module 1030 includes:
[0139] The adsorption unit is configured to control the first virtual object to move towards the locked target virtual object when detecting that a distance between the first virtual object and the target virtual object is greater than a first distance in response to a release operation on the first close-range interaction skill control.
[0140] In an optional implementation, the adsorption unit comprises:
[0141] A ray detection subunit is configured to perform ray detection in the direction of the current orientation of the center of the virtual scene when the distance between the first virtual object and the target virtual object is greater than the first distance.
[0142] An adsorption subunit is configured to control the first virtual object to move towards the target virtual object when the first virtual object detected by the ray detection is the target virtual object.
[0143] In an optional implementation, the locking unit comprises:
[0144] A progress display subunit is configured to display a charging progress control for triggering the interactive skill on the graphical user interface.
[0145] An automatic interaction subunit is configured to automatically initiate interaction with the target virtual object when the charging progress control displays that the charging is complete.
[0146] In an optional implementation, the first virtual object is mounted with a collision detection box, and the interaction module 1040 comprises:
[0147] A collision detection unit is configured to perform collision detection between the first virtual object and the target virtual object through the collision detection box.
[0148] An interaction adjustment unit is configured to adjust the interaction with the target virtual object according to the real-time detection result.
[0149] In an optional implementation, the virtual object interaction apparatus 1000 further comprises:
[0150] A target searching module is configured to automatically search for the target virtual object in the virtual scene according to the orientation of the center of the adsorbable region.
[0151] A distinguishing display module is configured to perform interface identification display on the adsorbable region when the target virtual object appears in the adsorbable region.
[0152] In an optional implementation, the virtual object interaction apparatus 1000 further comprises:
[0153] An automatic locking module is configured to automatically search for and lock the target virtual object in the virtual scene in response to a trigger operation on the second short-range interaction skill control.
[0154] A target adsorption module is configured to adsorb the target virtual object that has been locked to initiate interaction with the target virtual object.
[0155] The specific details of the modules in the above-mentioned virtual object interaction device have been described in detail in the corresponding virtual object interaction method, and thus will not be described again here.
[0156] The modules in the above-mentioned device can be general processors, including central processing units, network processing units, and the like; and can also be digital signal processors, application specific integrated circuits, field programmable gate arrays or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components. The modules can also be implemented in the form of software, firmware, and the like. The processors in the above-mentioned device can be independent processors or can be integrated together.
[0157] Exemplary embodiments of the present disclosure also provide a computer readable storage medium having stored thereon a program product capable of implementing the above-mentioned methods of the present disclosure. In some possible embodiments, various aspects of the present disclosure can also be implemented in the form of a program product, which includes program codes for causing an electronic device to perform the steps described in the above-mentioned “Exemplary Methods” section according to various exemplary embodiments of the present disclosure when the program product is run on the electronic device. The program product can take the form of a portable compact disc read-only memory (CD-ROM) and include program codes, and can be run on an electronic device, such as a personal computer. However, the program product of the present disclosure is not limited to this, and in the present document, the readable storage medium can be any tangible medium containing or storing a program that can be used by or in conjunction with an instruction execution system, device or apparatus.
[0158] The program product can take any combination of one or more readable media. The readable medium can be a readable signal medium or a readable storage medium. The readable storage medium may, for example, but is not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or apparatus, or any combination of the above. More specific examples (non-exhaustive list) of readable storage media include an electrical connection having one or more wires, a portable disc, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above.
[0159] The computer readable signal medium can include a data signal propagated in a baseband or as a part of a carrier wave, in which readable program codes are carried. Such a propagated data signal can take various forms, including but not limited to electromagnetic signals, optical signals or any suitable combination of the above. The readable signal medium can also be any readable medium other than the readable storage medium, which can send, propagate or transmit programs for use by or in conjunction with an instruction execution system, device or apparatus.
[0160] The program code contained on the readable medium may be transmitted using any suitable medium, including but not limited to wireless, wired, optical fiber, RF, etc., or any suitable combination thereof.
[0161] Program code for performing the operations of this disclosure can be written in any combination of one or more programming languages, including object-oriented programming languages such as Java and C++, and conventional procedural programming languages such as C or similar languages. The program code can execute entirely on the user's computing device, partially on the user's computing device, as a standalone software package, partially on the user's computing device and partially on a remote computing device, or entirely on a remote computing device or server. In cases involving remote computing devices, the remote computing devices can be connected to the user's computing device via any type of network, including a local area network (LAN) or a wide area network (WAN), or can be connected to an external computing device (e.g., via the Internet using an Internet service provider).
[0162] Exemplary embodiments of this disclosure also provide an electronic device capable of implementing the above-described method. Referring below... Figure 11 To describe an electronic device 1100 according to such an exemplary embodiment of the present disclosure. Figure 11 The electronic device 1100 shown is merely an example and should not be construed as limiting the functionality and scope of use of the embodiments disclosed herein.
[0163] like Figure 11 As shown, the electronic device 1100 can be represented as a general-purpose computing device. The components of the electronic device 1100 may include, but are not limited to: at least one processing unit 1110, at least one storage unit 1120, a bus 1130 connecting different system components (including storage unit 1120 and processing unit 1110), and a display unit 1140.
[0164] Storage unit 1120 stores program code that can be executed by processing unit 1110, causing processing unit 1110 to perform the steps described in the "Exemplary Methods" section above, according to various exemplary embodiments of this disclosure. For example, processing unit 1110 can perform... Figure 2 , Figure 4 , Figure 7 and Figure 8 Any one or more of the method steps.
[0165] Storage 1120 can include a readable medium that can be a volatile memory, such as random access memory (RAM) 1121 and / or cache memory 1122, and can further include a non-volatile memory, such as read-only memory (ROM) 1123.
[0166] Storage 1120 can also include a program / utility 1124 having a set of program modules 1125, including an operating system, one or more application programs, other program modules, and program data, each of which can give the electronic device its functionality, at least in part. By way of example, an application program 1125 can include a web browser, which is executed by processing unit 1110 and used by a user to browse content and programs available on the network 1160. Program / utility 1124 gives the electronic device 1100 the functionality to communicate with the network 1160, and can include the functionality to execute various applications program.
[0167] Bus 1130 can represent one or more of several types of bus structures, including a storage bus or bus controller, peripheral bus, graphics bus, processor or local bus using any of a variety of bus architectures.
[0168] Electronic device 1100 can also communicate with one or more external devices 1200 such as a keyboard or pointing device, using one or more I / O interfaces 1150. I / O interface 1150 can enable electronic device 1100 to exchange information with other devices, for example, using a storage interface, a peripheral interface, an external graphics interface, or the like. It will also be appreciated that electronic device 1100 can communicate with one or more networks, such as a local area network (LAN), a wide area network (WAN), and / or the Internet, for example, using network adapter 1160. It will be appreciated that the network connections shown are illustrative and other means of establishing a communications link between electronic device 1100 and a network can be used. One of ordinary skill in the art will recognize the interaction with these devices and networks.
[0169] Those skilled in the art will readily recognize that the example embodiments described herein can be implemented using software, hardware, or a combination thereof. Thus, the technical solutions according to the embodiments of the present disclosure can be embodied in the form of a software product, which can be stored in a non-volatile storage medium (such as a CD-ROM, a USB flash disk, a mobile hard disk, or the like) or a network, and includes a plurality of instructions to make a computing device (such as a personal computer, a server, a terminal device, or a network device, etc.) execute the methods according to the example embodiments of the present disclosure.
[0170] Moreover, the above-described figures are only a schematic representation of the processes comprised in the method according to the example embodiments of the present disclosure, and are not intended to limit purposes. It is readily understood that the processes shown in the above-described figures do not imply or restrict a chronological order of these processes. In addition, it is readily understood that these processes can be executed, for example, in a synchronous or asynchronous manner in a plurality of modules.
[0171] It should be noted that, although several modules or units of the device for action execution are mentioned in the above detailed description, such a division is not mandatory. Indeed, according to the embodiments of the present disclosure, the features and functionalities of two or more modules or units described above can be embodied in one module or unit. Conversely, the features and functionalities of one module or unit described above can be further divided into embodied by a plurality of modules or units.
[0172] It is understood that the present disclosure is not limited to the precise construction which has been described above and shown in the accompanying drawings, and that various modifications and changes can be made by those of ordinary skill in the art without departing from the scope of the present disclosure. The scope of the present disclosure is limited only by the appended claims.
Claims
1. A method for interacting with virtual objects, characterized in that, The method of providing a graphical user interface comprising a virtual scene and at least one proximity-interactive skill control via a terminal device includes: In response to a touch operation applied to the first proximity interaction skill control, an snap-in area is displayed on the graphical user interface; Based on the orientation of the crosshair in the adsorption area, the target virtual object is locked in the virtual scene; In response to the release operation applied to the first near-field interaction skill control, the target virtual object is attracted and locked. Collision detection is performed on the adsorbed target virtual object, and interaction is initiated with the target virtual object based on the detection results.
2. The virtual object interaction method according to claim 1, characterized in that, The step of locking the target virtual object in the virtual scene based on the orientation of the crosshair in the adsorption area includes: Aim at the target virtual object in the virtual scene according to the orientation of the crosshair in the adsorption area; When the angle between the target virtual object and the crosshair orientation meets the activation conditions of the locking function, the target virtual object is locked.
3. The virtual object interaction method according to claim 2, characterized in that, Aiming at the target virtual object in the virtual scene based on the orientation of the crosshair in the adsorption area includes: When a touch operation that brings the crosshair closer to the target virtual object is detected, the crosshair is controlled to deflect faster. When a touch operation that moves the crosshair away from the target virtual object is detected, the crosshair is controlled to decelerate and deflect.
4. The virtual object interaction method according to claim 2, characterized in that, The step of aiming at the target virtual object in the virtual scene according to the orientation of the crosshair in the adsorption area further includes: When the target virtual object is detected to be moving away from the crosshair, the crosshair is controlled to move in the same direction as the target virtual object so as to aim at the target virtual object according to the crosshair.
5. The virtual object interaction method according to claim 1, characterized in that, The response to the release operation of the first near-field interaction skill control, and the target virtual object after being attracted and locked, includes: In response to the release operation of the first near-field interaction skill control, when it is detected that the distance between the first virtual object and the target virtual object is greater than a first distance, the first virtual object is controlled to move towards the locked target virtual object.
6. The virtual object interaction method according to claim 5, characterized in that, When the distance between the first virtual object and the target virtual object is detected to be greater than a first distance, controlling the first virtual object to move towards the locked target virtual object includes: When the distance between the first virtual object and the target virtual object is detected to be greater than the first distance, ray detection is performed with the current orientation of the crosshair as the direction; When the first virtual object detected by the ray in the virtual scene is the target virtual object, the first virtual object is controlled to move toward the locked target virtual object.
7. The virtual object interaction method according to claim 2, characterized in that, When locking onto a target virtual object in the virtual scene based on the orientation of the crosshair in the adsorption area, the method further includes: A charging progress control for triggering interactive skills is displayed on the graphical user interface; When the charging progress control displays that charging is complete, it automatically initiates an interaction with the target virtual object.
8. The virtual object interaction method according to claim 1, characterized in that, A collision detection box is attached to the first virtual object; the step of performing collision detection on the adsorbed target virtual object and initiating interaction with the target virtual object based on the detection result includes: The collision detection box is used to perform collision detection between the first virtual object and the target virtual object. Adjust the interaction with the target virtual object based on real-time detection results.
9. The virtual object interaction method according to claim 1, characterized in that, The method further includes: Automatically locate the target virtual object in the virtual scene based on the orientation of the crosshair of the adsorption area; When the target virtual object appears in the absorbable area, the interface of the absorbable area is displayed with an identifier.
10. The virtual object interaction method according to claim 1, characterized in that, The method further includes: In response to a trigger operation applied to the second proximity interaction skill control, the system automatically searches for and locks the target virtual object in the virtual scene. The locked target virtual object is attracted to initiate interaction with it.
11. An interactive device for virtual objects, characterized in that, The device provides a graphical user interface including a virtual scene and at least one near-field interactive skill control via a terminal device, the device comprising: The display module is used to respond to touch operations applied to the first proximity interaction skill control and to display an snap-on area on the graphical user interface; A locking module is used to lock a target virtual object in the virtual scene based on the orientation of the crosshair in the adsorption area; The adsorption module is used to adsorb and lock the target virtual object in response to the release operation of the first near-field interaction skill control. The interaction module is used to perform collision detection on the adsorbed target virtual object and initiate interaction with the target virtual object based on the detection results.
12. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by a processor, it implements the method according to any one of claims 1-10.
13. An electronic device, characterized in that, include: processor; as well as Memory for storing the executable instructions of the processor; The processor is configured to execute the method of any one of claims 1-10 by executing the executable instructions.
Citation Information
Patent Citations
Auxiliary collimation method and device in shooting games, electronic device and storage medium
CN108404407A
Virtual scene display method and device, electronic device and storage medium
CN109847336A