Method and apparatus for interaction control of virtual object, electronic device, and storage medium

CN122912451APending Publication Date: 2026-10-16NETEASE (HANGZHOU) NETWORK CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510443403.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-04-09
Publication Date
2026-10-16

AI Technical Summary

Technical Problem

[0003]相关技术中,可以是以目标虚拟角色的当前朝向为基准,确定一个扇形区域,对位于扇形区域中的至少一个目标虚拟角色进行筛选,确定出目标交互对象;当时,若是位于扇形区域中的目标虚拟角色过多时,可能需要多次调整目标虚拟角色的朝向,才可能筛选出玩家需要进行交互的目标交互对象,筛选目标交互对象的步骤过于繁琐,对于目标交互对象的筛选效率较低

Benefits of technology

[0017] Fourthly, embodiments of this disclosure also provide a computer-readable storage medium storing a computer program, which, when executed by a processor, performs the interactive control method for virtual objects as described in the first aspect.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122912451A_ABST
    Figure CN122912451A_ABST
Patent Text Reader

Abstract

The present disclosure provides an interactive control method and device of a virtual object, an electronic device and a storage medium. In response to a control instruction for a target virtual role, the target virtual role is controlled to move in a game scene. According to a current role orientation of the target virtual role and a current camera orientation of a virtual camera, an interactive object recognition center point is determined. According to the interactive object recognition center point, a target interactive object is selected from a plurality of virtual objects to be interacted. The target virtual role and the target interactive object perform a virtual interaction behavior. In this way, when the target interactive object is selected, the current role orientation of the target virtual role and the current camera orientation of the virtual camera can be referred to at the same time to determine the interactive object recognition center point. The target interactive object is selected based on the interactive object recognition center point, which saves the virtual interactive object selection time and improves the accuracy of the selection of the target interactive object.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This disclosure relates to the field of human-computer interaction technology, and in particular to interactive control methods, devices, electronic devices and storage media for virtual objects. Background Technology

[0002] During the game, the target virtual character may need to interact with other virtual objects in the game scene. In order to ensure the relevance and accuracy of the interaction, it is necessary to screen the target virtual characters that can interact with the target virtual character and determine the target interaction objects that meet the player's interaction needs.

[0003] In related technologies, a fan-shaped area can be determined based on the current orientation of the target virtual character, and at least one target virtual character located in the fan-shaped area can be filtered to determine the target interaction object. However, if there are too many target virtual characters in the fan-shaped area, it may be necessary to adjust the orientation of the target virtual characters multiple times before the target interaction object that the player needs to interact with can be filtered out. The process of filtering the target interaction object is too cumbersome and the efficiency of filtering the target interaction object is low.

[0004] To address this, the center point of the terminal device's screen can be predetermined, and the target interactive object can be selected from multiple virtual interactive objects by using the distance between each selectable virtual interactive object and the center point of the screen. However, if the current location of the target virtual character is significantly different from the location of the center point of the screen, using the center point of the screen as a reference will not accurately select the target interactive object that the player needs to interact with, resulting in a low accuracy rate for selecting the target interactive object. Summary of the Invention

[0005] In view of this, the purpose of this disclosure is to provide a method, device, electronic device and storage medium for interactive control of virtual objects. When filtering target interactive objects, the current orientation of the target virtual character and the current orientation of the virtual camera can be referenced simultaneously to determine the center point of the interactive object recognition. The target interactive objects are then filtered based on the center point of the interactive object recognition, which saves the time of filtering virtual interactive objects and improves the accuracy of filtering target interactive objects.

[0006] In a first aspect, embodiments of this disclosure provide an interactive control method for virtual objects, which provides a graphical user interface through a terminal device. The graphical user interface includes game footage of all or part of a game scene captured by a virtual camera; the game scene includes a target virtual character; the interactive control method includes:

[0007] In response to control commands directed at the target virtual character, the system controls the target virtual character to move within the game scene.

[0008] Determine the center point for the interactive object recognition based on the current orientation of the target virtual character and the current orientation of the virtual camera;

[0009] Based on the center point of the interaction object identification, the target interaction object is selected from multiple virtual objects to be interacted with;

[0010] Control the target virtual character to perform virtual interaction behavior with the target interaction object.

[0011] Secondly, this disclosure also provides an interactive control device for virtual objects, which provides a graphical user interface through a terminal device. The graphical user interface includes game footage of all or part of the game scene captured by a virtual camera; the game scene includes a target virtual character; the interactive control device includes:

[0012] An object control module is used to respond to control commands for the target virtual character and control the target virtual character to move in the game scene;

[0013] The center point determination module is used to determine the center point of the interactive object based on the current orientation of the target virtual character and the current orientation of the virtual camera.

[0014] The interactive object filtering module is used to filter out target interactive objects from multiple virtual objects to be interacted based on the identification center point of the interactive object;

[0015] The interaction control module is used to control the target virtual character to perform virtual interaction behaviors with the target interaction object.

[0016] Thirdly, embodiments of this disclosure also provide an electronic device, including: a processor, a storage medium, and a bus, wherein the storage medium stores machine-readable instructions executable by the processor, and when the electronic device is running, the processor communicates with the storage medium via the bus, and the processor executes the machine-readable instructions to perform the interactive control method for virtual objects as described in the first aspect.

[0017] Fourthly, embodiments of this disclosure also provide a computer-readable storage medium storing a computer program, which, when executed by a processor, performs the interactive control method for virtual objects as described in the first aspect.

[0018] The virtual object interaction control method, apparatus, electronic device, and storage medium provided in this disclosure respond to control commands for a target virtual character, controlling the target virtual character to move within a game scene; determining an interaction object identification center point based on the target virtual character's current orientation and the virtual camera's current camera orientation; filtering a target interaction object from multiple virtual objects to be interacted with based on the interaction object identification center point; and controlling the target virtual character to perform virtual interaction behavior with the target interaction object. Thus, when filtering target interaction objects, the current orientation of the target virtual character and the virtual camera can be simultaneously referenced to determine the interaction object identification center point. Filtering target interaction objects based on the interaction object identification center point saves time and improves the accuracy of target interaction object filtering.

[0019] To make the above-mentioned objects, features and advantages of this disclosure more apparent and understandable, preferred embodiments are described below in detail with reference to the accompanying drawings. Attached Figure Description

[0020] To more clearly illustrate the technical solutions of the embodiments of this disclosure, the accompanying drawings used in the embodiments will be briefly described below. It should be understood that the following drawings only show some embodiments of this disclosure and should not be regarded as a limitation of the scope. For those skilled in the art, other related drawings can be obtained based on these drawings without creative effort.

[0021] Figure 1 This is one of the schematic diagrams of interactive object filtering in the related technologies provided in the embodiments of this disclosure;

[0022] Figure 2 This is a second schematic diagram of the interaction object filtering in the related technology provided in the embodiments of this disclosure;

[0023] Figure 3 A flowchart illustrating an interactive control method for a virtual object provided in an embodiment of this disclosure;

[0024] Figure 4 A schematic diagram of the target included angle provided in an embodiment of this disclosure;

[0025] Figure 5 This is one of the schematic diagrams showing the vertical screen center line being offset according to a target offset, provided in an embodiment of this disclosure;

[0026] Figure 6 This is a second schematic diagram illustrating the offset of the vertical screen centerline according to the target offset amount provided in this embodiment of the disclosure;

[0027] Figure 7This is one of the schematic diagrams illustrating the determination of the target interactive object provided in the embodiments of this disclosure;

[0028] Figure 8 This is the second schematic diagram illustrating the determination of the target interaction object provided in the embodiments of this disclosure;

[0029] Figure 9 This is a schematic diagram of the structure of an interactive control device for virtual objects provided in an embodiment of the present disclosure;

[0030] Figure 10 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this disclosure. Detailed Implementation

[0031] To make the objectives, technical solutions, and advantages of the embodiments of this disclosure clearer, the technical solutions of the embodiments of this disclosure will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only a part of the embodiments of this disclosure, and not all of them. The components of the embodiments of this disclosure described and shown in the accompanying drawings can generally be arranged and designed in various different configurations. Therefore, the following detailed description of the embodiments of this disclosure provided in the accompanying drawings is not intended to limit the scope of the claimed disclosure, but merely represents selected embodiments of this disclosure. Based on the embodiments of this disclosure, every other embodiment obtained by those skilled in the art without inventive effort falls within the scope of protection of this disclosure.

[0032] First, let me introduce the terms used in this disclosure:

[0033] (1) Terminal equipment

[0034] The terminal device involved in this disclosure mainly refers to a terminal used to provide a graphical user interface and control virtual characters. The terminal device can be a local terminal device as mentioned below, or a client device in a cloud interaction system. This terminal device can include, but is not limited to, any of the following devices: smartphones, tablets, game consoles, MP4 (Moving Picture Experts Group Audio Layer IV) players, personal digital assistants (PDAs), e-book readers, etc. The terminal device has a game-supporting application installed and running, such as an application supporting 3D or 2D games. In this disclosure, the application is described as a game application; optionally, this application can be a standalone application, such as a standalone 3D game program, or a network-connected application.

[0035] (2) Graphical User Interface

[0036] A graphical user interface (GUI) is a human-computer interaction display format that allows users to manipulate icons, icons, or menu options on the screen using input devices such as a mouse or keyboard. It also allows users to manipulate icons or menu options on the touch screen of a touch terminal by performing touch operations to select commands, launch programs, or perform other tasks.

[0037] (3) Game Scene

[0038] A game scene is a game environment displayed (or provided) by an application while it is running on a terminal or server; that is, the scene used during normal gameplay. In other words, a game scene refers to the virtual game controls that carry virtual characters during gameplay. These virtual characters can move, release skills, and perform other actions within the game scene under the control of user (i.e., player) commands issued to the terminal device. Optionally, a game scene can be a simulation of the real world, a semi-simulated / semi-fictional virtual environment, or a purely fictional virtual environment. A game scene can be any of a two-dimensional, 2.5-dimensional, or three-dimensional game scene. The virtual environment can be sky, land, ocean, etc., where land includes environmental elements such as deserts and cities. The game scene is the scene where the user controls the complete game logic of the virtual character. Optionally, a game scene can also be used for game scene battles between at least two virtual characters, and the game scene has virtual resources available for use by at least two virtual characters. For example, a game scene can include any one or more of the following elements: game background elements, game object elements, game item elements, and game resource elements.

[0039] (4) Target virtual character

[0040] A target virtual character refers to a controllable dynamic object in a virtual scene. Optionally, this dynamic object can be a virtual person, virtual animal, anime character, etc. This virtual object is a character controlled by the player through an input device, or an artificial intelligence (AI) trained and set up for battle in a virtual environment, or a non-player character (NPC) set up for battle in a virtual scene. Optionally, this virtual object is a virtual person competing in a virtual scene. Optionally, the number of virtual objects in the virtual scene battle is preset or dynamically determined based on the number of clients joining the battle; this disclosure does not limit this. In one possible implementation, the user can control the virtual object to move within the virtual scene, for example, controlling the virtual object to run, jump, crawl, etc., and can also control the target virtual character to use skills, virtual items, etc., provided by the application to fight against other virtual objects.

[0041] Secondly, the technical background of this disclosure will be introduced:

[0042] During the game, the target virtual character may need to interact with other virtual objects in the game scene. In order to ensure the relevance and accuracy of the interaction, it is necessary to screen the target virtual characters that can interact with the target virtual character and determine the target interaction objects that meet the player's interaction needs.

[0043] For related technologies, please refer to Figure 1 , Figure 1 This is one of the schematic diagrams of interactive object filtering in the related technology provided in the embodiments of this disclosure, such as... Figure 1 As shown, a list 110 of all interactive targets is displayed on the graphical user interface, allowing players to select a target for interaction. However, in this approach, the correlation between the option list on the graphical user interface and the actual interactive targets in the game scene is weak. When there are many interactive targets, players need to spend a lot of time identifying and switching targets, resulting in low interaction efficiency. Furthermore, as... Figure 1 As shown, another approach is to define a fan-shaped area based on the current orientation of the target virtual character, and then filter at least one target virtual character within the fan-shaped area to identify the target interaction object. However, if there are too many target virtual characters within the fan-shaped area, it may be necessary to adjust the orientation of the target virtual characters multiple times before the target interaction object that the player needs to interact with can be selected. The process of selecting the target interaction object is too cumbersome and has low efficiency.

[0044] For this, please refer to Figure 2 , Figure 2 This is a second schematic diagram of the interaction object filtering in the related technology provided in the embodiments of this disclosure, such as... Figure 2 As shown, the center point of the terminal device screen is predetermined, and the target interactive object is selected from multiple virtual interactive objects based on the distance between each selectable virtual interactive object and the center point of the screen. However, if the current position of the target virtual character is significantly different from the position of the screen center point, even using the screen center as a reference cannot accurately select the target interactive object that the player needs to interact with, resulting in a low accuracy rate for selecting the target interactive object; for example, as... Figure 2 As shown, the virtual character controlled by the player is facing the virtual character, but according to the calculation of the center of the screen, the virtual component is closer to the center of the screen. The system will automatically identify the virtual component as the target interaction object, which does not meet the player's interaction needs and the accuracy of the selection of the target interaction object is low.

[0045] Based on this, embodiments of this disclosure provide an interactive control method for virtual objects to save virtual interactive object filtering time and improve the accuracy of filtering target interactive objects.

[0046] Please see Figure 3 , Figure 3 A flowchart illustrating an interactive control method for a virtual object provided in an embodiment of this disclosure. Figure 3 As shown in the embodiments of this disclosure, the interactive control method for virtual objects includes:

[0047] S301. Responding to a control command for the target virtual character, control the target virtual character to move within the game scene.

[0048] S302. Determine the center point of the interactive object recognition based on the current orientation of the target virtual character and the current orientation of the virtual camera.

[0049] S303. Based on the center point of the interactive object identification, select the target interactive object from multiple virtual objects to be interacted with.

[0050] S304. Control the target virtual character to perform virtual interaction behavior with the target interaction object.

[0051] The virtual object interaction control method provided in this disclosure can simultaneously refer to the current character orientation of the target virtual character and the current camera orientation of the virtual camera when filtering target interactive objects, determine the interaction object recognition center point, and filter target interactive objects based on the interaction object recognition center point, thereby saving virtual interactive object filtering time and improving the accuracy of target interactive object filtering.

[0052] The exemplary steps of the embodiments of this disclosure are described below:

[0053] S301. Responding to a control command for the target virtual character, control the target virtual character to move within the game scene.

[0054] In one alternative implementation, players can control the target virtual character to move within the game scene and perform virtual interactive behaviors within the game scene by issuing control commands to the target virtual character.

[0055] In one alternative implementation, a movement control can be displayed in the graphical user interface, allowing players to control the movement direction of the target virtual character in the game scene by triggering actions on the movement control.

[0056] In one alternative implementation, the triggering operation for the moving control can be a touch operation on the moving control or a click operation on the moving control.

[0057] For example, when the terminal device is a mobile terminal, the triggering operation for the mobile control can be a touch operation (long press, click, or swipe operation, etc.) for the mobile control; when the terminal device is a PC, the triggering operation for the mobile control can be a click operation (click operation via mouse, etc.) for the mobile control through an external input device.

[0058] In one alternative implementation, while controlling the target virtual character to move within the game scene, the player can also control the target virtual character to perform virtual interaction behaviors with other virtual objects located in the game scene in order to better complete the corresponding virtual tasks.

[0059] For example, if the virtual object is a virtual character, the player can control the target virtual character to attack other virtual characters in order to defeat them and obtain corresponding virtual resources; the player can also control the target virtual character to engage in virtual dialogue with other virtual characters to obtain game information in the game scene; if the virtual object is a virtual interactive prop, the player can control the target virtual character to use the virtual interactive prop to perform corresponding virtual tasks.

[0060] In one alternative implementation, when the target virtual character needs to interact with other virtual objects, in order to ensure the relevance and accuracy of the interaction, it is necessary to screen the target virtual characters that can interact with the target virtual character and determine the target interaction objects that meet the player's interaction needs.

[0061] In related technologies, a fan-shaped area can be determined based on the current orientation of the target virtual character, and at least one target virtual character located in the fan-shaped area can be filtered to determine the target interaction object. However, if there are too many target virtual characters in the fan-shaped area, it may be necessary to adjust the orientation of the target virtual characters multiple times before the target interaction object that the player needs to interact with can be filtered out. The process of filtering the target interaction object is too cumbersome and the efficiency of filtering the target interaction object is low.

[0062] In another related technology, the center point of the screen can be determined in advance, and the target interactive object can be selected from multiple virtual interactive objects by the distance between each selectable virtual interactive object and the center point of the screen. However, if the current location of the target virtual character is far away from the location of the center point of the screen, it is also impossible to accurately select the target interactive object that the player needs to interact with, resulting in a low accuracy rate for selecting the target interactive object.

[0063] Based on this, the current orientation of the target virtual character and the current orientation of the virtual camera can be referenced simultaneously to determine the center point for the recognition of interactive objects. The target interactive objects can then be filtered based on the center point, reducing the number of virtual interactive object filtering steps while ensuring the accuracy of the filtering of target interactive objects.

[0064] S302. Determine the center point of the interactive object recognition based on the current orientation of the target virtual character and the current orientation of the virtual camera.

[0065] In one optional implementation, the game scene displayed in the graphical user interface, either entirely or partially, is captured by a virtual camera at a fixed position. When the virtual camera captures the game scene from a third-person perspective, there may be a certain deviation between the current camera orientation of the virtual camera and the current orientation of the target virtual character. To ensure that the selected target interactive objects meet the player's interaction expectations, it is necessary to determine the center point for identifying the interactive objects based on the current orientation of the target virtual character and the current camera orientation of the virtual camera. This eliminates the gap between the orientation of the target virtual character and the camera orientation of the virtual camera within a preset range, thereby accurately selecting the target interactive objects.

[0066] In one alternative implementation, before determining the center point of the interactive object recognition, it is necessary to first determine the center point of the current terminal device's screen. After determining the center point of the screen, the center point of the interactive object recognition is determined by combining the character orientation of the target virtual character and the camera orientation of the virtual camera.

[0067] Specifically, the interactive control method further includes:

[0068] a1: Determine the vertical screen center line of the terminal device in the vertical direction and the horizontal screen center line in the horizontal direction.

[0069] a2: Determine the center point of the terminal device's screen based on the vertical screen center line and the horizontal screen center line.

[0070] In one optional implementation, the center point at the top and the center point at the bottom of the terminal device can be determined, and the straight line connecting the center point at the top and the center point at the bottom of the terminal device is the vertical screen center line of the terminal device in the vertical direction; the center point at the left and the center point at the right of the terminal device can be determined, and the straight line connecting the center point at the left and the center point at the right of the terminal device is the horizontal screen center line of the terminal device in the horizontal direction.

[0071] Furthermore, the intersection of the vertical screen center line and the horizontal screen center line is determined as the screen center point.

[0072] Furthermore, after determining the center point of the screen, the current orientation of the target virtual character and the current orientation of the virtual camera can be combined to determine the center point of the interactive object recognition that can be performed.

[0073] Specifically, the step "determine the center point of the interactive object recognition based on the current orientation of the target virtual character and the current orientation of the virtual camera" includes:

[0074] b1: Determine the center point of the interactive object recognition based on the current orientation of the target virtual character, the current orientation of the virtual camera, and the center point of the screen.

[0075] In one alternative implementation, the degree of difference between the current orientation of the target virtual character and the current orientation of the virtual camera can be determined based on the current orientation of the target virtual character and the current orientation of the virtual camera. Then, based on the determined degree of difference between the current orientation of the target virtual character and the current orientation of the virtual camera, the target offset from the center point of the screen to the location of the target virtual character can be determined, the interactive object recognition center point can be determined, and the target interactive object can be accurately filtered based on the newly determined interactive object recognition center point.

[0076] Specifically, the step "determine the recognition center point of the interactive object based on the current orientation of the target virtual character, the current orientation of the virtual camera, and the center point of the screen" includes:

[0077] c1: Determine the target angle between the current orientation of the target virtual character and the current orientation of the virtual camera.

[0078] c2: If the target angle is within the first angle range, the center point of the screen is determined as the center point of the interactive object recognition.

[0079] In one optional implementation, the degree of difference between the current orientation of the target virtual character and the current orientation of the virtual camera can be represented by the target angle between them. That is, the target angle characterizes the degree of difference between the current orientation of the target virtual character and the current orientation of the virtual camera. The method for determining the target angle will be described below:

[0080] Specifically, the step "determining the target angle between the current orientation of the target virtual character and the current orientation of the virtual camera" includes:

[0081] d1: Based on the current orientation of the target virtual character, determine the horizontal orientation vector of the target virtual character.

[0082] d2: Based on the current camera orientation of the virtual camera, determine the camera orientation vector of the virtual camera in the horizontal direction.

[0083] d3: Determine the target angle based on the character's orientation vector and the camera's orientation vector.

[0084] In one alternative implementation, after determining the current orientation of the target virtual character and the current orientation of the virtual camera, the character orientation vector and the camera orientation vector can be determined by Euler angles; the character orientation vector and the camera orientation vector can also be determined by rotation matrices or quaternions; the character orientation vector and the camera orientation vector can also be determined by the distance between two points; or the character orientation vector and the camera orientation vector can be determined by spherical coordinates.

[0085] Here, the above methods for obtaining the character's orientation vector and the camera's orientation vector are merely exemplary methods. Other methods for calculating the orientation vector can be used to calculate the character's orientation vector and the camera's orientation vector.

[0086] In one alternative implementation, within the game engine, the forward orientation vector of the target virtual character or virtual camera can be obtained directly via Transform.forward; alternatively, the forward orientation vector of the target virtual character or virtual camera can be obtained via GetActorForwardVector().

[0087] Furthermore, after determining the character's facing vector and the camera's facing vector, the target angle can be determined according to different calculation methods. Here, the target angle is the angle between the character's facing vector and the camera's facing vector.

[0088] For example, please refer to Figure 4 , Figure 4 This is a schematic diagram of the target included angle provided in an embodiment of this disclosure, as shown below. Figure 4 As shown, after determining the current orientation of the target virtual character and the current orientation of the virtual camera, the angle between the two is determined as the target angle 410°.

[0089] The following section will explain the different methods for calculating the included angle of a target.

[0090] In one alternative implementation, the cosine of the included angle can be calculated using the dot product of vectors, and then the target included angle can be determined using inverse trigonometric functions.

[0091] Specifically, the cosine of the included angle can be determined using the following formula:

[0092]

[0093] Where COSθ is the cosine of the included angle; V 角色 V is the character's orientation vector; 摄像机 Let be the camera orientation vector.

[0094] Furthermore, the target angle can be determined using the following formula:

[0095]

[0096] Where θ is the target angle; V 角色 V is the character's orientation vector; 摄像机 Let be the camera orientation vector; here, the target angle ranges from [0°, 180°].

[0097] In another alternative implementation, the sine of the included angle can be calculated using the cross product of vectors, and then the target included angle can be determined using inverse trigonometric functions.

[0098] Specifically, the sine of the included angle can be determined using the following formula:

[0099]

[0100] Where sinθ is the sine of the included angle; V 角色 V is the character's orientation vector; 摄像机 V is the camera orientation vector; 叉 For V 角色 With V 摄像机 The cross product vector between them.

[0101] Furthermore, the target angle can be determined using the following formula:

[0102]

[0103] Where θ is the target angle; V 角色 V is the character's orientation vector; 摄像机 V is the camera orientation vector; 叉 For V 角色 With V 摄像机 The cross product vector between them; here, the target angle ranges from [0°, 180°].

[0104] In another alternative implementation, V can be角色 With V 摄像机 The horizontal orientation angle is converted into Euler angles, and the difference between the two orientation angles is the target angle.

[0105] Specifically, the target angle can be determined using the following formula:

[0106] θ = |θ1 - θ2|;

[0107] Where θ is the target angle; θ1 is the character's horizontal facing angle; θ2 is the camera's horizontal facing angle; here, the target angle ranges from [0°, 180°]; if the calculated θ is an obtuse angle greater than 180°, then it is necessary to determine the angle difference between 360° and the determined θ to determine the target angle θ within [0°, 180°].

[0108] Furthermore, after determining the target angle, the center of the interactive object recognition can be determined based on the angle range in which the current target angle is located.

[0109] In one optional implementation, the first included angle range can be [90°, 180°]. If the target included angle is within [90°, 180°], it is determined that the current target virtual character is facing away from the virtual camera. During the display of the graphical user interface, the player's sense of aiming at the virtual camera, the target virtual character, and the target interactive object is weak. At this time, the center point of the screen can be determined directly as the center point of the interactive object recognition without adjusting the center point of the screen, and then the target interactive object can be filtered according to the center point of the screen.

[0110] Please see Figure 5 , Figure 5 This is one of the schematic diagrams illustrating the offset of the vertical screen centerline according to the target offset provided in the embodiments of this disclosure, such as... Figure 5 As shown, if the target angle is within [90°, 180°], and the current target virtual character is facing away from the virtual camera, the player's sense of aiming at the virtual camera, target virtual character, and target interactive object is weak during the graphical user interface display process. In this case, the screen center point can be directly set as the interactive object recognition center point without adjusting the screen center point.

[0111] In one alternative implementation, if the target angle is determined to be within the second angle range, the center of the interactive object recognition needs to be redefined, instead of filtering the target interactive object based on the screen recognition center.

[0112] Specifically, the step "determine the interactive object recognition center point based on the current character orientation of the target virtual character, the current camera orientation of the virtual camera, and the center point of the screen" further includes:

[0113] e1: If the target angle is within the second angle interval, determine the target offset of the vertical screen centerline based on the target angle.

[0114] e2: Offset the vertical screen center line toward the location of the target virtual character according to the target offset, and determine the target update intersection point of the offset vertical screen center line and the horizontal screen center line.

[0115] e3: Determine the target update intersection point as the recognition center point of the interactive object.

[0116] In one optional implementation, the second included angle range can be [0°, 90°]. When the target included angle is within [0°, 90°], that is, when the target included angle is within the second included angle range, the target included angle is negatively correlated with the target offset. The larger the target included angle, the greater the difference between the current character orientation of the target virtual character and the current camera orientation of the virtual camera. The weaker the player's perception of the three-point alignment between the virtual camera, the target virtual character, and the target interactive object, the smaller the target offset that can be determined.

[0117] In one optional implementation, if the target angle is located within the second angle interval, the target offset can be calculated using different trigonometric functions. Furthermore, for different game scenarios, the target offset needs to be determined differently due to the different locations of the target virtual character, the different interaction ranges of the target virtual character and the virtual object to be interacted with. An initial offset needs to be determined based on the target offset before adjustment. This can meet different needs in determining the target offset and help improve the accuracy of determining the target offset.

[0118] Specifically, the step "determine the target offset of the vertical screen centerline based on the target angle" includes:

[0119] f1: Based on the target angle, determine the initial offset relative to the vertical screen centerline.

[0120] f2: Determine the offset adjustment coefficient based on the location of the target virtual character, the interaction range of the target virtual character and the virtual object to be interacted with.

[0121] f3: Determine the target offset based on the initial offset and the offset adjustment coefficient.

[0122] In one alternative implementation, if the target angle is located within the second angle interval, the initial offset can be calculated using different trigonometric functions. For example, the initial offset can be determined using the cosine function. After determining the initial offset, the initial offset is adjusted according to the offset adjustment coefficient to obtain the target offset.

[0123] Specifically, the target offset can be determined using the following formula:

[0124] d = k(cosθ);

[0125] Where d is the target offset; K is the offset adjustment coefficient; and θ is the target angle.

[0126] Specifically, the target offset can also be determined using the following formula:

[0127] d = kcos 2 (θ);

[0128] Where d is the target offset; K is the offset adjustment coefficient; and θ is the target angle.

[0129] Here, when θ is 0° and the target virtual character is facing the direction of the virtual camera, the maximum value of the target offset can be determined.

[0130] Furthermore, after determining the target offset, the horizontal screen center line is kept stationary, and the vertical screen center line is controlled to shift towards the target virtual character's location according to the target offset. The target update intersection point of the shifted vertical screen center line and the horizontal screen center line is then determined, and the target update intersection point is determined as the interactive object recognition center point.

[0131] For example. See also Figure 6 , Figure 6 This is a second schematic diagram illustrating the offset of the vertical screen centerline according to the target offset, as provided in this embodiment of the disclosure. Figure 6 As shown, the vertical screen center line L of the terminal device in the vertical direction. 纵 And the horizontal screen center line L of the terminal device in the horizontal direction 横 And determine the vertical screen center line L. 纵 and the horizontal screen center line L 横 The intersection point is determined as the center point O of the screen. 中心 After determining the target offset d, the vertical screen center line L is... 纵 After moving towards the target virtual character's location according to the target offset d, determine the vertical screen center line L after the offset. 纵 With the horizontal screen center line L 横 The intersection point between them is the center point O for identifying the interactive object. 偏移 .

[0132] Furthermore, after determining the interaction object identification center, multiple virtual objects to be interacted with in the game scene can be filtered based on the determined interaction object identification center to identify the target interaction object that can interact with the target virtual character.

[0133] S303. Based on the center point of the interactive object identification, select the target interactive object from multiple virtual objects to be interacted with.

[0134] In one optional implementation, the virtual object to be interacted with includes at least one of the following: a virtual character located in the game scene, a game scene object, or a virtual interactive prop;

[0135] The virtual object to be interacted with is a virtual object that meets preset interaction conditions; the preset interaction conditions include at least one of the following:

[0136] The distance between the virtual object to be interacted with and the target virtual character is within a preset interaction range; the virtual object to be interacted with is not completely obscured by the virtual occlusion object.

[0137] Here, virtual characters can be either player-controlled or non-player-controlled.

[0138] Specifically, the virtual objects that players can interact with can include virtual characters in the game scene. Players can control the target virtual character to attack other virtual characters and obtain virtual reward resources; players can also control the target virtual character to talk to other virtual characters and obtain virtual game information; the virtual objects to be interacted with can also include game scene objects set in the game scene. The target virtual character can move quickly in the game scene by interacting with the game scene objects. For example, if the game scene object is a virtual portal set in the game scene, the player can control the target virtual character to quickly move from the current position to other positions in the game scene by entering the virtual portal; the virtual objects to be interacted with can also be virtual interactive props. Players can control the target virtual character to pick up virtual interactive props, and the target virtual character can use virtual interactive props to assist the target virtual character in performing virtual tasks.

[0139] In one alternative implementation, the virtual object to be interacted with is a virtual object that can interact with the target virtual character. First, it is necessary to determine that the virtual object to be interacted with is within the preset interaction range of the target virtual character. Second, it is also necessary to determine that the virtual object to be interacted with is not completely obscured.

[0140] In one alternative implementation, distance and occlusion detection can be performed using methods such as view frustum, ray, sphere, or rectangular collider when determining the virtual object to be interacted with.

[0141] For example, taking a preset interaction range of 50 meters (within the game distance) from the target virtual character as an example, it is determined that there are virtual character A, virtual portal B, virtual interactive prop C1, and virtual interactive prop C2 in the current game scene; the distance between virtual character A and the target virtual character is determined to be 30 meters (game distance), the distance between virtual portal B and the target virtual character is 10 meters (game distance), the distance between virtual interactive prop C1 and the target virtual character is 70 meters (game distance), and the distance between virtual interactive prop C2 and the target virtual character is 40 meters (game distance). According to the preset interaction range, it can be determined that virtual interactive prop C1 is not a virtual object that can be interacted with by the target virtual character; at the same time, through the analysis of the game scene, it can be seen that virtual character A is not obscured, virtual portal B is completely obscured by virtual buildings in the game scene, and virtual interactive prop C1 is partially obscured by virtual grass in the game scene. After filtering, virtual character A and virtual interactive prop C1 can be selected as virtual objects to be interacted with.

[0142] Furthermore, after identifying multiple virtual objects to be interacted with, the distance between each virtual object to be interacted with and the recognition center point of the interaction object can be determined. Then, based on the distance between each virtual object to be interacted with and the recognition center point of the interaction object, the target interaction object that can interact with the target virtual character can be determined.

[0143] Specifically, the step "selecting the target interactive object from multiple virtual objects to be interacted with based on the center point of the interactive object identification" includes:

[0144] g1: Based on the location of the center point of the interactive object identification and the location of each virtual object to be interacted with, determine the first object distance between each virtual object to be interacted with and the location of the center point of the interactive object identification.

[0145] g2: Determine the target interactive object based on at least one virtual object among multiple virtual objects to be interacted with that has the shortest distance to the location of the identification center point of the interactive object.

[0146] In one alternative implementation, since the center point of the interactive object recognition is located on a two-dimensional screen, while each virtual object to be interacted with in the game scene is located in a three-dimensional game scene, when determining the distance between each virtual object to be interacted and the center point of the interactive object recognition, the three-dimensional position coordinates of each virtual object to be interacted with in the game scene can be converted into two-dimensional position coordinates, and the object distance between each virtual object to be interacted with and the center point of the interactive object recognition can be determined based on the two-dimensional position coordinates of the center point of the interactive object recognition.

[0147] Furthermore, after determining the object distance between each interactive object and the interactive object identification center point, the target interactive object is determined based on at least one interactive virtual object with the shortest first object distance to the location of the interactive object identification center point. It is also necessary to determine whether the interactive virtual objects need to be filtered again based on the number of interactive virtual objects with the shortest first object distance to the location of the interactive object identification center point.

[0148] Specifically, the step "determining the target interactive object based on at least one virtual object among multiple virtual objects to be interacted with that has the shortest distance to the location of the identification center point of the interactive object" includes:

[0149] h1: If there is one virtual object among the virtual objects to be interacted that has the shortest distance to the first object at the location of the identification center point of the interactive object, then the virtual object to be interacted is determined as the target interactive object.

[0150] h2: If there are multiple virtual objects among the virtual objects to be interacted that have the shortest object distance to the location of the identification center point of the interactive object, determine the second object distance between each virtual object to be interacted and the location of the target virtual character.

[0151] h3: The virtual object with the shortest distance to the second object among multiple virtual objects to be interacted with is determined as the target interactive object.

[0152] In one alternative implementation, if it is determined that there is only one virtual object among the virtual objects to be interacted with that has the shortest distance to the first object from the location of the identification center point of the interactive object, then there is no need to filter the virtual objects to be interacted with again, and the virtual object to be interacted with can be directly identified as the target interactive object.

[0153] In another optional implementation, if it is determined that there is more than one virtual object among the virtual objects to be interacted with that has the shortest first object distance to the location of the identification center point of the interactive object, then it is necessary to perform a second screening based on the second object distance between each virtual object to be interacted with and the location of the target virtual character, and determine the virtual object to be interacted with that has the shortest second object distance to the location of the target virtual character as the target interactive object.

[0154] For example, three virtual objects to be interacted with are identified as virtual object A, virtual object B, and virtual object C. Calculations show that the distance between virtual object A and the center point of the interaction object identification is 10 meters (game distance), the distance between virtual object B and the center point of the interaction object identification is 30 meters (game distance), and the distance between virtual object C and the center point of the interaction object identification is 10 meters (game distance). Since the distances between virtual objects A and C and the center point of the interaction object identification are the same (10 meters, game distance), the distances between virtual objects A and C and the target virtual character need to be determined again. Calculations show that the distance between virtual object A and the target virtual character is 15 meters (game distance), and the distance between virtual object C and the target virtual character is 25 meters (game distance). Since virtual object A is closer to the target virtual character, virtual object A is identified as the target interaction object.

[0155] In another alternative implementation, if there are at least two virtual objects to be interacted with that are both at the same distance from the center point of the interactive object identification and at the same distance from the target virtual character, the identifiers of the at least two virtual objects to be interacted with can be displayed in the graphical user interface, and the target interactive object can be determined according to the player's selection command.

[0156] In the example above, if the distance between the virtual object to be interacted, virtual object C, and the target virtual character is determined to be 15 meters (game distance), the identifier A of the virtual object to be interacted and the identifier C of the virtual object to be interacted are displayed in the graphical user interface. Based on the player's selection command, it is determined that the player has selected the virtual object to be interacted, and the virtual object to be interacted is determined as the target interaction object.

[0157] Furthermore, after identifying the target interaction object, in order to help players more clearly identify the target interaction object that can be interacted with, an interaction prompt icon can be displayed at a preset location of the target interaction object to provide interaction prompts to the player, thereby improving the player's gaming experience and the efficiency of human-computer interaction.

[0158] Specifically, after the step of "selecting the target interactive object from multiple virtual objects to be interacted based on the center point of the interactive object identification", the interaction control method further includes:

[0159] i1: Display an interactive prompt icon at the preset location of the target interactive object.

[0160] In one optional implementation, the preset position of the target interactive object can be a location near the target interactive object, and when the target interactive object is a virtual character, it can be located above the head of the virtual character.

[0161] In one alternative implementation, the interactive prompt identifier may include object attribute information of the target interactive object (object nickname, object function, etc.).

[0162] Furthermore, after identifying the target interaction object, it is possible to control the target virtual character to perform virtual interaction behaviors with the target interaction object.

[0163] S304. Control the target virtual character to perform virtual interaction behavior with the target interaction object.

[0164] In one alternative implementation, players can trigger an interaction between the target interactive object and the target virtual character by triggering an interactive prompt icon, thereby controlling the target virtual character to complete virtual interactive behaviors.

[0165] For example, the virtual objects that a player can control to interact with a target virtual character may include virtual characters in the game scene. The player can control the target virtual character to attack other virtual characters and obtain virtual reward resources; the player can also control the target virtual character to converse with other virtual characters and obtain virtual game information; the virtual objects to be interacted with may also include game scene objects set in the game scene. The target virtual character can move quickly in the game scene by interacting with the game scene objects. For example, if the game scene object is a virtual portal set in the game scene, the player can control the target virtual character to quickly move from the current position to other positions in the game scene by entering the virtual portal; the virtual objects to be interacted with may also be virtual interactive props. The player can control the target virtual character to pick up virtual interactive props, and the target virtual character can use virtual interactive props to assist the target virtual character in performing virtual interactive behaviors.

[0166] For example, please refer to Figure 7 , Figure 7 This is one of the schematic diagrams for determining the target interactive object provided in the embodiments of this disclosure, such as... Figure 7 As shown, if the target angle is located within the second angle range, the vertical screen center line L will be...纵 After moving towards the target virtual character's location according to the target offset d, determine the vertical screen center line L after the offset. 纵 With the horizontal screen center line L 横 The intersection point between them is the center point O for identifying the interactive object. 偏移 The virtual objects to be interacted with in the current game scene are identified as virtual characters and virtual components. The center point O between the virtual character and the object is calculated. 偏移 The distance between them is X1, and the virtual component and the object recognition center point O are... 偏移 If the distance between them is X2, and X1 is less than X2, then the virtual character is identified as the target interaction object, and the first interaction prompt icon 710 is displayed at the preset position of the virtual character.

[0167] For example, please refer to Figure 8 , Figure 8 This is a second schematic diagram illustrating the determination of the target interactive object provided in the embodiments of this disclosure, as shown below. Figure 8 As shown, if the target angle is within the first angle range, the screen recognition center O is determined as the center point of the interactive object recognition. The virtual objects to be interacted with in the current game scene are determined to be virtual characters and virtual components. After calculation, the distance between the virtual character and the screen recognition center O is X3, and the distance between the virtual component and the screen recognition center O is X4. Since X4 is less than X3, the virtual component is determined as the target interactive object, and the second interactive prompt mark 810 is displayed at the preset position of the virtual component.

[0168] The virtual object interaction control method provided in this disclosure responds to control commands for a target virtual character, controlling the target virtual character to move within a game scene; determines an interaction object identification center point based on the target virtual character's current orientation and the virtual camera's current camera orientation; filters a target interaction object from multiple virtual objects to be interacted with based on the interaction object identification center point; and controls the target virtual character to perform virtual interaction behavior with the target interaction object. In this way, when filtering target interaction objects, the current orientation of the target virtual character and the virtual camera can be simultaneously referenced to determine the interaction object identification center point. Filtering target interaction objects based on the interaction object identification center point saves time and improves the accuracy of target interaction object filtering.

[0169] Based on the same inventive concept, this disclosure also provides an interactive control device for virtual objects corresponding to the interactive control method for virtual objects. Since the principle of the device in this disclosure for solving the problem is similar to the interactive control method for virtual objects described above, the implementation of the device can refer to the implementation of the method, and the repeated parts will not be described again.

[0170] Please see Figure 9 , Figure 9 This is a schematic diagram of the structure of an interactive control device for a virtual object provided in an embodiment of this disclosure. Figure 9 As shown, the interactive control device 900 includes:

[0171] The object control module 910 is used to respond to control commands for the target virtual character and control the target virtual character to move in the game scene;

[0172] The center point determination module 920 is used to determine the center point of the interactive object based on the current character orientation of the target virtual character and the current camera orientation of the virtual camera.

[0173] The interactive object filtering module 930 is used to filter out the target interactive object from multiple virtual objects to be interacted based on the center point of the interactive object identification.

[0174] The interaction control module 940 is used to control the target virtual character to perform virtual interaction behavior with the target interaction object.

[0175] In one optional implementation, the virtual object to be interacted with includes at least one of the following: a virtual character located in the game scene, a game scene object, or a virtual interactive prop;

[0176] The virtual object to be interacted with is a virtual object that meets preset interaction conditions; the preset interaction conditions include at least one of the following:

[0177] The distance between the virtual object to be interacted with and the target virtual character is within a preset interaction range; the virtual object to be interacted with is not completely obscured by the virtual occlusion object.

[0178] In an optional embodiment, the interactive control device 900 further includes a screen center point determination module (not shown in the figure), the screen center point determination module being used for:

[0179] Determine the vertical screen center line and the horizontal screen center line of the terminal device in the vertical direction;

[0180] The center point of the terminal device screen is determined based on the vertical screen center line and the horizontal screen center line.

[0181] In an optional implementation, when the recognition center point determination module 920 determines the recognition center point of the interactive object based on the current character orientation of the target virtual character and the current camera orientation of the virtual camera, the recognition center point determination module 920 is used to:

[0182] The center point for identifying the interactive object is determined based on the current orientation of the target virtual character, the current orientation of the virtual camera, and the center point of the screen.

[0183] In an optional implementation, when the recognition center point determination module 920 determines the recognition center point of the interactive object based on the current character orientation of the target virtual character, the current camera orientation of the virtual camera, and the center point of the screen, the recognition center point determination module 920 is used to:

[0184] Determine the target angle between the current orientation of the target virtual character and the current orientation of the virtual camera;

[0185] If the target angle is within the first angle range, the center point of the screen is determined as the center point for the recognition of the interactive object.

[0186] In an optional implementation, when the recognition center point determination module 920 determines the recognition center point of the interactive object based on the current character orientation of the target virtual character, the current camera orientation of the virtual camera, and the center point of the screen, the recognition center point determination module 920 is used to:

[0187] If the target angle is within the second angle range, the target offset of the vertical screen centerline is determined based on the target angle.

[0188] The vertical screen center line is offset toward the location of the target virtual character according to the target offset amount, and the target update intersection point of the offset vertical screen center line and the horizontal screen center line is determined.

[0189] The target update intersection point is determined as the recognition center point of the interactive object.

[0190] In an optional implementation, when the identification center point determination module 920 is used to determine the target offset of the vertical screen center line based on the target angle, the identification center point determination module 920 is used to:

[0191] Based on the target angle, determine the initial offset relative to the vertical screen centerline;

[0192] Based on the location of the target virtual character, the interaction range of the target virtual character and the virtual object to be interacted with, an offset adjustment coefficient is determined;

[0193] The target offset is determined based on the initial offset and the offset adjustment coefficient.

[0194] In an optional implementation, when determining the target angle between the current orientation of the target virtual character and the current camera orientation of the virtual camera, the identification center point determination module 920 is used to:

[0195] Based on the current orientation of the target virtual character, determine the horizontal orientation vector of the target virtual character;

[0196] Based on the current camera orientation of the virtual camera, determine the camera orientation vector of the virtual camera in the horizontal direction;

[0197] The target angle is determined based on the character's orientation vector and the camera's orientation vector.

[0198] In an optional implementation, when the interactive object filtering module 930 filters out a target interactive object from multiple virtual objects to be interacted with based on the interactive object identification center point, the interactive object filtering module 930 is used to:

[0199] Based on the location of the interaction object identification center point and the location of each virtual object to be interacted with, a first object distance is determined between each virtual object to be interacted with and the location of the interaction object identification center point.

[0200] The target interactive object is determined based on at least one virtual object among multiple virtual objects to be interacted with that has the shortest distance to the location of the identification center point of the interactive object.

[0201] In an optional implementation, when the interaction object filtering module 930 determines the target interaction object based on at least one virtual object among a plurality of virtual objects to be interacted with that has the shortest distance to a first object from the location of the interaction object identification center point, the interaction object filtering module 930 is configured to:

[0202] If there is only one virtual object among the virtual objects to be interacted with that has the shortest distance to the first object at the location of the identification center point of the interactive object, then the virtual object to be interacted with is determined as the target interactive object.

[0203] If there are multiple virtual objects among the virtual objects to be interacted that have the shortest object distance to the location of the identification center point of the interactive object, then determine the second object distance between each virtual object to be interacted and the location of the target virtual character.

[0204] The virtual object that has the shortest distance to the second object among multiple virtual objects to be interacted with is determined as the target interactive object.

[0205] In an optional embodiment, the interactive control device 900 further includes an interactive prompt indicator display module (not shown in the figure), the interactive prompt indicator display module being used for:

[0206] An interactive prompt icon is displayed at a preset location on the target interactive object.

[0207] In one optional implementation, the target angle represents the degree of difference between the current character orientation of the target virtual character and the current camera orientation of the virtual camera; when the target angle is within a second angle range, the target angle is negatively correlated with the target offset.

[0208] The virtual object interaction control device provided in this embodiment responds to control commands for a target virtual character, controlling the target virtual character to move within a game scene; determines an interaction object recognition center point based on the target virtual character's current orientation and the virtual camera's current camera orientation; filters out a target interaction object from multiple virtual objects to be interacted with based on the interaction object recognition center point; and controls the target virtual character to perform virtual interaction behavior with the target interaction object. Thus, when filtering target interaction objects, the device can simultaneously refer to the target virtual character's current orientation and the virtual camera's current camera orientation to determine the interaction object recognition center point, and filter target interaction objects based on this center point, saving virtual interaction object filtering time while improving the accuracy of target interaction object filtering.

[0209] Please see Figure 10 , Figure 10 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this disclosure. Figure 10 As shown, the electronic device 1000 includes a processor 1010, a memory 1020, and a bus 1030.

[0210] The memory 1020 stores machine-readable instructions executable by the processor 1010. When the electronic device 1000 is running, the processor 1010 communicates with the memory 1020 via the bus 1030, causing the processor 1010 to execute the following instructions during operation:

[0211] In response to control commands directed at the target virtual character, the system controls the target virtual character to move within the game scene.

[0212] Determine the center point for the interactive object recognition based on the current orientation of the target virtual character and the current orientation of the virtual camera;

[0213] Based on the center point of the interaction object identification, the target interaction object is selected from multiple virtual objects to be interacted with;

[0214] Control the target virtual character to perform virtual interaction behavior with the target interaction object.

[0215] In one optional implementation, the virtual object to be interacted with includes at least one of the following: a virtual character located in the game scene, a game scene object, or a virtual interactive prop;

[0216] The virtual object to be interacted with is a virtual object that meets preset interaction conditions; the preset interaction conditions include at least one of the following:

[0217] The distance between the virtual object to be interacted with and the target virtual character is within a preset interaction range; the virtual object to be interacted with is not completely obscured by the virtual occlusion object.

[0218] In one optional implementation, the instructions executed by the processor 1010 further include:

[0219] Determine the vertical screen center line and the horizontal screen center line of the terminal device in the vertical direction;

[0220] The center point of the terminal device screen is determined based on the vertical screen center line and the horizontal screen center line.

[0221] In one optional implementation, the instruction executed by the processor 1010, which involves determining the interaction object recognition center point based on the current character orientation of the target virtual character and the current camera orientation of the virtual camera, includes:

[0222] The center point for identifying the interactive object is determined based on the current orientation of the target virtual character, the current orientation of the virtual camera, and the center point of the screen.

[0223] In one optional implementation, the instruction executed by the processor 1010, wherein determining the interactive object recognition center point based on the current character orientation of the target virtual character, the current camera orientation of the virtual camera, and the center point of the screen, includes:

[0224] Determine the target angle between the current orientation of the target virtual character and the current orientation of the virtual camera;

[0225] If the target angle is within the first angle range, the center point of the screen is determined as the center point for the recognition of the interactive object.

[0226] In an optional implementation, the instructions executed by the processor 1010, wherein determining the interactive object recognition center point based on the current character orientation of the target virtual character, the current camera orientation of the virtual camera, and the center point of the screen, further includes:

[0227] If the target angle is within the second angle range, the target offset of the vertical screen centerline is determined based on the target angle.

[0228] The vertical screen center line is offset toward the location of the target virtual character according to the target offset amount, and the target update intersection point of the offset vertical screen center line and the horizontal screen center line is determined.

[0229] The target update intersection point is determined as the recognition center point of the interactive object.

[0230] In one optional implementation, the instruction executed by the processor 1010, which involves determining the target offset of the vertical screen centerline based on the target angle, includes:

[0231] Based on the target angle, determine the initial offset relative to the vertical screen centerline;

[0232] Based on the location of the target virtual character, the interaction range of the target virtual character and the virtual object to be interacted with, an offset adjustment coefficient is determined;

[0233] The target offset is determined based on the initial offset and the offset adjustment coefficient.

[0234] In one optional implementation, the instruction executed by processor 1010, determining the target angle between the current orientation of the target virtual character and the current camera orientation of the virtual camera, includes:

[0235] Based on the current orientation of the target virtual character, determine the horizontal orientation vector of the target virtual character;

[0236] Based on the current camera orientation of the virtual camera, determine the camera orientation vector of the virtual camera in the horizontal direction;

[0237] The target angle is determined based on the character's orientation vector and the camera's orientation vector.

[0238] In one optional implementation, the instructions executed by the processor 1010, wherein selecting the target interactive object from multiple virtual objects to be interacted based on the interactive object identification center point, includes:

[0239] Based on the location of the interaction object identification center point and the location of each virtual object to be interacted with, a first object distance is determined between each virtual object to be interacted with and the location of the interaction object identification center point.

[0240] The target interactive object is determined based on at least one virtual object among multiple virtual objects to be interacted with that has the shortest distance to the location of the identification center point of the interactive object.

[0241] In an optional implementation, the instructions executed by the processor 1010, wherein determining the target interactive object based on at least one interactive virtual object among a plurality of interactive virtual objects having the shortest distance to the location of the interactive object identification center point, includes:

[0242] If there is only one virtual object among the virtual objects to be interacted with that has the shortest distance to the first object at the location of the identification center point of the interactive object, then the virtual object to be interacted with is determined as the target interactive object.

[0243] If there are multiple virtual objects among the virtual objects to be interacted that have the shortest object distance to the location of the identification center point of the interactive object, then determine the second object distance between each virtual object to be interacted and the location of the target virtual character.

[0244] The virtual object that has the shortest distance to the second object among multiple virtual objects to be interacted with is determined as the target interactive object.

[0245] In one optional implementation, the instructions executed by the processor 1010 further include:

[0246] An interactive prompt icon is displayed at a preset location on the target interactive object.

[0247] In one optional implementation, the target angle represents the degree of difference between the current character orientation of the target virtual character and the current camera orientation of the virtual camera; when the target angle is within a second angle range, the target angle is negatively correlated with the target offset.

[0248] By employing the above method, when filtering target interactive objects, the current orientation of the target virtual character and the current orientation of the virtual camera can be simultaneously referenced to determine the center point for identifying the interactive object. Target interactive objects can then be filtered based on this center point, saving filtering time and improving accuracy. Furthermore, for different game scenarios, the required target offset varies depending on the location of the target virtual character and the interaction range of the target virtual character and the virtual object to be interacted with. An initial offset needs to be determined based on the target offset before adjustment, thus adapting to different needs and improving the accuracy of target offset determination. Moreover, to help players more clearly identify the target interactive object, an interaction prompt can be displayed at a preset location of the target interactive object after identification, providing interaction guidance to the player and enhancing the player's gaming experience and human-computer interaction efficiency.

[0249] This disclosure also provides a computer-readable storage medium storing a computer program, which, when executed by a processor, performs the following instructions:

[0250] In response to control commands directed at the target virtual character, the system controls the target virtual character to move within the game scene.

[0251] Determine the center point for the interactive object recognition based on the current orientation of the target virtual character and the current orientation of the virtual camera;

[0252] Based on the center point of the interaction object identification, the target interaction object is selected from multiple virtual objects to be interacted with;

[0253] Control the target virtual character to perform virtual interaction behavior with the target interaction object.

[0254] In one optional implementation, the virtual object to be interacted with includes at least one of the following: a virtual character located in the game scene, a game scene object, or a virtual interactive prop;

[0255] The virtual object to be interacted with is a virtual object that meets preset interaction conditions; the preset interaction conditions include at least one of the following:

[0256] The distance between the virtual object to be interacted with and the target virtual character is within a preset interaction range; the virtual object to be interacted with is not completely obscured by the virtual occlusion object.

[0257] In one optional implementation, the instructions executed by the computer-readable storage medium further include:

[0258] Determine the vertical screen center line and the horizontal screen center line of the terminal device in the vertical direction;

[0259] The center point of the terminal device screen is determined based on the vertical screen center line and the horizontal screen center line.

[0260] In one optional implementation, the instructions executed by the computer-readable storage medium, wherein determining the interaction object recognition center point based on the current character orientation of the target virtual character and the current camera orientation of the virtual camera, includes:

[0261] The center point for identifying the interactive object is determined based on the current orientation of the target virtual character, the current orientation of the virtual camera, and the center point of the screen.

[0262] In one optional implementation, the instructions executed by the computer-readable storage medium, wherein determining the interactive object recognition center point based on the current character orientation of the target virtual character, the current camera orientation of the virtual camera, and the center point of the screen, includes:

[0263] Determine the target angle between the current orientation of the target virtual character and the current orientation of the virtual camera;

[0264] If the target angle is within the first angle range, the center point of the screen is determined as the center point for the recognition of the interactive object.

[0265] In an optional implementation, the instructions executed by the computer-readable storage medium, wherein determining the interactive object recognition center point based on the current character orientation of the target virtual character, the current camera orientation of the virtual camera, and the center point of the screen, further includes:

[0266] If the target angle is within the second angle range, the target offset of the vertical screen centerline is determined based on the target angle.

[0267] The vertical screen center line is offset toward the location of the target virtual character according to the target offset amount, and the target update intersection point of the offset vertical screen center line and the horizontal screen center line is determined.

[0268] The target update intersection point is determined as the recognition center point of the interactive object.

[0269] In one optional implementation, the instructions executable by the computer-readable storage medium, wherein determining the target offset of the vertical screen centerline based on the target angle, includes:

[0270] Based on the target angle, determine the initial offset relative to the vertical screen centerline;

[0271] Based on the location of the target virtual character, the interaction range of the target virtual character and the virtual object to be interacted with, an offset adjustment coefficient is determined;

[0272] The target offset is determined based on the initial offset and the offset adjustment coefficient.

[0273] In one optional implementation, the instructions executed by the computer-readable storage medium, wherein determining the target angle between the current orientation of the target virtual character and the current camera orientation of the virtual camera, includes:

[0274] Based on the current orientation of the target virtual character, determine the horizontal orientation vector of the target virtual character;

[0275] Based on the current camera orientation of the virtual camera, determine the camera orientation vector of the virtual camera in the horizontal direction;

[0276] The target angle is determined based on the character's orientation vector and the camera's orientation vector.

[0277] In one optional implementation, the instructions executable by the computer-readable storage medium, wherein selecting the target interactive object from a plurality of virtual objects to be interacted based on the interactive object identification center point, includes:

[0278] Based on the location of the interaction object identification center point and the location of each virtual object to be interacted with, a first object distance is determined between each virtual object to be interacted with and the location of the interaction object identification center point.

[0279] The target interactive object is determined based on at least one virtual object among multiple virtual objects to be interacted with that has the shortest distance to the location of the identification center point of the interactive object.

[0280] In one optional implementation, the instructions executed by the computer-readable storage medium, wherein determining the target interactive object based on at least one interactive virtual object among a plurality of interactive virtual objects having the shortest distance to a first object location relative to the identification center point of the interactive object, includes:

[0281] If there is only one virtual object among the virtual objects to be interacted with that has the shortest distance to the first object at the location of the identification center point of the interactive object, then the virtual object to be interacted with is determined as the target interactive object.

[0282] If there are multiple virtual objects among the virtual objects to be interacted that have the shortest object distance to the location of the identification center point of the interactive object, then determine the second object distance between each virtual object to be interacted and the location of the target virtual character.

[0283] The virtual object that has the shortest distance to the second object among multiple virtual objects to be interacted with is determined as the target interactive object.

[0284] In one optional implementation, the instructions executed by the computer-readable storage medium further include:

[0285] An interactive prompt icon is displayed at a preset location on the target interactive object.

[0286] In one optional implementation, the target angle represents the degree of difference between the current character orientation of the target virtual character and the current camera orientation of the virtual camera; when the target angle is within a second angle range, the target angle is negatively correlated with the target offset.

[0287] By employing the above method, when filtering target interactive objects, the current orientation of the target virtual character and the current orientation of the virtual camera can be simultaneously referenced to determine the center point for identifying the interactive object. Target interactive objects can then be filtered based on this center point, saving filtering time and improving accuracy. Furthermore, for different game scenarios, the required target offset varies depending on the location of the target virtual character and the interaction range of the target virtual character and the virtual object to be interacted with. An initial offset needs to be determined based on the target offset before adjustment, thus adapting to different needs and improving the accuracy of target offset determination. Moreover, to help players more clearly identify the target interactive object, an interaction prompt can be displayed at a preset location of the target interactive object after identification, providing interaction guidance to the player and enhancing the player's gaming experience and human-computer interaction efficiency.

[0288] In the several embodiments provided in this disclosure, it should be understood that the disclosed systems, apparatuses, and methods can be implemented in other ways. The apparatus embodiments described above are merely illustrative. For example, the division of units is only a logical functional division, and in actual implementation, there may be other division methods. Furthermore, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Additionally, the shown or discussed mutual couplings, direct couplings, or communication connections may be through some communication interfaces; indirect couplings or communication connections between devices or units may be electrical, mechanical, or other forms.

[0289] The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.

[0290] In addition, the functional units in the various embodiments of this disclosure can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit.

[0291] If the aforementioned functions are implemented as software functional units and sold or used as independent products, they can be stored in a processor-executable, non-volatile, computer-readable storage medium. Based on this understanding, the technical solution of this disclosure, in essence, or the part that contributes to the prior art, or a portion of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of this disclosure. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.

[0292] Finally, it should be noted that the above-described embodiments are merely specific implementations of this disclosure, used to illustrate the technical solutions of this disclosure, and not to limit it. The protection scope of this disclosure is not limited thereto. Although this disclosure has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that any person skilled in the art can still modify or easily conceive of changes to the technical solutions described in the foregoing embodiments, or make equivalent substitutions for some of the technical features, within the scope of the technology disclosed in this disclosure; and these modifications, changes, or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of this disclosure, and should all be covered within the protection scope of this disclosure. Therefore, the protection scope of this disclosure should be determined by the protection scope of the claims.

Claims

1. A method for interactive control of virtual objects, characterized in that, A graphical user interface is provided through a terminal device, wherein the graphical user interface includes game footage of all or part of the game scene captured by a virtual camera; The game scene includes a target virtual character; The interactive control method includes: In response to control commands directed at the target virtual character, the system controls the target virtual character to move within the game scene. Determine the center point for the interactive object recognition based on the current orientation of the target virtual character and the current orientation of the virtual camera; Based on the center point of the interaction object identification, the target interaction object is selected from multiple virtual objects to be interacted with; Control the target virtual character to perform virtual interaction behavior with the target interaction object.

2. The interactive control method according to claim 1, characterized in that, The virtual object to be interacted with includes at least one of the following: a virtual character located in the game scene, a game scene object, or a virtual interactive prop; The virtual object to be interacted with is a virtual object that meets preset interaction conditions; the preset interaction conditions include at least one of the following: The distance between the virtual object to be interacted with and the target virtual character is within a preset interaction range; the virtual object to be interacted with is not completely obscured by the virtual occlusion object.

3. The interactive control method according to claim 1, characterized in that, The interactive control method further includes: Determine the vertical screen center line and the horizontal screen center line of the terminal device in the vertical direction; The center point of the terminal device screen is determined based on the vertical screen center line and the horizontal screen center line.

4. The interactive control method according to claim 3, characterized in that, The step of determining the center point for identifying the interactive object based on the current orientation of the target virtual character and the current orientation of the virtual camera includes: The center point for identifying the interactive object is determined based on the current orientation of the target virtual character, the current orientation of the virtual camera, and the center point of the screen.

5. The interactive control method according to claim 4, characterized in that, Determining the center point of the interactive object recognition based on the current orientation of the target virtual character, the current orientation of the virtual camera, and the center point of the screen includes: Determine the target angle between the current orientation of the target virtual character and the current orientation of the virtual camera; If the target angle is within the first angle range, the center point of the screen is determined as the center point for the recognition of the interactive object.

6. The interactive control method according to claim 5, characterized in that, The step of determining the interactive object recognition center point based on the current character orientation of the target virtual character, the current camera orientation of the virtual camera, and the center point of the screen further includes: If the target angle is within the second angle range, the target offset of the vertical screen centerline is determined based on the target angle. The vertical screen center line is offset toward the location of the target virtual character according to the target offset amount, and the target update intersection point of the offset vertical screen center line and the horizontal screen center line is determined. The target update intersection point is determined as the recognition center point of the interactive object.

7. The interactive control method according to claim 6, characterized in that, Determining the target offset of the vertical screen centerline based on the target angle includes: Based on the target angle, determine the initial offset relative to the vertical screen centerline; Based on the location of the target virtual character, the interaction range of the target virtual character and the virtual object to be interacted with, an offset adjustment coefficient is determined; The target offset is determined based on the initial offset and the offset adjustment coefficient.

8. The interactive control method according to claim 5, characterized in that, Determining the target angle between the current orientation of the target virtual character and the current orientation of the virtual camera includes: Based on the current orientation of the target virtual character, determine the horizontal orientation vector of the target virtual character; Based on the current camera orientation of the virtual camera, determine the camera orientation vector of the virtual camera in the horizontal direction; The target angle is determined based on the character's orientation vector and the camera's orientation vector.

9. The interactive control method according to claim 1, characterized in that, The step of selecting the target interactive object from multiple virtual objects to be interacted with based on the center point of the interactive object identification includes: Based on the location of the interaction object identification center point and the location of each virtual object to be interacted with, a first object distance is determined between each virtual object to be interacted with and the location of the interaction object identification center point. The target interactive object is determined based on at least one virtual object among multiple virtual objects to be interacted with that has the shortest distance to the location of the identification center point of the interactive object.

10. The interactive control method according to claim 9, characterized in that, The step of determining the target interactive object based on at least one virtual object among multiple virtual objects to be interacted with that has the shortest distance to the location of the identification center point of the interactive object includes: If there is only one virtual object among the virtual objects to be interacted with that has the shortest distance to the first object at the location of the identification center point of the interactive object, then the virtual object to be interacted with is determined as the target interactive object. If there are multiple virtual objects among the virtual objects to be interacted that have the shortest object distance to the location of the identification center point of the interactive object, then determine the second object distance between each virtual object to be interacted and the location of the target virtual character. The virtual object that has the shortest distance to the second object among multiple virtual objects to be interacted with is determined as the target interactive object.

11. The interactive control method according to claim 1, characterized in that, After selecting the target interactive object from multiple virtual objects to be interacted based on the interactive object identification center point, the interaction control method further includes: An interactive prompt icon is displayed at a preset location on the target interactive object.

12. The interactive control method according to claim 6, characterized in that, The target angle represents the degree of difference between the current orientation of the target virtual character and the current orientation of the virtual camera; when the target angle is within the second angle range, the target angle is negatively correlated with the target offset.

13. An interactive control device for virtual objects, characterized in that, A graphical user interface is provided through a terminal device, wherein the graphical user interface includes game footage of all or part of the game scene captured by a virtual camera; The game scene includes a target virtual character; The interactive control device includes: An object control module is used to respond to control commands for the target virtual character and control the target virtual character to move in the game scene; The center point determination module is used to determine the center point of the interactive object based on the current orientation of the target virtual character and the current orientation of the virtual camera. The interactive object filtering module is used to filter out target interactive objects from multiple virtual objects to be interacted based on the identification center point of the interactive object; The interaction control module is used to control the target virtual character to perform virtual interaction behaviors with the target interaction object.

14. An electronic device, characterized in that, include: The device includes a processor, a memory, and a bus, wherein the memory stores machine-readable instructions executable by the processor, and when the electronic device is running, the processor communicates with the memory via the bus, and the processor executes the machine-readable instructions to perform the steps of the interactive control method for a virtual object as described in any one of claims 1 to 12.

15. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program that, when executed by a processor, performs the steps of the interactive control method for the virtual object according to any one of claims 1 to 12.