Virtual camera control method, device and electronic device

By sampling points of discrete virtual plots on the terminal device and generating continuous reference surfaces, the problem that the virtual camera cannot move on the discrete plots is solved, and the continuous motion and operation of the virtual camera are simplified.

CN113926191BActive Publication Date: 2024-12-20NETEASE (HANGZHOU) NETWORK CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202111372360.0
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-11-18
Publication Date
2024-12-20
Estimated Expiration
2041-11-18

AI Technical Summary

Technical Problem

In the prior art, virtual cameras cannot continuously move on discrete virtual plots, resulting in unreal shooting scenes.

Method used

By providing a graphical user interface on the terminal device, multiple points on the discrete virtual plot are sampled, continuous reference surfaces are generated, and the movement of the virtual camera is controlled according to these reference surfaces.

Benefits of technology

The continuous movement of the virtual camera on discrete virtual plots is realized, simplifying player operations and improving the gaming experience.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN113926191B_ABST
    Figure CN113926191B_ABST
Patent Text Reader

Abstract

The present invention discloses a method, device and electronic device for controlling a virtual camera. A graphical user interface is provided through a terminal device, and the method comprises: displaying a game scene captured by a virtual camera through a graphical user interface, wherein the game scene includes multiple virtual plots, wherein the multiple virtual plots are separated from each other; sampling the multiple virtual plots respectively to obtain multiple sampling points; connecting the multiple sampling points to generate multiple continuous reference surfaces; and controlling the virtual camera to move according to the multiple reference surfaces. The present invention solves the technical problem in the prior art that a virtual camera cannot move continuously on discrete virtual plots.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of computers, and in particular to a method, device and electronic equipment for controlling a virtual camera. Background Art

[0002] The virtual camera in the game is usually used to shoot the game scene, so that the player can observe the game scene and play the game. The virtual camera can shoot the game scene in the form of a bird's-eye view. For example, in the camera navigation of a business simulation game, the virtual camera moves with the ups and downs of the continuous surface in the game scene.

[0003] However, in the prior art, the camera navigation solution for continuous surfaces is not suitable for scenes with discrete plots. If the camera navigation solution for continuous surfaces is adopted, when the camera moves to the blank area of ​​the discrete plots, the virtual camera may fall due to the lack of support from the plots, or even if it does not fall, the height difference between the discrete plots may cause the scene image captured by the camera to appear unrealistic. Therefore, the prior art lacks a navigation solution for the virtual camera in the game scene containing discrete plots.

[0004] To address the above-mentioned problems, no effective solution has been proposed yet. Summary of the invention

[0005] The embodiments of the present invention provide a method, an apparatus and an electronic device for controlling a virtual camera, so as to at least solve the technical problem in the prior art that a virtual camera cannot move continuously on discrete virtual plots.

[0006] According to one aspect of an embodiment of the present invention, a method for controlling a virtual camera is provided, wherein a graphical user interface is provided through a terminal device, and the method comprises: displaying a game scene captured by a virtual camera through a graphical user interface, wherein the game scene includes multiple virtual plots, wherein the multiple virtual plots are separated from each other; sampling the multiple virtual plots respectively to obtain multiple sampling points; connecting the multiple sampling points to generate multiple continuous reference surfaces; and controlling the movement of the virtual camera according to the multiple reference surfaces.

[0007] Furthermore, the method for controlling a virtual camera further includes: before performing a connection operation on the plurality of sampling points to generate a plurality of continuous reference surfaces, determining that an editing completion instruction for at least one of the plurality of virtual plots is received.

[0008] Furthermore, the method of virtual camera control also includes: when a touch operation on an editing completion control is received, or when it is detected that the edited state of at least one of the multiple virtual plots meets a preset condition, generating an editing completion instruction for at least one of the multiple virtual plots.

[0009] Furthermore, the method of virtual camera control also includes: projecting multiple sampling points onto a preset plane to obtain reference points on the preset plane corresponding to the multiple sampling points respectively; performing a triangulation operation based on the multiple reference points to obtain a triangulation result; and performing a connection operation on the multiple sampling points based on the triangulation result to generate multiple continuous reference surfaces.

[0010] Furthermore, the method for controlling a virtual camera also includes: obtaining an association relationship between the virtual camera and a plurality of reference surfaces; obtaining navigation coordinates corresponding to the virtual camera according to the association relationship and the plurality of reference surfaces; and controlling the movement of the virtual camera according to the navigation coordinates.

[0011] Furthermore, the method for controlling the virtual camera also includes: generating drag data in response to a drag operation on the game scene; and determining an association relationship between the virtual camera and a plurality of reference surfaces according to the drag data.

[0012] Furthermore, the method for controlling a virtual camera also includes: obtaining initial coordinates corresponding to the virtual camera and the multiple reference surfaces according to the association relationship and the multiple reference surfaces; and correcting the initial coordinates according to a preset algorithm to obtain navigation coordinates corresponding to the virtual camera.

[0013] Furthermore, the method for controlling a virtual camera also includes: adjusting the angle of the virtual camera during movement according to a plurality of reference surfaces.

[0014] According to another aspect of an embodiment of the present invention, a device for controlling a virtual camera is provided, which provides a graphical user interface through a terminal device, and includes: a display module, which is used to display a game scene captured by a virtual camera through a graphical user interface, wherein the game scene includes multiple virtual plots, wherein the multiple virtual plots are separated from each other; a sampling module, which is used to sample the multiple virtual plots respectively to obtain multiple sampling points; a connection module, which is used to connect the multiple sampling points to generate multiple continuous reference surfaces; and a control module, which is used to control the movement of the virtual camera according to the multiple reference surfaces.

[0015] According to another aspect of an embodiment of the present invention, a computer-readable storage medium is provided, in which a computer program is stored. The computer program is configured to execute the above-mentioned virtual camera control method when running.

[0016] According to another aspect of an embodiment of the present invention, an electronic device is also provided, which includes one or more processors; a storage device for storing one or more programs, when the one or more programs are executed by the one or more processors, the one or more processors are implemented to run the programs, wherein the programs are configured to execute the above-mentioned method of virtual camera control when running.

[0017] In an embodiment of the present invention, discrete plots are sampled and connected to generate a continuous reference surface. The game scene captured by the virtual camera is displayed on a graphical user interface provided by a terminal device, and multiple virtual plots summarized in the game scene are sampled separately to obtain multiple sampling points. The multiple sampling points are then connected to generate multiple continuous reference surfaces. Finally, the virtual camera is controlled to move according to the multiple reference surfaces, wherein the multiple virtual plots are separated from each other.

[0018] In the above process, multiple virtual plots are separated from each other, that is, multiple virtual plots are in a discrete state. In the present application, by connecting multiple sampling points on multiple virtual plots in a discrete state, a continuous reference surface is generated from a discontinuous reference surface, so that the virtual camera can move continuously in the game scene, and the continuous movement of the virtual camera in multiple virtual plots in a discrete state is realized. Moreover, compared with the prior art, in the present application, the player only needs to perform two-dimensional operations on the virtual camera to realize the viewing of the game scene, which simplifies the operation of the virtual camera.

[0019] It can be seen that the solution provided in the present application achieves the purpose of enabling the virtual camera to move continuously in multiple virtual plots in a discrete state, thereby realizing the technical effect of applying the virtual camera to discrete virtual plots, and further solving the technical problem in the prior art that the virtual camera cannot move continuously on discrete virtual plots. BRIEF DESCRIPTION OF THE DRAWINGS

[0020] The drawings described herein are used to provide a further understanding of the present invention and constitute a part of this application. The exemplary embodiments of the present invention and their descriptions are used to explain the present invention and do not constitute an improper limitation of the present invention. In the drawings:

[0021] Figure 1 It is a schematic diagram of camera navigation on a continuous surface according to the prior art;

[0022] Figure 2 is a schematic diagram of camera navigation on a discrete surface according to the prior art;

[0023] Figure 3 is a flow chart of a method for controlling a virtual camera according to an embodiment of the present invention;

[0024] Figure 4 is a top view of an optional virtual plot according to an embodiment of the present invention;

[0025] Figure 5 is a schematic diagram of an optional shape editing of a virtual land parcel according to an embodiment of the present invention;

[0026] Figure 6is a schematic diagram of an optional triangulation according to an embodiment of the present invention;

[0027] Figure 7 is a schematic diagram of a grid of an optional navigation surface according to an embodiment of the present invention;

[0028] Figure 8 4 is a schematic diagram of a virtual camera control device according to an embodiment of the present invention. DETAILED DESCRIPTION

[0029] In order to enable those skilled in the art to better understand the scheme of the present invention, the technical scheme in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of the present invention.

[0030] It should be noted that the terms "first", "second", etc. in the specification and claims of the present invention and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchanged where appropriate, so that the embodiments of the present invention described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device that includes a series of steps or units is not necessarily limited to those steps or units that are clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.

[0031] According to an embodiment of the present invention, a method embodiment of virtual camera control is provided. It should be noted that the steps shown in the flowchart of the accompanying drawings can be executed in a computer system such as a set of computer executable instructions, and although a logical order is shown in the flowchart, in some cases, the steps shown or described can be executed in an order different from that shown here.

[0032] In addition, it should be noted that the terminal device running the game can execute the method of controlling the virtual camera provided in this embodiment, wherein the terminal device can be a portable terminal device (e.g., a smart phone, a smart tablet), or a non-mobile device (e.g., a computer). Optionally, in this embodiment, a graphical user interface is provided by the terminal device, and the graphical user interface can display the game scene captured by the virtual camera.

[0033] In an optional embodiment, Figure 3is a flow chart of a method for controlling a virtual camera according to an embodiment of the present invention. Figure 3 As shown, the method comprises the following steps:

[0034] Step S302: displaying a game scene captured by a virtual camera through a graphical user interface, wherein the game scene includes a plurality of virtual plots, wherein the plurality of virtual plots are separated from each other.

[0035] In step S302, the multiple virtual plots refer to terrain blocks in the game, and the multiple virtual plots are separated from each other, which means that the multiple virtual plots are not connected. Figure 2 In the example, two virtual plots are not connected. In addition, there may be height differences between multiple virtual plots, for example, Figure 2 In the embodiment, there is a height difference between two virtual plots. Optionally, in the present application, multiple virtual plots are separated from each other, which means that the multiple virtual plots are not connected, and there is a height difference between the multiple virtual plots.

[0036] In an optional embodiment, in a simulation business game based on a floating island, after detecting a game start command, the terminal device acquires the game scene captured by the virtual camera in real time, and displays the game scene captured by the virtual camera to the player through a graphical user interface. The player can then play the game according to the game scene displayed by the terminal device.

[0037] Step S304: sampling the multiple virtual plots respectively to obtain multiple sampling points.

[0038] In step S304, during the process of sampling the multiple virtual plots, the terminal device displays the multiple virtual plots in a graphical user interface in a top-down perspective, so that the multiple virtual plots are displayed in a two-dimensional space. Optionally, during the process of sampling the multiple virtual plots, the positions of the sampling points on each virtual plot may be the same or different. For example, Figure 4 In the top view of the virtual plots shown, the number of sampling points on the two virtual plots is the same, but the positions of the sampling points on the virtual plots are different.

[0039] In an optional embodiment, each virtual plot is a standard module, and the terminal device can receive the sampling instruction of the player, and after receiving the sampling instruction of the player, perform sampling processing on multiple virtual plots. Optionally, after receiving the sampling instruction, the terminal device enters the sampling mode, in which the player can mark the sampling point on each virtual plot by clicking the mouse or touching the finger. For example, Figure 4 In the game, the player marked three sampling points on two virtual plots.

[0040] In an optional embodiment, after receiving the sampling instruction, the terminal device enters a sampling mode, in which the electronic device calls a preset sampling algorithm to automatically sample each virtual plot. Optionally, the terminal device determines the number of sampling points and the location of the sampling points for each virtual plot by running a preset sampling algorithm. Among them, the terminal device determines the number of sampling points and the location of the sampling points for each virtual plot based on the shape information, area information, and location information of each virtual plot, and in combination with the game scene. For example, the terminal device determines the number of sampling points based on the area of ​​the virtual plot, such as setting one sampling point for a small virtual plot, and setting multiple sampling points for a larger virtual plot, thereby avoiding the problem of waste of system resources caused by setting a large number of sampling points for a smaller virtual plot, thereby saving system performance and maximizing the utilization of system resources.

[0041] In an optional embodiment, after receiving the sampling instruction, the terminal device enters a sampling mode, in which the terminal device reads relevant information of the sampling points from a preset storage area, and samples each virtual plot according to the relevant information of the sampling points read. The above-mentioned sampling point information may be, but is not limited to, the number information and location information of the sampling points. The designer may mark the sampling points in advance and store the relevant information of the sampling points.

[0042] Step S306: Connect the multiple sampling points to generate multiple continuous reference surfaces.

[0043] It should be noted that in step S304, the multiple virtual plots are not connected, and there is a height difference between the multiple virtual plots. In step S306, multiple virtual plots in a discrete state (i.e., multiple virtual plots are not connected) are connected by connecting multiple sampling points on the multiple virtual plots, thereby generating multiple continuous reference surfaces, which are used for the navigation of the virtual camera, thereby solving the problem in the prior art that the virtual camera cannot navigate in the game scene of discrete plots.

[0044] Step S308: controlling the virtual camera to move according to the multiple reference surfaces.

[0045] It should be noted that the reference surface generated by step S306 is a continuous reference surface, that is, through step S306, the terminal device generates a complete and continuous plurality of reference surfaces through a plurality of virtual plots in a discrete state, so that in step S308, the terminal device can control the virtual camera to move along the reference surface according to certain rules, and then the player can move the virtual camera continuously within the control composed of the plurality of virtual plots in a discrete state.

[0046] In addition, it should be noted that in the prior art, the camera navigation solution for continuous surfaces is not applicable to scenes with discrete plots of land. Figure 1 In the schematic diagram of camera navigation on a continuous surface shown, the essence of camera navigation on a continuous surface is that a virtual camera moves on a continuous surface at a certain height with the surface according to certain rules. In this scheme, the surface is usually a preset and continuous surface, and this scheme cannot be applied to discrete plots of multiple unconnected surfaces with height differences. For discrete plots, when the virtual camera moves to the boundary of the current plot, the virtual camera may fall because it has no support from the ground. Even if the virtual camera floats in the game scene, when the virtual camera is moved, the virtual camera is too far away from the low-altitude surface and too close to the high-altitude surface, so that the virtual camera cannot capture the game scene that fluctuates with the surface well. For example, in a game scene of a simulation business game based on a floating island, if the game designer does not place plots in a certain area, there will be no plots in that area, resulting in the phenomenon that the plots in the game scene are not placed continuously. The existing technical solutions cannot be applied Figure 2 Schematic diagram of camera navigation on a discrete surface shown.

[0047] In addition, in ghost mode or flight mode of various first-person perspective games, although the virtual camera can move freely in three-dimensional space, the player needs to control the translation and direction, which involves the control of at least four parameters (including two translation parameters and two rotation parameters), and usually requires the use of a keyboard, mouse, or dual joysticks. Although this solution can achieve maximum freedom of perspective, it is complex to operate and is usually difficult to apply to non-first-person perspective games.

[0048] Based on the scheme defined in the above steps S302 to S308, it can be known that in an embodiment of the present invention, discrete plots are sampled and connected to generate a continuous reference surface. The game scene captured by the virtual camera is displayed on the graphical user interface provided by the terminal device, and multiple virtual plots summarized in the game scene are sampled separately to obtain multiple sampling points. Then, the multiple sampling points are connected to generate multiple continuous reference surfaces. Finally, the virtual camera is controlled to move according to the multiple reference surfaces, wherein the multiple virtual plots are separated from each other.

[0049] It is easy to notice that in the above process, multiple virtual plots are separated from each other, that is, multiple virtual plots are in a discrete state. In the present application, by connecting multiple sampling points on multiple virtual plots in a discrete state, a continuous reference surface is generated from a discontinuous reference surface, so that the virtual camera can move continuously in the game scene, and the continuous movement of the virtual camera in multiple virtual plots in a discrete state is realized. Moreover, compared with the prior art, in the present application, the player only needs to perform two-dimensional operations on the virtual camera to realize the viewing of the game scene, which simplifies the operation of the virtual camera.

[0050] It can be seen that the solution provided in the present application achieves the purpose of enabling the virtual camera to move continuously in multiple virtual plots in a discrete state, thereby realizing the technical effect of applying the virtual camera to discrete virtual plots, and further solving the technical problem in the prior art that the virtual camera cannot move continuously on discrete virtual plots.

[0051] In an optional embodiment, before connecting the multiple sampling points to generate multiple continuous reference surfaces, the terminal device determines that an edit completion instruction for at least one of the multiple virtual plots has been received. The edit completion instruction may be a control instruction generated by the player operating a control in the graphical user interface that indicates the completion of the edit, or the edit completion instruction may be automatically generated by the terminal device according to the state of the virtual plot.

[0052] Specifically, when a touch operation on the editing completion control is received, or when it is detected that the edited state of at least one of the multiple virtual plots meets a preset condition, the terminal device generates an editing completion instruction for at least one of the multiple virtual plots.

[0053] In an optional embodiment, an edit completion control is provided in the graphical user interface. After detecting that the player has performed a touch operation on the edit completion control, the terminal device determines that the player has completed the edit operation on at least one virtual plot of land among the multiple virtual plots, and at this time, the terminal device generates an edit completion instruction.

[0054] In another optional embodiment, when the placement style of at least one virtual plot is a preset style, and / or the shape of at least one virtual plot is a preset shape, the terminal device determines that the player has completed the editing operation on at least one virtual plot and generates an editing completion instruction.

[0055] Further, after the terminal device receives the editing completion instruction, the terminal device stops moving the multiple virtual plots, and / or the terminal device stops modifying the shape of at least one virtual plot, and / or the terminal device stops placing at least one virtual plot. That is, when the terminal device receives the editing completion instruction, the terminal device completes the editing operation on at least one virtual plot, and / or, when detecting that the placement style of at least one virtual plot is the placement style selected by the player, the terminal device determines that the editing operation on at least one virtual plot has been completed.

[0056] It should be noted that before connecting multiple sampling points to generate multiple continuous reference surfaces, the terminal device may also edit at least one virtual plot, wherein the terminal device may edit the position and / or shape and / or placement style of at least one virtual plot.

[0057] Optionally, the terminal device receives a first editing instruction for at least one virtual plot, and determines the position of at least one virtual plot in the three-dimensional space. The player can set the position of each virtual plot in the three-dimensional space by dragging the virtual plot using a control medium such as a mouse or a finger. For example, the player drags the virtual plot A from position 1 to position 2 in the three-dimensional space by dragging the virtual plot using a mouse.

[0058] It should be noted that the position of the at least one virtual plot refers to the position of the virtual plot in three-dimensional space, that is, the position of the at least one virtual plot is a three-dimensional position.

[0059] Optionally, the terminal device may also receive a second editing instruction for multiple virtual plots, and determine the shape of at least one virtual plot in three-dimensional space. Each virtual plot is provided with multiple editing points, and the player changes the shape of the virtual plot by dragging the editing points through a control medium such as a mouse or finger. Figure 5 In the schematic diagram of shape editing of a virtual plot shown, the player can edit the shape of the virtual plot by dragging the editing points.

[0060] It should be noted that the player can set editing points on the virtual plots through a control medium such as a mouse or finger. In addition, the player can also send a second editing instruction to the terminal device to edit the shapes of multiple virtual plots. After receiving the second editing instruction, the terminal device displays the editing points on the virtual plots. For example, if the player double-clicks the virtual plot or long presses the virtual plot, the terminal device can receive the above-mentioned second editing instruction, and at this time, the virtual plot with the editing points is displayed in the graphical user interface of the terminal device.

[0061] In addition, it should be noted that after at least one virtual plot is re-edited, the terminal device recalculates and generates multiple continuous reference surfaces through the at least one edited virtual plot, that is, after at least one virtual plot is re-edited, the terminal device samples the at least one edited virtual plot separately and connects the multiple sampling points obtained to generate multiple continuous reference surfaces.

[0062] Optionally, the terminal device may also receive a third editing instruction for multiple virtual plots, and place at least one virtual plot in a three-dimensional space according to a preset placement style. The player may set the placement style of the virtual plot on the terminal device through a control medium such as a mouse or finger, for example, virtual plots A, B, and C are set at the vertices of an equilateral triangle. In addition, the player may also determine a preset placement style from multiple placement styles pre-stored in the terminal device. After determining the preset placement style selected by the player, the terminal device automatically places at least one virtual plot according to the preset placement style.

[0063] In an optional embodiment, after sampling multiple virtual plots respectively to obtain multiple sampling points, the terminal device performs a connection operation on the multiple sampling points to generate multiple continuous reference surfaces. Specifically, the terminal device projects the multiple sampling points onto a preset plane to obtain reference points on the preset plane that correspond to the multiple sampling points respectively, then performs a triangulation operation based on the multiple reference points to obtain a triangulation result, and finally, performs a connection operation on the multiple sampling points based on the triangulation result to generate multiple continuous reference surfaces.

[0064] Optionally, the terminal device projects all sampling points of all virtual plots onto a preset plane, which may be a ground plane or a plane preset by the player. After projecting all sampling points onto the preset plane, the terminal device obtains multiple sampling points projected onto the preset plane, wherein the multiple sampling points after projection are sampling points on the preset plane. Then, the terminal device may use the Delaunay triangulation algorithm to triangulate the multiple sampling points after projection, and then connect each sampling point to generate a grid based on the triangulation result, thereby generating a continuous reference surface, that is, connecting multiple sampling points in the three-dimensional space based on the triangulation result. Among them, Figure 6 A schematic diagram of an optional triangulation is shown in Figure 6 In the figure, three sampling points are set on the virtual plot A, namely sampling points 1, 2, and 3, and three sampling points are set on the virtual plot B, namely sampling points 4, 5, and 6, among which sampling point 1 is connected to sampling point 4, sampling point 4 is connected to sampling point 2, sampling point 2 is connected to sampling point 5, sampling point 5 is connected to sampling point 3, and sampling point 3 is connected to sampling point 6.

[0065] It should be noted that the Delaunay triangulation algorithm is an algorithm for triangulating any given set of plane points based on the "maximum-minimum angle" optimization criterion, wherein the "maximum-minimum angle" optimization criterion refers to the criterion of maximizing the sum of all minimum internal angles.

[0066] In addition, it should be noted that the terminal device first projects multiple sampling points of multiple virtual plots in the three-dimensional space onto a preset plane to obtain multiple sampling points after projection, wherein the multiple sampling points after projection are sampling points on the preset plane. After obtaining the segmentation result, the multiple sampling points in the three-dimensional space are connected based on the segmentation result to generate a grid map of the navigation surface, such as Figure 7 The grid diagram of the navigation surface shown in Figure 1. Figure 7 It can be seen that the method provided in the present application can realize the generation of a complete and continuous navigation surface (ie, a continuous reference surface) for a plurality of virtual plots in a discrete state.

[0067] Furthermore, after connecting multiple sampling points to generate multiple continuous reference surfaces, the terminal device can control the movement of the virtual camera according to the multiple reference surfaces. Specifically, the terminal device obtains the association relationship between the virtual camera and the multiple reference surfaces, and obtains the navigation coordinates corresponding to the virtual camera according to the association relationship and the multiple reference surfaces, and then controls the movement of the virtual camera according to the navigation coordinates.

[0068] It should be noted that the above association relationship indicates that there is a certain association between the virtual camera and the reference surface. For example, the relative distance between the virtual camera and the reference surface is a fixed value. In this scene, the target relative distance between the virtual camera and the reference surface remains unchanged, that is, the virtual camera moves up and down with the ups and downs of the reference surface during movement; for another example, the distance between the virtual camera and the reference surface is a dynamic value, which can be calculated by a vibration reduction algorithm. In addition, the relationship between the virtual camera and the reference surface is not limited to the above relationship, and can also be other relationships, which will not be given examples here.

[0069] In addition, it should be noted that, in the present application, the above-mentioned navigation coordinates are coordinates for determining the position of the virtual camera, and the navigation coordinates may be, but are not limited to, position coordinates in the world coordinate system in the game scene.

[0070] In an optional embodiment, the terminal device may generate drag data in response to a drag operation on the game scene, and determine the association relationship between the virtual camera and multiple reference surfaces according to the drag data. The drag data at least includes information such as the player's drag speed and drag direction of the game scene, and the terminal device may determine the association relationship between the virtual camera and the reference surface according to the player's drag speed and / or drag direction of the game scene.

[0071] Optionally, the player may input a control instruction in the terminal device, and the control instruction is used to control the virtual camera to move along with the reference surface, wherein the control instruction may be a two-dimensional instruction, such as a mouse drag instruction, a single-finger drag instruction, etc. After receiving the control instruction, the terminal device parses the control instruction, determines the moving direction and / or moving speed of the virtual camera from the parsing result, and then makes the virtual camera maintain a certain height with the reference surface according to a certain rule, and moves in two dimensions according to the player's control instruction, so that the player can move the virtual camera continuously in the three-dimensional space composed of virtual plots in a discrete state. For example, the direction in which the player drags the mouse is the above-mentioned moving direction, and the speed at which the player drags the mouse is the above-mentioned moving speed. After detecting the player's operation on the mouse, the terminal device controls the virtual camera to move along the reference surface in the above-mentioned moving direction at the above-mentioned moving speed.

[0072] It should be noted that, since in the present application, the virtual camera moves along a continuous reference plane, in the present application, the player only needs to move the virtual camera in two dimensions to complete the viewing of the game scene, and there is no need to rotate and displace the virtual camera at the same time. Compared with the prior art, the solution provided in the present application can simplify the player's operation and improve the player's gaming experience.

[0073] In an optional embodiment, in the process of obtaining the navigation coordinates corresponding to the virtual camera based on the association relationship and multiple reference planes, the terminal device obtains the initial coordinates corresponding to the virtual camera and the multiple reference planes based on the association relationship and the multiple reference planes, and corrects the initial coordinates according to a preset algorithm to obtain the navigation coordinates corresponding to the virtual camera.

[0074] It should be noted that, in actual applications, the relationship between the reference surface and the moving trajectory of the virtual camera is not limited to a parallel relationship, but can also be a non-strict parallel relationship. For example, when the reference surface formed by the triangle is not smooth enough, the player can input an adjustment instruction to the terminal device so that the terminal device can correct the initial coordinates corresponding to the virtual camera and multiple reference surfaces based on a preset algorithm to achieve smooth processing of the reference surface and obtain the navigation coordinates corresponding to the virtual camera. For another example, the terminal device can determine the height change trend parameter of the reference surface according to the height change of the reference surface, and then adjust the initial coordinates corresponding to the virtual camera and multiple reference surfaces according to the height change trend parameter, so that the change trend of the virtual camera path is smoother or steeper than the change trend of the terrain.

[0075] In another optional embodiment, in addition to adjusting the initial coordinates of the virtual camera corresponding to multiple reference surfaces, the terminal device can also adjust the angle of the virtual camera during movement according to the multiple reference surfaces, so that the terminal device can adjust the shooting angle of the virtual camera according to the undulations of the surface, so that the game scene displayed by the graphical user interface adapts to the undulations of the surface.

[0076] As can be seen from the above content, the present application provides a navigation solution for a discrete virtual plot scene that can change dynamically. The solution generates a continuous reference surface for multiple virtual plots in a discrete state, and uses the continuous reference surface for the navigation of the virtual camera. Through this solution, the virtual camera can be applied to a game scene with multiple virtual plots in a discrete state, that is, the virtual camera can move continuously in a non-continuous, non-preset (that is, editable by the player) game scene. In addition, compared with the solution in the prior art that requires the virtual camera to be rotated and displaced at the same time, the solution provided by the present application has the advantage of convenient operation.

[0077] According to an embodiment of the present invention, there is also provided an embodiment of a virtual camera control device, which provides a graphical user interface through a terminal device, wherein: Figure 8 is a schematic diagram of a device for controlling a virtual camera according to an embodiment of the present invention, such as Figure 8 As shown, the device includes: a display module 801 , a sampling module 803 , a connection module 805 and a control module 807 .

[0078] Among them, the display module 801 is used to display the game scene captured by the virtual camera through a graphical user interface, wherein the game scene includes multiple virtual plots, wherein the multiple virtual plots are separated from each other; the sampling module 803 is used to sample the multiple virtual plots respectively to obtain multiple sampling points; the connection module 805 is used to connect the multiple sampling points to generate multiple continuous reference surfaces; the control module 807 is used to control the movement of the virtual camera according to the multiple reference surfaces.

[0079] It should be noted that the above-mentioned display module 801, sampling module 803, connection module 805 and control module 807 correspond to steps S302 to S308 in the above-mentioned embodiments, and the examples and application scenarios implemented by the four modules and the corresponding steps are the same, but are not limited to the contents disclosed in the above-mentioned embodiments.

[0080] Optionally, the virtual camera control device further includes: a first determination module, used to determine whether an editing completion instruction for at least one virtual plot among the multiple virtual plots is received before performing a connection operation on the multiple sampling points to generate a plurality of continuous reference surfaces.

[0081] Optionally, the device for controlling the virtual camera also includes: a first generating module, which is used to generate an editing completion instruction for at least one of the multiple virtual plots when a touch operation for the editing completion control is received, or when it is detected that the edited state of at least one of the multiple virtual plots meets a preset condition.

[0082] Optionally, the connection module includes: a projection module, a segmentation module and a first connection module. The projection module is used to project multiple sampling points onto a preset plane to obtain reference points on the preset plane corresponding to the multiple sampling points; the segmentation module is used to perform a triangulation operation based on the multiple reference points to obtain a segmentation result; and the first connection module is used to perform a connection operation on the multiple sampling points based on the segmentation result to generate multiple continuous reference surfaces.

[0083] Optionally, the control module includes: a first acquisition module, a second acquisition module and a first control module. The first acquisition module is used to acquire the association relationship between the virtual camera and multiple reference surfaces; the second acquisition module is used to obtain the navigation coordinates corresponding to the virtual camera according to the association relationship and the multiple reference surfaces; and the first control module is used to control the movement of the virtual camera according to the navigation coordinates.

[0084] Optionally, the first acquisition module includes: a second generation module and a second determination module. The second generation module is used to generate drag data in response to a drag operation on the game scene; the second determination module is used to determine the association relationship between the virtual camera and multiple reference surfaces according to the drag data.

[0085] Optionally, the second acquisition module includes: a third acquisition module and a first adjustment module. The third acquisition module is used to obtain the initial coordinates corresponding to the virtual camera and the multiple reference surfaces according to the association relationship and the multiple reference surfaces; the first adjustment module is used to correct the initial coordinates according to a preset algorithm to obtain the navigation coordinates corresponding to the virtual camera.

[0086] Optionally, the virtual camera control device further includes: a second adjustment module, used to adjust the angle of the virtual camera during movement according to multiple reference surfaces.

[0087] According to another aspect of an embodiment of the present invention, a computer-readable storage medium is further provided, in which a computer program is stored. The computer program is configured to execute the control method of the virtual camera in the above embodiment when running.

[0088] According to another aspect of an embodiment of the present invention, an electronic device is also provided, which includes one or more processors; a storage device for storing one or more programs, when the one or more programs are executed by the one or more processors, the one or more processors are implemented to run the programs, wherein the programs are configured to execute the control method of the virtual camera in the above-mentioned embodiment when running.

[0089] The serial numbers of the above embodiments of the present invention are only for description and do not represent the advantages or disadvantages of the embodiments.

[0090] In the above embodiments of the present invention, the description of each embodiment has its own emphasis. For parts that are not described in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.

[0091] In the several embodiments provided in this application, it should be understood that the disclosed technical content can be implemented in other ways. Among them, the device embodiments described above are only schematic. For example, the division of the units can be a logical function division. There may be other division methods in actual implementation. For example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of units or modules, which can be electrical or other forms.

[0092] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple units. Some or all of the units may be selected according to actual needs to achieve the purpose of the present embodiment.

[0093] In addition, each functional unit in each embodiment of the present invention may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.

[0094] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art, or all or part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including a number of instructions for a computer device (which can be a personal computer, a server or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present invention. The aforementioned storage medium includes: U disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), mobile hard disk, magnetic disk or optical disk and other media that can store program codes.

[0095] The above is only a preferred embodiment of the present invention. It should be pointed out that for ordinary technicians in this technical field, several improvements and modifications can be made without departing from the principle of the present invention. These improvements and modifications should also be regarded as the scope of protection of the present invention.

Claims

1. A method for controlling a virtual camera, It is characterized in that Providing a graphical user interface through a terminal device, the method comprising: Displaying a game scene captured by a virtual camera through the graphical user interface, wherein the game scene includes a plurality of virtual plots of land, wherein the plurality of virtual plots of land are separated from each other; Sampling the multiple virtual plots respectively to obtain multiple sampling points; Performing a connection operation on the plurality of sampling points to generate a plurality of continuous reference surfaces; The virtual camera is controlled to move according to the multiple reference surfaces.

2. The method according to claim 1, It is characterized in that Before connecting the plurality of sampling points to generate a plurality of continuous reference surfaces, the method further includes: It is determined that an edit completion instruction for at least one of the plurality of virtual plots is received.

3. The method according to claim 2, It is characterized in that The method further comprises: When a touch operation on the edit completion control is received, or when it is detected that the edited state of at least one of the multiple virtual plots meets a preset condition, an edit completion instruction for at least one of the multiple virtual plots is generated.

4. The method according to claim 1, It is characterized in that Connecting the plurality of sampling points to generate a plurality of continuous reference surfaces includes: Projecting the plurality of sampling points onto a preset plane to obtain reference points on the preset plane corresponding to the plurality of sampling points respectively; Perform triangulation operation based on multiple reference points to obtain triangulation results; A connection operation is performed on the plurality of sampling points based on the segmentation result to generate a plurality of continuous reference surfaces.

5. The method according to claim 1, It is characterized in that The step of controlling the virtual camera to move according to the multiple reference surfaces comprises: Acquire the association relationship between the virtual camera and the multiple reference surfaces; Obtaining navigation coordinates corresponding to the virtual camera according to the association relationship and the multiple reference surfaces; The virtual camera is controlled to move according to the navigation coordinates.

6. The method according to claim 5, It is characterized in that Acquiring the association relationship between the virtual camera and the multiple reference surfaces includes: In response to a drag operation on the game scene, generating drag data; The association relationship between the virtual camera and the multiple reference surfaces is determined according to the drag data.

7. The method according to claim 5, It is characterized in that The obtaining, according to the association relationship and the plurality of reference surfaces, navigation coordinates corresponding to the virtual camera includes: According to the association relationship and the multiple reference surfaces, obtaining initial coordinates of the virtual camera corresponding to the multiple reference surfaces; The initial coordinates are corrected according to a preset algorithm to obtain the navigation coordinates corresponding to the virtual camera.

8. The method according to claim 1, It is characterized in that The method further comprises: The angle of the virtual camera during the movement is adjusted according to the multiple reference surfaces.

9. A virtual camera control device, It is characterized in that Providing a graphical user interface through a terminal device, the device comprises: A display module, configured to display a game scene captured by a virtual camera through the graphical user interface, wherein the game scene includes a plurality of virtual plots, wherein the plurality of virtual plots are separated from each other; A sampling module, used to sample the multiple virtual plots respectively to obtain multiple sampling points; A connection module, used for connecting the plurality of sampling points to generate a plurality of continuous reference surfaces; A control module is used to control the virtual camera to move according to the multiple reference surfaces.

10. A computer-readable storage medium, It is characterized in that The computer-readable storage medium stores a computer program, wherein the computer program is configured to execute the method for controlling a virtual camera as claimed in any one of claims 1 to 8 when executed.

11. An electronic device, It is characterized in that The electronic device includes one or more processors; a storage device for storing one or more programs, which, when executed by the one or more processors, enables the one or more processors to run the programs, wherein the programs are configured to execute the method for virtual camera control described in any one of claims 1 to 8 when running.