Virtual camera control method and device and electronic equipment

By binding virtual objects with a virtual camera and maintaining a third-person perspective, the transmission parameters are obtained to control the transmission of virtual objects and camera, which solves the problem of sudden changes in the picture when the virtual character is transmitted through the portal and improves the virtual interactive experience.

CN120789651APending Publication Date: 2025-10-17NETEASE (HANGZHOU) NETWORK CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510648924.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-05-19
Publication Date
2025-10-17

AI Technical Summary

Technical Problem

In a virtual scene, when a virtual character passes through a portal, the virtual camera and the virtual character are transmitted simultaneously, causing a sudden change in the scene image, affecting the user's virtual interactive experience.

Method used

Bind the virtual object through the virtual camera, maintain the third-person perspective to shoot, obtain the transmission parameters and control the virtual object and camera to be transmitted to the target position. At the same time, maintain the camera binding position during the transmission process, change to the camera position for shooting, and avoid sudden changes in the picture.

Benefits of technology

It improves the smoothness of screen display, improves the user's virtual interaction experience, and avoids sudden changes in scene images.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120789651A_ABST
    Figure CN120789651A_ABST
Patent Text Reader

Abstract

The invention provides a control method and device of a virtual camera and electronic equipment. The method comprises the following steps: responding to a target viewport, entering a virtual scene, of a virtual object, and obtaining a first scene position where the target viewport is located and a transmission parameter of the target viewport; controlling the virtual object and the virtual camera to be transmitted to the target scene position based on the transmission parameter; wherein in the transmission process, the virtual camera is kept at a preset camera binding position of the virtual object; controlling the virtual camera to change from the camera binding position to a camera position corresponding to the first scene position based on the transmission parameter; and controlling the virtual camera to shoot the virtual scene at the camera position to obtain a second scene picture. According to the mode, sudden change of the scene picture is avoided, the picture display fluency is improved, and the virtual interaction experience of the user is further improved.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of games, and in particular to a virtual camera control method and device and electronic equipment. BACKGROUND

[0002] When a virtual camera shoots a virtual scene in a third-person perspective, the virtual camera is bound to a specified position of a virtual character, and a scene picture shot by the virtual camera is displayed on a terminal device, the scene picture including at least part of the virtual character. A portal in the virtual scene can instantly move objects such as virtual characters, virtual props, and virtual skills from a scene position where the portal is located to another scene position. When the virtual character enters the portal, the virtual character and the bound virtual camera are simultaneously transported, causing the scene picture shot by the virtual camera displayed on the terminal device to mutate, reducing the smoothness of the picture display and affecting the virtual interaction experience of the user. SUMMARY

[0003] In view of this, the present application aims to provide a virtual camera control method, device, and electronic equipment to avoid scene picture mutation, improve the smoothness of the picture display, and further improve the virtual interaction experience of the user.

[0004] In a first aspect, an embodiment of the present application provides a virtual camera control method, which provides a graphical user interface through a terminal device; a virtual camera is located in a virtual scene, the virtual camera is bound to a virtual object and shoots the virtual scene in a third-person perspective to obtain a first scene picture; the first scene picture is displayed on the graphical user interface; the method comprises: in response to the virtual object entering a target viewport in the virtual scene, obtaining a first scene position where the target viewport is located and a transport parameter of the target viewport; based on the transport parameter, controlling the virtual object and the virtual camera to be transported to a target scene position; wherein, during the transport process, the virtual camera is kept at a preset camera binding position of the virtual object; based on the transport parameter, controlling the virtual camera to be transformed from the camera binding position to a camera position corresponding to the first scene position; controlling the virtual camera to shoot the virtual scene at the camera position to obtain a second scene picture.

[0005] In a second aspect, an embodiment of the present application provides a virtual camera control apparatus, which provides a graphical user interface through a terminal device; the virtual camera is located in a virtual scene, the virtual camera is bound to a virtual object, and the virtual camera shoots the virtual scene in a third-person perspective to obtain a first scene picture; the first scene picture is displayed on the graphical user interface; the apparatus comprises: a position and parameter acquisition module, configured to acquire a first scene position where a target viewport is located and a transmission parameter of the target viewport in response to the virtual object entering the target viewport in the virtual scene; a transmission control module, configured to control the virtual object and the virtual camera to be transmitted to a target scene position based on the transmission parameter; wherein, during the transmission process, the virtual camera is kept at a preset camera binding position of the virtual object; a transformation control module, configured to control the virtual camera to be transformed from the camera binding position to a camera position corresponding to the first scene position based on the transmission parameter; and a shooting control module, configured to control the virtual camera to shoot the virtual scene at the camera position to obtain a second scene picture.

[0006] In a third aspect, an embodiment of the present application provides an electronic device, comprising a processor and a memory, the memory stores computer executable instructions capable of being executed by the processor, and the processor executes the computer executable instructions to implement the virtual camera control method.

[0007] In a fourth aspect, an embodiment of the present application provides a computer readable storage medium, which stores computer executable instructions, and the computer executable instructions, when invoked and executed by a processor, cause the processor to implement the virtual camera control method.

[0008] The embodiments of the present application have the following beneficial effects:

[0009] The virtual camera control method, apparatus and electronic device described above provide a graphical user interface through a terminal device; the virtual camera is located in a virtual scene, the virtual camera is bound to a virtual object, and the virtual camera shoots the virtual scene in a third-person perspective to obtain a first scene picture; the first scene picture is displayed on the graphical user interface; in response to the virtual object entering a target viewport in the virtual scene, a first scene position where the target viewport is located and a transmission parameter of the target viewport are acquired; the virtual object and the virtual camera are controlled to be transmitted to a target scene position based on the transmission parameter; wherein, during the transmission process, the virtual camera is kept at a preset camera binding position of the virtual object; the virtual camera is controlled to be transformed from the camera binding position to a camera position corresponding to the first scene position based on the transmission parameter; and the virtual camera is controlled to shoot the virtual scene at the camera position to obtain a second scene picture.

[0010] In the mode, the virtual character and the bound virtual camera are transmitted at the same time after the virtual object enters the target viewport, but the virtual camera is transformed to the camera position corresponding to the first scene position and controls the virtual camera to shoot the virtual scene at the camera position, so that the virtual camera does not visually enter the target viewport after the virtual object enters the target viewport, scene picture mutation is avoided, the smoothness of picture display is improved, and the virtual interaction experience of the user is improved.

[0011] Other features and advantages of the present application will be set forth in the descriptions below, and in part will become apparent to those skilled in the art upon examination of the following or can be learned by practice of the application. The objects and other advantages of the application will be realized and attained by the structure particularly pointed out in the written description and claims hereof as well as the appended drawings.

[0012] So that the above and other features and advantages of the present application can be more clearly understood, preferred embodiments will be described in detail with reference to the accompanying drawings, in which: BRIEF DESCRIPTION OF DRAWINGS

[0013] In order to more clearly illustrate the specific embodiments of the present application or the technical solutions in the prior art, the following will briefly introduce the drawings needed to be used in the specific embodiments or prior art description. Obviously, the drawings described below are some embodiments of the present application, and for those skilled in the art, other drawings can also be obtained without creative labor based on these drawings.

[0014] Figure 1 A flow chart of a virtual camera control method provided by an embodiment of the present application is shown in the figure;

[0015] Figure 2 A schematic diagram of displaying a virtual object, a first scene picture and a target viewport in a graphical user interface provided by an embodiment of the present application is shown in the figure;

[0016] Figure 3 A schematic diagram of a virtual camera and a patch model provided by an embodiment of the present application is shown in the figure;

[0017] Figure 4 A schematic diagram of a scene picture displayed by a target viewport when a virtual object approaches the target viewport provided by an embodiment of the present application is shown in the figure;

[0018] Figure 5 A schematic diagram of a virtual object entering a target viewport provided by an embodiment of the present application is shown in the figure;

[0019] Figure 6 A schematic diagram of determining a front position of a camera provided by an embodiment of the present application is shown in the figure;

[0020] Figure 7A structural schematic diagram of a virtual camera control device provided by an embodiment of the present application is shown in the figure.

[0021] Figure 8 A schematic diagram of an electronic device provided by an embodiment of the present application is shown in the figure. DETAILED DESCRIPTION

[0022] To make the objectives, technical solutions and advantages of the embodiments of the present application clearer, the technical solutions of the present application will be described below in detail with reference to the accompanying drawings. Obviously, the described embodiments are some but not all of the embodiments of the present application. Based on the embodiments of the present application, all other embodiments obtained by those skilled in the art without creative efforts belong to the scope of the present application.

[0023] At present, most of the portals appearing in the games with portal as the main gameplay are in the first-person perspective, and lack of collaborative portal performance in the third-person perspective. Or, the portal function is limited to the plot performance element, and lacks actual gameplay interaction value.

[0024] In a virtual scene, a portal can instantly move objects such as a virtual character, a virtual prop and a virtual skill from a scene position where the portal is located to another scene position. In the related art, when a virtual character enters the portal, the virtual character and a virtual camera bound thereto are simultaneously transmitted, so that a scene picture captured by the virtual camera displayed on a terminal device is suddenly changed, which reduces the smoothness of the picture display and affects the virtual interaction experience of a user.

[0025] Based on this, the virtual camera control method, device and electronic device provided by the embodiments of the present application can be applied to the shooting of a virtual scene, for example, shooting a virtual scene by a virtual camera in a third-person perspective.

[0026] To facilitate the understanding of the embodiments, first, a virtual camera control method disclosed by the embodiments of the present application is described in detail. The virtual camera control method provides a graphical user interface by a terminal device. The terminal device can be a local terminal device or a client device. The terminal device can control a virtual object to perform actions in a virtual scene, for example, moving, shooting and jumping.

[0027] The virtual camera is located in the virtual scene. The virtual camera is bound to the virtual object and shoots the virtual scene in a third-person perspective to obtain a first scene picture. For example, the third-person perspective can be understood as that the virtual camera is located at a right rear perspective, a top perspective or other positions of the virtual object with a certain distance from the virtual object. The virtual camera can completely shoot the object model of the virtual object. In the embodiments, the specific relative position of the virtual camera and the virtual object is not limited, and the scene picture is in the third-person perspective.

[0028] The first scene picture is displayed on the aforementioned graphical user interface. When the terminal device controls the virtual object to perform an action in the virtual scene, the virtual camera bound to the virtual object moves following the virtual object, and the first scene picture also changes following the movement of the virtual object.

[0029] In actual implementation, the virtual object can be a virtual character, a skill released by the user when performing a skill release operation, or a virtual prop triggered for control. For example, the user triggers a skill control in the terminal device to control a virtual prop in the virtual scene. In this embodiment, a virtual object is taken as a virtual character as an example for detailed introduction.

[0030] As shown in Figure 1 The control method of the virtual camera includes the following steps.

[0031] In step S102, in response to the virtual object entering a target viewport in the virtual scene, a first scene position where the target viewport is located is obtained, and a transmission parameter of the target viewport is obtained.

[0032] The target viewport is used to display a viewport picture different from the first scene picture. That is, in the same graphical user interface, the scene content of the first scene picture is displayed, and the picture content of the viewport picture is also displayed. It can also be understood that a transmission door effect is rendered in the first scene picture. The scene picture in the target viewport is obtained by shooting by a virtual camera other than the virtual camera bound to the virtual object in the virtual scene. The position or orientation of the virtual camera is different from the position or orientation of the virtual camera bound to the virtual object.

[0033] The first scene position can be understood as an entry position corresponding to the target viewport. Specifically, it can be a preset scene position in the virtual scene, or a position determined from the virtual scene according to a user operation. For example, the user performs a skill release operation, and a scene position selected by the skill release operation is determined as the first scene position. In this embodiment, any scene position in the virtual scene can be determined as the first scene position. For example, the first scene position can be a position where a wall model, a ground model, a water model, or a scene ground model in the virtual scene is located.

[0034] The transmission parameter is associated with the target viewport. Specifically, it can include an exit position transmitted from the first scene position where the target viewport is located. It can also include a rotation parameter in the process of transmitting from the first scene position where the target viewport is located to the exit position.

[0035] In actual implementation, a target viewport is set in the virtual scene, and the terminal device can control the virtual object to enter the target viewport; that is, the virtual object interacts with the target viewport in the virtual scene, and then the terminal device acquires a first scene position where the target viewport is located and a transmission parameter associated with the target viewport.

[0036] In step S104, the virtual object and the virtual camera are controlled to be transmitted to a target scene position based on the transmission parameter; in the transmission process, the virtual camera is kept at a preset camera binding position of the virtual object.

[0037] The target scene position can be different from or the same as the first scene position; the target scene position can be understood as an exit position corresponding to the target viewport, and can be a preset scene position in the virtual scene or a position determined from the virtual scene according to a user operation. In this embodiment, any scene position in the virtual scene can be determined as the target scene position. For example, the target scene position can be a wall model, a ground model, a water model, or the like in the virtual scene.

[0038] The camera binding position can be a position of a right rear position, a position of a left rear position, a position of an oblique upper position, or the like of the virtual object, and the camera binding position is not limited in this embodiment.

[0039] In an implementation mode, after the transmission parameter is acquired, the virtual object and the virtual camera can be controlled to be transmitted from the first scene position to the target scene position according to the target scene position in the transmission parameter, or the orientation of the virtual object or the virtual camera can be controlled to be rotated according to the rotation parameter in the transmission parameter, for example, the orientation of the virtual object or the virtual camera at the first scene position is zero degrees, and the virtual object or the virtual camera is controlled to be rotated from zero degrees to a first angle, and the rotating direction can be a lower left direction, an upper right direction, or the like.

[0040] It should be noted that in the process of transmitting the virtual object and the virtual camera, the virtual camera is kept at the preset camera binding position of the virtual object; that is, the virtual camera still shoots the virtual scene in the third-person perspective in the transmission process to obtain the first scene picture. The relative position of the virtual object and the virtual camera remains unchanged in the transmission process.

[0041] In step S106, the virtual camera is controlled to be transformed from the camera binding position to a camera position corresponding to the first scene position based on the transmission parameter.

[0042] The camera position is usually a preset position near the first scene position, for example, a top-left position, a front-right position, etc. of the first scene position. After the virtual object and the virtual camera are transferred to the target scene position, the virtual camera can be separated from the virtual object, and the virtual camera is controlled to move away from the preset camera binding position of the virtual object and to move to the camera position corresponding to the first scene position. The transformation can be realized by inverse transfer.

[0043] It can be understood that the virtual object and the virtual camera are transferred to the target scene position, the virtual camera is unbound from the virtual object, and the virtual camera is transferred again from the target scene position to the camera position corresponding to the first scene position, thereby avoiding the problem of sudden change of the scene picture caused by simultaneous transfer of the virtual camera and the virtual object.

[0044] After the virtual camera is transformed to the camera position corresponding to the first scene position, the orientation of the virtual camera can be adjusted according to the transfer parameter, or the virtual camera can be controlled to move synchronously with the virtual object when the virtual object moves. If the transfer parameter includes a rotation parameter and the angle of the rotation parameter is greater than zero, the rotation angle of the virtual camera can be processed, or the scene picture taken by the virtual camera can be processed, to avoid sudden change of the scene picture, for example, by interpolation processing to make the scene picture gradually transition.

[0045] In this embodiment, the virtual camera and the virtual object are controlled respectively, that is, the virtual camera and the virtual object are separated, thereby avoiding sudden change of the scene picture taken by the virtual camera.

[0046] In step S108, the virtual camera is controlled to take a virtual scene at the camera position to obtain a second scene picture.

[0047] When the virtual camera is transformed to the camera position corresponding to the first scene position, the virtual camera is controlled to take a virtual scene at the camera position to obtain a second scene picture, and the second scene picture is displayed on the graphical user interface.

[0048] It can be understood that the virtual object is located near the first scene position before entering the target viewport, and the virtual camera is also located near the first scene position to take a first scene picture. After the virtual object enters the target viewport and is transferred to the target scene position, the virtual camera is transferred to the target scene position with the virtual object. If the target scene position is far away from the first scene position, the camera position of the virtual camera will change greatly, resulting in instantaneous change of the scene picture.

[0049] In this embodiment, the virtual camera is transformed from the target scene position to the camera position corresponding to the first scene position. It can be understood that, before and after the virtual object enters the target viewport and is transmitted, the virtual camera is always near the first scene position, and the position of the virtual camera does not change significantly due to the transmission. Therefore, when the virtual object and the scene picture around the target viewport in the second scene picture are rendered, the scene picture will not change suddenly, and the smoothness of the picture display is improved.

[0050] The above method for controlling a virtual camera includes providing a graphical user interface by a terminal device; the virtual camera is located in a virtual scene, the virtual camera is bound to a virtual object, and the virtual camera captures the virtual scene in a third-person perspective to obtain a first scene picture; the first scene picture is displayed on the graphical user interface; in response to the virtual object entering a target viewport in the virtual scene, a first scene position where the target viewport is located and a transmission parameter of the target viewport are obtained; based on the transmission parameter, the virtual object and the virtual camera are controlled to be transmitted to the target scene position; during the transmission process, the virtual camera is kept at a preset camera binding position of the virtual object; based on the transmission parameter, the virtual camera is controlled to be transformed from the camera binding position to a camera position corresponding to the first scene position; and the virtual camera is controlled to capture the virtual scene at the camera position to obtain a second scene picture.

[0051] In this way, after the virtual object enters the target viewport, the virtual character and the bound virtual camera are transmitted at the same time, but the virtual camera is transformed back to the camera position corresponding to the first scene position, and the virtual camera is controlled to capture the virtual scene at the camera position. In vision, after the virtual object enters the target viewport, the virtual camera does not enter the target viewport, which avoids the scene picture from changing suddenly, improves the smoothness of the picture display, and further improves the virtual interaction experience of the user.

[0052] In an implementation manner, whether there is a viewport model corresponding to the target viewport between the virtual camera and the virtual object is detected; in response to the fact that there is the viewport model between the virtual camera and the virtual object, it is determined that the virtual object enters the target viewport.

[0053] In the virtual scene, the target viewport usually corresponds to a viewport model. The target viewport can correspond to two viewport models, one of which is an entrance, and the other of which is an exit. The viewport model has a preset shape, such as a circular shape, an elliptical shape, an irregular shape, etc. The viewport model can be a three-dimensional model or a two-dimensional model, such as a face sheet model.

[0054] In actual implementation, the terminal device can perform occlusion detection on the camera arm corresponding to the virtual camera, detect whether there is a viewport model corresponding to the target viewport between the virtual camera and the virtual object, for example, whether there is a viewport model corresponding to the target viewport between the virtual camera and the virtual object center point position, and determine whether there is a viewport model corresponding to the target viewport between the virtual camera and the virtual object center point position. The camera arm is used to move the virtual camera, which can be understood as a long rod supporting the virtual camera. The virtual camera is placed on one end of the camera arm, and when the other end moves the camera arm, the virtual camera moves.

[0055] If the detection result is that there is a viewport model between the virtual camera and the virtual object, it can be determined that the virtual object enters the target viewport.

[0056] In an optional implementation, the first distance between the virtual camera and the virtual object and the second distance between the virtual camera and the viewport model corresponding to the target viewport are detected. If the first distance is greater than the second distance, it is determined that there is a viewport model corresponding to the target viewport between the virtual camera and the virtual object.

[0057] In an example, the virtual camera in the virtual scene can emit a ray around it, and the distance between the virtual object, the viewport model corresponding to the target viewport and the virtual camera in the virtual scene is detected through the ray. For example, the ray detects the first distance between the virtual camera and the virtual object and the second distance between the virtual camera and the viewport model corresponding to the target viewport, and then compares the first distance and the second distance. If the first distance is greater than the second distance, it is determined that there is a viewport model corresponding to the target viewport between the virtual camera and the virtual object.

[0058] That is, if the distance between the virtual camera and the viewport model is closer than the distance between the virtual camera and the virtual object, it can be determined that there is a viewport model corresponding to the target viewport between the virtual camera and the virtual object. However, in actual application, this determination method is limited by the use scenario. When the virtual object is located beside the viewport model corresponding to the target viewport, the first distance is less than or equal to the second distance, and there is no such viewport model between the virtual camera and the virtual object, attention should be paid to the use scenario.

[0059] In one way, the transmission parameters include: the target scene position, and the transmission rotation parameter of the first scene position to the target scene position. The transmission rotation parameter can be a transmission rotation angle or a transmission rotation direction. The transmission rotation angle can be any value between zero degrees and one hundred and eighty degrees, and the transmission rotation direction can be any rotation direction.

[0060] In actual implementation, the transmission parameters can include the target scene position and the transmission rotation parameter of the first scene position to the target scene position. The target scene position and the first scene position can be the same or different.

[0061] Specifically, based on the transfer rotation parameter, the object orientation of the transferred virtual object and / or the camera orientation of the virtual camera are adjusted.

[0062] In one example, the object orientation of the transmitted virtual object or the camera orientation of the virtual camera can be adjusted according to the transmission rotation parameter; or the object orientation of the transmitted virtual object and the camera orientation of the virtual camera can be adjusted at the same time according to the transmission rotation parameter.

[0063] In one embodiment, the transfer parameters include a first scene position and a transfer rotation parameter for transferring the first scene position to a target scene position. Specifically, the virtual camera is controlled to transfer in reverse from the camera binding position to the camera position corresponding to the first scene position; and the camera orientation of the virtual camera is adjusted based on the transfer rotation parameter.

[0064] The virtual camera's orientation can be understood as the direction the virtual camera's crosshairs are aiming. After obtaining the teleportation parameters, the virtual camera can be controlled to move away from the camera binding position based on the first scene position in the teleportation parameters and reverse teleported to a preset camera position near the first scene position.

[0065] When the virtual camera is at the camera position, the camera orientation of the virtual camera can be adjusted according to the transmission rotation parameter from the first scene position to the target scene position in the transmission parameter. For example, when the transmission rotation parameter is zero degrees, the camera orientation remains unchanged; or, the camera orientation is rotated backward sixty degrees from the original orientation.

[0066] In one embodiment, if Figure 2 In the first scene image shown in (a), the virtual object is close to the target viewport. At this time, there is no abnormality in the scene images displayed in and around the target viewport. In the related art, after the virtual object completely enters the target viewport, Figure 2 In the first scene image shown in (b), the scene image displayed in the target viewport and the scene image displayed around the target viewport suddenly change.

[0067] In this embodiment, after the virtual object completely enters the target viewport, the virtual camera is located at the camera position corresponding to the first scene position to capture the second scene image, such as Figure 2 In the second scene image shown in (c), there is no sudden change in the scene image displayed in the target viewport and the scene image displayed around the target viewport.

[0068] In one implementation, in response to the movement of the virtual object, the movement of the virtual camera is controlled based on the transmission parameters; in response to the virtual camera entering the target viewport, the virtual camera is controlled to be transmitted to the camera binding position of the virtual object, and the virtual camera is controlled to shoot the virtual scene at the camera binding position to obtain a third scene image.

[0069] In actual implementation, when the virtual camera is at the camera position, if the virtual object moves, the virtual camera can be controlled to move synchronously according to the transmission parameters; it can be understood that the camera binding position of the virtual object is reversely transmitted to the vicinity of the first scene position through the transmission parameters. When the virtual object is teleported, when the virtual object moves, the camera binding position moves accordingly, and the position to which the camera binding position is reversely transmitted also moves accordingly.

[0070] After the virtual object is teleported, as the virtual object moves away from the teleportation exit, the virtual camera gradually approaches the first scene position of the target viewport. When the virtual camera enters the target viewport, the virtual camera is teleported. When the virtual camera enters the target viewport, the virtual camera is controlled to teleport to the camera binding position of the virtual object and continues to capture the virtual scene at the camera binding position to obtain a third scene image, which is then displayed on the graphical user interface.

[0071] It is understandable that when the virtual camera enters the target viewport, the virtual object has already entered the target viewport. At this time, switching the scene screen from the second scene screen to the third scene screen will not affect the smoothness of the screen display in the graphical user interface.

[0072] Furthermore, the vertical rotation angle of the virtual camera is obtained; in response to the vertical rotation angle not being equal to the preset angle, the vertical rotation angle is adjusted until the vertical rotation angle is equal to the preset angle; wherein, during the process of adjusting the vertical rotation angle, the camera orientation of the virtual camera is kept unchanged.

[0073] After the virtual camera's parameters are transmitted and reversed, the vertical rotation angle may not match the preset angle. For example, the vertical rotation angle may be greater than or less than the preset angle. For example, the preset angle is set to zero degrees. When the vertical rotation angle does not match the preset angle, the captured scene's perspective is abnormal.

[0074] To avoid this issue, in actual implementation, the vertical rotation parameter in the transmitted rotation parameters can be obtained from the transmitted parameters; the vertical rotation parameter is compared with the preset angle. If the vertical rotation angle is not equal to the preset angle, the vertical rotation angle is adjusted. For example, an interpolation operation is performed between the vertical rotation angle and the preset angle, so that the virtual camera gradually transitions from the vertical rotation angle to the preset angle. It should be noted that during the process of adjusting the vertical rotation angle of the virtual camera, the camera orientation of the virtual camera does not change.

[0075] In one mode, a specified number of interpolation angles are generated between the vertical rotation angle and the preset angle; wherein the specified number of interpolation angles are sequentially arranged, and the closer the arrangement position of the interpolation angle to the interpolation angle of the preset angle, the closer the angle value of the interpolation angle to the preset angle; the vertical rotation angle is adjusted to sequentially equal the specified number of interpolation angles in the arrangement order until the vertical rotation angle equals the preset angle.

[0076] In one example, the vertical rotation angle can be taken as the first angle, and the preset angle can be taken as the last angle. A specified number of interpolation angles are generated between the vertical rotation angle and the preset angle, and the specified number can be set according to requirements. The more detailed the picture is, the larger the specified number is.

[0077] Specifically, when the specified number of interpolation angles are sequentially arranged, the closer the arrangement position of the interpolation angle to the interpolation angle of the preset angle, i.e., the closer to the interpolation angle of the last angle, the closer the angle value of the interpolation angle to the preset angle; similarly, the closer the interpolation angle to the vertical rotation angle, i.e., the closer to the interpolation angle of the first angle, the closer the angle value of the interpolation angle to the vertical rotation angle.

[0078] In this way, the problem of abnormal shooting angle after the virtual camera is reversely transmitted can be avoided, the scene picture view is more reasonable, and the picture smoothness is ensured.

[0079] In one implementation mode, the viewport model corresponding to the target viewport is a patch model. The patch model is a two-dimensional model and is used to render the portal effect.

[0080] In this embodiment, when the virtual camera approaches the patch model and the virtual camera and the patch model are interpenetrated, the display problem of the scene picture appearing on the graphical user interface is described in detail.

[0081] Specifically, in response to the interpenetration of the virtual camera and the patch model, a camera frustum of the virtual camera is obtained; wherein when the virtual camera and the patch model are interpenetrated, the camera frustum is divided into a first frustum region and a second frustum region by the patch model; the first frustum region is located outside the target viewport, and the second frustum region is located inside the target viewport; the first frustum region is rendered to obtain a first scene picture region; a specified model position on the patch model outside the second frustum region is obtained, and the specified model position is adjusted to the second frustum region; the adjusted second frustum region is rendered to obtain a second scene picture region; wherein the second scene picture region and the first scene picture region constitute a first scene picture.

[0082] The camera frustum can be understood as a space that can be photographed by the virtual camera, and the camera frustum is composed of four frustum planes, a near clipping plane, and a far clipping plane. Before the virtual object enters the target viewport in the virtual scene, if the virtual camera and the patch model produce penetration, the camera frustum of the virtual camera is obtained.

[0083] As shown in (a) of FIG. 6, the patch model divides the virtual camera into two parts, and when the virtual camera is divided into two parts, the camera frustum is also divided into two parts; in an example, when the virtual camera and the patch model produce penetration, the camera frustum is divided into a first frustum region and a second frustum region by the patch model, the first frustum region is located outside the target viewport, that is, the space in which the virtual object is located and has not entered the target viewport; and the second frustum region is located inside the target viewport, that is, the space in which the virtual object will enter the target viewport. Figure 3

[0084] In actual implementation, the first frustum region is rendered to obtain a first scene picture region, as shown in (a) of FIG. 6, the first frustum region is a left front part region of the virtual camera. Figure 3

[0085] Further, a specified model position outside the second frustum region on the patch model can be obtained, as shown in (b) of FIG. 6, the specified model position outside the second frustum region is a right rear part region of the virtual camera, that is, a region that cannot be photographed by the virtual camera; the pixels on the patch model are modified, the specified model position is adjusted to the second frustum region, and the second frustum region is as shown in (c) of FIG. 6, so as to adjust the position deviation of the pixels. Figure 3 Figure 3

[0086] The adjusted second frustum region is rendered to obtain a second scene picture region, and the second scene picture region and the first scene picture region are spliced to obtain a first scene picture.

[0087] Specifically, the specified model position is located in a rear part region of the virtual camera, and the specified model position and the second frustum region are located on the same side of the patch model; wherein the rear part region of the virtual camera is divided based on a first plane perpendicular to a camera orientation of the virtual camera, the first plane divides the virtual scene into a front part region and a rear part region of the virtual camera, and the camera frustum is located in the front part region.

[0088] The specified model position is located in the rear part region of the virtual camera, and the specified model position and the second frustum region are located on the same side of the patch model, and are both inside the target viewport; as shown in (a) of FIG. 7, the virtual camera is divided according to a first plane perpendicular to a camera orientation of the virtual camera to obtain a rear part region of the virtual camera, and the first plane can divide the virtual scene into a front part region and a rear part region of the virtual camera. Figure 3 ​​​​​

[0089] In one implementation, a first material parameter of a specified model position on the patch model is preset; wherein the first material parameter is used to indicate that when the specified model position is located outside the second view frustum region, the specified model position is adjusted into the second view frustum region.

[0090] The first material parameter can indicate the material on each specified model position of the patch model.

[0091] On the patch model, the first material parameter of the pixel position where each model position is located is preset, and when the specified model position is located outside the second view frustum region, the specified model position is adjusted into the second view frustum region according to the first material parameter.

[0092] In the related art, as shown in (a) of Figure 4 When the virtual character approaches the patch model, the virtual camera penetrates the patch model, and in the scene picture, part of the right region of the patch model displays the picture content in the target viewport, and the other part displays the picture content shot by the virtual camera, resulting in abnormal picture.

[0093] In the embodiment, the picture content corresponding to the specified model position is adjusted into the second view frustum region, and as shown in (b) of Figure 4 When the virtual camera penetrates the patch model, in the scene picture, the right region of the patch model displays the picture content in the target viewport, avoiding the abnormal picture.

[0094] In the above manner, when the virtual camera approaches the patch model and the virtual camera penetrates the patch model, the object outside the view frustum of the virtual camera is rendered into the scene picture through the material parameter, avoiding the abnormal picture when the virtual camera penetrates the patch model, and making the scene picture smoother.

[0095] In one implementation, the viewport model corresponding to the target viewport is the patch model. In the embodiment, the display problem of the scene picture appearing on the graphical user interface when the virtual object is entering the target viewport is described in detail.

[0096] Specifically, in response to the virtual object being in the target viewport in the virtual scene, a first sub-model and a second sub-model of the object model of the virtual object divided by the patch model are determined; wherein the first sub-model is located outside the target viewport, and the second sub-model is located inside the target viewport; the first sub-model is rendered to obtain a first object display area; an object model is copied at the position of the object model, and the second sub-model of the copied object model is rendered to obtain a second object display area; wherein the second object display area and the first object display area constitute a complete virtual object.

[0097] If the virtual object is entering a target viewport in the virtual scene, the patch model will usually split the virtual object in two; in one example, the object model of the virtual object is divided by the patch model into a first sub-model outside the target viewport and a second sub-model inside the target viewport.

[0098] In actual implementation, the first sub-model is rendered to obtain a first object display area, as shown in the left part of (a) in FIG. 6. Figure 5

[0099] Further, another object model can be copied at the position of the object model of the virtual object, and the second sub-model of the copied object model is rendered to obtain a second object display area, as shown in the right part of (b) in FIG. 6. Figure 5

[0100] In one approach, a second material parameter of the model position on the object model is preset; the second material parameter is used to indicate that when the model position on the object model is inside the target viewport, the rendering of the model position is stopped.

[0101] The second material parameter can indicate the material of each model position on the object model. On the object model, the second material parameter of the pixel position where each model position is located is preset, so that when the model position is inside the target viewport, the rendering of the model position is stopped according to the second material parameter, thereby rendering only the model position outside the target viewport.

[0102] In one approach, a third material parameter of the model position on the copied object model is preset; the third material parameter is used to indicate that when the model position on the copied object model is outside the target viewport, the rendering of the model position is stopped.

[0103] The third material parameter can indicate the material of each model position on the copied object model. On the copied object model, the third material parameter of the pixel position where each model position is located is preset, so that when the model position is outside the target viewport, the rendering of the model position is stopped according to the third material parameter, thereby rendering only the model position inside the target viewport.

[0104] In related technologies, during the process in which the object model enters the target viewport, only the part of the object model entering the target viewport or only the part of the object model coming out of the target viewport is displayed in the scene picture, resulting in incomplete display of the object model; through the above approach of the embodiment, by copying the object model and modifying the material parameter of the object model, the object model can be completely displayed during the process in which the object model enters the target viewport, and the display effect of the object model is improved.​​

[0105] In some related technologies, for a multi-player game scenario, a movement of a virtual character in a frame is divided into multiple stages. First, before the movement, the input instruction of the user is read to determine the moving direction of the virtual character. When the virtual character starts to move, the movement of the virtual character is controlled according to the input instruction. This stage usually generates update data, such as the new position of the virtual character and the components corresponding to the virtual character, the new components inserted by the virtual character, and the like. Then, the updated data is notified to other components.

[0106] The client sends the moving time and the timestamp as a moving package in a short time. After the server receives the moving package, the movement of the virtual character is controlled. If there is a large difference between the moving package of the server and the moving package of the client, the client is usually instructed to resend. Because the teleporter in the virtual scene itself has a large position difference, the results calculated by the two ends often differ for a moving package. In a multi-player game scenario, in order to prevent cheating, the result of the server is used as the standard, so the client is prone to two situations: first, the client has transmitted, but the server has not transmitted, and needs to return to the original transmitted result; second, the client has not transmitted, but the server has transmitted, and the client needs to move autonomously to transmit.

[0107] To solve the above problems, the embodiment adopts the following implementation manner:

[0108] In one implementation manner, in response to a first moving instruction for a virtual object, the virtual object is controlled to move in a virtual scene, and object state data of the virtual object is updated based on the first moving instruction. The updated object state data is notified to scene components associated with the virtual object. In response to a second moving instruction for the virtual object, the virtual object is controlled to move into a target viewport, and the virtual object is controlled to teleport to a target scene position based on teleport parameters of the target viewport. The object state data of the virtual object is updated based on the second moving instruction and the target scene position, and the updated object state data is notified to the scene components associated with the virtual object.

[0109] The object state data can be the updated position of the scene components corresponding to the virtual object, the scene components inserted by the virtual object, and the like.

[0110] First, when the terminal device receives a first moving instruction of a user for a virtual object, the virtual object is controlled to move in a virtual scene. The first moving instruction can trigger the virtual character to perform a normal moving action. The object state data of the virtual object is updated according to the first moving instruction, for example, the skill special effect configured by the virtual object, to obtain updated object state data, and the updated object state data is notified to the scene components associated with the virtual object.

[0111] Further, if a second movement instruction for the virtual object is received, the virtual object is controlled to move into the target viewport, and then is controlled to teleport to a target scene position according to teleport parameters of the target viewport; the object state data of the virtual object is updated according to the second movement instruction and the target scene position, to obtain updated object state data, and is notified to a scene component associated with the virtual object.

[0112] In the above manner, the updated movement data is notified to the scene component associated with the virtual object before the virtual object moves, and the teleport and the notification of the movement component are combined by taking the teleport as a parameter of a movement package, so that the number of teleports of the two ends is equal, and the synchronization check of the two ends is performed.

[0113] In some related technologies, the muzzle position of the virtual gun is bound to the position of the virtual character, that is, when the virtual character is located at a position in the virtual scene, the deviation of the muzzle position from the bound position is within a threshold range; in the third-person perspective, the virtual gun is fired, and the firing is determined by the muzzle position and the aiming direction, and the aiming direction is determined by the camera front position and the camera orientation, however, when the teleport portal exists, the positioning of the camera front position is affected, and the deviation will greatly exceed the threshold range.

[0114] In this embodiment, for the coupling between the virtual gun and the target viewport, the following specific implementation manners are provided:

[0115] In one implementation manner, the virtual object carries the virtual gun; and the viewport model corresponding to the target viewport is a patch model. Specifically, in response to the virtual object being located outside the target viewport and the firing position of the virtual gun entering the target viewport, the camera front position of the virtual camera is determined based on the camera orientation of the virtual camera, the patch model and the virtual object; and the aiming direction of the virtual gun is determined based on the camera front position and the camera orientation.

[0116] In the virtual scene, the virtual object can be located near the target viewport, if the virtual object is located outside the target viewport and the firing position of the virtual gun carried by the virtual object enters the target viewport, the terminal device can calculate the camera front position of the virtual camera according to the camera orientation of the virtual camera, the patch model and the virtual object.

[0117] After obtaining the camera front position of the virtual camera, in the third-person perspective, the aiming direction of the virtual gun can be calculated according to the camera front position and the camera orientation.

[0118] In the above manner, whether the camera front position and the virtual object are located on two sides of the patch model or on the same side of the patch model, the accuracy of the aiming direction can be ensured.

[0119] In one method, a ray passing through the virtual camera is generated along the camera orientation of the virtual camera; a second plane passing through the virtual object and parallel to the patch model is generated; and the intersection of the ray and the second plane is determined as the camera front position of the virtual camera.

[0120] In actual implementation, we can start from the binding position of the camera and generate a ray passing through the virtual camera along the camera orientation of the virtual camera; then generate a second plane passing through the virtual object and parallel to the patch model. The ray and the second plane intersect at one point, and this intersection is used as the front position of the virtual camera.

[0121] In one approach, a reference position range is determined based on a patch model; a camera front position is determined to be within the reference position range, and an aiming direction of a virtual firearm is determined based on the camera front position and camera orientation.

[0122] The reference position range usually refers to the width range from the left end to the right end of the patch model.

[0123] If the reference position range is determined based on the patch model, and the camera front position is determined to be within the reference position range, then Figure 6 As shown in (a), when the virtual object and the virtual camera are on the same side, the aiming direction of the virtual gun is determined according to the camera's front position and camera orientation; Figure 6 As shown in (b), when the virtual object and the virtual camera are located on opposite sides, the 'aim b' in the figure is determined to be the aiming direction of the virtual firearm according to the front position and orientation of the camera.

[0124] In the related art, if the camera front position exceeds the reference position range, it may cause the camera front position to be incorrectly selected, such as Figure 6 In the 'camera front position 1' shown in (c), if Figure 6 If there is a target that can be aimed at within the box shown in (c), the target will be lost.

[0125] To avoid the above situation, this embodiment provides the following implementation:

[0126] In one method, it is determined that the camera front position is not within the reference position range, and a third plane is generated that passes through the virtual object and is parallel to the object orientation of the virtual object; the intersection of the third plane and the ray is determined as the updated camera front position.

[0127] If the reference position range is determined based on the patch model and the camera front position is not within the reference position range, then Figure 6 As shown in (b), a third plane is generated that passes through the virtual object and is parallel to the object orientation of the virtual object. The ray intersects the third plane at a point. This intersection point is used as the front position of the virtual camera, and the intersection point with the first plane is the offset position.

[0128] In the related art, due to the existence of the target viewport near the virtual object, the muzzle position of the virtual gun may enter the target viewport for transmission before the virtual object, and thus the virtual gun may deviate from the target viewport. By the above method of the embodiment, the front camera position can be reasonably adjusted near the target viewport, so that the aiming direction of the virtual gun can be more accurately calculated, the deviation caused by the target viewport can be avoided, and the accuracy of gun aiming can be improved.

[0129] To detect the target model in the virtual scene in the target viewport, the embodiment provides the following specific implementation manners:

[0130] In an implementation manner, a detection ray is generated along the camera orientation of the virtual camera with the virtual camera as the starting point; in response to the intersection of the detection ray and the viewport model of the target viewport, the intersection position of the detection ray and the viewport model is determined; the intersection position is transmitted based on the transmission parameter to obtain a detection starting point; the detection direction is determined based on the transmission parameter and the camera orientation; and the detection is performed along the detection direction from the detection starting point to obtain a detection target.

[0131] In actual implementation, the virtual camera can be taken as the starting point, and a detection ray is generated along the camera orientation of the virtual camera. If the detection ray intersects with the viewport model of the target viewport, the terminal device obtains the intersection position of the detection ray and the viewport model.

[0132] Then, the intersection position can be transmitted to a target scene position according to the transmission parameter to obtain a detection starting point, and the detection direction of the detection starting point is determined according to the transmission parameter and the camera orientation. From the detection starting point, a ray along the detection direction can be emitted to detect the model in the virtual scene to obtain a detection target.

[0133] In one manner, the detection ray is preset with a specified detection length. The specified detection length is usually the distance from one side to the other side of the viewport model of the target viewport, for example, the distance from the entrance to the exit of the viewport model.

[0134] Specifically, the ray length between the virtual camera and the intersection position is determined; the length difference between the specified detection length and the ray length is determined; the ray is controlled to extend by the length difference along the detection direction from the detection starting point; and the detection target is determined based on the model detected by the ray.

[0135] In actual implementation, after the terminal device acquires the intersection position, the terminal device can calculate the ray length between the virtual camera and the intersection position, and then perform difference operation on the specified detection length and the ray length according to the specified detection length to obtain a length difference. Then, the terminal device controls the ray to extend by the length difference along the detection direction from the detection starting point. For example, if the ray length is 500 meters and the specified length is 100 meters, the length difference is 400 meters, which is the difference between 500 meters and 100 meters. According to the length difference of 400 meters, the terminal device can determine the detection target according to the detected model.

[0136] In the conventional detection manner, if the occlusion detection is performed in the third-person perspective, a ray can be emitted from the object model of the virtual object to the target model detected by the virtual camera. When the ray passes through the teleporter, the detection needs to be performed in combination with the logic of the teleporter.

[0137] In one manner, the detection target is determined in the following manner:

[0138] Specifically, it is determined whether there is occlusion between the detection starting point and the model detected by the ray. If there is no occlusion between the detection starting point and the model detected by the ray, the model detected by the ray is determined as the detection target.

[0139] In this embodiment, the occlusion detection is performed on the ray detection that has been segmented by the target viewport. The starting point of the occlusion detection can be adjusted, and the occlusion detection is performed from the aforementioned detection starting point. It is determined whether there is occlusion between the detection starting point and the model detected by the ray. If there is no occlusion between the detection starting point and the model detected by the ray, the model detected by the ray is determined as the detection target.

[0140] In the above manner, the detection target is screened, and the detection target that matches the logic is determined as the final detection target.

[0141] The above embodiments of the present application have the following advantages:

[0142] The embodiments can realize multi-perspective cooperation: the embodiments break through the binding paradigm of the traditional first-person perspective and realize dynamic decoupling of the third-person free perspective and the teleport behavior.

[0143] The embodiments have interaction integrity: the embodiments support coordinate mapping of teleporters at any spatial position of any entity or non-entity target. Through modification of the skill framework, not only entities such as characters can be teleported, but also physical detection of the teleported character can be realized.

[0144] The embodiments have framework universality: through reconstruction of the mobile component, the embodiments break through the dependence of the traditional teleporter scheme on specific scenes and realize a standardized solution compatible with all scenes. The arrangement of the teleporter in the scheme is generated in any scene position.

[0145] The embodiment separates the character model and the virtual camera from each other in the third-person perspective virtual scene, and transmits the camera and the character model separately through the portal by additional processing, so that the character model and the virtual camera have the ability of different world coordinates in the case of being associated with each other.

[0146] The embodiment adds a portal in a multiplayer battle environment, and adapts the transmission by moving the underlying to avoid mismatch between the client and the server in the transmission logic.

[0147] Corresponding to the method embodiment, referring to Figure 7 The virtual camera control device shown in the figure provides a graphical user interface through a terminal device; the virtual camera is located in a virtual scene, the virtual camera is bound to a virtual object, and the virtual scene is photographed in a third-person perspective to obtain a first scene picture; the first scene picture is displayed on the graphical user interface; the device comprises:

[0148] The position and parameter acquisition module 71 is configured to acquire a first scene position where a target viewport is located and a transmission parameter of the target viewport in response to the virtual object entering the target viewport in the virtual scene;

[0149] The transmission control module 72 is configured to control the virtual object and the virtual camera to be transmitted to a target scene position based on the transmission parameter; wherein, during the transmission process, the virtual camera is kept at a preset camera binding position of the virtual object;

[0150] The transformation control module 73 is configured to control the virtual camera to be transformed from the camera binding position to a camera position corresponding to the first scene position based on the transmission parameter;

[0151] The shooting control module 74 is configured to control the virtual camera to shoot the virtual scene at the camera position to obtain a second scene picture.

[0152] The virtual camera control device described above provides a graphical user interface through a terminal device; the virtual camera is located in a virtual scene, the virtual camera is bound to a virtual object, and the virtual scene is photographed in a third-person perspective to obtain a first scene picture; the first scene picture is displayed on the graphical user interface; in response to the virtual object entering a target viewport in the virtual scene, a first scene position where the target viewport is located and a transmission parameter of the target viewport are acquired; the virtual object and the virtual camera are controlled to be transmitted to a target scene position based on the transmission parameter; wherein, during the transmission process, the virtual camera is kept at a preset camera binding position of the virtual object; the virtual camera is controlled to be transformed from the camera binding position to a camera position corresponding to the first scene position based on the transmission parameter; the virtual camera is controlled to shoot the virtual scene at the camera position to obtain a second scene picture.

[0153] In the manner, the virtual character and the bound virtual camera are transmitted at the same time after the virtual object enters the target viewport, but the virtual camera is transformed back to the camera position corresponding to the first scene position, and the virtual camera is controlled to shoot the virtual scene at the camera position, so that in vision, the virtual camera does not enter the target viewport after the virtual object enters the target viewport, the scene picture is avoided from being suddenly changed, the smoothness of the picture display is improved, and the virtual interaction experience of the user is improved.

[0154] The device further includes a viewport model detection module configured to detect whether a viewport model corresponding to the target viewport exists between the virtual camera and the virtual object, and determine that the virtual object enters the target viewport in response to the existence of the viewport model between the virtual camera and the virtual object.

[0155] The viewport model detection module is further configured to detect a first distance between the virtual camera and the virtual object, and a second distance between the virtual camera and the viewport model corresponding to the target viewport, and determine that the viewport model corresponding to the target viewport exists between the virtual camera and the virtual object if the first distance is greater than the second distance.

[0156] The transmission parameter includes a target scene position and a transmission rotation parameter of the first scene position transmitted to the target scene position, and the device further includes an orientation adjustment module configured to adjust an object orientation of the transmitted virtual object and / or a camera orientation of the virtual camera based on the transmission rotation parameter.

[0157] The transmission parameter includes a first scene position and a transmission rotation parameter of the first scene position transmitted to a target scene position, and the transformation control module is further configured to control the virtual camera to be reversely transmitted from the camera bound position to a camera position corresponding to the first scene position, and adjust the camera orientation of the virtual camera based on the transmission rotation parameter.

[0158] The device further includes a movement control module configured to control the virtual camera to move based on the transmission parameter in response to the movement of the virtual object, control the virtual camera to be transmitted to the camera bound position of the virtual object in response to the virtual camera entering the target viewport, and control the virtual camera to shoot the virtual scene at the camera bound position to obtain a third scene picture.

[0159] The device further includes a rotation angle adjustment module configured to obtain a vertical rotation angle of the virtual camera, adjust the vertical rotation angle until the vertical rotation angle is equal to a preset angle in response to the vertical rotation angle being not equal to the preset angle, and keep the camera orientation of the virtual camera unchanged during the adjustment of the vertical rotation angle.

[0160] The rotation angle adjustment module is further configured to generate a specified number of interpolation angles between the vertical rotation angle and the preset angle, wherein the specified number of interpolation angles are sequentially arranged, and the closer the arrangement position is to the interpolation angle of the preset angle, the closer the angle value of the interpolation angle is to the preset angle; and the vertical rotation angle is sequentially equal to the specified number of interpolation angles in the arrangement order until the vertical rotation angle is equal to the preset angle.

[0161] The viewport model corresponding to the target viewport is a patch model; the device further comprises a frustum region rendering module configured to, in response to the virtual camera and the patch model generating penetration, obtain a camera frustum of the virtual camera; wherein when the virtual camera and the patch model generate penetration, the camera frustum is divided into a first frustum region and a second frustum region by the patch model; the first frustum region is located outside the target viewport, and the second frustum region is located inside the target viewport; the first frustum region is rendered to obtain a first scene picture region; a specified model position on the patch model outside the second frustum region is obtained, the specified model position is adjusted to the second frustum region, and the adjusted second frustum region is rendered to obtain a second scene picture region; wherein the second scene picture region and the first scene picture region constitute a first scene picture.

[0162] The specified model position is located in a rear region of the virtual camera, and the specified model position and the second frustum region are located on the same side of the patch model; wherein the rear region of the virtual camera is divided based on a first plane perpendicular to a camera orientation of the virtual camera, the first plane divides the virtual scene into a front region and the rear region of the virtual camera; and the camera frustum is located in the front region.

[0163] The device further comprises a first material parameter setting module configured to pre-set a first material parameter of the specified model position on the patch model; wherein the first material parameter is used to indicate that when the specified model position is located outside the second frustum region, the specified model position is adjusted to the second frustum region.

[0164] The viewport model corresponding to the target viewport is a patch model; the device further comprises a sub-model rendering module configured to, in response to the virtual object being in the target viewport in the virtual scene, determine a first sub-model and a second sub-model of an object model of the virtual object divided by the patch model; wherein the first sub-model is located outside the target viewport, and the second sub-model is located inside the target viewport; the first sub-model is rendered to obtain a first object display region; an object model is copied at a position of the object model, the second sub-model of the copied object model is rendered to obtain a second object display region; wherein the second object display region and the first object display region constitute a complete virtual object.

[0165] The device further comprises a second material parameter setting module, configured to preset a second material parameter of a model position on the object model; wherein the second material parameter is used to indicate that when the model position on the object model is located within the target viewport, the rendering of the model position is stopped.

[0166] The device further comprises a third material parameter setting module, configured to preset a third material parameter of a model position on the copied object model; wherein the third material parameter is used to indicate that when the model position on the copied object model is located outside the target viewport, the rendering of the model position is stopped.

[0167] The device further comprises a component notification module, configured to, in response to a first movement instruction for the virtual object, control the virtual object to move in the virtual scene, and update object state data of the virtual object based on the first movement instruction, and notify the updated object state data to a scene component associated with the virtual object; in response to a second movement instruction for the virtual object, control the virtual object to move into the target viewport, and control the virtual object to be transferred to a target scene position based on a transfer parameter of the target viewport; update the object state data of the virtual object based on the second movement instruction and the target scene position, and notify the updated object state data to the scene component associated with the virtual object.

[0168] The virtual object carries a virtual firearm; the viewport model corresponding to the target viewport is a facet model; the device further comprises a sighting direction determination module, configured to, in response to the virtual object being located outside the target viewport and a firing position of the virtual firearm entering the target viewport, determine a camera front position of a virtual camera based on a camera orientation of the virtual camera, the facet model and the virtual object, and determine a sighting direction of the virtual firearm based on the camera front position and the camera orientation.

[0169] The sighting direction determination module is further configured to generate a ray passing through the virtual camera along the camera orientation of the virtual camera, generate a second plane passing through the virtual object and parallel to the facet model, and determine an intersection of the ray and the second plane as the camera front position of the virtual camera.

[0170] The sighting direction determination module is further configured to determine a reference position range based on the facet model, determine that the camera front position is located in the reference position range, and determine the sighting direction of the virtual firearm based on the camera front position and the camera orientation.

[0171] The device further comprises a camera front position determination module, configured to determine that the camera front position is not located in the reference position range, generate a third plane passing through the virtual object and parallel to an object orientation of the virtual object, and determine an intersection of the third plane and the ray as an updated camera front position.

[0172] The device further includes a detection module configured to generate a detection ray from the virtual camera as a starting point along a camera orientation of the virtual camera; determine a position of an intersection of the detection ray and a viewport model of the target viewport in response to the detection ray intersecting the viewport model; transmit the position of the intersection based on the transmission parameter to obtain a detection starting point; determine a detection direction based on the transmission parameter and the camera orientation; and detect a detection target along the detection direction from the detection starting point.

[0173] The detection ray is preset with a specified detection length; and the detection module is further configured to determine a ray length between the virtual camera and the position of the intersection; determine a length difference between the specified detection length and the ray length; control the ray to extend the length difference along the detection direction from the detection starting point; and determine the detection target based on a model detected by the ray.

[0174] The detection module is further configured to determine whether there is an occlusion between the detection starting point and the model detected by the ray; and determine the model detected by the ray as the detection target in response to a determination that there is no occlusion between the detection starting point and the model detected by the ray.

[0175] The embodiment further provides an electronic device including a processor and a memory, the memory storing computer executable instructions capable of being executed by the processor, and the processor executes the computer executable instructions to implement the control method of the virtual camera. The electronic device can be a server or a terminal device.

[0176] Referring to Figure 8 The electronic device includes a processor 100 and a memory 101, the memory 101 storing computer executable instructions capable of being executed by the processor 100, and the processor 100 executes the computer executable instructions to implement the control method of the virtual camera.

[0177] Further, Figure 8 The electronic device further includes a bus 102 and a communication interface 103, and the processor 100, the communication interface 103 and the memory 101 are connected through the bus 102.

[0178] The memory 101 can include a high-speed random access memory (RAM) and can further include a non-volatile memory such as at least one disk memory. The communication connection between the system network element and at least one other network element is realized through at least one communication interface 103 (which can be wired or wireless), and the Internet, a wide area network, a local area network, a metropolitan area network, etc. can be used. The bus 102 can be an ISA bus, a PCI bus or an EISA bus, etc. The bus can be divided into an address bus, a data bus, a control bus, etc. For ease of representation, Figure 8Only one bidirectional arrow is used to represent both directions, but this does not indicate that there is only one bus or only one type of bus.

[0179] The processor 100 can be an integrated circuit chip with processing capability. In implementation process, each step of the above method can be completed by integrated logic circuit of hardware in the processor 100 or by instructions in the form of software. The processor 100 described above can be a general processor, including a central processing unit (CPU), a network processor (NP), etc.; can also be a digital signal processor (DSP), an application specific integrated circuit (ASIC), a field-programmable gate array (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components. Each method, step and logic block disclosed in the embodiments of the present application can be implemented or executed. The general processor can be a microprocessor or the processor can also be any conventional processor. The steps of the method disclosed in combination with the embodiments of the present application can be directly embodied as a hardware code processor for execution, or a combination of hardware and software modules in the code processor for execution. The software module can be located in a random access memory, a flash memory, a read only memory, a programmable read only memory or an electrically erasable programmable memory, a register, etc. The storage medium in the art. The storage medium is located in the memory 101, and the processor 100 reads the information in the memory 101, and combines the hardware to complete the steps of the method of the above embodiment.

[0180] The processor in the above electronic device can implement the following operations in the control method of the virtual camera by executing computer executable instructions:

[0181] A graphical user interface is provided by a terminal device; a virtual camera is located in a virtual scene, the virtual camera is bound to a virtual object, and the virtual camera shoots the virtual scene in a third-person perspective to obtain a first scene picture; the first scene picture is displayed on the graphical user interface; in response to the virtual object entering a target viewport in the virtual scene, a first scene position where the target viewport is located and a transmission parameter of the target viewport are obtained; based on the transmission parameter, the virtual object and the virtual camera are controlled to be transmitted to the target scene position; wherein, during the transmission process, the virtual camera is kept at a preset camera binding position of the virtual object; based on the transmission parameter, the virtual camera is controlled to be transformed from the camera binding position to a camera position corresponding to the first scene position; the virtual camera is controlled to shoot the virtual scene at the camera position to obtain a second scene picture.

[0182] detecting whether there is a viewport model corresponding to the target viewport between the virtual camera and the virtual object; in response to the virtual camera and the virtual object existing the viewport model, determining that the virtual object enters the target viewport.

[0183] detecting a first distance between the virtual camera and the virtual object, and a second distance between the virtual camera and a viewport model corresponding to the target viewport; if the first distance is greater than the second distance, determining that there is a viewport model corresponding to the target viewport between the virtual camera and the virtual object.

[0184] The transmission parameters include: a target scene position, and a transmission rotation parameter of the first scene position to the target scene position; based on the transmission rotation parameter, adjusting the object orientation of the transmitted virtual object and / or the camera orientation of the virtual camera.

[0185] The transmission parameters include: a first scene position, and a transmission rotation parameter of the first scene position to the target scene position; controlling the virtual camera to be transmitted from the camera binding position to the camera position corresponding to the first scene position in reverse; based on the transmission rotation parameter, adjusting the camera orientation of the virtual camera.

[0186] In response to the movement of the virtual object, controlling the virtual camera to move based on the transmission parameters; in response to the virtual camera entering the target viewport, controlling the virtual camera to be transmitted to the camera binding position of the virtual object, and controlling the virtual camera to shoot the virtual scene at the camera binding position to obtain a third scene picture.

[0187] Obtaining a vertical rotation angle of the virtual camera; in response to the vertical rotation angle not being equal to a preset angle, adjusting the vertical rotation angle until the vertical rotation angle is equal to the preset angle; wherein, in the process of adjusting the vertical rotation angle, the camera orientation of the virtual camera is kept unchanged.

[0188] Generating a specified number of interpolation angles between the vertical rotation angle and the preset angle; wherein, the specified number of interpolation angles are sequentially arranged, and the closer the arrangement position of the interpolation angle to the preset angle, the closer the angle value of the interpolation angle to the preset angle; adjusting the vertical rotation angle to sequentially equal to the specified number of interpolation angles in the arrangement order until the vertical rotation angle is equal to the preset angle.

[0189] The viewport model corresponding to the target viewport is a patch model; in response to the virtual camera and the patch model generating penetration, a camera frustum of the virtual camera is obtained; wherein, when the virtual camera and the patch model generate penetration, the camera frustum is divided into a first frustum region and a second frustum region by the patch model; the first frustum region is located outside the target viewport, and the second frustum region is located inside the target viewport; the first frustum region is rendered to obtain a first scene picture region; a specified model position on the patch model outside the second frustum region is obtained, and the specified model position is adjusted to the second frustum region; the adjusted second frustum region is rendered to obtain a second scene picture region; wherein, the second scene picture region and the first scene picture region constitute a first scene picture.

[0190] The specified model position is located in a rear region of the virtual camera, and the specified model position and the second frustum region are located on the same side of the patch model; wherein, the rear region of the virtual camera is divided based on a first plane perpendicular to a camera orientation of the virtual camera, the first plane divides the virtual scene into a front region and the rear region of the virtual camera; the camera frustum is located in the front region.

[0191] A first material parameter of the specified model position on the patch model is preset; wherein, the first material parameter is used to indicate that when the specified model position is located outside the second frustum region, the specified model position is adjusted to the second frustum region.

[0192] The viewport model corresponding to the target viewport is a patch model; in response to the virtual object being in the target viewport in the virtual scene, a first sub-model and a second sub-model of an object model of the virtual object divided by the patch model are determined; wherein, the first sub-model is located outside the target viewport, and the second sub-model is located inside the target viewport; the first sub-model is rendered to obtain a first object display region; an object model is copied at a position of the object model, and a second sub-model of the copied object model is rendered to obtain a second object display region; wherein, the second object display region and the first object display region constitute a complete virtual object.

[0193] A second material parameter of a model position on the object model is preset; wherein, the second material parameter is used to indicate that when the model position on the object model is located inside the target viewport, the rendering of the model position is stopped.

[0194] A third material parameter of a model position on the copied object model is preset; wherein, the third material parameter is used to indicate that when the model position on the copied object model is located outside the target viewport, the rendering of the model position is stopped.

[0195] In response to a first movement instruction for the virtual object, the virtual object is controlled to move in the virtual scene, and object state data of the virtual object is updated based on the first movement instruction. The updated object state data is notified to a scene component associated with the virtual object. In response to a second movement instruction for the virtual object, the virtual object is controlled to move into a target viewport. The virtual object is transferred to a target scene position based on a transfer parameter of the target viewport. Based on the second movement instruction and the target scene position, the object state data of the virtual object is updated. The updated object state data is notified to the scene component associated with the virtual object.

[0196] The virtual object carries a virtual gun. The viewport model corresponding to the target viewport is a patch model. In response to the virtual object being located outside the target viewport and a firing position of the virtual gun entering the target viewport, a camera front position of the virtual camera is determined based on a camera orientation of the virtual camera, the patch model, and the virtual object. An aiming direction of the virtual gun is determined based on the camera front position and the camera orientation.

[0197] A ray is generated along the camera orientation of the virtual camera and passes through the virtual camera. A second plane is generated through the virtual object and parallel to the patch model. An intersection of the ray and the second plane is determined as the camera front position of the virtual camera.

[0198] A reference position range is determined based on the patch model. When the camera front position is located in the reference position range, an aiming direction of the virtual gun is determined based on the camera front position and the camera orientation.

[0199] When the camera front position is not located in the reference position range, a third plane is generated through the virtual object and parallel to an object orientation of the virtual object. An intersection of the third plane and the ray is determined as an updated camera front position.

[0200] A detection ray is generated along the camera orientation of the virtual camera with the virtual camera as a starting point. In response to the detection ray intersecting with a viewport model of the target viewport, an intersection position of the detection ray and the viewport model is determined. The intersection position is transferred based on the transfer parameter to obtain a detection starting point. A detection direction is determined based on the transfer parameter and the camera orientation. The detection is performed from the detection starting point along the detection direction to obtain a detection target.

[0201] The detection ray is preconfigured with a specified detection length. A ray length between the virtual camera and the intersection position is determined. A length difference between the specified detection length and the ray length is determined. The ray is controlled to extend by the length difference along the detection direction from the detection starting point. The detection target is determined based on a model detected by the ray.

[0202] It is determined whether there is an occlusion between the detection starting point and the model detected by the ray. When there is no occlusion between the detection starting point and the model detected by the ray, the model detected by the ray is determined as the detection target.

[0203] In the above manner, after the virtual object enters the target viewport, the virtual character and the bound virtual camera are transmitted at the same time, but the virtual camera is transformed to the camera position corresponding to the first scene position and controls the virtual camera to shoot the virtual scene at the camera position, so that visually, after the virtual object enters the target viewport, the virtual camera does not enter the target viewport, scene picture mutation is avoided, the smoothness of picture display is improved, and the virtual interaction experience of the user is improved.

[0204] The embodiment also provides a computer readable storage medium, which stores computer executable instructions. When the computer executable instructions are called and executed by a processor, the computer executable instructions cause the processor to implement the control method of the virtual camera.

[0205] The computer executable instructions stored in the above computer readable storage medium can implement the following operation in the control method of the virtual camera by executing the computer executable instructions.

[0206] A graphical user interface is provided by a terminal device. The virtual camera is located in a virtual scene. The virtual camera is bound to a virtual object and shoots the virtual scene in a third-person perspective to obtain a first scene picture. The first scene picture is displayed on the graphical user interface. In response to the virtual object entering a target viewport in the virtual scene, a first scene position where the target viewport is located and a transmission parameter of the target viewport are obtained. Based on the transmission parameter, the virtual object and the virtual camera are transmitted to the target scene position. During the transmission process, the virtual camera is kept at a preset camera binding position of the virtual object. Based on the transmission parameter, the virtual camera is transformed from the camera binding position to a camera position corresponding to the first scene position. The virtual camera is controlled to shoot the virtual scene at the camera position to obtain a second scene picture.

[0207] It is detected whether there is a viewport model corresponding to the target viewport between the virtual camera and the virtual object. In response to the existence of the viewport model between the virtual camera and the virtual object, it is determined that the virtual object enters the target viewport.

[0208] It is detected that a first distance between the virtual camera and the virtual object and a second distance between the virtual camera and a viewport model corresponding to the target viewport. If the first distance is greater than the second distance, it is determined that there is a viewport model corresponding to the target viewport between the virtual camera and the virtual object.

[0209] The transmission parameter includes the target scene position and a transmission rotation parameter of the transmission of the first scene position to the target scene position. Based on the transmission rotation parameter, an object orientation of the transmitted virtual object and / or a camera orientation of the virtual camera are adjusted.

[0210] The transmission parameter comprises a first scene position and a transmission rotation parameter of the first scene position transmitted to a target scene position; the virtual camera is controlled to be inversely transmitted from a camera binding position to a camera position corresponding to the first scene position; and the camera orientation of the virtual camera is adjusted based on the transmission rotation parameter.

[0211] The virtual camera is controlled to move based on the transmission parameter in response to the movement of the virtual object; and the virtual camera is controlled to be transmitted to the camera binding position of the virtual object in response to the virtual camera entering the target viewport, and the virtual camera is controlled to capture the virtual scene at the camera binding position to obtain a third scene picture.

[0212] A vertical rotation angle of the virtual camera is obtained; the vertical rotation angle is adjusted until the vertical rotation angle is equal to a preset angle in response to the vertical rotation angle not being equal to the preset angle; and the camera orientation of the virtual camera is kept unchanged during the adjustment of the vertical rotation angle.

[0213] A specified number of interpolation angles are generated between the vertical rotation angle and the preset angle; the specified number of interpolation angles are sequentially arranged, and the interpolation angle closer to the preset angle in the arrangement has an angle value closer to the preset angle; and the vertical rotation angle is adjusted to sequentially equal to the specified number of interpolation angles in the arrangement order until the vertical rotation angle is equal to the preset angle.

[0214] The viewport model corresponding to the target viewport is a face model; a camera frustum of the virtual camera is obtained in response to the virtual camera and the face model being interpenetrated; when the virtual camera and the face model are interpenetrated, the camera frustum is divided into a first frustum region and a second frustum region by the face model; the first frustum region is located outside the target viewport, and the second frustum region is located inside the target viewport; a first scene picture region is obtained by rendering the first frustum region; a specified model position on the face model located outside the second frustum region is obtained, and the specified model position is adjusted to be in the second frustum region; a second scene picture region is obtained by rendering the adjusted second frustum region; and the second scene picture region and the first scene picture region constitute a first scene picture.

[0215] The specified model position is located in a rear region of the virtual camera and is located on the same side of the face model as the second frustum region; the rear region of the virtual camera is divided based on a first plane perpendicular to the camera orientation of the virtual camera, the first plane divides the virtual scene into a front region and the rear region of the virtual camera; and the camera frustum is located in the front region.

[0216] A first material parameter of the specified model position on the face model is preset; the first material parameter is used to indicate that the specified model position is adjusted to be in the second frustum region when the specified model position is located outside the second frustum region.

[0217] The viewport model corresponding to the target viewport is a patch model; in response to the virtual object entering the target viewport in the virtual scene, determining a first sub-model and a second sub-model of the object model of the virtual object divided by the patch model; wherein the first sub-model is located outside the target viewport, and the second sub-model is located inside the target viewport; rendering the first sub-model to obtain a first object display area; copying an object model at the position of the object model, rendering the second sub-model of the copied object model to obtain a second object display area; wherein the second object display area and the first object display area constitute a complete virtual object.

[0218] The second material parameter of the model position on the object model is set in advance; wherein the second material parameter is used to indicate that when the model position on the object model is located inside the target viewport, the rendering of the model position is stopped.

[0219] The third material parameter of the model position on the copied object model is set in advance; wherein the third material parameter is used to indicate that when the model position on the copied object model is located outside the target viewport, the rendering of the model position is stopped.

[0220] In response to a first movement instruction for the virtual object, the virtual object is controlled to move in the virtual scene, and the object state data of the virtual object is updated based on the first movement instruction, and the updated object state data is notified to the scene component associated with the virtual object; in response to a second movement instruction for the virtual object, the virtual object is controlled to move into the target viewport, and the virtual object is controlled to be transferred to the target scene position based on the transfer parameter of the target viewport; based on the second movement instruction and the target scene position, the object state data of the virtual object is updated, and the updated object state data is notified to the scene component associated with the virtual object.

[0221] The virtual object carries a virtual gun; the viewport model corresponding to the target viewport is a patch model; in response to the virtual object being located outside the target viewport and the firing position of the virtual gun entering the target viewport, a camera front position of the virtual camera is determined based on the camera orientation of the virtual camera, the patch model and the virtual object; based on the camera front position and the camera orientation, the aiming direction of the virtual gun is determined.

[0222] A ray is generated along the camera orientation of the virtual camera and passes through the virtual camera; a second plane is generated which passes through the virtual object and is parallel to the patch model; the intersection of the ray and the second plane is determined as the camera front position of the virtual camera.

[0223] A reference position range is determined based on the patch model; the camera front position is located in the reference position range, and the aiming direction of the virtual gun is determined based on the camera front position and the camera orientation.

[0224] The intersection of the third plane and the ray is determined as an updated camera front position.

[0225] A detection ray is generated from the virtual camera along the camera orientation of the virtual camera; in response to the detection ray intersecting with a viewport model of the target viewport, a position of the intersection of the detection ray and the viewport model is determined; the position of the intersection is transmitted based on the transmission parameter to obtain a detection starting point; a detection direction is determined based on the transmission parameter and the camera orientation; and the detection target is detected from the detection starting point along the detection direction.

[0226] The detection ray is preset with a specified detection length; a ray length between the virtual camera and the position of the intersection is determined; a length difference between the specified detection length and the ray length is determined; the ray is controlled to extend from the detection starting point along the detection direction by the length difference; and the detection target is determined based on the model detected by the ray.

[0227] It is determined whether there is an occlusion between the detection starting point and the model detected by the ray; and the model detected by the ray is determined as the detection target when it is determined that there is no occlusion between the detection starting point and the model detected by the ray.

[0228] In the above manner, after the virtual object enters the target viewport, the virtual character and the bound virtual camera are transmitted at the same time, but the virtual camera is transformed back to the camera position corresponding to the first scene position, and the virtual camera is controlled to shoot the virtual scene at the camera position, so that, in vision, the virtual camera does not enter the target viewport after the virtual object enters the target viewport, scene picture mutation is avoided, the smoothness of picture display is improved, and the virtual interaction experience of the user is improved.

[0229] The computer program product of the virtual camera control method, device and electronic equipment provided in the embodiment of the application includes a computer readable storage medium storing program codes, the program codes include instructions for executing the method described in the foregoing method embodiments, and specific implementation can be referred to the method embodiments, which will not be described herein.

[0230] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working process of the system and device described above can refer to the corresponding process in the foregoing method embodiments, which will not be described herein.

[0231] In addition, in the description of the embodiments of the present application, unless otherwise explicitly specified and limited, the terms "mounting", "connection", "connecting" should be understood in a broad sense, for example, can be fixedly connected, can be detachably connected, or integrally connected; can be mechanically connected, can be electrically connected; can be directly connected, can be indirectly connected through an intermediate medium, or can be the communication inside two elements. For those skilled in the art, the specific meaning of the above terms in the present application can be understood according to the specific circumstances.

[0232] If the functions are realized in the form of software function units and sold or used as independent products, they can be stored in a computer readable storage medium. Based on such understanding, the technical solutions of the present application or the part of the prior art that essentially contributes to the present application or the part of the technical solutions can be embodied in the form of a software product, which is stored in a storage medium and includes a plurality of instructions for causing a computer device (which can be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the method described in the embodiments of the present application. The aforementioned storage medium includes: a U disk, a mobile hard disk, a read-only memory (ROM, Read-Only Memory), a random access memory (RAM, Random Access Memory), a magnetic disk or an optical disk, and various program code storage media.

[0233] In the description of the present application, it should be noted that the terms "center", "upper", "lower", "left", "right", "vertical", "horizontal", "inner", "outer" and the like indicate the orientation or positional relationship based on the orientation or positional relationship shown in the drawings, and are only for the convenience of describing the present application and simplifying the description, and do not indicate or imply that the devices or elements referred to must have a particular orientation, be constructed and operated in a particular orientation, and therefore cannot be understood as limiting the present application. In addition, the terms "first", "second", "third" are only for descriptive purposes and cannot be understood as indicating or implying relative importance.

[0234] Finally, it should be noted that: the above embodiments are only specific embodiments of the present application, which are used to illustrate the technical solutions of the present application, and are not limited thereto, the protection scope of the present application is not limited thereto, although the present application has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that any person skilled in the art within the technical range disclosed by the present application can modify or easily think of changes to the technical solutions recorded in the foregoing embodiments, or make equivalent replacement to part of the technical features; and these modifications, changes or replacements do not make the corresponding technical solutions deviate from the spirit and scope of the technical solutions of the embodiments of the present application, and should be covered in the protection scope of the present application. Therefore, the protection scope of the present application should be subject to the protection scope of the claims.

Claims

1. A method for controlling a virtual camera, characterized in that: A graphical user interface is provided through a terminal device; the virtual camera is located in a virtual scene, the virtual camera is bound to a virtual object, and the virtual scene is photographed from a third-person perspective to obtain a first scene image; The first scene image is displayed on the graphical user interface; the method includes: In response to the virtual object entering a target viewport in the virtual scene, obtaining a first scene position where the target viewport is located and a transmission parameter of the target viewport; Based on the transmission parameters, controlling the virtual object and the virtual camera to be transmitted to a target scene position; wherein, during the transmission process, the virtual camera remains at a preset camera binding position of the virtual object; Based on the transmission parameters, controlling the virtual camera to transform from the camera binding position to a camera position corresponding to the first scene position; The virtual camera is controlled to shoot the virtual scene at the camera position to obtain a second scene image.

2. The method according to claim 1, characterized in that Before the step of obtaining a first scene position of the target viewport and a transmission parameter of the target viewport in response to the virtual object entering the target viewport in the virtual scene, the method further includes: Detecting whether there is a viewport model corresponding to the target viewport between the virtual camera and the virtual object; In response to the viewport model existing between the virtual camera and the virtual object, it is determined that the virtual object enters the target viewport.

3. The method according to claim 2, characterized in that The step of detecting whether there is a viewport model corresponding to the target viewport between the virtual camera and the virtual object includes: detecting a first distance between the virtual camera and the virtual object, and a second distance between the virtual camera and a viewport model corresponding to the target viewport; If the first distance is greater than the second distance, it is determined that a viewport model corresponding to the target viewport exists between the virtual camera and the virtual object.

4. The method according to claim 1, wherein The transmission parameters include: the target scene position, and a transmission rotation parameter for transmitting the first scene position to the target scene position; After the step of controlling the virtual object and the virtual camera to be transmitted to the target scene position based on the transmission parameters, the method further includes: Based on the transmission rotation parameter, the object orientation of the transmitted virtual object and / or the camera orientation of the virtual camera are adjusted.

5. The method according to claim 1, wherein The transmission parameters include: the first scene position, and a transmission rotation parameter for transmitting the first scene position to the target scene position; The step of controlling the virtual camera to transform from the camera binding position to the camera position corresponding to the first scene position based on the transmission parameters includes: Controlling the virtual camera to be transmitted in reverse from the camera binding position to the camera position corresponding to the first scene position; Based on the transferred rotation parameter, the camera orientation of the virtual camera is adjusted.

6. The method according to claim 1, characterized in that After the step of controlling the virtual camera to transform from the camera binding position to the camera position corresponding to the first scene position based on the transmission parameters, the method further includes: controlling movement of the virtual camera based on the transmission parameters in response to movement of the virtual object; In response to the virtual camera entering the target viewport, the virtual camera is controlled to be transferred to the camera binding position of the virtual object, and the virtual camera is controlled to shoot the virtual scene at the camera binding position to obtain a third scene image.

7. The method according to claim 1, characterized in that After the step of controlling the virtual camera to transform from the camera binding position to the camera position corresponding to the first scene position based on the transmission parameters, the method further includes: Obtaining the vertical rotation angle of the virtual camera; In response to the vertical rotation angle not being equal to the preset angle, the vertical rotation angle is adjusted until the vertical rotation angle is equal to the preset angle; wherein, during the process of adjusting the vertical rotation angle, the camera orientation of the virtual camera is kept unchanged.

8. The method according to claim 7, characterized in that The step of adjusting the vertical rotation angle until the vertical rotation angle is equal to the preset angle includes: generating a specified number of interpolation angles between the vertical rotation angle and the preset angle; wherein the specified number of interpolation angles are arranged in sequence, and the closer the arrangement position of the interpolation angle is to the preset angle, the closer the angle value of the interpolation angle is to the preset angle; The vertical rotation angle is adjusted to be equal to the specified number of interpolation angles in order of arrangement until the vertical rotation angle is equal to the preset angle.

9. The method according to claim 1, characterized in that The viewport model corresponding to the target viewport is a patch model; before the step of obtaining the first scene position of the target viewport and the transmission parameters of the target viewport in response to the virtual object entering the target viewport in the virtual scene, the method further includes: In response to the virtual camera and the mesh model intersecting, obtaining a camera cone of the virtual camera; wherein, when the virtual camera and the mesh model intersect, the camera cone is divided into a first cone area and a second cone area by the mesh model; the first cone area is located outside the target viewport, and the second cone area is located inside the target viewport; Rendering the first viewing cone area to obtain a first scene image area; Acquire a designated model position on the patch model that is outside the second viewing cone area, and adjust the designated model position to the second viewing cone area; Render the adjusted second visual cone area to obtain a second scene picture area; wherein the second scene picture area and the first scene picture area constitute the first scene picture.

10. The method according to claim 9, characterized in that The designated model position is located in the rear area of ​​the virtual camera, and the designated model position and the second viewing cone area are located on the same side of the patch model; The rear area of ​​the virtual camera is divided based on a first plane perpendicular to the camera orientation of the virtual camera, and the first plane divides the virtual scene into a front area and a rear area of ​​the virtual camera; the camera cone is located in the front area.

11. The method according to claim 9, characterized in that Before the steps of obtaining a designated model position on the patch model that is outside the second viewing cone area and adjusting the designated model position to the second viewing cone area, the method further includes: Pre-set a first material parameter for a specified model position on the patch model; wherein the first material parameter is used to indicate: when the specified model position is outside the second viewing cone area, control the specified model position to be adjusted to the second viewing cone area.

12. The method according to claim 1, characterized in that The viewport model corresponding to the target viewport is a patch model; the method further includes: In response to the virtual object entering a target viewport in the virtual scene, determining that the object model of the virtual object is divided into a first sub-model and a second sub-model by the patch model; wherein the first sub-model is located outside the target viewport and the second sub-model is located inside the target viewport; Rendering the first sub-model to obtain a first object display area; An object model is copied at the location of the object model, and a second sub-model of the copied object model is rendered to obtain a second object display area; wherein the second object display area and the first object display area constitute the complete virtual object.

13. The method according to claim 12, characterized in that Before the step of rendering the first sub-model to obtain the first object display area, the method further includes: Pre-setting a second material parameter of a model position on the object model; wherein the second material parameter is used to indicate: when the model position on the object model is within the target viewport, stop rendering the model position.

14. The method according to claim 12, characterized in that Before rendering the copied second sub-model of the object model to obtain a second object display area, the method further includes: Presetting a third material parameter of a model position on the copied object model; wherein the third material parameter is used to indicate: when the model position on the copied object model is outside the target viewport, stop rendering the model position.

15. The method according to claim 1, wherein The method further comprises: In response to a first movement instruction for the virtual object, controlling the virtual object to move in the virtual scene, updating object state data of the virtual object based on the first movement instruction, and notifying the scene component associated with the virtual object of the updated object state data; In response to a second movement instruction for the virtual object, controlling the virtual object to move into the target viewport, and controlling the virtual object to be transferred to the target scene position based on a transfer parameter of the target viewport; Based on the second movement instruction and the target scene position, the object state data of the virtual object is updated, and the updated object state data is notified to the scene component associated with the virtual object.

16. The method according to claim 1, wherein The virtual object carries a virtual firearm; the viewport model corresponding to the target viewport is a patch model; Before the step of acquiring the first scene position of the target viewport and the transmission parameters of the target viewport in response to the virtual object entering the target viewport in the virtual scene, the method further includes: In response to the virtual object being outside the target viewport and the firing position of the virtual firearm entering the target viewport, determining a camera front position of the virtual camera based on a camera orientation of the virtual camera, the mesh model, and the virtual object; An aiming direction of the virtual firearm is determined based on the camera front position and the camera orientation.

17. The method according to claim 16, characterized in that The step of determining a camera front position of the virtual camera based on the camera orientation of the virtual camera, the patch model, and the virtual object comprises: generating a ray passing through the virtual camera along the camera orientation of the virtual camera; generating a second plane passing through the virtual object and parallel to the mesh model; An intersection point between the ray and the second plane is determined as a front position of the virtual camera.

18. The method according to claim 16, characterized in that The step of determining the aiming direction of the virtual firearm based on the camera front position and the camera orientation includes: Determining a reference position range based on the patch model; It is determined that the front position of the camera is located in the reference position range, and based on the front position of the camera and the camera orientation, an aiming direction of the virtual firearm is determined.

19. The method according to claim 18, characterized in that The method further comprises: Determining that the front position of the camera is not within the reference position range, and generating a third plane passing through the virtual object and parallel to the object orientation of the virtual object; An intersection point between the third plane and the ray is determined as an updated camera front position.

20. The method according to claim 1, wherein Before the step of obtaining a first scene position of the target viewport and a transmission parameter of the target viewport in response to the virtual object entering the target viewport in the virtual scene, the method further includes: Taking the virtual camera as a starting point, generating a detection ray along the camera orientation of the virtual camera; In response to the detection ray intersecting with the viewport model of the target viewport, determining a position of an intersection of the detection ray and the viewport model; Based on the transmission parameters, the intersection position is transmitted to obtain a detection starting point; based on the transmission parameters and the camera orientation, a detection direction is determined; Starting from the detection starting point, detection is performed along the detection direction to obtain a detection target.

21. The method according to claim 20, characterized in that The detection ray is preset with a specified detection length; the step of starting from the detection starting point and detecting along the detection direction to obtain the detection target includes: determining a ray length between the virtual camera and the intersection position; determining a length difference between the designated detection length and the ray length; The ray is controlled to start from the detection starting point and extend along the detection direction by the length difference; and a detection target is determined based on a model detected by the ray.

22. The method according to claim 21, characterized in that The step of determining a detection target based on the model detected by the ray comprises: Determine whether there is any occlusion between the detection starting point and the model detected by the ray; It is determined that there is no occlusion between the detection starting point and the model detected by the ray, and the model detected by the ray is determined as a detection target.

23. A virtual camera control device, characterized in that: A graphical user interface is provided through a terminal device; the virtual camera is located in a virtual scene, the virtual camera is bound to a virtual object, and the virtual scene is photographed from a third-person perspective to obtain a first scene image; The first scene image is displayed on the graphical user interface; the device includes: a position and parameter acquisition module, configured to acquire, in response to the virtual object entering a target viewport in the virtual scene, a first scene position where the target viewport is located and transmission parameters of the target viewport; A transmission control module, configured to control the transmission of the virtual object and the virtual camera to a target scene location based on the transmission parameters; wherein, during the transmission process, the virtual camera remains at a preset camera binding position of the virtual object; a transformation control module, configured to control the virtual camera to transform from the camera binding position to a camera position corresponding to the first scene position based on the transmission parameters; The shooting control module is used to control the virtual camera to shoot the virtual scene at the camera position to obtain a second scene image.

24. An electronic device, characterized in that: The method comprises a processor and a memory, wherein the memory stores computer-executable instructions that can be executed by the processor, and the processor executes the computer-executable instructions to implement the virtual camera control method according to any one of claims 1 to 22.

25. A computer-readable storage medium, characterized in that The computer-readable storage medium stores computer-executable instructions. When the computer-executable instructions are called and executed by a processor, the computer-executable instructions prompt the processor to implement the virtual camera control method according to any one of claims 1 to 22.