Virtual lens position adjustment method and device, electronic equipment and storage medium

By acquiring the target position and speed parameters of the virtual sphere, and adjusting the movement speed and position of the virtual camera, the problem of dizziness caused by the virtual camera following too fast was solved, improving the visual experience and naturalness of camera movement in ball games.

CN117547817BActive Publication Date: 2026-11-20NETEASE (HANGZHOU) NETWORK CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202311284314.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-10-04
Publication Date
2026-11-20
Estimated Expiration
2043-10-04

AI Technical Summary

Technical Problem

In ball games, the virtual camera follows the virtual ball's movement too quickly, causing rapid screen transitions and resulting in dizziness and fatigue for players. Furthermore, current technology cannot make the camera movement in ball games as natural as the visual experience in real life.

Method used

By acquiring the target position and speed parameters of the virtual sphere in the virtual game scene, the movement speed and position of the virtual camera are adjusted to follow the movement of the virtual sphere in real time, ensuring that the camera movement conforms to the broadcast effect in the real world.

Benefits of technology

It improves the flexibility of virtual camera movement and the immersion of the game, making the movement of the virtual camera more in line with the realism of ball games and enhancing the player's visual experience.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117547817B_ABST
    Figure CN117547817B_ABST
Patent Text Reader

Abstract

The application discloses a virtual lens position adjustment method and device, electronic equipment and a computer readable storage medium. The method comprises the following steps: displaying a first scene picture obtained by shooting a virtual ball at a first position in a virtual game scene through a virtual lens; obtaining a target position of the virtual ball in the virtual game scene; determining a speed parameter corresponding to the target position; determining a second position in the virtual game scene according to the target position; adjusting the virtual lens from the first position to the second position according to the speed parameter, and displaying a second scene picture obtained by shooting the virtual lens during the adjustment from the first position to the second position. The method can realize smooth transition of the virtual lens in a ball game, and improve the visual experience of players watching the game picture.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of computers, and specifically to a method, apparatus, electronic device, and computer-readable storage medium for adjusting the position of a virtual camera. Background Technology

[0002] Currently, in ball games, a common approach is to bind a virtual camera to a virtual ball or the player controlling the game, with the camera moving in sync with the ball's or player's movements. However, because the virtual ball's position changes rapidly, this rapid camera movement can cause fast-paced screen transitions, leading to dizziness and fatigue for players.

[0003] Alternatively, in some games, a virtual ball is set to move at a constant speed, and the camera follows the virtual ball at the same speed to reduce the discomfort caused by fast camera movement. However, this method makes the camera movement in ball games less natural and does not conform to the visual experience of watching live broadcasts of ball sports in real life, resulting in poor realism.

[0004] There is currently no effective solution to the above problems. Summary of the Invention

[0005] This application provides a method, apparatus, electronic device, and computer-readable storage medium for adjusting the position of a virtual camera, which can solve the technical problems of abrupt transitions in virtual cameras and poor visual experience for players in the aforementioned ball games.

[0006] In a first aspect, embodiments of this application provide a method for adjusting the position of a virtual camera, the method comprising:

[0007] The image shows the first scene captured by a virtual camera at a first location within the virtual game scene, showing the virtual sphere.

[0008] Obtain the target position of the virtual sphere in the virtual game scene;

[0009] Determine the velocity parameters corresponding to the target position;

[0010] Based on the target location, determine the second location in the virtual game scene;

[0011] Based on the speed parameters, the virtual camera is adjusted from the first position to the second position, and the second scene captured during the adjustment process is displayed.

[0012] Secondly, embodiments of this application provide a virtual camera position adjustment device, which includes: a display unit, an acquisition unit, a determination unit, and an adjustment unit;

[0013] The aforementioned display unit is used to display a first scene image captured by a virtual lens at a first location within a virtual game scene, showing the virtual sphere.

[0014] The aforementioned acquisition unit is used to acquire the target position of the virtual sphere in the virtual game scene;

[0015] The aforementioned determining unit is used to determine the velocity parameters corresponding to the target position;

[0016] The aforementioned determining unit is further configured to determine a second location in the virtual game scene based on the target location;

[0017] The aforementioned adjustment unit is used to adjust the virtual camera from the first position to the second position according to the speed parameter, and to display the second scene captured during the process of adjusting the virtual camera from the first position to the second position.

[0018] Thirdly, embodiments of this application provide an electronic device, including:

[0019] Processor; and

[0020] The memory is used to store data processing programs, which, when the electronic device is powered on and run by the processor, execute the method as described in the first aspect.

[0021] Fourthly, embodiments of this application provide a computer-readable storage medium storing a data processing program that is executed by a processor to perform the method as described in the first aspect.

[0022] This application provides a method for adjusting the position of a virtual camera. The method displays a first scene image captured by a virtual camera at a first position within a virtual game scene, allowing the player to see the virtual sphere moving within that first scene image. Then, it acquires the target position of the virtual sphere within the virtual game scene, which uniquely determines the sphere's position. Further, it determines the speed parameters corresponding to the target position and, based on the target position, determines a second position within the virtual game scene. The speed parameters can be used to adjust the movement speed of the virtual camera, and the second position is the desired position for the virtual camera. Having obtained the movement speed and the desired position of the virtual camera, the method adjusts the virtual camera from the first position to the second position based on the speed parameters, and displays the second scene image captured during the adjustment process.

[0023] By acquiring the position of the virtual sphere in the virtual game scene, the movement speed of the virtual camera and the second position to be adjusted are determined based on the position of the virtual sphere. That is, the movement speed and position of the virtual camera are determined in real time based on the movement position of the virtual sphere. When the virtual sphere is in different positions in the virtual game scene, the movement speed of the virtual camera is different from the second position to be adjusted. This can improve the flexibility of the virtual camera movement, make the movement of the virtual camera more in line with ball games, enhance the immersiveness of the camera movement in ball games, make it more in line with the characteristics of real-world broadcasting of ball sports, and improve the player's visual experience. Attached Figure Description

[0024] To more clearly illustrate the technical solutions of the embodiments of this application, the drawings used in the description of the embodiments of this application will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0025] Figure 1 A schematic diagram of a game system illustrating the virtual camera position adjustment method provided in this application embodiment;

[0026] Figure 2 A flowchart illustrating an example of a virtual camera position adjustment method provided in an embodiment of this application;

[0027] Figure 3 A schematic diagram illustrating a complete virtual stadium provided in an embodiment of this application;

[0028] Figure 4 This is a schematic diagram illustrating a partial virtual sports field provided in an embodiment of this application;

[0029] Figure 5 A schematic diagram illustrating an example of a world coordinate system established for a virtual game scene, provided in an embodiment of this application;

[0030] Figure 6 This is a schematic diagram illustrating an example of a screen coordinate system established for a display screen, provided in an embodiment of this application.

[0031] Figure 7 This is a schematic diagram illustrating an example of region division for a display screen, provided in an embodiment of this application.

[0032] Figure 8 This is a schematic diagram illustrating an example of region division for a virtual game scene, provided in an embodiment of this application.

[0033] Figure 9This is an example of a scene image obtained by a virtual camera capturing a virtual sphere located in the central area of ​​a virtual game scene, as provided in an embodiment of this application.

[0034] Figure 10 This is an example of a scene image obtained by a virtual camera capturing a virtual sphere located in the first boundary region of a virtual game scene, as provided in an embodiment of this application.

[0035] Figure 11 This is another example of a scene image obtained by a virtual camera capturing a virtual sphere located in the first boundary region of a virtual game scene, as provided in an embodiment of this application.

[0036] Figure 12 This is an example of a scene image obtained by a virtual camera capturing a virtual sphere located in the second boundary region of a virtual game scene, as provided in an embodiment of this application.

[0037] Figure 13 This is another example of a scene image obtained by a virtual camera capturing a virtual sphere located in the second boundary region of a virtual game scene, as provided in an embodiment of this application.

[0038] Figure 14 This is an example of a scene image obtained by a virtual camera capturing a virtual sphere located in a corner area of ​​a virtual game scene, as provided in an embodiment of this application.

[0039] Figure 15 This is another example of a scene image obtained by a virtual camera capturing a virtual sphere located in a corner area of ​​a virtual game scene, as provided in an embodiment of this application.

[0040] Figure 16 This is another example of a scene image obtained by a virtual camera capturing a virtual sphere located in a corner area of ​​a virtual game scene, as provided in an embodiment of this application.

[0041] Figure 17 This is another example of a scene image obtained by a virtual camera capturing a virtual sphere located in a corner area of ​​a virtual game scene, as provided in an embodiment of this application.

[0042] Figure 18 This is a schematic diagram of the structure of the virtual camera position adjustment device provided in the embodiments of this application;

[0043] Figure 19 This application provides a structural block diagram of an electronic device for adjusting the position of a virtual camera. Detailed Implementation

[0044] Many specific details are set forth in the following description to provide a full understanding of this application. However, this application can be implemented in many other ways different from those described herein, and those skilled in the art can make similar extensions without departing from the spirit of this application; therefore, this application is not limited to the specific embodiments disclosed below.

[0045] It should be noted that the terms "first," "second," "third," etc., in the claims, specification, and drawings of this application are used to distinguish similar objects and are not used to describe a specific order or sequence. Such data are interchangeable where appropriate so that the embodiments of this application described herein can be implemented in a sequence other than that shown or described herein. Furthermore, the terms "comprising," "having," and their variations are intended to cover non-exclusive inclusion; for example, a process, method, system, product, or apparatus that includes a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to these processes, methods, products, or apparatuses.

[0046] It should be understood that in the embodiments of this application, "at least one" means one or more, and "more than one" means two or more. "And / or" is merely a description of the relationship between related objects, indicating that three relationships can exist. For example, A and / or B can represent: A existing alone, A and B existing simultaneously, and B existing alone. The character " / " generally indicates that the related objects before and after it are in an "or" relationship. "Contains A, B and / or C" means containing any one, two, or three of A, B, and C.

[0047] It should be understood that in the embodiments of this application, "B corresponding to A", "B corresponding to A", "A corresponds to B" or "B corresponds to A" means that B is associated with A, and B can be determined based on A. Determining B based on A does not mean that B is determined solely based on A; B can also be determined based on A and / or other information.

[0048] In view of the above-mentioned problems, this application provides a method, apparatus, electronic device and computer-readable storage medium for adjusting the position of a virtual camera.

[0049] The virtual camera position adjustment method provided in this application can be executed by an electronic device, such as a terminal or a server. The terminal can be a smartphone, tablet, laptop, or other similar device. The server can be a standalone physical server, a server cluster or distributed system composed of multiple physical servers, or a cloud server providing basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud storage, network services, cloud communication, middleware services, domain name services, security services, CDN, and big data and artificial intelligence platforms. It is understood that this application does not limit the specific entity executing the virtual camera position adjustment method.

[0050] In one alternative embodiment, when the virtual camera position adjustment method is run on a terminal device, the terminal device stores a game application and a virtual game scene. The terminal device interacts with the player through a graphical player interface (GUI). The terminal device can provide the GUI to the player in various ways, such as rendering it on the terminal device's display screen or presenting the GUI through holographic projection.

[0051] In an optional embodiment, when the virtual camera position adjustment method runs on a server, the method can be implemented and executed based on a cloud gaming system. A cloud gaming system refers to a gaming method based on cloud computing. A cloud gaming system includes a server and client devices. The main body running the game application and the main body presenting the game screen are separate; the storage and execution of the virtual camera position adjustment method are completed on the server. The game screen presentation is completed on the client, which is mainly used for receiving and sending game data and presenting the game interface. For example, the client can be a display device with data transmission capabilities located close to the player, such as a mobile terminal, television, computer, PDA, or personal digital assistant. However, the terminal device for processing game data is the server in the cloud. During gameplay, the player operates the client to send commands to the server. The server controls the game operation according to the commands, encodes and compresses game screen data, returns it to the client via the network, and finally, the client decodes and outputs the game screen.

[0052] It should be noted that, in this embodiment, the execution entity of the virtual camera position adjustment method can be a terminal device or a server. The terminal device can be a local terminal device or a client device in the aforementioned cloud gaming. This embodiment does not limit the type of execution entity.

[0053] For example, this method is applied to, such as Figure 1The illustrated electronic device includes a game system 100. The game system 100 may include at least one terminal 110, at least one server 120, at least one database 130, and a network. The terminal 110 held by the player can connect to servers of different games via the network. The terminal is any device with computing hardware capable of supporting and executing software applications corresponding to the game.

[0054] The terminal 110 includes a display screen and a processor. The display screen is used to present the game interface and receive operations performed by the player on the game interface. The game interface may include a portion of a virtual game scene, which is a virtual world where virtual characters move. The processor is used to run the game, generate the game interface, respond to operations, and control the display of the game screen. When the player operates the game interface through the display screen, the game interface can control the local content of the terminal in response to received operation commands, and can also control the content of the remote server in response to received operation commands.

[0055] Furthermore, when the game system 100 includes multiple terminals, multiple servers, and multiple networks, different terminals can connect to each other through different networks and servers. The network can be a wireless network or a wired network; for example, wireless networks include Wi-Fi, LAN, cellular networks, 2G, 3G, 4G, and 5G networks. Additionally, different terminals can also connect to other terminals or servers using their own Bluetooth networks or hotspot networks. Moreover, the system 100 can include multiple databases coupled to different servers, and can continuously store game-related information in the databases as different players engage in multiplayer online gaming.

[0056] It should be noted that, Figure 1 The game system diagram shown is merely an example. The game system 100 described in this application embodiment is intended to more clearly illustrate the technical solutions of this application embodiment and does not constitute a limitation on the technical solutions provided in this application embodiment. As those skilled in the art will know, with the evolution of game systems and the emergence of new business scenarios, the technical solutions provided in this application embodiment are also applicable to similar technical problems.

[0057] The technical solution of this application will be described in detail below through specific embodiments. It should be noted that the following specific embodiments can be combined with each other, and the same or similar concepts or processes may not be described again in some embodiments.

[0058] like Figure 2 As shown, Figure 2This is an example flowchart of virtual camera position adjustment provided in an embodiment of this application. It should be noted that the steps shown may be executed in a different logical order than that shown in the flowchart. The method may include the following steps S210 to S240.

[0059] Step S210: Display the first scene image of the virtual sphere captured by the virtual camera at the first position in the virtual game scene.

[0060] Generally, the scene displayed on the screen of an electronic device is a portion of the game scene captured by a virtual camera. For example, in a first-person game, the virtual camera can be positioned above the player-controlled virtual character's head (e.g., at the eye level). The virtual camera moves with the virtual character, and its orientation rotates with the virtual character's rotation. Therefore, the virtual game scene is a portion of the game scene within a preset area in front of the virtual character. Similarly, in a third-person game, the virtual camera can be positioned directly above or slightly above and behind the player-controlled virtual character. Therefore, the virtual game scene includes the virtual character and a portion of the game scene. The virtual game scene can include various virtual game characters, virtual items, virtual buildings, etc. In this embodiment, a third-person football game is used as an example for method description; that is, in the football game, both the virtual football and the virtual character controlling the football are displayed in the game scene.

[0061] It is important to note that during the adjustment of the virtual camera's position, the virtual camera's shooting direction should always be aligned with the virtual sphere.

[0062] It is understood that in the embodiments of this application, virtual lens, virtual camera, virtual webcam or virtual video camera all refer to the same thing, that is, a virtual device used to capture scene images of a virtual sphere.

[0063] It should be noted that the virtual camera position adjustment method provided in this application is applicable to most ball games, such as basketball, football, or volleyball games, and of course, it is also applicable to virtual camera position adjustment in non-ball games. This application does not limit its application; the following method description will use football as an example.

[0064] In a football game, the first scene captured by the virtual camera at the first position within the virtual game scene, showing the virtual ball, constitutes the game screen within the virtual stadium, which includes the virtual ball. Typically, the virtual stadium is too large for the electronic device's screen to display completely; instead, a portion of the virtual stadium is shown. For example... Figure 3 As shown, Figure 3This is a schematic diagram of a complete virtual stadium provided in the embodiments of this application. Figure 3 This includes the first virtual character 10 of the first team participating in the football game, the second virtual character 20 of the second team, the virtual ball 30, the goal 40 of the first team, and the goal 50 of the second team. For example... Figure 4 As shown, Figure 4 This is a schematic diagram showing one example of a virtual sports field provided in the embodiments of this application. Figure 4 This includes the first virtual character 10 of the first team participating in the football game, the second virtual character 20 of the second team, the virtual ball 30, and the goal 40 of the first team. It can be seen that due to the limitations of the display screen size of electronic devices... Figure 3 The second team's goal 50, as shown, was not displayed on the electronic device's screen. This is understandable. Figure 4 The portion of the virtual court shown is merely an example and is not intended to limit this application. As the virtual camera moves, the portion of the virtual court displayed on the electronic device's screen changes accordingly.

[0065] In this embodiment, the position of the virtual camera capturing the scene is associated with the position of the virtual sphere, so as to control the movement of the virtual camera according to the position change of the virtual sphere. For example, when the virtual sphere moves to the right, the virtual camera is controlled to move to the right following the virtual sphere.

[0066] Understandably, in the real world, broadcast cameras don't move while the football is within a certain area of ​​the field. Only when it moves outside that area do staff move the camera to follow the football's movement. Currently, in most games, when the virtual camera follows the virtual ball, there's a fixed offset between the virtual camera and the virtual ball; that is, the distance between them is constant. For example, if the virtual ball moves 1 meter, the virtual camera also moves 1 meter relative to it. This method doesn't reflect the real-world broadcasting effect of a football match.

[0067] In this embodiment, to enhance the realism of virtual camera transitions in football games and make them more consistent with real-world broadcast effects, the virtual camera can remain stationary when the virtual ball is within a certain area of ​​the field. In other words, the offset between the virtual camera and the virtual ball is not fixed but changes in real-time based on the movement of the virtual ball within the virtual field. That is, the position of the virtual camera needs to be adjusted in real-time according to the movement of the virtual ball, so that the position of the virtual ball captured by the virtual camera and displayed on the electronic device's screen better matches the player's visual requirements.

[0068] The following section describes the process of the virtual camera following the position of the virtual sphere.

[0069] Step S220: Obtain the target position of the virtual sphere in the virtual game scene.

[0070] The aforementioned target position can be understood as any position of the virtual sphere when it moves in the virtual game scene, that is, any position of the virtual court when it moves.

[0071] Understandably, the position of the virtual sphere within the aforementioned virtual court can be represented by a coordinate representing its displacement within the world coordinate system established for the virtual court; that is, there is a one-to-one correspondence between the position and the world coordinates. The world coordinate system provided in this embodiment has three axes: X, Y, and Z. The plane formed by the X and Y axes is the plane containing the preset ground plane in the virtual game scene, i.e., the surface of the virtual court. The Z-axis represents the height from the virtual court surface. It should be noted that in the subsequent description of the virtual camera position adjustment method, changes in the virtual camera's height are not considered; that is, in this embodiment, the height of the virtual camera can be set to a fixed value, remaining constant during movement.

[0072] like Figure 5 As shown in this embodiment, the lower left corner of the virtual stadium is taken as the origin (0,0) of the world coordinate system. Assuming the virtual stadium has a length of 'a' and a width of 'b', the world coordinates corresponding to the lower right corner of the virtual stadium are (a, 0), the upper left corner are (0, b), and the center point is (a / 2, b / 2). Therefore, when the football moves in the virtual stadium, there is a unique world coordinate system that represents its position.

[0073] Step S230: Determine the velocity parameters corresponding to the target position.

[0074] Understandably, the speed parameter corresponding to the target location mentioned above represents the movement speed of the virtual camera. It can also be understood as the switching speed of the scene views seen by the player.

[0075] In some embodiments, the velocity parameters corresponding to the target position can be determined through the following steps S231 to S232.

[0076] Step S231: Convert the world coordinates of the target location to screen coordinates, and determine the target screen area on the display screen to which the screen coordinates belong.

[0077] Step S232: Obtain the region velocity parameters corresponding to the target screen area, and determine the region velocity parameters as the velocity parameters corresponding to the target position.

[0078] The target screen area mentioned above is one of the pre-divided screen areas of the display screen. Each pre-divided screen area is configured with a region speed parameter, which is the speed parameter that controls the movement of the virtual camera.

[0079] Understandably, the screen coordinates of the aforementioned target position are coordinate values ​​in a coordinate system established for the display screen of the electronic device, and can be used to represent the display position of the virtual sphere on the display screen. For example, when a soccer ball is displayed in the upper right corner of the display screen of an electronic device, this display position can be represented by screen coordinates. In the embodiments of this application, as... Figure 6 As shown, a two-dimensional coordinate system is established on the display screen with the bottom left corner as the origin, the X-axis positive to the right, and the Y-axis positive upwards. This two-dimensional coordinate system represents the display position of the virtual sphere in screen pixels. That is, by converting the world coordinates corresponding to the virtual sphere's target position on the court to screen coordinates, the specific position of the virtual sphere on the display screen can be determined. The conversion method between world coordinates and screen coordinates can refer to any method in relevant technologies, and will not be elaborated here.

[0080] The display screen of the electronic device is pre-divided into a preset number of screen areas, and area boundaries and area speed parameters are configured for each preset number of screen areas. At the same time, the area speed parameter of the outermost screen area is the largest, and the area speed parameter of the innermost screen area is the smallest. In actual application, the corresponding area speed parameters can be set for different screen areas according to actual needs. This example does not impose any special restrictions on this.

[0081] After dividing the display screen of an electronic device into screen areas, the distance between the screen coordinates corresponding to the virtual sphere when it is at the target position and the boundary of each screen area can be used to determine which screen area the virtual sphere is located in. Then, the virtual camera can be moved according to the area velocity parameters corresponding to the target screen area where the virtual sphere is located.

[0082] It should be noted that when dividing the display screen into regions, each screen region is symmetrical about both the horizontal and vertical midlines of the display screen. For example... Figure 7 As shown, the display screen of an electronic device can be divided into two screen areas, namely area 701 and area 702. This is understandable. Figure 7 The area division shown is for the display screen. Area 702 is the screen area remaining after subtracting area 701 from the entire display screen area of ​​the electronic device. The size of area 701 can be set according to actual needs, and there are no special restrictions here.

[0083] In this example, the region velocity parameter corresponding to region 701 is v1, and the region velocity parameter corresponding to region 702 is v2, where v1 > v2. That is, when the virtual sphere 30 is located in region 701, the virtual camera moves with the region velocity parameter v1, and when the virtual sphere 30 is located in region 702, the virtual camera moves with the region velocity parameter v2.

[0084] Since area 701 is the central area of ​​the display screen, it can be considered the core area of ​​the player's attention. The player can easily perceive the position of the virtual sphere. At this time, moving the virtual camera at a lower speed (v1) helps the player track the virtual sphere's trajectory. Area 702 is the edge area of ​​the display screen, not the core area of ​​the player's attention. When the virtual sphere appears at the edge of the screen, the virtual camera needs to be promptly returned to center so that the virtual sphere is as close to the center of the screen as possible. This means moving the virtual camera at a higher speed (v2). This helps the player better observe the movement of the virtual sphere, allowing them to better judge the situation on the field and improve the gaming experience. Returning the virtual camera to center can be understood as moving the virtual camera quickly so that the position of the virtual sphere in the game scene captured by the virtual camera is closer to the player's visual center, i.e., the center of the display screen.

[0085] In some embodiments, determining the velocity parameter corresponding to the target position can also be achieved as follows: First, each screen coordinate in the screen coordinate system established for the display screen of the electronic device is configured with a velocity parameter. This velocity parameter is used to move the virtual camera. After converting the world coordinates of the target position to screen coordinates, the velocity parameter corresponding to the screen coordinates can be directly obtained. That is, the virtual camera is controlled to move at the velocity indicated by the velocity parameter.

[0086] Step S240: Determine the second location in the virtual game scene based on the target location.

[0087] The aforementioned second position is the position that the virtual camera needs to be adjusted to in the virtual game scene. After obtaining the world coordinates of the target position of the virtual sphere in the virtual court, the second position of the virtual camera after following the virtual sphere's offset can be determined based on the world coordinates of the target position of the virtual sphere. In a specific implementation, the offset between the virtual camera and the virtual sphere can be determined according to the player's visual requirements, and then the second position of the virtual camera after following the virtual sphere's movement can be calculated based on the world coordinates of the target position of the virtual sphere and the offset. That is, the above step S240 determines the second position in the virtual game scene based on the world coordinates corresponding to the target position, which may specifically include the following steps S241 to S243.

[0088] Step S241: Determine the target scene area in the virtual game scene to which the world coordinates of the target location belong.

[0089] The aforementioned target scene area is one of the scene areas pre-divided for the virtual game scene.

[0090] Step S242: Obtain the position offset parameters corresponding to the target scene area.

[0091] Step S243: Determine the second position in the virtual game scene based on the position offset parameter and the world coordinates of the target position.

[0092] The steps for determining the second position in the virtual game scene are described in detail below.

[0093] The virtual stadium can be divided into multiple areas based on the user's visual requirements, importance, or stadium function during a football match. In different stadium areas, the virtual camera and the virtual ball have different offsets, making the game footage captured by the virtual camera more consistent with real-world football broadcast footage, thus increasing the realism of the football game.

[0094] like Figure 8 As shown, the virtual court 800 is divided into four main areas according to its function: the central area A, the first boundary area B, the corner area C, and the second boundary area D. Among them, as... Figure 8 As shown in the diagram, according to the area division by the dotted lines, the first boundary region B is respectively set on both sides of the central region A along the first preset direction, that is, the first boundary region B includes the upper boundary region B2 and the lower boundary region B1; the second boundary region D is respectively set on both sides of the central region A along the second preset direction, including the left second boundary region D1 and the right second boundary region D2. It can be understood that the first preset direction and the second preset direction are perpendicular to each other. In a specific embodiment, the first preset direction and the second preset direction can be the X-axis direction and the Y-axis direction, respectively. The corner region C can connect a first boundary region and a second boundary region, such as... Figure 8 As shown, corner area C includes corner areas C1, C2, C3, and C4; the second boundary area D can be understood as follows: in a football game, the first boundary area can also be called the sideline area, the second boundary area can be called the goal line area, and the corner area can be called the corner kick area. The sideline area can be considered as the boundary area of ​​the field on the side without the goal, while the goal line area is the boundary area of ​​the field including the goal line. Similarly, the basketball court can be divided into the same areas in a basketball game.

[0095] Below, we will provide an example of the offset between the virtual camera and the virtual sphere in each of the above regions.

[0096] In some embodiments, when the virtual ball is located in the central area A, i.e., when the virtual ball is located in the main area where the player attacks and tries to win the ball, the player prefers to be able to track the trajectory of the football in real time to compete for control of the football. Therefore, in this area, the smaller the offset between the virtual camera and the virtual ball, the better. Therefore, in step S240 above, "determine the second position in the virtual game scene based on the target position," when the target position is located in the central area of ​​the virtual game scene, the target position can be determined as the second position in the virtual game scene.

[0097] For example, when the world coordinates of the virtual sphere at the target position in the area are (x1, y1), the world coordinates of the second position that the virtual camera needs to switch to are also (x1, y1). Figure 9 As shown, when the world coordinates corresponding to the second position that the virtual camera needs to switch to are the same as the world coordinates corresponding to the virtual sphere when it is in the target position, in the second scene captured by the virtual camera during the process of adjusting from the first position to the second position in the virtual game, the virtual sphere 30 is always in the center of the display screen of the electronic device.

[0098] When the virtual sphere is located in an area other than the central area in the virtual game scene, the step S233 above, "determine the second position in the virtual game scene according to the position offset parameter and the world coordinates of the target position", can be specifically determined in the following way, which includes steps S2331 to S2332.

[0099] Step S2331: Decompose the world coordinates of the target position to obtain the first displacement in the first preset direction and the second displacement in the second preset direction corresponding to the target position; wherein the first preset direction and the second preset direction are perpendicular to each other.

[0100] Step S2332: Determine the second position in the virtual game scene based on the position offset parameter, the first displacement, and the second displacement.

[0101] The first and second preset directions mentioned above can be respectively as follows: Figure 5 The X-axis and Y-axis directions are shown. That is, in this step, the target position is split in the X-axis and Y-axis directions to obtain the first displacement and the second displacement, respectively. Then, the first displacement and the second displacement are offset to obtain the second position.

[0102] For the specific implementation of determining the second position in the virtual game scene based on the position offset parameter, the first displacement and the second displacement, reference may be made to the following further description of the method for determining the second position under different circumstances where the virtual sphere is located in the rest of the area other than the central area in the above-mentioned virtual game scene.

[0103] When the virtual sphere is located in the first boundary area B, in the real world, in order to make users watching the match more focused on the football game and minimize the capture of various information outside the stadium by the camera, the moving distance of the camera during broadcasting usually needs to be smaller than the moving distance of the football. For example, when the football is located in the upper boundary area B2, the upward moving distance of the camera is smaller than the moving distance of the football, so that the football can be located at a position slightly above the middle of the display screen of the electronic device, and in this way, the footage outside the football field captured by the camera is less.

[0104] Based on the above principle, in the embodiments of the present application, when the virtual sphere is located in the first boundary area B, a certain offset may be set for the moving distances of the virtual sphere and the virtual lens in the Y-axis direction, and the offset between the virtual sphere and the virtual lens in the X-axis direction is 0. This can not only make the players pay more attention to whether the virtual sphere will cross the sideline, create a tense atmosphere where the virtual sphere is about to go out of bounds, and improve the player's game experience, but also track the moving trajectory of the virtual sphere in real time in the X-axis direction, so that the position change between the virtual lens and the virtual sphere does not shift, which is more in line with the camera movement rhythm of football in the real world.

[0105] The above-mentioned setting of a certain offset in the Y-axis direction can be understood as setting a position offset parameter for the world coordinate corresponding to the virtual sphere when it is at the target position in the first boundary area B. For example, when the world coordinate corresponding to the virtual sphere at the target position in the first boundary area B is (x2, y2), the position offset parameter set in the Y-axis direction is k1, and k1 is a positive number. Then when the virtual lens moves following the virtual sphere, the second position to be switched to may be (x2, k1×y2).

[0106] It can be seen that when the target scene area is the first boundary area in the virtual game scene, the position offset parameter corresponding to the first boundary area is acquired, then the second displacement is offset according to the position offset parameter, and the first displacement and the offset second displacement are determined as the second position.

[0107] In a specific embodiment, when the virtual sphere is located in the upper boundary area B2, 0<k1≤1, that is, the ordinate in the world coordinate corresponding to the virtual sphere at the target position is attenuated, so that the position offset of the virtual lens is smaller than the position offset of the virtual sphere. In this way, as Figure 10As shown, the virtual sphere 30 can be displayed at a position slightly above the center of the display screen of the electronic device. When the virtual sphere is located in the lower boundary area B1, 1<k1≤N1, that is, as shown in Figure 11 the virtual sphere can be displayed at a position slightly below the center of the display screen of the electronic device. Wherein N1 is the upper limit of the value of the position offset parameter k1. When k1=N1, the position of the virtual lens in the Y-axis direction is locked to remain unchanged, so that the virtual lens does not follow the movement of the virtual sphere in the Y-axis direction, that is, the game picture displayed on the display screen of the electronic device remains unchanged.

[0108] When the virtual sphere is located in the second boundary area D, the situation is the same as when the virtual sphere is located in the first boundary area B. In order to allow users watching the match to focus more on the football game and minimize the camera's capture of various information outside the pitch, the moving distance of the camera during broadcasting usually needs to be less than the moving distance of the football. For example, when the football is located in the second boundary area D1, the distance the camera moves to the left is less than the distance the football moves to the left, so that the football can be displayed at a position slightly to the left of the center of the display screen of the electronic device. In this way, the camera captures fewer pictures outside the left side of the football pitch, reducing the influence of picture information outside the pitch on the player.

[0109] Based on the above principle, in the embodiment of the present application, when the virtual sphere is located in the second boundary area D, a certain offset can be set for the moving distances of the virtual sphere and the virtual lens in the X-axis direction, and the offset between the virtual sphere and the virtual lens in the Y-axis direction is set to 0. This not only allows the player to pay more attention to whether the virtual sphere will cross the boundary line, creates a tense atmosphere where the virtual sphere is about to go out of bounds, and improves the player's game experience, but also can track the movement trajectory of the virtual sphere in real time in the Y-axis direction, which is more in line with the camera movement rhythm of football in the real world.

[0110] The above-mentioned setting of a certain offset in the X-axis direction can be understood as setting a position offset parameter for the world coordinate corresponding to the target position of the virtual sphere when it is in the second boundary area D. For example, when the world coordinate corresponding to the target position of the virtual sphere in the second boundary area D is (x3, y3), the position offset parameter set in the X-axis direction is k2, and k2 is a positive number. Then when the virtual lens moves following the virtual sphere, the second position to be switched to can be (k2×x3, y3).

[0111] It can be seen that when the target scene area is the second boundary area in the virtual game scene, the position offset parameter corresponding to the second boundary area is acquired, the first displacement is offset according to the position offset parameter, and the offset first displacement and the second displacement are determined as the second position.

[0112] In a specific embodiment, when the virtual sphere is located in the left boundary region D1, 1<k2≤N2, that is, as shown in Figure 12 , the virtual sphere can be displayed at a position slightly to the left of the center of the display screen of the electronic device. When the virtual sphere is located in the right boundary region D2, 0<k2≤1, that is, the abscissa in the world coordinate corresponding to the target position of the virtual sphere is attenuated, so that the position offset of the virtual lens is smaller than the position offset of the virtual sphere. In this way, as shown in Figure 13 , the virtual sphere can be displayed at a position slightly to the right of the center of the display screen of the electronic device. Wherein, N2 is the upper limit of the value of the position offset parameter k2. When k2=N2, the position of the virtual lens in the X-axis direction is locked to remain unchanged, so that the virtual lens does not follow the movement of the virtual sphere in the X-axis direction, that is, the game screen displayed on the display screen of the electronic device remains unchanged.

[0113] When the virtual sphere is located in the corner region C, it is more in line with the player's visual experience to display the virtual sphere at the corner of the display screen of the electronic device. For example, when the football is located in Figure 8 the illustrated corner region C1, it is more in line with the player's visual experience to make the football displayed at the lower left corner of the display screen of the electronic device. To achieve the above objective, the embodiment of the present application may make the moving distances of the virtual lens to the left and downward both smaller than the moving distances of the football to the left and downward. In this way, not only the screen outside the virtual stadium captured by the virtual camera is less, which is consistent with the broadcast screen of football matches in the real world, but also the display position of the virtual sphere is more in line with the player's visual requirements, improving the player's game experience.

[0114] To meet the above requirements, in the embodiment of the present application, when the virtual sphere is located in the corner region C, a certain offset can be set for the moving distances of the virtual sphere and the virtual lens in both the X-axis direction and the Y-axis direction, that is, preset position offset parameters are superimposed on the world coordinates corresponding to the target position of the virtual sphere when it is in the corner region C, so as to calculate the world coordinates of the second position to which the virtual lens needs to switch. For example, when the world coordinate of the target position of the virtual sphere in the corner region C is (x4, y4), the position offset parameter set in the X-axis direction is k3, and the position offset parameter set in the Y-axis direction is k4. Wherein, both k3 and k4 are positive numbers. Then when the virtual lens moves following the virtual sphere, the second position to which it needs to switch can be (k3×x4, k4×y4).

[0115] It can be seen that when the target scene region is a corner region in the virtual game scene, the position offset parameters corresponding to the corner region are acquired, and the position offset parameters corresponding to the corner region may include a first offset parameter and a second offset parameter; the first displacement is offset according to the first offset parameter, the second displacement is offset according to the second offset parameter, and the offset first displacement and the offset second displacement are determined as the second position.

[0116] In a specific embodiment, when the virtual sphere moves in the corner region C1, 1<k3≤N3 and 1<k4≤N4, that is, as shown in Figure 14 , in the second scene image captured while the virtual camera is adjusted from the first position to the second position in the virtual game, the virtual sphere can be displayed at a position offset to the lower left of the center of the display screen of the electronic device; when the virtual sphere moves in the corner region C2, 1<k3≤N3 and 0<k4≤1, that is, as shown in Figure 15 , when the virtual camera is switched to the second position, the virtual sphere 30 can be displayed at a position offset to the upper left of the center of the display screen of the electronic device; when the virtual sphere moves in the corner region C3, 0<k3≤1 and 0<k4≤1, that is, as shown in Figure 16 , in the second scene image captured while the virtual camera is adjusted from the first position to the second position in the virtual game, the virtual sphere 30 can be displayed at a position offset to the upper right of the center of the display screen of the electronic device; when the virtual sphere moves in the corner region C4, 0<k3≤1 and 1<k4≤N4, that is, as shown in Figure 17 , in the second scene image captured while the virtual camera is adjusted from the first position to the second position in the virtual game, the virtual sphere 30 can be displayed at a position offset to the lower right of the center of the display screen of the electronic device.

[0117] It can be understood that the aforementioned N3 is the upper limit of the value of the position offset parameter k3. When k3=N3, the position of the virtual camera is locked and remains unchanged, so that the virtual camera does not follow the movement of the virtual sphere in the X-axis direction. The aforementioned N4 is the upper limit of the value of the position offset parameter k4. When k4=N4, the position of the virtual camera in the Y-axis direction is locked and remains unchanged, so that the virtual camera does not follow the movement of the virtual sphere in the Y-axis direction.

[0118] To more clearly understand the position change of the virtual camera caused by following the movement of the virtual sphere, the relationship between the target position of the virtual sphere in the virtual court and the corresponding second position of the virtual camera is summarized below by taking Table 1 as an example.

[0119] Table 1 Example of Target Positions and Second Positions

[0120]

[0121] Understandably, when the target scene areas are the first boundary area, the second boundary area, or the corner area, the position offset parameters corresponding to each area have an upper limit. When the position offset parameters corresponding to the target scene area are greater than or equal to a preset threshold, in this embodiment, the second position in the virtual game scene can be determined according to the preset threshold and the world coordinates of the target position. That is, the displacement values ​​of the world coordinates of the target position are offset by the preset threshold, and the virtual camera is controlled to enter the position locking state at the second position. The position locking state is the state in which the virtual camera does not change position with the movement of the virtual sphere.

[0122] Step S250: Based on the speed parameters, adjust the virtual camera from the first position to the second position, and display the second scene captured during the process of adjusting the virtual camera from the first position to the second position.

[0123] In a specific embodiment, the original moving speed of the virtual lens when it is in the first position can be obtained; the speed parameter can be superimposed with the original moving speed to obtain the target speed of the virtual lens; and based on the target speed, the virtual lens can be adjusted from the first position to the second position.

[0124] It should be further explained here that in the process of moving the virtual camera from the first position to the second position, the final result is only to infinitely approach the coordinate position of the second position. In most cases, it will not be able to completely coincide with the second position. Therefore, it is sufficient to keep the difference between the final position and the second position within a certain range.

[0125] Understandably, the virtual camera is constantly in shooting mode while moving, and displays the second scene captured during the movement to the player through the display screen, allowing the player to smoothly switch between game scenes.

[0126] It should be noted that, similar to this embodiment and other embodiments of this application, Figures 3 to 17 The dimensions, appearance, layout, and text displayed in the illustrations are for illustrative purposes only and are not intended to limit the actual dimensions.

[0127] This concludes the explanation of the method provided in this embodiment. By acquiring the position of the virtual sphere in the virtual game scene, the movement speed of the virtual camera and the second position to be adjusted are determined based on the position of the virtual sphere. That is, the movement speed and position of the virtual camera are determined in real time based on the movement position of the virtual sphere. When the virtual sphere is located in different positions in the virtual game scene, the movement speed of the virtual camera is different from the second position to be adjusted. This can improve the flexibility of the virtual camera movement, make the movement of the virtual camera more in line with ball games, enhance the immersiveness of the camera movement in ball games, make it more in line with the characteristics of real-world broadcasting of ball sports, and enhance the player's visual experience.

[0128] Corresponding to the virtual camera position adjustment method provided in the embodiments of this application, the embodiments of this application also provide a virtual camera position adjustment device 300, such as... Figure 18 As shown, the device 300 includes: a display unit 301, an acquisition unit 302, a determination unit 303, and an adjustment unit 304;

[0129] Display unit 301 is used to display a first scene image of the virtual sphere captured by a virtual lens at a first position in the virtual game scene;

[0130] The acquisition unit 302 is used to acquire the target position of the virtual sphere in the virtual game scene;

[0131] Determining unit 303 is used to determine the velocity parameters corresponding to the target position;

[0132] The determining unit 303 is also used to determine a second position in the virtual game scene based on the target position;

[0133] The adjustment unit 304 is used to adjust the virtual camera from the first position to the second position according to the speed parameter, and to display the second scene image captured during the process of adjusting the virtual camera from the first position to the second position.

[0134] Optionally, the determining unit 303 is specifically used to convert the world coordinates of the target position into screen coordinates, and determine the target screen area to which the screen coordinates belong on the display screen; the target screen area is one of the screen areas obtained by pre-dividing the display screen; obtain the area velocity parameter corresponding to the target screen area, and determine the area velocity parameter as the velocity parameter corresponding to the target position.

[0135] Optionally, the determining unit 303 is further configured to determine the target scene region to which the world coordinates of the target position belong in the virtual game scene; the target scene region is one of the scene regions pre-divided for the virtual game scene; obtain the position offset parameter corresponding to the target scene region; and determine the second position in the virtual game scene based on the position offset parameter and the world coordinates of the target position.

[0136] Optionally, the determining unit 303 is further configured to, when the position offset parameter corresponding to the target scene area is greater than or equal to a preset threshold, determine a second position in the virtual game scene based on the preset threshold and the world coordinates of the target position, and control the virtual camera to enter a position locking state at the second position; the position locking state means that the virtual camera does not change position following the movement of the virtual sphere.

[0137] Optionally, the determining unit 303 is further configured to determine the target location as a second location in the virtual game scene if the target location is located in the central area of ​​the virtual game scene.

[0138] Optionally, the determining unit 303 is further configured to decompose the world coordinates of the target position to obtain a first displacement in a first preset direction and a second displacement in a second preset direction corresponding to the target position; wherein the first preset direction and the second preset direction are perpendicular to each other; and determine the second position in the virtual game scene based on the position offset parameter, the first displacement and the second displacement.

[0139] Optionally, the determining unit 303 is specifically used to offset the second displacement according to the position offset parameter when the target scene area is the first boundary area in the virtual game scene, and to determine the first displacement and the offset second displacement as the second position; the first boundary area is respectively set on both sides of the central area of ​​the virtual game scene along the first preset direction.

[0140] Optionally, the determining unit 303 is specifically used to offset the first displacement according to the position offset parameter when the target scene area is the second boundary area in the virtual game scene, and determine the offset first displacement and the second displacement as the second position; the second boundary area is respectively set on both sides of the central area of ​​the virtual game scene along the second preset direction.

[0141] Optionally, the determining unit 303 is specifically used to offset the first displacement and the second displacement according to the position offset parameter when the target scene area is a corner area in the virtual game scene, and to determine the offset first displacement and the offset second displacement as the second position; the corner area connects a first boundary area and a second boundary area, the first boundary area is respectively set on both sides of the center area of ​​the virtual game scene along the first preset direction, and the second boundary area is respectively set on both sides of the center area of ​​the virtual game scene along the second preset direction.

[0142] Optionally, the adjustment unit 304 is specifically used to obtain the original moving speed of the virtual lens when it is in the first position; to superimpose the speed parameter with the original moving speed to obtain the target speed of the virtual lens; and to adjust the virtual lens from the first position to the second position based on the target speed.

[0143] Corresponding to the virtual camera position adjustment method provided in the embodiments of this application, the embodiments of this application also provide an electronic device for adjusting the position of a virtual camera, such as... Figure 19 As shown, the electronic device includes: a processor 401; and a memory 402 for storing a program for adjusting the position of a virtual lens. After the device is powered on and the processor runs the program for adjusting the position of the virtual lens, it performs the following steps:

[0144] The image shows the first scene captured by a virtual camera at a first location within the virtual game scene, showing the virtual sphere.

[0145] Obtain the target position of the virtual sphere in the virtual game scene;

[0146] Determine the velocity parameters corresponding to the target position;

[0147] Based on the target location, determine the second location in the virtual game scene;

[0148] Based on the speed parameters, the virtual camera is adjusted from the first position to the second position, and the second scene captured during the adjustment process is displayed.

[0149] Corresponding to the virtual camera position adjustment method provided in the embodiments of this application, the embodiments of this application also provide a computer-readable storage medium storing a program for the virtual camera position adjustment method, which is executed by a processor to perform the following steps:

[0150] The image shows the first scene captured by a virtual camera at a first location within the virtual game scene, showing the virtual sphere.

[0151] Obtain the target position of the virtual sphere in the virtual game scene;

[0152] Determine the velocity parameters corresponding to the target position;

[0153] Based on the target location, determine the second location in the virtual game scene;

[0154] Based on the speed parameters, the virtual camera is adjusted from the first position to the second position, and the second scene captured during the adjustment process is displayed.

[0155] It should be noted that for a detailed description of the apparatus, electronic device and computer-readable storage medium provided in the embodiments of this application, please refer to the relevant description of the virtual lens position adjustment method embodiments provided in the embodiments of this application, which will not be repeated here.

[0156] Although this application discloses preferred embodiments as described above, it is not intended to limit this application. Any person skilled in the art can make possible changes and modifications without departing from the spirit and scope of this application. Therefore, the scope of protection of this application should be determined by the scope defined in the claims of this application.

[0157] In a typical configuration, an electronic device includes one or more processors (CPU), input / output interfaces, network interfaces, and memory.

[0158] Memory may include non-persistent storage in computer-readable media, such as random access memory (RAM) and / or non-volatile memory, such as read-only memory (ROM) or flash RAM. Memory is an example of computer-readable media.

[0159] 1. Computer-readable media includes both permanent and non-permanent, removable and non-removable media that can store information by any method or technology. Information can be computer-readable operations, data structures, program modules, or other data. Examples of computer storage media include, but are not limited to, phase-change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technologies, CD-ROM, digital versatile optical disc (DVD) or other optical storage, magnetic tape, magnetic magnetic disk storage or other magnetic storage devices, or any other non-transferable medium that can be used to store information accessible by a computing device. As defined herein, computer-readable media does not include non-transitory computer-readable media, such as modulated data signals and carrier waves.

[0160] 2. Those skilled in the art will understand that embodiments of this application can be provided as methods, systems, or computer program products. Therefore, this application can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, this application can take the form of a computer program product embodied on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.

[0161] Although this application discloses preferred embodiments as described above, it is not intended to limit this application. Any person skilled in the art can make possible changes and modifications without departing from the spirit and scope of this application. Therefore, the scope of protection of this application should be determined by the scope defined in the claims of this application.

Claims

1. A method for adjusting the position of a virtual camera, characterized in that, The method includes: The image shows the first scene captured by a virtual camera at a first location within the virtual game scene, showing the virtual sphere. Obtain the target position of the virtual sphere in the virtual game scene; Determining the velocity parameter corresponding to the target position includes: converting the world coordinates of the target position into screen coordinates, and determining the target screen area to which the screen coordinates belong on the display screen; the target screen area is one of the screen areas pre-divided from the display screen; obtaining the area velocity parameter corresponding to the target screen area, and determining the area velocity parameter as the velocity parameter corresponding to the target position; Determining a second location in the virtual game scene based on the target location includes: determining the target scene region to which the world coordinates of the target location belong in the virtual game scene; the target scene region is one of the scene regions pre-divided for the virtual game scene; obtaining a position offset parameter corresponding to the target scene region; and determining the second location in the virtual game scene based on the position offset parameter and the world coordinates of the target location. Based on the speed parameters, the virtual camera is adjusted from the first position to the second position, and the second scene captured during the adjustment process is displayed.

2. The method according to claim 1, characterized in that, The step of determining the second position in the virtual game scene based on the position offset parameter and the world coordinates of the target position includes: when the position offset parameter corresponding to the target scene area is greater than or equal to a preset threshold, determining the second position in the virtual game scene based on the preset threshold and the world coordinates of the target position, and controlling the virtual camera to enter a position locking state at the second position; the position locking state means that the virtual camera does not change position following the movement of the virtual sphere.

3. The method according to claim 1, characterized in that, Determining the second position in the virtual game scene based on the target position includes: when the target position is located in the central area of ​​the virtual game scene, determining the target position as the second position in the virtual game scene.

4. The method according to claim 1, characterized in that, The step of determining the second position in the virtual game scene based on the position offset parameter and the world coordinates of the target position includes: splitting the world coordinates of the target position to obtain a first displacement in a first preset direction and a second displacement in a second preset direction corresponding to the target position; wherein the first preset direction and the second preset direction are perpendicular to each other; and determining the second position in the virtual game scene based on the position offset parameter, the first displacement and the second displacement.

5. The method according to claim 4, wherein determining the second position in the virtual game scene based on the position offset parameter, the first displacement, and the second displacement comprises: When the target scene area is the first boundary area in the virtual game scene, the second displacement is offset according to the position offset parameter, and the first displacement and the offset second displacement are determined as the second position; the first boundary area is respectively set on both sides of the central area of ​​the virtual game scene along the first preset direction.

6. The method according to claim 4, characterized in that, Determining the second position in the virtual game scene based on the position offset parameter, the first displacement, and the second displacement includes: when the target scene area is the second boundary area in the virtual game scene, offsetting the first displacement according to the position offset parameter, and determining the offset first displacement and the second displacement as the second position; the second boundary area is respectively set on both sides of the central area of ​​the virtual game scene along the second preset direction.

7. The method according to claim 4, characterized in that, Determining the second position in the virtual game scene based on the position offset parameter, the first displacement, and the second displacement includes: when the target scene area is a corner area in the virtual game scene, offsetting the first displacement and the second displacement according to the position offset parameter, and determining the offset first displacement and the offset second displacement as the second position; the corner area connects a first boundary area and a second boundary area, the first boundary area is respectively set on both sides of the center area of ​​the virtual game scene along the first preset direction, and the second boundary area is respectively set on both sides of the center area of ​​the virtual game scene along the second preset direction.

8. The method according to claim 1, characterized in that, The step of adjusting the virtual camera from the first position to the second position according to the speed parameter includes: obtaining the original moving speed of the virtual camera when it is in the first position; superimposing the speed parameter with the original moving speed to obtain the target speed of the virtual camera; and adjusting the virtual camera from the first position to the second position based on the target speed.

9. A virtual camera position adjustment device, characterized in that, The device includes: a display unit, an acquisition unit, a determination unit, and an adjustment unit; The display unit is used to display a first scene image captured by a virtual lens at a first location in a virtual game scene, showing the virtual sphere. The acquisition unit is used to acquire the target position of the virtual sphere in the virtual game scene; The determining unit is configured to determine the velocity parameter corresponding to the target position; specifically, the determining unit is configured to convert the world coordinates of the target position into screen coordinates, and determine the target screen area to which the screen coordinates belong on the display screen; the target screen area is one of the screen areas pre-divided by the display screen; obtain the area velocity parameter corresponding to the target screen area, and determine the area velocity parameter as the velocity parameter corresponding to the target position; the determining unit is further configured to determine a second position in the virtual game scene based on the target position; specifically, the determining unit is further configured to determine the target scene area to which the world coordinates of the target position belong in the virtual game scene; the target scene area is one of the scene areas pre-divided for the virtual game scene; obtain the position offset parameter corresponding to the target scene area; determine the second position in the virtual game scene based on the position offset parameter and the world coordinates of the target position; the adjusting unit is configured to adjust the virtual camera from the first position to the second position according to the velocity parameter, and display the second scene image captured during the process of adjusting the virtual camera from the first position to the second position.

10. An electronic device, characterized in that, include: processor; And a memory for storing a data processing program, which, when powered on and run by the processor, executes the method as described in any one of claims 1 to 8.

11. A computer-readable storage medium, characterized in that, The system contains a data processing program that is executed by a processor to perform the method as described in any one of claims 1 to 8.

Citation Information

Patent Citations

  • Display method and device and storage medium

    CN114053701A

  • Game display control method and device, terminal equipment and storage medium

    CN115400428A