Screen display method, device, terminal and computer program thereof
The method and device improve the display effect in three-dimensional virtual environments by optimizing camera movement to prevent obstruction of locked characters by user-controlled characters, ensuring clear and rational presentation.
Patent Information
- Application Number
- JP2024514684
- Authority / Receiving Office
- JP · JP
- Patent Type
- Applications
- Current Assignee / Owner
- Priority Date
- 2022-01-04
- Filing Date
- 2022-10-25
- Publication Date
- 2024-10-04
- Estimated Expiration
- 2042-10-25
AI Technical Summary
In existing game applications, a locked virtual character can be blocked by the user-controlled character, affecting the display effect in a three-dimensional virtual environment.
A method and device that improve the rationality of camera movement by determining the position and orientation of a virtual camera based on the positions of a self-character and a locked character, ensuring the locked character is not obstructed by the user-controlled character, using a virtual tracking object as the visual focus.
Enhances the display effect by preventing the locked character from being blocked and improving the rationality of camera movement, ensuring clear and rational presentation of both characters in the screen shot.
Smart Images

Figure 2024536009000001_ABST
Abstract
Description
[Technical field]
[0001] This application claims priority to a Chinese patent application filed on January 4, 2022, bearing application number 202210003178.6 and titled "Screen display method, device, terminal, storage medium, and program product," the entire contents of which are incorporated herein by reference.
[0002] The present application relates to the technical fields of computers and the Internet, and more particularly to a screen display method, an apparatus, a terminal, and a computer program thereof. [Background technology]
[0003] Currently, some game applications provide a three-dimensional virtual environment in which a virtual character can perform various operations under the control of a user, thereby providing a more realistic game environment to the user.
[0004] In the related technology, when a user locks a target virtual character (hereinafter referred to as the "locked character") in a three-dimensional virtual environment, the game application controls the virtual camera to observe the locked character with the virtual character controlled by the user himself (hereinafter referred to as the "self-character") as the visual focus, and presents the screen captured by this virtual camera to the user.
[0005] However, with this method, the locked character is likely to be obscured by the player's own character, which may affect the display effect on the screen. Summary of the Invention
[0006] In the embodiments of the present application, a screen display method, device, terminal, storage medium, and program product are proposed that can improve the rationality of the camera movement of the virtual camera and improve the display effect of the screen.
[0007] According to one aspect of an embodiment of the present application, a screen display method executed by a terminal device is proposed, the method comprising: displaying a first screen frame, the first screen frame being a screen image of a three-dimensional virtual environment captured by a virtual camera with a virtual tracking object in the three-dimensional virtual environment as a visual focus; determining a target position of the virtual following object based on a target position of a self character and a target position of a first lock character, the first lock character referring to a lock target corresponding to the self character under a character lock state; determining a target position and a target orientation of the virtual camera based on a target position of the virtual following object, wherein a distance between the target position of the virtual camera and the target position of the virtual following object is smaller than a distance between the target position of the virtual camera and the target position of the first locked character; obtaining a single-frame target position and a single-frame target orientation of the virtual camera in a second screen frame by interpolation based on a target position and a target orientation of the virtual camera and a real position ("real position") and a real orientation ("real heading direction") of the virtual camera in the first screen frame; generating and displaying the second screen frame based on a single-frame target position and a single-frame target orientation of the virtual camera in the second screen frame.
[0008] According to one aspect of an embodiment of the present application, a screen display method executed by a terminal device is proposed, the method comprising: displaying a first screen frame, the first screen frame being a screen image of a three-dimensional virtual environment captured by a virtual camera with a virtual tracking object in the three-dimensional virtual environment as a visual focus; In response to movement of at least one of the self character and a first locked character, displaying the second screen frame based on a single frame target position and a single frame target orientation of the virtual camera in the second screen frame, wherein the single frame target position and the single frame target orientation are determined based on a target position and target orientation of the virtual camera, the target position and target orientation of the virtual camera are determined based on a target position of the virtual following object, a distance between the target position of the virtual camera and the target position of the virtual following object is smaller than a distance between the target position of the virtual camera and the target position of the first locked character, and the first locked character refers to a locked target corresponding to the self character under the character locked state.
[0009] According to one aspect of an embodiment of the present application, a screen display device is proposed, the device comprising: a screen display module configured to display a first screen frame, the first screen frame being a screen image of a three-dimensional virtual environment captured by a virtual camera with a virtual tracking object in the three-dimensional virtual environment as a visual focus; an object position determination module configured to determine a target position of the virtual following object based on a target position of a self character and a target position of a first lock character, the first lock character referring to a lock target corresponding to the self character under a character lock state; a camera position determination module configured to determine a target position and a target orientation of the virtual camera based on a target position of the virtual following object, wherein a distance between the target position of the virtual camera and the target position of the virtual following object is smaller than a distance between the target position of the virtual camera and the target position of the first lock character; a single-frame position determination module configured to obtain a single-frame target position and a single-frame target orientation of the virtual camera in a second screen frame by interpolation based on a target position and a target orientation of the virtual camera and an actual position and an actual orientation of the virtual camera in the first screen frame; Including, The screen display module is further configured to generate and display the second screen frame based on a single-frame target position and a single-frame target orientation of the virtual camera in the second screen frame.
[0010] According to one aspect of an embodiment of the present application, a screen display device is proposed, the device comprising: a screen display module configured to display a first screen frame, the first screen frame being a screen image of a three-dimensional virtual environment captured by a virtual camera with a virtual tracking object in the three-dimensional virtual environment as a visual focus; The screen display module is further configured to display the second screen frame based on a single frame target position and a single frame target orientation of the virtual camera in the second screen frame in response to movement of at least one of the self character and a first locked character, wherein the single frame target position and the single frame target orientation are determined based on the target position and target orientation of the virtual camera, and the target position and target orientation of the virtual camera are determined based on the target position of the virtual following object, the distance between the target position of the virtual camera and the target position of the virtual following object is smaller than the distance between the target position of the virtual camera and the target position of the first locked character, and the first locked character refers to a locked target corresponding to the self character under the character locked state.
[0011] According to one aspect of an embodiment of the present application, a terminal device is proposed having a processor and a memory, wherein a computer program is stored in the memory, and when the computer program is loaded and executed by the processor, the above-mentioned screen display method is realized.
[0012] According to one aspect of an embodiment of the present application, a computer-readable storage medium having a computer program stored thereon is proposed, and when the computer program is loaded and executed by a processor, the above-mentioned screen display method is realized.
[0013] According to one aspect of the embodiments of the present application, a computer program product or a computer program is proposed, which includes computer instructions stored in a computer-readable storage medium, and a processor of a terminal device reads and executes the computer instructions from the computer-readable storage medium, thereby performing the above-mentioned screen display method on the terminal device.
[0014] The technical solutions proposed in the embodiments of the present application can bring about the following beneficial effects:
[0015] The virtual following object in the three-dimensional virtual environment is set as the visual focus of the virtual camera, and in a character lock state, the position information of the virtual following object is determined based on the position information of the self character and the position information of the locked character, and then the position and orientation of the virtual camera are updated based on the position information of the virtual following object. When determining the position information of the virtual following object, both the position information of the self character and the position information of the locked character are taken into consideration, so that the occlusion of the locked character by the self character is avoided, and the determined position information of the virtual following object becomes more reasonable and accurate, and furthermore, it is ensured that the self character and the locked character are presented to the user more reasonably and clearly in the screen captured by the virtual camera with the virtual following object as the visual focus, and the rationality of the camera movement of the virtual camera in the character lock state is increased, and the display effect of the screen is improved.
[0016] In addition, by maintaining the distance between the target position of the virtual camera and the target position of the virtual following object smaller than the distance between the target position of the virtual camera and the target position of the first locked character, the virtual following object is closer to the virtual camera than the first locked character within the field of view of the virtual camera, thereby preventing the first locked object from blocking the field of view of the virtual camera and making the camera movement of the virtual camera more rational when in the character locked state. [Brief description of the drawings]
[0017] [Figure 1] FIG. 1 is a schematic diagram illustrating a technology implementation environment according to one embodiment of the present application. [Diagram 2] 2 is a flowchart of a screen display method according to an embodiment of the present application. [Diagram 3] FIG. 2 is a schematic diagram illustrating the determination of a pending-determination target position of a virtual following object according to an embodiment of the present application; [Figure 4] 1 is a schematic diagram showing a rear angular region of a self-character according to an embodiment of the present application; [Diagram 5]FIG. 2 is a schematic diagram illustrating a screen shot with a virtual tracking object as a visual focus according to an embodiment of the present application; [Figure 6] FIG. 2 is a schematic diagram illustrating a rotation orbit of a virtual camera according to an embodiment of the present application; [Figure 7] FIG. 2 is a schematic diagram illustrating determining a target position and target orientation of a virtual camera according to an embodiment of the present application. [Figure 8] FIG. 2 is a schematic diagram illustrating a relationship between a first distance and a first interpolation coefficient according to an embodiment of the present application. [Figure 9] FIG. 11 is a schematic diagram illustrating a relationship between a second distance and a second interpolation coefficient according to an embodiment of the present application. [Figure 10] FIG. 2 is a schematic diagram illustrating single-frame target orientation determination of a virtual camera according to an embodiment of the present application. [Figure 11] 11 is a flowchart illustrating switching of a locked character in a character lock state according to an embodiment of the present application. [Figure 12] FIG. 1 is a schematic diagram illustrating the determination of a pre-lock character and its marking according to an embodiment of the present application; [Figure 13] 11 is a flowchart illustrating a process of updating a virtual camera in a non-character locked state according to an embodiment of the present application. [Figure 14] FIG. 13 is a schematic diagram illustrating a virtual camera update process under a non-character lock state according to an embodiment of the present application. [Figure 15] 1 is a flowchart illustrating a process for updating a virtual camera according to an embodiment of the present application. [Figure 16] 4 is a flowchart of a screen display method according to another embodiment of the present application. [Figure 17] FIG. 1 is a block diagram of a screen display device according to an embodiment of the present application. [Figure 18] FIG. 2 is a configuration block diagram of a terminal device according to an embodiment of the present application. DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS
[0018] Before introducing the embodiments of this application, the nouns referred to in this application will first be explained.
[0019] 1. Virtual Environment A virtual environment is an environment that is displayed (or provided) when a client of an application (e.g., a game application) is executed on a terminal device (also called a terminal), and the virtual environment refers to an environment constructed for virtual objects to act (e.g., play a game, perform a task, etc.), and the virtual environment may be, for example, a virtual house, a virtual island, a virtual map, etc. The virtual environment may be a simulation environment of the real world, a semi-simulation / semi-fictional environment, or a purely fictional environment. In the embodiment of the present application, the virtual environment is three-dimensional, i.e., a space composed of three dimensions of length, width, and height, and therefore may be referred to as a "three-dimensional virtual environment."
[0020] 2. Virtual Characters A virtual character refers to a character controlled by a user account in an application. In the case where a game application is used as an example of the application, the virtual character is a game character controlled by a user account in the game application. The virtual character may be in the form of a human, an animal, an anime, or other form, and is not limited thereto in the embodiment of the present application. In the embodiment of the present application, the virtual character is also three-dimensional, and therefore may be referred to as a "three-dimensional virtual character."
[0021] In different game applications, the operations that a virtual character can perform under the control of a user account may also be different, for example, in a shooting game application, a virtual character can perform operations such as hitting, shooting, throwing virtual objects, running, jumping, releasing skills, etc. under the control of a user account.
[0022] Of course, in applications other than game applications, a virtual character can be presented to a user and the corresponding functions can be provided to the virtual character. Examples of such applications include applications based on (real-life, augmented reality), social applications, and interactive entertainment applications, and the embodiments of the present application are not limited thereto. Different applications provide different forms of virtual characters and different functions, which can be set in advance according to actual needs, and the embodiments of the present application are not limited thereto.
[0023] Referring to Figure 1, a schematic diagram of a technology implementation environment according to one embodiment of the present application is shown. The technology implementation environment includes a terminal 10 and a server 20.
[0024] The terminal 10 may be a mobile phone, a tablet computer, a game host, a multimedia playback device, a PC (Personal Computer), The terminal 10 may be an electronic device such as a personal computer (PC), an in-vehicle terminal, or a smart TV. A client of a target application may be installed on the terminal 10. The target application refers to an application capable of providing a three-dimensional virtual environment, such as a game application, a simulation application, or an entertainment application. Exemplarily, a game application capable of providing a three-dimensional virtual environment is a three-dimensional action game (3D Action Game, abbreviated as "3D ACT"), 3D shooting game, 3D MOBA (Multiplayer Action Game). This includes, but is not limited to, applications that support games such as PlayStation 4, Xbox One, PlayStation 5, PlayStation 6, PlayStation 7, PlayStation 8, PlayStation 8 Plus ...
[0025] The server 20 is for providing a background service to a client of a target application in the terminal 10. For example, the server 20 may be a background server of the target application. The server 20 may be a single server, a server group consisting of a plurality of servers, or a cloud computing service center.
[0026] The terminal 10 and the server 20 can communicate with each other via a network 30. The network 30 may be a wired network or a wireless network.
[0027] Referring to FIG. 2, a flowchart of a screen display method according to an embodiment of the present application is shown. The execution subject of each step in the method may be the terminal 10 in the technical implementation environment shown in FIG. 1, for example, the execution subject of each step may be a client of a target application installed and executed on the terminal 10. In the following method embodiment, for convenience of explanation, the execution subject of each step will be described as a "client". The method includes the following several steps (210 to 250).
[0028] Step 210: A first screen frame is displayed, and the first screen frame is a screen image of the three-dimensional virtual environment captured by a virtual camera with a virtual tracking object in the three-dimensional virtual environment as a visual focus.
[0029] When the client presents the content in the three-dimensional virtual environment to the user, the client displays a screen frame which is an image of the three-dimensional virtual environment captured by a virtual camera. Illustratively, the first screen frame refers to an image of the three-dimensional virtual environment captured by the virtual camera at the current time. The three-dimensional virtual environment includes virtual characters, such as a virtual character controlled by the user himself (called a "self-character" in the embodiment of the present application), other users or systems (e.g., AI (Artificial Intelligence) Examples of virtual objects include virtual characters controlled by a virtual reality (AI) system. Alternatively, other virtual objects may be included in the 3D virtual environment, such as a virtual house, a virtual loader, and a virtual tree, but the embodiments of the present application are not limited thereto. In the embodiments of the present application, a screen frame may be generated using a virtual camera technique, in other words, a client may observe the 3D virtual environment using a virtual camera as an observation viewpoint, and may capture the 3D virtual environment in real time (or at a predetermined interval), thereby obtaining a screen frame, and the content of the screen frame changes with the change in position of the virtual camera.
[0030] In the embodiment of the present application, the virtual camera has a virtual following object in the three-dimensional virtual environment as a visual focus, and the virtual following object is an invisible object. For example, the virtual following object is not a virtual character or a virtual object, and does not have an external shape, and it can be regarded as a point in the three-dimensional virtual environment. In the three-dimensional virtual environment, the position of the virtual following object changes according to the position change of the self-character (which may optionally include other virtual characters). The virtual camera moves (e.g., position and orientation) following the virtual following object, thereby capturing the content around the virtual following object in the three-dimensional virtual environment, and displaying it on the screen frame to provide it to the user.
[0031] Step 220: Determine a target position of a virtual following object according to the target position of the self character and the target position of a first lock character, where the first lock character refers to the lock target corresponding to the self character under the character lock state.
[0032] The character lock state refers to a state in which the self character has another virtual character as a lock target, and the other virtual character may be a virtual character controlled by another user or the system. In the character lock state, the position and orientation of the virtual camera need to change according to the position changes of the self character and the locked character, so that the screen frame captured by the virtual camera contains the self character and the locked character as much as possible, and the user can observe the self character and the locked character in the screen frame.
[0033] In the embodiment of the present application, the visual focus of the virtual camera is the virtual following object, so the position and orientation of the virtual camera change according to the position change of the virtual following object, while the position of the virtual following object changes according to the position change of the self character and the lock character. The lock character is the lock target corresponding to the self character. In some embodiments, the lock character is displayed as a mark, and the operation corresponding to the self character acts on the lock character. Optionally, the first lock character may be any one or more other virtual characters that the self character locks to.
[0034] In some embodiments, for the process of updating the virtual camera under a character lock state, taking the lock target of the self-character as the first lock character as an example, step 220 may include the following several sub-steps.
[0035] 1. The target position of the own character is set as a following target, and a waiting target position of the virtual following object is determined on the target line, so that the target line is perpendicular to the connecting line between the target position of the own character and the target position of the first locked character.
[0036] In a character lock state, on the one hand, the virtual following object still needs to move following the movement of the self-character with the self-character as the following target, and on the other hand, in order to display the currently locked first locked character in the screen frame, the target position of the virtual following object also needs to take into account the target position of the first locked character.
[0037] In the embodiment of the present application, the target position can be understood as a planned position and refers to a desired or expected moving destination. For example, the target position of the self character refers to a desired or expected moving destination of the self character (e.g., the next frame corresponding to the first screen frame), and the target position of the first lock character refers to a desired or expected moving destination of the first lock character. The target position of the self character can be determined based on a control operation on the self character by the user. The target position of the first lock character can be determined based on a control operation on the first lock character by the system or another user.
[0038] As shown in FIG. 3, a schematic diagram showing the determination of the target position of the virtual following object 31 is exemplarily shown. In FIG. 3, the target position of the self character 32 is represented by point A, the target position of the first lock character 33 is represented by point B, and the target line CD is perpendicular to the line AB, and the target position of the virtual following object 31 is determined on the target line CD, for example, as shown at point O in FIG. 3. In FIG. 3, the target line CD is a line perpendicular to the line AB and passing through point A, in other words, the target line is perpendicular to the connecting line between the target position (point A) of the self character 32 and the target position (point B) of the first lock character 33, and the target line passes through the target position (point A) of the self character 32. In some other embodiments, the target line CD may be a line perpendicular to the line AB but not passing through point A.
[0039] 2. If the target position of the virtual following object waiting to be determined satisfies the condition, the target position of the virtual following object waiting to be determined is determined as the target position of the virtual following object.
[0040] 3. If the target position of the virtual following object waiting to be determined does not satisfy the condition, the target position of the virtual following object is obtained by adjusting the target position of the virtual following object waiting to be determined.
[0041] In the embodiment of the present application, after determining the target position of the virtual following object, it is necessary to judge whether the target position of the virtual following object satisfies a condition. If the condition is satisfied, the target position of the virtual following object is determined as the target position of the virtual following object. If the condition is not satisfied, the target position of the virtual following object is obtained by adjusting the target position of the virtual following object, and the target position obtained by adjusting the target position satisfies the above condition. The above condition is set to set the target position of the virtual following object to an appropriate position, specifically, when the virtual camera is used to photograph the virtual following object as the visual focus, both the self-character and the first lock object can be photographed within the screen, and there is no overlap between the positions of the self-character and the first lock object, improving the screen display effect.
[0042] Alternatively, the above condition includes that the offset distance of the waiting-for-determination target position of the virtual following object with respect to the target position of the self character is equal to or less than the maximum offset amount. When the offset distance of the waiting-for-determination target position of the virtual following object with respect to the target position of the self character is greater than the maximum offset amount, the waiting-for-determination target position of the virtual following object is adjusted based on the maximum offset amount to obtain the target position of the virtual following object, and the offset distance of the target position of the virtual following object with respect to the target position of the self character is equal to or less than the maximum offset amount. Alternatively, the maximum offset amount may be a value greater than 0. Alternatively, the maximum offset amount may be a fixed value or a value dynamically determined according to the position of the virtual camera. For example, as shown in FIG. 3, if the length of the line segment CA is the maximum offset amount, when the length of the line segment OA is greater than the length of the line segment CA, the point C is determined as the target position of the virtual following object 31, and when the length of the line segment OA is equal to or less than the length of the line segment CA, the point O is determined as the target position of the virtual following object 31. The above-mentioned method makes it possible to avoid a situation in which the self-character is not included in the screen frame captured by the virtual camera due to the distance between the virtual following object and the self-character being too far, thereby making the camera movement of the virtual camera more rational.
[0043] Optionally, the above conditions further include that the offset distance of the waiting target position of the virtual following object with respect to the target position of the self character is greater than the minimum offset amount. When the offset distance of the waiting target position of the virtual following object with respect to the target position of the self character is equal to or less than the minimum offset amount, the waiting target position of the virtual following object is adjusted based on this minimum offset amount to obtain the target position of the virtual following object, and the offset distance of the target position of the virtual following object with respect to the target position of the self character is greater than the minimum offset amount. Optionally, the value of the minimum offset amount may be 0 or a value greater than 0, and is not limited thereto in the embodiment of the present application. In addition, the minimum offset amount is smaller than the maximum offset amount described above. Optionally, the minimum offset amount may be a fixed value or a value dynamically determined according to the position of the virtual camera. For example, as shown in FIG. 3, when point O and point A overlap, the target position of the virtual following object 31 is obtained by moving point O by a predetermined distance in the direction of point C, while when point O and point A do not overlap, point O is determined as the target position of the virtual following object 31. The above-mentioned method makes it possible to avoid a situation in which the first lock object is blocked by the self-character in the screen frame captured by the virtual camera due to the virtual following object being on the connecting line between the self-character and the first lock object, thereby making the camera movement of the virtual camera more rational.
[0044] Optionally, the above condition further includes that the target position of the virtual following object waiting for determination is inside the back angle region of the self character. If the target position of the virtual following object waiting for determination is outside the back angle region of the self character, the target position of the virtual following object is obtained by adjusting the target position of the virtual following object waiting for determination based on the back angle region of the self character, and the target position of the virtual following object is inside the back angle region of the self character. Here, the back angle region of the self character refers to a corner region that has a straight line passing through the target position of the self character and the target position of the first lock object as its central axis and faces in the opposite direction to the first lock object. In the embodiment of the present application, the size of the back angle region is not limited, and may be, for example, 90 degrees, 120 degrees, 150 degrees, 180 degrees, etc., and it can be set according to actual needs. As shown in FIG. 4, a schematic diagram of the back angle region is illustratively shown. 4, the target position of the self character 32 is represented by point A, the target position of the first lock character 33 is represented by point B, and the back included angular region of the self character 32 is represented by angle α. When the target position O of the virtual following object 31 waiting for determination is outside the angle α, the target position of the virtual following object 31 is obtained by moving this point O to the side of the angle α, while when the target position O of the virtual following object 31 waiting for determination is inside the angle α, this point O is determined as the target position of the virtual following object 31. The above method ensures that the self character is closer to the virtual camera than the first lock character, thereby allowing the user to intuitively distinguish between the self character and the first lock character by the display effect of close, large, far, small.
[0045] As shown in Fig. 5, after the target position of the virtual following object that satisfies the conditions is determined by the above-mentioned method, a screen in which the virtual camera is used to capture a 3D virtual environment with the virtual following object as the visual focus is exemplarily shown. As is clear from Fig. 5, on the one hand, the self-character 32 and the first lock character 33 are both present in the screen, and the self-character 32 does not cover the first lock character 33, and on the other hand, the self-character 32 is closer to the virtual camera than the first lock character 33, and the size of the self-character 32 is larger than the size of the first lock character 33, so that the user can more intuitively distinguish between the two characters.
[0046] Step 230: Determine a target position and target orientation of a virtual camera based on the target position of the virtual following object, and the distance between the target position of the virtual camera and the target position of the virtual following object is smaller than the distance between the target position of the virtual camera and the target position of the first locked character.
[0047] After the target position of the virtual following object is determined, the target position and target orientation of the virtual camera can be determined based on the target position of the virtual following object. In an embodiment of the present application, the distance between the target position of the virtual camera and the target position of the virtual following object is smaller than the distance between the target position of the virtual camera and the target position of the first lock character, so that within the field of view of the virtual camera, the virtual following object is closer to the virtual camera than the first lock character, and the field of view of the virtual camera is avoided from being blocked by the first lock object, making the camera movement of the virtual camera more rational.
[0048] In some embodiments, step 230 includes several of the following substeps.
[0049] 1. Determine a rotation orbit on which the virtual camera is located based on the target position of the virtual following object, and the plane on which the rotation orbit is located is parallel to the reference plane of the 3D virtual environment and the central axis of the rotation orbit passes through the target position of the virtual following object.
[0050] In the embodiment of the present application, the rotation orbit refers to the moving orbit of the virtual camera, and the virtual camera can automatically move to follow the virtual object on the rotation orbit, and the rotation orbit may be circular, elliptical, etc., and is not limited thereto in the embodiment of the present application. As shown in Fig. 6, the target position of the virtual following object 31 is represented by point O, and the target position of the self-character 32 is represented by point A, and the target position (i.e., point O) of the virtual following object 31 and the target position (i.e., point A) of the self-character 32 are located in the reference plane of the three-dimensional virtual environment. The plane on which the rotation orbit 35 on which the virtual camera 34 is located is parallel to the reference plane of the three-dimensional virtual environment, and the central axis 36 of the rotation orbit 35 passes through the target position (i.e., point O) of the virtual following object 31. Here, the reference plane of the three-dimensional virtual environment may be a horizontal plane (e.g., the ground) of the three-dimensional virtual environment, the virtual objects in the three-dimensional virtual environment are located on the reference plane, and the plane on which the rotation orbit 35 on which the virtual camera 34 is located is also located on the reference plane, thereby allowing the content in the three-dimensional virtual environment to be photographed at a predetermined planar viewing angle.
[0051] 2. Determine a target position and a target orientation of the virtual camera on the rotation orbit based on the target position of the virtual following object and the target position of the first locked character.
[0052] The target position of the virtual camera refers to a theoretically required or expected destination of the virtual camera, the target orientation of the virtual camera refers to a theoretically required or expected orientation of the virtual camera, the single frame target position of the virtual camera below refers to a practically required or expected destination of the virtual camera for transitioning the virtual camera from a current position to a target position, and the single frame target orientation of the virtual camera below refers to a practically required or expected orientation of the virtual camera for transitioning the virtual camera from a current orientation to a target orientation. When the target position of the first lock character and the target position of the virtual following object are determined within a reference plane of the three-dimensional virtual environment, the projection point of the target position of the virtual camera on the reference plane of the three-dimensional virtual environment is on a straight line where the target position of the first lock character and the target position of the virtual following object are located, and the target position of the virtual following object is located between the projection point and the target position of the first lock character.
[0053] As shown in FIG. 7, the target position of the virtual following object 31 is represented by point O, the target position of the self character 32 is represented by point A, and the target position of the first lock character 33 is represented by point B. On the rotation orbit 35, a point K can be uniquely determined, and the projection point of this point K on the reference plane of the three-dimensional virtual environment is represented by point K', this point K' is on a straight line OB, and point O is located between point K' and point B. This point K is determined as the target position of the virtual camera 34, and the direction of the radiation KO is determined as the target direction of the virtual camera 34. For the projection point K' of the above point K on the reference plane, a straight line passing through point K and perpendicular to the reference plane is created, and the intersection point between the straight line and the reference plane is the projection point K'. Based on the target position of the virtual following object and the target position of the first lock character, the target position of the virtual camera is determined on the rotation orbit corresponding to the virtual camera, so that the target position of the virtual camera is more reasonable, and the rationality of the camera movement of the virtual camera is higher.
[0054] Step 240: According to the target position and target orientation of the virtual camera and the real position and real orientation of the virtual camera in the first screen frame, obtain a single-frame target position and a single-frame target orientation of the virtual camera in the second screen frame by interpolation.
[0055] After determining the target position of the virtual camera, the actual position of the virtual camera in the first screen frame can be combined to obtain a single-frame target position of the virtual camera in the second screen frame according to a first interpolation algorithm, which aims to make the position of the virtual camera gradually (or smoothly) approach the target position of the virtual camera.
[0056] Similarly, after determining the target orientation of the virtual camera, the actual orientation of the virtual camera in the first screen frame can be combined to obtain a single-frame target orientation of the virtual camera in the second screen frame according to a second interpolation algorithm, which aims to make the orientation of the virtual camera gradually (or smoothly) approach the target orientation of the virtual camera.
[0057] In some embodiments, the process of determining a single-frame target position of the virtual camera in the second screen frame is as follows: determine a first interpolation coefficient based on a first distance, where the first distance refers to the distance between the first lock character and the self-character, and the first interpolation coefficient is used to determine a position adjustment amount of the virtual camera; and determine a single-frame target position of the virtual camera in the second screen frame based on the target position of the virtual camera, the actual position of the virtual camera in the first screen frame, and the first interpolation coefficient.
[0058] Alternatively, the first interpolation coefficient has a positive correlation with the first distance. Illustratively, as shown in FIG. 8, a relationship curve 81 between the first distance and the first interpolation coefficient is shown. According to the relationship curve 81, the first interpolation coefficient can be determined based on the first distance. For example, the first interpolation coefficient can take a value between [0, 1]. Alternatively, a distance between the target position of the virtual camera and the actual position of the virtual camera in the first screen frame is calculated, and the distance is multiplied by the first interpolation coefficient to obtain a position adjustment amount, and then the actual position of the virtual camera in the first screen frame is translated by the position adjustment amount toward the direction of the target position of the virtual camera, thereby obtaining a single-frame target position of the virtual camera in the second screen frame. By determining the interpolation coefficient for the virtual camera position as described above, when the change in distance between the self-character and the locked character is large, the change in displacement of the virtual camera also becomes large accordingly, and conversely, when the change in distance between the self-character and the locked character is small, the change in displacement of the virtual camera also becomes small accordingly, thereby ensuring that both the self-character and the locked character do not move away from the field of view as much as possible and that the screen content changes smoothly.
[0059] In some embodiments, the process of determining a single-frame target orientation of the virtual camera in the second screen frame includes: determining a second interpolation coefficient based on a second distance, where the second distance refers to the distance between the first lock character and the central axis of the screen, and the second interpolation coefficient is used to determine an orientation adjustment amount of the virtual camera; and determining a single-frame target orientation of the virtual camera in the second screen frame based on the target orientation of the virtual camera, the actual orientation of the virtual camera in the first screen frame, and the second interpolation coefficient.
[0060] Alternatively, the second interpolation coefficient is positively correlated with the second distance. Illustratively, as shown in FIG. 9, a schematic diagram of the relationship between the second distance and the second interpolation coefficient is shown. In FIG. 9, the self character is represented by 32, the first lock character is represented by 33, and the central axis of the screen is represented by 91. For example, the second interpolation coefficient can take a value between [0, 1]. The smaller the distance between the first lock character 33 and the central axis 91 of the screen, the closer the second interpolation coefficient is to 0, while the larger the distance between the first lock character 33 and the central axis 91 of the screen, the closer the second interpolation coefficient is to 1. Alternatively, as shown in FIG. 10, the angle θ between the target orientation of the virtual camera 34 and the real orientation of the virtual camera 34 in the first screen frame is calculated, and the angle θ is multiplied by the second interpolation coefficient to obtain an orientation adjustment amount γ, and then the real orientation is shifted toward the direction of the target orientation by the orientation adjustment amount γ to obtain a single-frame target orientation of the virtual camera 34 in the second screen frame. By determining the interpolation coefficient for the virtual camera orientation as described above, when the locked character is close to the central axis of the screen, the change in orientation is small, and even if the locked character frequently experiences sudden displacements, the virtual camera will not shake significantly; on the other hand, when the locked character is far from the central axis of the screen, the change in orientation is large, and even if the locked character dashes out of the field of view at high speed, the virtual camera can respond in a timely manner, ensuring that the locked character does not leave the field of view.
[0061] Step 250: Generate and display a second screen frame based on the single-frame target position and the single-frame target orientation of the virtual camera in the second screen frame.
[0062] After determining the single-frame target position and single-frame target orientation of the virtual camera in the second screen frame, the client can control the virtual camera to be placed according to the single-frame target position and single-frame target orientation, photograph the three-dimensional virtual environment with the virtual tracking object in the three-dimensional virtual environment as the visual focus to obtain a second screen frame, and then display the second screen frame.
[0063] Alternatively, the second screen frame is a screen frame next to the first screen frame, and the second screen frame is displayed after the display of the first screen frame is completed. Exemplarily, if the first screen frame is a screen frame at a current time, the second screen frame is a screen frame at a time next to the current time, the single-frame target position is a true position of the virtual camera at the next time, and the single-frame target direction is a true orientation of the virtual camera at the next time.
[0064] In addition, in the embodiments of the present application, the screen switching process in the character lock state has been explained by taking the switching process from the first screen frame to the second screen frame as an example, but it should be understood that the switching process between any two screen frames in the character lock state can be realized in accordance with the switching process from the first screen frame to the second screen frame described above.
[0065] To sum up, in the technical solution according to the embodiment of the present application, the virtual following object in the 3D virtual environment is taken as the visual focus of the virtual camera, and in the character lock state, the position information of the virtual following object is determined based on the position information of the self character and the position information of the locked character, and then the position and orientation of the virtual camera are updated based on the position information of the virtual following object. When determining the position information of the virtual following object, both the position information of the self character and the position information of the locked character are taken into consideration, so that the occlusion of the locked character by the self character is avoided, and the determined position information of the virtual following object is more reasonable and accurate; and, in the screen captured by the virtual camera with the virtual following object as the visual focus, the self character and the locked character are more reasonable and clear to be presented to the user, and the rationality of the camera movement of the virtual camera in the character lock state is improved, and the display effect of the screen is improved.
[0066] In addition, by maintaining the distance between the target position of the virtual camera and the target position of the virtual following object smaller than the distance between the target position of the virtual camera and the target position of the first locked character, the virtual following object is closer to the virtual camera than the first locked character within the field of view of the virtual camera, thereby preventing the first locked object from blocking the field of view of the virtual camera and making the camera movement of the virtual camera more rational when in the character locked state.
[0067] In some embodiments, the embodiments of the present application may also support switching the locked character under the character locked state, as shown in Figure 11. This process includes the following steps (1110 to 1130).
[0068] Step 1110: In the character lock state, in response to a view adjustment operation on the self-character, the virtual camera is controlled to rotate around the virtual following object.
[0069] In the character lock state, it is assumed that the first locked character is currently locked. The user can control the virtual camera to rotate around the virtual following object on its rotation orbit by executing a view adjustment operation on the user's own character, thereby switching the locked character. Here, the rotation orbit of the virtual camera can be referred to the description of the above embodiment, and will not be further described here. The view adjustment operation is used to adjust the observation view angle of the virtual camera, and for example, the rotation direction and rotation speed of the virtual camera can be determined by the view adjustment operation. Taking an example where the view adjustment operation is a slide operation on the screen (e.g., a non-button area) by the user's finger, the rotation direction of the virtual camera can be determined based on the direction of this slide operation, and the rotation speed of the virtual camera can be determined based on the slide speed or slide distance of this slide operation.
[0070] In some embodiments, in a character locked state, the client switches from a character locked state to a non-character locked state in response to a field of view adjustment operation on the self-character, while in a non-character locked state, the client controls the virtual camera to rotate around the virtual following object based on the field of view adjustment operation.
[0071] Optionally, the character lock state and the non-character lock state have corresponding virtual cameras. For convenience of explanation, the virtual camera used in the character lock state is described as the first virtual camera, and the virtual camera used in the non-character lock state is described as the second virtual camera. In the character lock state, the first virtual camera is in a working state, and the second virtual camera is in a non-working state, and the client can update the position and orientation of the first virtual camera according to the method procedure described in the embodiment related to FIG. 2 above. In the character lock state, the client switches from the character lock state to the non-character lock state in response to a view adjustment operation on the self character, controls the currently used virtual camera to be switched from the first virtual camera to the second virtual camera, and controls the second virtual camera to rotate around the virtual following object based on the view adjustment operation. Optionally, the size of the rotation orbit of the first virtual camera and the position relative to the reference plane are the same, thereby ensuring seamless switching between the first virtual camera and the second virtual camera, and the user does not feel the camera switching process from the screen, improving the efficiency of switching the virtual camera and the user experience.
[0072] Step 1120: During the rotation process, determine a pre-lock character in the 3D virtual environment, and display a third screen frame, in which the pre-lock character and the corresponding pre-lock mark are displayed.
[0073] During the virtual camera rotation process, the first locked character is no longer locked, and the client is in a non-character locked state at this time, and this non-character locked state is also called a pre-locked state. In the pre-locked state, the client determines a pre-locked character in the 3D virtual environment based on information such as the position of each virtual character in the 3D virtual environment and the position and orientation of the virtual camera. For example, the visual focus of the virtual camera (i.e., the virtual tracking object) is determined based on the position and orientation of the virtual camera, and the virtual object closest to this visual focus is determined as the pre-locked character. Here, the pre-locked character refers to a virtual character that will soon be locked or a virtual character that may be locked. At the same time, in the pre-locked state, if a pre-locked character exists, a pre-locked mark corresponding to the pre-locked character is displayed on the screen frame displayed on the client in order to present to the user which virtual character is currently pre-locked.
[0074] Step 1130: In response to the lock confirmation operation on the pre-lock character, the pre-lock character is determined as a second lock character, and a fourth screen frame is displayed, in which the second lock character and the corresponding lock mark are displayed.
[0075] The lock confirmation operation refers to a trigger operation by the user to determine the pre-lock character as the lock character. Still, taking the above-mentioned field of view adjustment operation as an example of a slide operation on the screen by the user's finger, when the user's finger is removed from the screen and the slide operation is completed, such a slide operation completion operation is determined as the lock confirmation operation. The client can determine the corresponding pre-lock character as the second lock character when the slide operation is completed.
[0076] Optionally, after determining the pre-locked character as the second locked character, the client switches from the non-character locked state (or the pre-locked state) to the character locked state, and updates the position and orientation of the virtual camera in the character locked state according to the method steps described in the embodiment of Figure 2 above.
[0077] Alternatively, the character locked state and the non-character locked state each have a corresponding virtual camera. In this case, the client controls to switch the currently used virtual camera from the second virtual camera to the first virtual camera at the same time as switching from the non-character locked state (or the pre-locked state) to the character locked state, and then updates the position and orientation of the first virtual camera according to the method procedure described in the embodiment of FIG. 2 above.
[0078] The lock mark is a mark for distinguishing the locked character from other non-locked characters. The lock flag may be different from the pre-lock flag, so that the user can distinguish whether the virtual character is a pre-locked character or a locked character by the different marks.
[0079] For example, as shown in FIG. 12, in the character lock state shown in part (a) of FIG. 12, the first locked character 33 is locked by the self character 32, and a lock mark 41 corresponding to the first locked character 33 is displayed on the screen frame. At this time, the user can trigger the field of view adjustment to the self character 32 by performing a slide operation on the screen. During the process of the slide operation, the client controls the virtual camera to rotate around the virtual following object based on information such as the direction and displacement of the slide operation, and during the rotation process, the client predicts the pre-locked character in the 3D virtual environment. As shown in part (b) of FIG. 12, after determining the pre-locked character 38, the client displays a pre-locked mark 42 corresponding to the pre-locked character 38 on the screen frame, so that the user can know which virtual character is currently in the pre-locked state based on the pre-locked mark 42. If the current pre-lock character 38 meets the user's expectation, the user can stop performing the slide operation and, for example, control the user to release his / her finger from the screen, at which time the client determines the pre-lock character 38 as the second lock character and displays the lock mark 41 corresponding to this second lock character on the screen frame, as shown in part (c) of Figure 12.
[0080] In the embodiment of the present application, the view adjustment to the self-character is supported under the character lock state, thereby realizing the switching of the locked character. In addition, during the switching process, the client automatically predicts the pre-locked character and displays the pre-lock mark corresponding to the pre-locked character, so that the user can intuitively and clearly observe which virtual character is currently in the pre-locked state, and can switch the locked character accurately and efficiently.
[0081] In some embodiments, as shown in FIG. 13, in a non-character locked state, the virtual camera update process includes the following steps (1310 to 1350).
[0082] Step 1310: Under a non-character locked state, take the self character as the following target, and update the position of the virtual following object through interpolation to obtain a single-frame target position of the virtual following object in the fifth screen frame.
[0083] In the non-character-locked state, the visual focus of the virtual camera is still the virtual following object, and since there is no locked character at this time, the position update of the virtual following object only needs to consider the position change of the self character, and does not need to consider the position change of the locked character. Optionally, in the non-character-locked state, a third interpolation algorithm is used to determine a single-frame target position of the virtual following object, and the third interpolation algorithm is intended to make the virtual following object smoothly follow the self character.
[0084] Alternatively, in a non-character locked state, a third interpolation coefficient is determined based on a third distance, the third distance being the distance between the self character and the virtual following object, and the third interpolation coefficient is used to determine the position adjustment amount of the virtual following object. Here, the third interpolation coefficient shows a positive correlation with the third distance. Then, a single-frame target position of the virtual following object in the fifth screen frame is determined based on the real position of the self character in the first screen frame, the real position of the virtual following object in the first screen frame, and the third interpolation coefficient. Exemplarily, the third interpolation coefficient can also take a value between [0, 1], and the distance between the real position of the self character in the first screen frame and the real position of the virtual following object in the first screen frame is calculated, and the distance is multiplied by the third interpolation coefficient to obtain the position adjustment amount, and then the real position of the virtual following object in the first screen frame is translated toward the direction of the self character by the position adjustment amount to obtain the single-frame target position of the virtual following object in the fifth screen frame. The fifth screen frame may be one screen frame following the first screen frame. According to the above method, when the self character is far from the virtual following object, the following speed of the virtual following object becomes faster, while when the self character is close to the virtual following object, the following speed of the virtual following object becomes slower. Since the virtual following object slowly follows the self character in the three-dimensional virtual environment, even if the self character is irregularly displaced or has a large positional deviation from other virtual characters, the virtual camera can move smoothly, and the rationality of the camera movement of the virtual camera in the unlocked character state is improved.
[0085] Step 1320: Determine a single-frame target position of the virtual camera in the fifth screen frame based on the single-frame target position of the virtual following object in the fifth screen frame.
[0086] If there is a single-frame target position of the virtual following object in the fifth screen frame, the single-frame target position of the virtual camera in the fifth screen frame can be determined based on the default positional relationship between the virtual camera and the virtual following object.
[0087] For example, as shown in FIG. 14, in a non-character locked state, the position of the virtual following object 31 is updated by interpolation with the self-character 32 as the following target to obtain a single-frame target position of the virtual following object 31, and then the single-frame target position of the virtual camera 34 is determined based on the single-frame target position of the virtual following object 31.
[0088] Step 1330: If no view adjustment operation is obtained for the self character, the actual orientation of the virtual camera in the first screen frame is determined as the single-frame target orientation of the virtual camera in the fifth screen frame.
[0089] In a non-character locked state, if the user does not perform a view adjustment operation on the self-character to adjust the view direction, the client maintains the virtual camera direction in the previous frame.
[0090] Step 1340: If a field of view adjustment operation is obtained for the self character, the actual orientation of the virtual camera in the first screen frame is adjusted based on the field of view adjustment operation to obtain a single-frame target orientation of the virtual camera in the fifth screen frame.
[0091] In a non-character-locked state, when the user performs a view adjustment operation on the self-character to adjust the view direction, the client needs to update the virtual camera direction. Optionally, the client updates the virtual camera direction based on the view adjustment operation. For example, if the view adjustment operation is a slide operation on the screen, the client can determine the adjustment direction and adjustment angle of the virtual camera direction based on information such as the direction and displacement of the slide operation, and then combine the orientation in the previous frame to determine the target orientation in the next frame.
[0092] Step 1350: Generate and display a fifth screen frame based on the single-frame target position and the single-frame target orientation of the virtual camera in the fifth screen frame.
[0093] After determining the single-frame target position and single-frame target orientation of the virtual camera in the fifth screen frame, the client can control the virtual camera to be placed according to the single-frame target position and single-frame target orientation, photograph the three-dimensional virtual environment with the virtual tracking object in the three-dimensional virtual environment as the visual focus to obtain a fifth screen frame, and then display the fifth screen frame.
[0094] In the embodiment of the present application, in a non-character-locked state, the virtual following object moves smoothly following the self-character, and the virtual camera is controlled to take a picture with the virtual following object as the visual focus, thereby capturing an image. Since the virtual following object slowly follows the self-character in the 3D virtual environment, even if the self-character is irregularly displaced or has a large positional deviation from other virtual characters, the virtual camera can move smoothly, and the occurrence of phenomena such as violent shaking of the screen content is avoided, and the user's viewing experience is improved.
[0095] The technical solution of this application will be outlined below in conjunction with FIG.
[0096] As shown in FIG. 15, when the update of the virtual camera starts, the client first judges whether or not the character is in a locked state. If the character is in a locked state, the client judges whether or not the user has performed a view adjustment operation under the character locked state. If the user has not performed a view adjustment operation under the character locked state, the client determines the target position of the virtual following object based on the target position of the self character and the target position of the first locked character. Next, the client judges whether or not the offset distance of the target position of the virtual following object with respect to the target position of the self character exceeds the maximum offset amount. If the maximum offset is exceeded, the target position of the virtual following object is adjusted, whereas if the maximum offset is not exceeded, the position and orientation of the virtual camera are maintained. Furthermore, the client judges whether or not the target position of the virtual following object is outside the rear angle region of the self character. If the target position is outside the rear angle region, the target position of the virtual following object is adjusted, whereas if the target position is inside the rear angle region, the target position and target orientation of the virtual camera are determined based on the target position of the virtual following object. Then, the single-frame target position and the single-frame target orientation of the virtual camera are obtained by interpolation based on the target position and the target orientation of the virtual camera and the current real position and real orientation of the virtual camera. In this way, updating of the virtual camera is completed in the character lock state.
[0097] In the character-locked state, when the user performs a field-of-view adjustment operation, the client determines the pre-locked character by controlling the virtual camera to rotate around the virtual following object. In this way, updating of the virtual camera is completed in the pre-locked state.
[0098] In a non-character locked state, the position of the virtual following object is updated by interpolation with the self character as the following target. Then, it is determined whether or not a view adjustment operation has been performed by the user. If a view adjustment operation has been performed, the single-frame target orientation is determined based on the view adjustment operation. On the other hand, if a view adjustment operation has not been performed, the current real orientation of the virtual camera is determined as the single-frame target orientation. In this way, updating of the virtual camera is completed in a non-character locked state.
[0099] During the execution process of the client, the position and orientation of the virtual camera need to be updated every frame, and then the screen frame is obtained and displayed to the user by photographing the 3D virtual environment at the visual focus of the virtual tracking object based on the updated position and orientation.
[0100] Referring to FIG. 16, a flowchart of a screen display method according to another embodiment of the present application is shown. An execution subject of each step of the method may be the terminal 10 in the technical implementation environment shown in FIG. 1, for example, an execution subject of each step may be a client of a target application installed and executed on the terminal 10. In the following method embodiment, for convenience of explanation, an execution subject of each step is described as a "client". The method includes the following several steps (1610 to 1620).
[0101] Step 1610: Display a first screen frame, which is a screen image of the three-dimensional virtual environment captured by a virtual camera with a virtual tracking object in the three-dimensional virtual environment as a visual focus.
[0102] Step 1620: In response to movement of at least one of the self character and the first locked character, a second screen frame is displayed based on a single frame target position and a single frame target orientation of the virtual camera in the second screen frame, the single frame target position and the single frame target orientation are determined based on the target position and target orientation of the virtual camera, the target position and target orientation of the virtual camera are determined based on a target position of the virtual following object, the distance between the target position of the virtual camera and the target position of the virtual following object is smaller than the distance between the target position of the virtual camera and the target position of the first locked character, and the first locked character refers to a locked target corresponding to the self character under a character locked state.
[0103] In a character locked state, the positions of both the player's character and the first locked character may move, so the position and orientation of the virtual camera must be adjusted in accordance with the changes in the positions of the player's character and the first locked character so that the screen frame captured by the virtual camera includes as many of the player's character and the locked character as possible.
[0104] In an exemplary embodiment, step 1620 includes several substeps:
[0105] 1. In response to movement of at least one of the self character and the first locked character, a target position of the self character and a target position of the first locked character are determined.
[0106] 2. Determine a target position of the virtual following object based on the target position of the self character and the target position of the first locked character.
[0107] 3. Determine the target position and target orientation of the virtual camera based on the target position of the virtual following object.
[0108] 4. Based on the target position and target orientation of the virtual camera and the real position and real orientation of the virtual camera in the first screen frame, obtain the single-frame target position and single-frame target orientation of the virtual camera in the second screen frame by interpolation.
[0109] 5. Generate and display a second screen frame based on the single-frame target position and the single-frame target orientation of the virtual camera in the second screen frame.
[0110] Optionally, the embodiment of the present application can also support switching the locked character under the character locked state. The method includes the following steps:
[0111] In the character lock state, the virtual camera is controlled to rotate around the virtual following object in response to a view adjustment operation on the self character.
[0112] During the rotation process, a pre-lock character in the 3D virtual environment is determined and a third screen frame is displayed, in which the pre-lock character and its corresponding pre-lock mark are displayed.
[0113] In response to a lock confirmation operation on the pre-lock character, the pre-lock character is determined as a second lock character, and a fourth screen frame is displayed, in which the second lock character and a lock mark corresponding to it are displayed.
[0114] Optionally, the process of updating the virtual camera under a non-character locked condition includes the following steps.
[0115] Under a non-character-locked state, the position of the virtual following object is updated with the self-character as a following target to obtain a single-frame target position of the virtual following object in the fifth screen frame.
[0116] A fifth screen frame is displayed based on a single-frame target position and a single-frame target orientation of the virtual camera in the fifth screen frame, the single-frame target position of the virtual camera in the fifth screen frame is determined based on the single-frame target position of the virtual following object in the fifth screen frame, and the single-frame target orientation of the virtual camera in the fifth screen frame is determined based on an actual orientation of the virtual camera in the first screen frame.
[0117] For details not described in detail in this embodiment, reference can be made to the descriptions of other method embodiments above.
[0118] To sum up, in the technical solution according to the embodiment of the present application, the virtual following object in the 3D virtual environment is taken as the visual focus of the virtual camera, and in the character lock state, the position information of the virtual following object is determined based on the position information of the self character and the position information of the locked character, and then the position and orientation of the virtual camera are updated based on the position information of the virtual following object. When determining the position information of the virtual following object, both the position information of the self character and the position information of the locked character are taken into consideration, so that the blocking of the locked character by the self character is avoided, and the determined position information of the virtual following object is more reasonable and accurate; furthermore, in the screen captured by the virtual camera with the virtual following object as the visual focus, the camera movement of the virtual camera in the character lock state is more reasonable, and the self character and the locked character are more reasonably and clearly presented to the user, and the display effect of the screen is improved.
[0119] In addition, by maintaining the distance between the target position of the virtual camera and the target position of the virtual following object smaller than the distance between the target position of the virtual camera and the target position of the first locked character, the virtual following object is closer to the virtual camera than the first locked character within the field of view of the virtual camera, thereby preventing the first locked object from blocking the field of view of the virtual camera and making the camera movement of the virtual camera more rational when in the character locked state.
[0120] The following are apparatus embodiments of the present application, which can implement the method embodiments of the present application. For details not disclosed in the apparatus embodiments of the present application, please refer to the method embodiments of the present application.
[0121] Referring to FIG. 17, a block diagram of a screen display device according to an embodiment of the present application is shown. The device has a function for implementing the above-mentioned method embodiment, which may be implemented in hardware or by executing corresponding software in hardware. The device may be the above-mentioned terminal or may be disposed in the terminal. As shown in FIG. 17, the device 1700 includes a screen display module 1710, an object position determining module 1720, a camera position determining module 1730, and a single frame position determining module 1740.
[0122] The screen display module 1710 is configured to display a first screen frame, the first screen frame being a screen image of the three-dimensional virtual environment captured by a virtual camera with a virtual following object in the three-dimensional virtual environment as a visual focus.
[0123] The object position determination module 1720 is configured to determine a target position of the virtual following object based on a target position of a self character and a target position of a first lock character, where the first lock character refers to a lock target corresponding to the self character under a character lock state.
[0124] The camera position determination module 1730 is configured to determine a target position and target orientation of the virtual camera based on a target position of the virtual following object, wherein the distance between the target position of the virtual camera and the target position of the virtual following object is smaller than the distance between the target position of the virtual camera and the target position of the first locked character.
[0125] The single-frame position determination module 1740 is configured to obtain a single-frame target position and a single-frame target orientation of the virtual camera in a second screen frame by interpolation based on the target position and target orientation of the virtual camera and the actual position and actual orientation of the virtual camera in the first screen frame.
[0126] The screen display module 1710 is further configured to generate and display the second screen frame based on a single-frame target position and a single-frame target orientation of the virtual camera in the second screen frame.
[0127] In some embodiments, the single frame position determination module 1740 includes: A rotation trajectory of the virtual camera is determined based on a target position of the virtual following object, the plane of the rotation trajectory being parallel to a reference plane of the three-dimensional virtual environment and the central axis of the rotation trajectory passing through the target position of the virtual following object; and The target position and target orientation of the virtual camera on the rotation orbit are determined based on a target position of the virtual following object and a target position of the first locked character.
[0128] In some embodiments, the single frame position determination module 1740 further comprises: determining a first interpolation coefficient based on a first distance, the first distance being a distance between the first lock character and the self-character, and the first interpolation coefficient being used to determine a position adjustment amount of the virtual camera; determining a single-frame target position of the virtual camera in the second screen frame based on a target position of the virtual camera, an actual position of the virtual camera in the first screen frame, and the first interpolation coefficient; Determine a second interpolation coefficient according to a second distance, the second distance being a distance between the first lock character and a central axis of a screen, and the second interpolation coefficient is used to determine an orientation adjustment amount of the virtual camera; and configured to determine a single frame target orientation of the virtual camera in the second screen frame based on a target orientation of the virtual camera, an actual orientation of the virtual camera in the first screen frame, and the second interpolation coefficient.
[0129] In some embodiments, the first interpolation coefficient is positively correlated with the first distance and the second interpolation coefficient is positively correlated with the second distance.
[0130] In some embodiments, the object position determination module 1720 includes: Under the character lock state, a target position of the self character is set as a following target, and a target position of the virtual following object waiting for determination is determined on a target straight line, and the target straight line is perpendicular to a connecting line between the target position of the self character and the target position of the first locked character; If the target position of the virtual following object satisfies a condition, the target position of the virtual following object is determined as the target position of the virtual following object; When the waiting-to-be-determined target position of the virtual following object does not satisfy the condition, the waiting-to-be-determined target position of the virtual following object is adjusted to obtain the target position of the virtual following object.
[0131] Optionally, the condition includes that an offset distance of the waiting-to-be-determined target position of the virtual following object with respect to the target position of the self character is equal to or less than a maximum offset amount. The object position determination module 1720 is further configured to obtain the target position of the virtual following object by adjusting the waiting-to-be-determined target position of the virtual following object based on the maximum offset amount when the offset distance of the waiting-to-be-determined target position of the virtual following object with respect to the target position of the self character is greater than the maximum offset amount, and the offset distance of the target position of the virtual following object with respect to the target position of the self character is equal to or less than the maximum offset amount.
[0132] Optionally, the condition includes that the target position of the virtual following object is inside the rear angle region of the self character. The object position determination module 1720 is further configured to obtain the target position of the virtual following object by adjusting the target position of the virtual following object based on the rear angle region of the self character when the target position of the virtual following object is outside the rear angle region of the self character, and the target position of the virtual following object is inside the rear angle region of the self character.
[0133] In some embodiments, the camera position determination module 1730 controls the virtual camera to rotate around the virtual following object in response to a view adjustment operation on the self-character under the character lock state.
[0134] The screen display module 1710 is configured to determine a pre-lock character in the 3D virtual environment during the rotation process, and display a third screen frame, in which the pre-lock character and the corresponding pre-lock mark are displayed.
[0135] The screen display module 1710 is further configured to, in response to a lock confirmation operation on the pre-lock character, determine the pre-lock character as a second lock character and display a fourth screen frame, in which the second lock character and a corresponding lock mark are displayed.
[0136] In some embodiments, the object position determination module 1720 is further configured to obtain a single-frame target position of the virtual following object in a fifth screen frame by updating the position of the virtual following object by interpolation, with the self-character as a following target, under a non-character locked state.
[0137] The single frame position determination module 1740 is further configured to determine a single frame target position of the virtual camera in the fifth screen frame based on the single frame target position of the virtual following object in the fifth screen frame, and if no field of view adjustment operation is obtained for the self character, to determine the real orientation of the virtual camera in the first screen frame as the single frame target orientation of the virtual camera in the fifth screen frame, while if a field of view adjustment operation is obtained for the self character, to obtain the single frame target orientation of the virtual camera in the fifth screen frame by adjusting the real orientation of the virtual camera in the first screen frame based on the field of view adjustment operation.
[0138] The screen display module 1710 is further configured to generate and display the fifth screen frame based on a single-frame target position and a single-frame target orientation of the virtual camera in the fifth screen frame.
[0139] Optionally, the object position determination module 1720 further comprises: determining a third interpolation coefficient according to a third distance under the non-character-locked state, the third distance being a distance between the self character and the virtual following object, the third interpolation coefficient being used to determine a position adjustment amount of the virtual following object, the third interpolation coefficient being positively correlated with the third distance; and It is configured to determine a single-frame target position of the virtual following object in the fifth screen frame based on the actual position of the self character in the first screen frame, the actual position of the virtual following object in the first screen frame, and the third interpolation coefficient.
[0140] To sum up, in the technical solution according to the embodiment of the present application, the virtual following object in the 3D virtual environment is taken as the visual focus of the virtual camera, and in the character lock state, the position information of the virtual following object is determined based on the position information of the self character and the position information of the locked character, and then the position and orientation of the virtual camera are updated based on the position information of the virtual following object. When determining the position information of the virtual following object, both the position information of the self character and the position information of the locked character are taken into consideration, so that the occlusion of the locked character by the self character is avoided, and the determined position information of the virtual following object is more reasonable and accurate; and, in the screen captured by the virtual camera with the virtual following object as the visual focus, the self character and the locked character are more reasonable and clear to be presented to the user, and the rationality of the camera movement of the virtual camera in the character lock state is improved, and the display effect of the screen is improved.
[0141] In addition, by maintaining the distance between the target position of the virtual camera and the target position of the virtual following object smaller than the distance between the target position of the virtual camera and the target position of the first locked character, the virtual following object is closer to the virtual camera than the first locked character within the field of view of the virtual camera, thereby preventing the first locked object from blocking the field of view of the virtual camera and making the camera movement of the virtual camera more rational when in the character locked state.
[0142] In another exemplary embodiment of the present application, a screen display device is proposed. As shown in FIG.
[0143] The screen display module 1710 is configured to display a first screen frame, the first screen frame being a screen image of the three-dimensional virtual environment captured by a virtual camera with a virtual following object in the three-dimensional virtual environment as a visual focus.
[0144] The screen display module 1710 is further configured to display the second screen frame based on a single frame target position and a single frame target orientation of the virtual camera in the second screen frame in response to movement of at least one of the self character and a first locked character, wherein the single frame target position and the single frame target orientation are determined based on the target position and target orientation of the virtual camera, the target position and target orientation of the virtual camera are determined based on the target position of the virtual following object, the distance between the target position of the virtual camera and the target position of the virtual following object is smaller than the distance between the target position of the virtual camera and the target position of the first locked character, and the first locked character refers to a locked target corresponding to the self character under the character locked state.
[0145] In some embodiments, as shown in FIG. 17, the apparatus 1700 may further include an object position determining module 1720, a camera position determining module 1730, and a single frame position determining module 1740.
[0146] The object position determination module 1720 is configured to determine a target position of the self character and a target position of the first lock character in response to movement of at least one of the self character and the first lock character, and to determine a target position of the virtual following object based on the target position of the self character and the target position of the first lock character.
[0147] The camera position determination module 1730 is configured to determine a target position and a target orientation for the virtual camera based on a target position of the virtual following object.
[0148] The single-frame position determination module 1740 is configured to obtain a single-frame target position and a single-frame target orientation of the virtual camera in the second screen frame by interpolation based on a target position and a target orientation of the virtual camera and an actual position and an actual orientation of the virtual camera in the first screen frame.
[0149] The screen display module 1710 is further configured to generate and display the second screen frame based on a single-frame target position and a single-frame target orientation of the virtual camera in the second screen frame.
[0150] In some embodiments, the camera position determination module 1730 further controls the virtual camera to rotate around the virtual following object in response to a view adjustment operation on the self-character under the character lock state.
[0151] The screen display module 1710 is further configured to determine a pre-lock character in the 3D virtual environment during the rotation process, and display a third screen frame, in which the pre-lock character and the corresponding pre-lock mark are displayed.
[0152] The screen display module 1710 is further configured to, in response to a lock confirmation operation on the pre-lock character, determine the pre-lock character as a second lock character and display a fourth screen frame, in which the second lock character and a corresponding lock mark are displayed.
[0153] In some embodiments, the object position determination module 1720 is further configured to obtain a single-frame target position of the virtual following object in a fifth screen frame by updating the position of the virtual following object with the self-character as a following target under a non-character locked state.
[0154] The screen display module 1710 is further configured to display the fifth screen frame based on a single-frame target position and a single-frame target orientation of the virtual camera in the fifth screen frame, wherein the single-frame target position of the virtual camera in the fifth screen frame is determined based on a single-frame target position of a virtual following object in the fifth screen frame, and the single-frame target orientation of the virtual camera in the fifth screen frame is determined based on an actual orientation of the virtual camera in the first screen frame.
[0155] To sum up, in the technical solution according to the embodiment of the present application, the virtual following object in the 3D virtual environment is taken as the visual focus of the virtual camera, and in the character lock state, the position information of the virtual following object is determined based on the position information of the self character and the position information of the locked character, and then the position and orientation of the virtual camera are updated based on the position information of the virtual following object. When determining the position information of the virtual following object, both the position information of the self character and the position information of the locked character are taken into consideration, so that the occlusion of the locked character by the self character is avoided, and the determined position information of the virtual following object is more reasonable and accurate; and, in the screen captured by the virtual camera with the virtual following object as the visual focus, the self character and the locked character are more reasonable and clear to be presented to the user, and the rationality of the camera movement of the virtual camera in the character lock state is improved, and the display effect of the screen is improved.
[0156] In addition, by maintaining the distance between the target position of the virtual camera and the target position of the virtual following object smaller than the distance between the target position of the virtual camera and the target position of the first locked character, the virtual following object is closer to the virtual camera than the first locked character within the field of view of the virtual camera, thereby preventing the first locked object from blocking the field of view of the virtual camera and making the camera movement of the virtual camera more rational when in the character locked state.
[0157] It is particularly noted that, in the above-mentioned embodiment of the device, the functions are realized by only the divided functional modules, but in actual application, the above-mentioned functions can be allocated to different functional modules as necessary, in other words, the internal structure of the device can be divided into different functional modules to realize all or part of the above-mentioned functions. In addition, the device according to the above-mentioned embodiment belongs to the same concept as the method embodiment, and the specific implementation process can be referred to the method embodiment, and will not be described further here.
[0158] Referring to Fig. 18, a configuration block diagram of a terminal device 1800 according to an embodiment of the present application is shown. The terminal device 1800 may be the terminal device 10 in the implementation environment shown in Fig. 1, which is for implementing the screen display method according to the above embodiment. Specifically, it is as follows.
[0159] Typically, the terminal device 1800 includes a processor 1801 and a memory 1802 .
[0160] The processor 1801 may include one or more processing cores, such as a 4-core processor, an 8-core processor, etc. The processor 1801 may include a DSP (Digital Signal Processor). Signal Processing), FPGA (Field-Programmable Gate Array), PLA (Programmable The processor 1801 may include a main processor and a coprocessor, the main processor being a processor for processing data in an awake state, and a CPU (Central Processor). The processor 1801 is also called a Graphics Processing Unit (GPU) or central processor, and is a low-power processor for processing data when the coprocessor is in standby mode. In some embodiments, the processor 1801 is a Graphics In some embodiments, the processor 1801 may be integrated with an AI (Artificial Intelligence) Processing Unit (GPU), which performs the rendering and drawing of content to be displayed on a display screen. The AI processor may also include an artificial intelligence (AI) processor that handles computational operations related to machine learning.
[0161] The memory 1802 may include one or more computer-readable storage media, which may be non-transitory. The memory 1802 may include high-speed random access memory, non-volatile memory, such as one or more magnetic disk storage devices, flash memory storage devices, etc. In some embodiments, the non-transitory computer-readable storage media in the memory 1802 may be configured to store a computer program that, when executed by one or more processors, implements the above-described screen display method.
[0162] In some embodiments, the terminal device 1800 may further include a peripheral device interface 1803 and at least one peripheral device. The processor 1801, the memory 1802, and the peripheral device interface 1803 may be connected via a bus or signal lines. Each peripheral device may be connected to the peripheral device interface 1803 via a bus, signal lines, or a circuit board. Specifically, the peripheral device includes at least one of a radio frequency circuit 1804, a display screen 1805, an audio circuit 1806, and a power supply 1807.
[0163] It should be understood by those skilled in the art that the configuration shown in FIG. 18 is not intended to limit the terminal device 1800, and that the terminal device 1800 may include more or fewer components than shown, may combine some components, or may use different component arrangements.
[0164] In one exemplary embodiment, a computer-readable storage medium is further proposed having a computer program stored thereon, which, when executed by a processor, realizes the above-mentioned screen display method.
[0165] Optionally, the computer readable storage medium may be a read-only memory (ROM). Memory, read-only memory), RAM (Random Access Memory), SSD (Solid Examples of random access memory include ReRAM (Resistance Random Access Memory), and optical disks. Random Access Memory, Resistive Random Access Memory, DRAM (Dynamic Random Access Memory) Random Access Memory (Dynamic Random Access Memory).
[0166] In one exemplary embodiment, a computer program product or a computer program is proposed, the computer program product or the computer program comprising computer instructions stored in a computer-readable storage medium, the computer instructions being read by a processor of a terminal device from the computer-readable storage medium and executed to perform the above-mentioned screen display method on the terminal device.
[0167] In particular, the information (including but not limited to object device information, object personal information, etc.), data (including but not limited to analytical data, stored data, displayed data, etc.) and signals related to this application are all authorized by the object or fully authorized by each party, and the collection, use and processing of related data must comply with the relevant laws, regulations and standards of the relevant countries and regions. For example, the user accounts, 3D virtual environments, etc. related to this application are obtained when fully authorized.
[0168] It should be understood that "multiple" referred to in this specification refers to two or more than two. "And / or" describes the relation between related objects, and indicates that three relations may exist. For example, A and / or B can indicate three situations: A exists alone, A and B exist simultaneously, and B exists alone. The symbol " / " generally indicates that the related objects before and after are in an "or" relationship. In addition, the step numbers described in this specification are only examples of possible execution orders between steps, and in some other embodiments, the steps may not be executed in the numerical order, for example, two differently numbered steps may be executed simultaneously, or two differently numbered steps may be executed in the reverse order to that shown, and the embodiments of the present application are not limited thereto.
[0169] The above description is merely an illustrative embodiment of the present application, and does not limit the present application. Various amendments, equivalent replacements, improvements, etc. made within the scope that does not deviate from the spirit and principles of the present application are intended to be included in the protection scope of the present application.
Claims
1. A screen display method executed by a terminal device, comprising: displaying a first screen frame, the first screen frame being a screen image of the three-dimensional virtual environment captured by a virtual camera with a virtual tracking object in the three-dimensional virtual environment as a visual focus; determining a target position of the virtual following object based on a target position of a self character and a target position of a first lock character, the first lock character referring to a lock target corresponding to the self character under a character lock state; determining a target position and a target orientation of the virtual camera based on a target position of the virtual following object, wherein a distance between the target position of the virtual camera and the target position of the virtual following object is smaller than a distance between the target position of the virtual camera and the target position of the first locked character; obtaining a single-frame target position and a single-frame target orientation of the virtual camera in a second screen frame by interpolation based on a target position and a target orientation of the virtual camera and an actual position and an actual orientation of the virtual camera in the first screen frame; generating and displaying the second screen frame based on a single-frame target position and a single-frame target orientation of the virtual camera in the second screen frame; The method includes:
2. determining a target position and a target orientation of the virtual camera based on a target position of the virtual following object, determining a rotation trajectory of the virtual camera based on a target position of the virtual following object, the plane of the rotation trajectory being parallel to a reference plane of the three-dimensional virtual environment and the central axis of the rotation trajectory passing through the target position of the virtual following object; determining a target position and a target orientation of the virtual camera on the rotation orbit based on a target position of the virtual following object and a target position of the first lock character; The method of claim 1.
3. obtaining a single-frame target position and a single-frame target orientation of the virtual camera in a second screen frame by interpolation based on a target position and a target orientation of the virtual camera and an actual position and an actual orientation of the virtual camera in the first screen frame, determining a first interpolation coefficient based on a first distance, the first distance being a distance between the first lock character and the self-character, and the first interpolation coefficient being used to determine an adjustment amount of the position of the virtual camera; determining a single-frame target position of the virtual camera in the second screen frame based on a target position of the virtual camera, an actual position of the virtual camera in the first screen frame, and the first interpolation coefficient; determining a second interpolation coefficient based on a second distance, the second distance being a distance between the first lock character and a central axis of a screen, the second interpolation coefficient being used to determine an adjustment amount of an orientation of the virtual camera; determining a single frame target orientation of the virtual camera at the second screen frame based on a target orientation of the virtual camera, an actual orientation of the virtual camera at the first screen frame, and the second interpolation coefficient. The method of claim 1.
4. the first interpolation coefficient exhibits a positive correlation with the first distance, and the second interpolation coefficient exhibits a positive correlation with the second distance; The method according to claim 3.
5. The step of determining a target position of the virtual following object based on a target position of a self character and a target position of a first lock character includes: a step of determining a target position of the virtual following object on a target straight line by setting the target position of the self character as a following target, the target straight line being perpendicular to a connecting line between the target position of the self character and the target position of the first locked character; determining the waiting target position of the virtual following object as a target position of the virtual following object when the waiting target position of the virtual following object satisfies a condition; If the waiting-for-determination target position of the virtual following object does not satisfy the condition, adjusting the waiting-for-determination target position of the virtual following object to obtain the target position of the virtual following object. The method of claim 1.
6. the condition includes that an offset distance of a target position of the virtual following object waiting for determination with respect to a target position of the self character is equal to or less than a maximum offset amount; When the target position of the virtual following object does not satisfy the condition, the step of acquiring the target position of the virtual following object by adjusting the target position of the virtual following object When an offset distance of a target position of the virtual following object waiting for determination with respect to a target position of the self character is greater than the maximum offset amount, the target position of the virtual following object is adjusted based on the maximum offset amount to obtain the target position of the virtual following object; an offset distance of the target position of the virtual following object with respect to the target position of the self character is equal to or less than the maximum offset amount; The method according to claim 5.
7. the condition includes that a target position of the virtual following object waiting for determination is inside a rear angular region of the self character; When the target position of the virtual following object does not satisfy the condition, the step of acquiring the target position of the virtual following object by adjusting the target position of the virtual following object When the target position of the virtual following object is outside a rear angle region of the self character, the target position of the virtual following object is adjusted based on the rear angle region of the self character to obtain the target position of the virtual following object; The target position of the virtual following object is within the back angular region of the self character. The method according to claim 5.
8. The method comprises: a step of controlling the virtual camera to rotate around the virtual following object in response to a field of view adjustment operation on the self-character under the character lock state; determining a pre-lock character in the three-dimensional virtual environment during the rotation process and displaying a third screen frame, in which the pre-lock character and a corresponding pre-lock mark are displayed; and a step of determining the pre-lock character as a second lock character and displaying a fourth screen frame in response to a lock confirmation operation on the pre-lock character, the fourth screen frame displaying the second lock character and a lock mark corresponding thereto. The method of claim 1.
9. After the step of displaying a first screen frame, Under a non-character-locked state, updating the position of the virtual following object by interpolation with the self character as a following target to obtain a single-frame target position of the virtual following object in a fifth screen frame; determining a single-frame target position of the virtual camera in the fifth screen frame based on a single-frame target position of the virtual following object in the fifth screen frame; determining an actual orientation of the virtual camera in the first screen frame as a single-frame target orientation of the virtual camera in the fifth screen frame when a field of view adjustment operation for the self character is not acquired; when a view adjustment operation for the self character is acquired, adjusting an actual orientation of the virtual camera in the first screen frame based on the view adjustment operation to acquire a single-frame target orientation of the virtual camera in the fifth screen frame; generating and displaying the fifth screen frame based on a single-frame target position and a single-frame target orientation of the virtual camera in the fifth screen frame. The method of claim 1.
10. In a non-character-locked state, the self character is taken as a following target, and the position of the virtual following object is updated by interpolation to obtain a single-frame target position of the virtual following object in a fifth screen frame, determining a third interpolation coefficient based on a third distance under the non-character-locked state, the third distance being a distance between the self-character and the virtual following object, the third interpolation coefficient being used to determine a position adjustment amount of the virtual following object, and the third interpolation coefficient being positively correlated with the third distance; determining a single-frame target position of the virtual following object in the fifth screen frame based on a real position of the self character in the first screen frame, a real position of the virtual following object in the first screen frame, and the third interpolation coefficient; 10. The method of claim 9.
11. A screen display method executed by a terminal device, comprising: displaying a first screen frame, the first screen frame being a screen image of the three-dimensional virtual environment captured by a virtual camera with a virtual tracking object in the three-dimensional virtual environment as a visual focus; displaying a second screen frame based on a single frame target position and a single frame target orientation of the virtual camera in a second screen frame in response to movement of at least one of a self character and a first locked character, wherein the single frame target position and the single frame target orientation are determined based on a target position and a target orientation of the virtual camera, the target position and the target orientation of the virtual camera are determined based on a target position of the virtual following object, a distance between the target position of the virtual camera and the target position of the virtual following object is smaller than a distance between the target position of the virtual camera and the target position of the first locked character, and the first locked character refers to a locked target corresponding to the self character under the character locked state; The method includes:
12. The step of displaying the second screen frame based on a single-frame target position and a single-frame target orientation of the virtual camera in the second screen frame in response to movement of at least one of a self-character and a first locked character includes: determining a target position of the self character and a target position of the first lock character in response to movement of at least one of the self character and the first lock character; determining a target position of the virtual following object based on a target position of the self character and a target position of the first lock character; determining a target position and a target orientation of the virtual camera based on a target position of the virtual following object; obtaining a single-frame target position and a single-frame target orientation of the virtual camera in the second screen frame by interpolation based on a target position and a target orientation of the virtual camera and an actual position and an actual orientation of the virtual camera in the first screen frame; generating and displaying the second screen frame based on a single-frame target position and a single-frame target orientation of the virtual camera in the second screen frame. The method of claim 11.
13. The method comprises: a step of controlling the virtual camera to rotate around the virtual following object in response to a field of view adjustment operation on the self-character under the character lock state; determining a pre-lock character in the three-dimensional virtual environment during the rotation process and displaying a third screen frame, in which the pre-lock character and a corresponding pre-lock mark are displayed; and a step of determining the pre-lock character as a second lock character and displaying a fourth screen frame in response to a lock confirmation operation on the pre-lock character, the fourth screen frame displaying the second lock character and a lock mark corresponding thereto. The method of claim 11.
14. After the step of displaying a first screen frame, Under a non-character-locked state, updating a position of the virtual following object with the self character as a following target to obtain a single-frame target position of the virtual following object in a fifth screen frame; displaying the fifth screen frame based on a single-frame target position and a single-frame target orientation of the virtual camera in the fifth screen frame, wherein the single-frame target position of the virtual camera in the fifth screen frame is determined based on a single-frame target position of a virtual following object in the fifth screen frame, and the single-frame target orientation of the virtual camera in the fifth screen frame is determined based on an actual orientation of the virtual camera in the first screen frame. The method of claim 11.
15. A screen display device, a screen display module configured to display a first screen frame, the first screen frame being a screen image of a three-dimensional virtual environment captured by a virtual camera with a virtual tracking object in the three-dimensional virtual environment as a visual focus; an object position determination module configured to determine a target position of the virtual following object based on a target position of a self character and a target position of a first lock character, the first lock character referring to a lock target corresponding to the self character under a character lock state; a camera position determination module configured to determine a target position and a target orientation of the virtual camera based on a target position of the virtual following object, wherein a distance between the target position of the virtual camera and the target position of the virtual following object is smaller than a distance between the target position of the virtual camera and the target position of the first lock character; a single-frame position determination module configured to obtain a single-frame target position and a single-frame target orientation of the virtual camera in a second screen frame by interpolation based on a target position and a target orientation of the virtual camera and an actual position and an actual orientation of the virtual camera in the first screen frame; Including, The screen display module is further configured to generate and display the second screen frame based on a single-frame target position and a single-frame target orientation of the virtual camera in the second screen frame.
16. A screen display device, a screen display module configured to display a first screen frame, the first screen frame being a screen image of a three-dimensional virtual environment captured by a virtual camera with a virtual tracking object in the three-dimensional virtual environment as a visual focus; The screen display module is further configured to display the second screen frame based on a single frame target position and a single frame target orientation of the virtual camera in a second screen frame in response to movement of at least one of the self character and a first locked character under a character locked state, wherein the single frame target position and the single frame target orientation are determined based on a target position and target orientation of the virtual camera, the target position and target orientation of the virtual camera are determined based on a target position of the virtual following object, the distance between the target position of the virtual camera and the target position of the virtual following object is smaller than the distance between the target position of the virtual camera and the target position of the first locked character, and the first locked character refers to a locked target corresponding to the self character under the character locked state.
17. A terminal device comprising a processor and a memory, The memory stores a computer program; When the computer program is loaded and executed by the processor, the screen display method according to any one of claims 1 to 14 is realized. Terminal device.
18. A screen display method executed by a terminal device, comprising: a step of displaying a screen of a three-dimensional virtual environment, the screen of the three-dimensional virtual environment displaying a self-character and a first locked character; adjusting display contents on a screen of the three-dimensional virtual environment in response to a field of view adjustment operation on the self-character; displaying a second locked character, which has been replaced with the self-character, on a screen of the three-dimensional virtual environment based on the field of view adjustment operation; The method includes:
19. the step of displaying a second locked character, which has been switched with the self-character, on the screen of the three-dimensional virtual environment based on the field of view adjustment operation, displaying the self-character and a pre-locked character on a screen of the three-dimensional virtual environment based on the field of view adjustment operation; and determining the pre-lock character as the second lock character in response to a lock confirmation operation on the pre-lock character, and displaying the self-character and the second lock character on a screen of the three-dimensional virtual environment.
20. The method of claim 18.
20. the step of displaying the self-character and the pre-locked character on the screen of the three-dimensional virtual environment based on the field of view adjustment operation, displaying the self-character, the pre-lock character, and a pre-lock mark corresponding thereto on a screen of the three-dimensional virtual environment; 20. The method of claim 19.
21. The step of displaying the self character and the second lock character on the screen of the three-dimensional virtual environment includes: displaying the self-character, the second lock character, and a lock mark corresponding thereto on a screen of the three-dimensional virtual environment; 20. The method of claim 19.
22. the field of view adjustment operation is a sliding operation on a screen by a user's finger, The lock confirmation operation is an operation in which the user's finger is removed from the screen to complete the slide operation.
20. The method of claim 19.
23. A computer program configured to cause a processor to implement the screen display method according to any one of claims 1 to 14.
Citation Information
Patent Citations
Animation generation method used for carrying out interaction with virtual role, apparatus and electronic equipment
CN106600668A
AR processing system and processing method of three-dimensional game
CN107358656A
Skill aiming method and device in three-dimensional virtual environment, terminal and storage medium
CN111282266A
Picture display method and device for virtual environment, equipment and medium
CN111467802A
Game object locking method and device
CN112791405A
