View angle control method and device in game, electronic equipment and storage medium
By adjusting the virtual camera perspective according to the player's action instructions, the problem of vision limitations in traditional racing games is solved, and a more dynamic and immersive gaming experience is achieved.
Patent Information
- Application Number
- CN202510428390.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-04-07
- Publication Date
- 2025-05-23
- Estimated Expiration
- 2045-04-07
AI Technical Summary
In traditional racing games, the shooting field of virtual cameras is fixed directly behind or inside the player's racing car, causing players to be unable to grasp the surrounding situation in time, lack visual dynamics, and unable to experience the immersive gaming experience.
The player's action command determines at least one second game vehicle, and adjusts the shooting perspective of the virtual camera based on the relative positional relationship between the first game vehicle and the second game vehicle, so that the player can observe some or all of the second game vehicle located around the first game vehicle.
It realizes that the player's perspective is no longer limited to the front of the first game vehicle, and can observe the surrounding situation dynamically and flexibly, improving the immersion and interactivity of the game, thereby enhancing the game experience.
Smart Images

Figure CN120022595A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of game technology, and in particular to a method, device, electronic device and storage medium for controlling viewing angle in a game. Background Art
[0002] In racing games, perspective control is the key to improving the gaming experience.
[0003] In traditional racing games, the shooting field of view of the virtual camera is bound to the car controlled by the player. For example, the shooting field of the virtual camera is always located directly behind or inside the player's car. During the game, no matter how the car turns, the player can only see the situation in front of the car and cannot grasp the surrounding situation in time. There is a lack of visual dynamics and the game cannot provide players with an immersive gaming experience. Summary of the invention
[0004] The purpose of this application is to provide a method, device, electronic device and storage medium for viewing angle control in a game, so as to enhance the player's gaming immersion and interactivity, thereby improving the gaming experience.
[0005] To achieve the above purpose, the technical solution adopted in the embodiment of the present application is as follows:
[0006] In a first aspect, an embodiment of the present application provides a method for controlling a viewing angle in a game, wherein a game scene screen under the viewing angle of a virtual camera is displayed on a user interface of a terminal device, wherein the game scene screen includes a first game vehicle controlled by a player through the terminal device, and a second game vehicle, wherein the method includes:
[0007] Determining at least one second game vehicle according to the player's action command;
[0008] The shooting angle of the virtual camera is adjusted according to the relative position relationship between the first game vehicle and each of the second game vehicles.
[0009] In a second aspect, an embodiment of the present application further provides a perspective control device in a game, which displays a game scene screen under the perspective of a virtual camera on a user interface of a terminal device, wherein the game scene screen includes a first game vehicle controlled by a player through the terminal device, and a second game vehicle, wherein the device includes: a determination module and an adjustment module;
[0010] The determination module is used to determine at least one second game vehicle according to the player's action instruction;
[0011] The adjustment module is used to adjust the shooting angle of the virtual camera according to the relative position relationship between the first game vehicle and each of the second game vehicles.
[0012] In a third aspect, an embodiment of the present application provides an electronic device comprising: a processor, a storage medium and a bus, wherein the storage medium stores machine-readable instructions executable by the processor. When the electronic device is running, the processor and the storage medium communicate via the bus, and the processor executes the machine-readable instructions to execute the perspective control method in the game provided in the first aspect.
[0013] In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium having a computer program stored thereon, and when the computer program is executed by a processor, the game perspective control method provided in the first aspect is executed.
[0014] The beneficial effects of this application are:
[0015] The present application provides a method, device, electronic device and storage medium for controlling a viewing angle in a game, including: determining at least one second game vehicle according to a player's action command; and adjusting the shooting angle of a virtual camera according to the relative position relationship between the first game vehicle and each second game vehicle. The method can determine at least one second game vehicle located around the first game vehicle controlled by the player through the player's action command, so that based on the relative position relationship between the first game vehicle and the second game vehicle, the shooting angle of the virtual camera can be controlled to be adjusted, so that under the adjusted shooting angle, the player can observe part or all of the second game vehicles located around the first game vehicle, so that the player's viewing angle is no longer limited to the front of the first game vehicle, and the player can dynamically and flexibly observe the surrounding situation, thereby enhancing the game immersion and game experience.
[0016] Secondly, the rotation of the shooting angle of view of the virtual camera is controlled in combination with the offset angular velocity, so that the rotation of the shooting angle of view is smoother and the game experience of the player is improved.
[0017] Secondly, by setting the tolerance angle, accidental touches of game operations can be effectively avoided, thereby improving the precision of game operations.
[0018] Finally, by continuously monitoring the player's facial rotation operations and restoring the virtual camera's shooting angle to the initial shooting angle when the player returns to the state of facing the screen, the player can naturally return to looking straight ahead when there is no need to observe the surrounding situation, without the need for additional operations, which greatly improves the ease of use of the game. BRIEF DESCRIPTION OF THE DRAWINGS
[0019] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings required for use in the embodiments will be briefly introduced below. It should be understood that the following drawings only show certain embodiments of the present application and therefore should not be regarded as limiting the scope. For ordinary technicians in this field, other related drawings can be obtained based on these drawings without paying creative work.
[0020] Figure 1 A schematic diagram of a user interface provided in an embodiment of the present application;
[0021] Figure 2 A schematic diagram of a flow chart of a viewing angle control method in a game provided in an embodiment of the present application;
[0022] Figure 3 A schematic diagram of a flow chart of another method for controlling viewing angle in a game provided in an embodiment of the present application;
[0023] Figure 4 A schematic diagram of a flow chart of another method for controlling viewing angle in a game provided in an embodiment of the present application;
[0024] Figure 5 Another user interface diagram provided in an embodiment of the present application;
[0025] Figure 6 A schematic diagram of a flow chart of another method for controlling viewing angle in a game provided in an embodiment of the present application;
[0026] Figure 7 A schematic diagram of another user interface provided in an embodiment of the present application;
[0027] Figure 8 A schematic diagram of a flow chart of another method for controlling viewing angle in a game provided in an embodiment of the present application;
[0028] Fig. 9 A schematic diagram of a game scene from a top-down perspective provided in an embodiment of the present application;
[0029] Fig.10 A schematic diagram of a flow chart of another method for controlling viewing angle in a game provided in an embodiment of the present application;
[0030] Fig.11 A schematic diagram of a viewing angle control device in a game provided by an embodiment of the present application;
[0031] Fig.12 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0032] To make the purpose, technical scheme and advantages of the embodiments of the present application clearer, the technical scheme in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. It should be understood that the drawings in the present application only serve the purpose of explanation and description and are not used to limit the scope of protection of the present application. In addition, it should be understood that the schematic drawings are not drawn in real proportion. The flowchart used in this application shows the operations implemented according to some embodiments of the present application. It should be understood that the operations of the flowchart can be implemented out of sequence, and the steps without logical context can be reversed in order or implemented simultaneously. In addition, those skilled in the art can add one or more other operations to the flowchart under the guidance of the content of the present application, or remove one or more operations from the flowchart.
[0033] In addition, the described embodiments are only a part of the embodiments of the present application, rather than all the embodiments. The components of the embodiments of the present application described and shown in the drawings here can be arranged and designed in various configurations. Therefore, the following detailed description of the embodiments of the present application provided in the drawings is not intended to limit the scope of the application claimed for protection, but merely represents the selected embodiments of the present application. Based on the embodiments of the present application, all other embodiments obtained by those skilled in the art without making creative work belong to the scope of protection of the present application.
[0034] In one embodiment of the present disclosure, the viewing angle control method in the game can be run on a local terminal device or a server. When the viewing angle control method in the game is run on a server, the method can be implemented and executed based on a cloud interaction system, wherein the cloud interaction system includes a server and a client device.
[0035] In an optional implementation, various cloud applications can be run under the cloud interaction system, such as cloud games. Taking cloud games as an example, cloud games refer to a game mode based on cloud computing. In the operation mode of cloud games, the operating body of the game program and the main body of the game screen presentation are separated. The storage and operation of the perspective control method in the game are completed on the cloud game server. The role of the client device is used for receiving and sending data and presenting the game screen. For example, the client device can be a display device with data transmission function close to the user side, such as a mobile terminal, a TV, a computer, a handheld computer, etc.; but the cloud game server in the cloud is used for information processing. When playing the game, the player operates the client device to send an operation instruction to the cloud game server. The cloud game server runs the game according to the operation instruction, encodes and compresses the game screen and other data, and returns it to the client device through the network. Finally, the client device decodes and outputs the game screen.
[0036] In an optional embodiment, taking a game as an example, a local terminal device stores a game program and is used to present a game screen. The local terminal device is used to interact with the player through a graphical user interface, that is, the game program is downloaded and installed by an electronic device and run conventionally. The local terminal device may provide the graphical user interface to the player in a variety of ways, for example, it may be rendered and displayed on a display screen of the terminal, or provided to the player through a holographic projection. For example, the local terminal device may include a display screen and a processor, the display screen is used to present a graphical user interface, the graphical user interface includes a game screen, and the processor is used to run the game, generate a graphical user interface, and control the display of the graphical user interface on the display screen.
[0037] In a possible implementation, an embodiment of the present invention provides a method for controlling viewing angles in a game, providing a graphical user interface through a terminal device, wherein the terminal device may be the local terminal device mentioned above, or may be a client device in the cloud interaction system mentioned above.
[0038] It should be noted that the term "comprising" will be used in the embodiments of the present application to indicate the existence of the features declared thereafter, but does not exclude the addition of other features.
[0039] In racing games, perspective control is the key to improving the gaming experience. Currently, in racing games, the shooting field of view of the virtual camera in the scene is bound to the car controlled by the player. The shooting field of the virtual camera is fixed to the back of the player's car or inside the car. During the game, the player can only observe the situation in front of the traffic jam, and cannot dynamically and flexibly grasp the situation around the player's car, which lacks the sense of reality of the game.
[0040] Based on this, this solution provides a method for controlling the viewing angle in the game, which triggers the acquisition of other game vehicles near the player's game vehicle through the player's action command, and controls the adjustment of the shooting angle of the virtual camera according to the relative position relationship between the player's game vehicle and other game vehicles. The shooting angle of the virtual camera can be adjusted in real time based on the player's action command, so that the player can grasp the surrounding situation in time, enhance the immersion and interactivity of the game, and improve the gaming experience.
[0041] Figure 1A user interface schematic diagram provided for an embodiment of the present application, a user interface is displayed on a terminal device, and the user interface displays a game scene screen presented to the user under the current shooting angle of the virtual camera, and the virtual camera refers to a camera used to control the scene display range in the game scene. The game scene screen includes a first game vehicle and a second game vehicle controlled by the player through the terminal device. The second game vehicle may include multiple game vehicles, and the second game vehicle may be a game vehicle controlled by the player's teammates or a game vehicle controlled by the player's opponents. The game vehicle may be a racing car or other types of vehicles that can move under the control of the player.
[0042] When the shooting angle of the virtual camera changes, the second game vehicle in the presented game scene screen will also change. Through the player's action instructions, at least one second game vehicle located around the first game vehicle can be determined, and according to the relative position relationship between the second game vehicle and the first game vehicle, the shooting angle of the virtual camera can be dynamically adjusted. Under the adjusted shooting angle, the player can observe the second game vehicles located around the first game vehicle, and is no longer limited to only being able to observe the second game vehicle located in front of the first game vehicle. This overcomes the problem of the player's single field of vision in traditional solutions and enhances the immersion and interactivity of the game.
[0043] Figure 2 A flowchart of a method for controlling viewing angle in a game provided by an embodiment of the present application; Figure 2 As shown, the method may include:
[0044] S101. Determine at least one second game vehicle according to an action instruction of the player.
[0045] The player's action instructions are used to trigger at least one second game vehicle located around the first game vehicle in the game scene. The action instructions may include but are not limited to facial action instructions, hand action instructions, body action instructions, etc.
[0046] The surroundings here may refer to other areas except the area directly in front of the first game vehicle. Figure 1 The second game vehicle 1, the second game vehicle 2, the second game vehicle 3, etc. can all be considered as second game vehicles located around the first game vehicle.
[0047] The player logs in to the game through a mobile device and enters the game homepage. After the game scene screen is loaded, the camera device on the mobile device used by the player can recognize the player's action instructions, and then determine at least one second game vehicle according to the player's action instructions. The second game vehicle can be any game vehicle controlled by any other player except the first game vehicle controlled by the player.
[0048] S102: Adjust the shooting angle of the virtual camera according to the relative position relationship between the first game vehicle and each second game vehicle.
[0049] The system can collect the position information of the first game vehicle and each second game vehicle in the game scene in real time, so that the relative position relationship between the first game vehicle and each second game vehicle can be determined based on the position information of the first game vehicle and the position information of each second game vehicle.
[0050] According to the relative position relationship between the first game vehicle and each second game vehicle, the adjustment parameters for adjusting the shooting angle of the virtual camera can be determined, so that the shooting angle of the virtual camera is adjusted according to the adjustment parameters.
[0051] It is worth noting that, since the shooting angle of the virtual camera determines the content of the game screen presented on the screen, the game vehicle currently presented in the game screen can be updated by adjusting the shooting angle of the virtual camera. Under the adjusted shooting angle of the virtual camera, the player can observe part or all of the at least one second game vehicle determined, that is, the player can observe part or all of the second game vehicles located around the first game vehicle. The player's field of vision is no longer limited to the front of the first game vehicle, and the surrounding situation can be observed dynamically.
[0052] In summary, the in-game perspective control method provided by this embodiment includes: determining at least one second game vehicle according to the player's action instructions; and adjusting the shooting perspective of the virtual camera according to the relative position relationship between the first game vehicle and each second game vehicle. This method can determine at least one second game vehicle located around the first game vehicle controlled by the player through the player's action instructions, so that based on the relative position relationship between the first game vehicle and the second game vehicle, the shooting perspective of the virtual camera can be controlled to be adjusted, so that under the adjusted shooting perspective, the player can observe part or all of the second game vehicles located around the first game vehicle, so that the player's perspective is no longer limited to the front of the first game vehicle, and the surrounding situation can be observed dynamically and flexibly, thereby enhancing the game immersion and game experience.
[0053] Figure 3 A flowchart of another method for controlling a viewing angle in a game provided by an embodiment of the present application; optionally, in step S102, adjusting the shooting viewing angle of the virtual camera according to the relative position relationship between the first game vehicle and each second game vehicle may include:
[0054] S201. Determine a target second game vehicle according to a relative position relationship between the first game vehicle and each second game vehicle.
[0055] Usually, the shooting angle of the virtual camera is fan-shaped and has a certain extension range. Therefore, the target second game vehicle can be determined from the second game vehicles based on the relative position relationship between the first game vehicle and the second game vehicles. Based on the relative position relationship between the target second game vehicle and the first game vehicle, the shooting angle of the virtual camera is adjusted so that the target second game vehicle can be observed under the adjusted shooting angle. At the same time, based on the diffusion range of the shooting angle, other second game vehicles that are closer to the target second game vehicle and are also within the extension range of the shooting angle can also be observed.
[0056] S202: Adjust the shooting angle of the virtual camera according to the relative position relationship between the first game vehicle and the target second game vehicle.
[0057] Therefore, the adjustment parameters of the shooting angle of the virtual camera can be determined according to the relative position relationship between the first game vehicle and the target second game vehicle, so as to control the adjustment of the shooting angle of the virtual camera based on the adjustment parameters, so as to adjust the shooting angle of the virtual camera from directly in front of the first game vehicle to all around the first game vehicle, so that the player can at least observe the target second game vehicle.
[0058] Optionally, in step S201, determining the target second game vehicle based on the relative position relationship between the first game vehicle and each second game vehicle may include: determining the second game vehicle closest to the first game vehicle as the target second game vehicle based on the relative position relationship between the first game vehicle and each second game vehicle.
[0059] Optionally, the relative position relationship between the first game vehicle and each second game vehicle can be determined based on the real-time collected position information of the first game vehicle in the game scene and the position information of each second game vehicle in the game scene, so that the second game vehicle closest to the first game vehicle is used as the target second game vehicle.
[0060] Usually, in a racing game, the player needs to control the first game vehicle to avoid other second game vehicles around in time to ensure that the first game vehicle can smoothly drive to the finish line and win the game. The second game vehicle closest to the first game vehicle is more likely to cause obstacles to the first game vehicle or collide with the first game vehicle. Therefore, the second game vehicle closest to the first game vehicle is used as the target second game vehicle, and the shooting angle of the virtual camera can be controlled based on the relative position relationship between the first game vehicle and the target second game vehicle, so that the player can observe the target second game vehicle in time and avoid it.
[0061] Of course, in actual applications, any second game vehicle within a preset distance range from the first game vehicle can also be used as the target game vehicle. Based on the extended characteristics of the shooting angle of the virtual camera, more second game vehicles can still be observed for avoidance.
[0062] Figure 4 A flowchart of another method for controlling a viewing angle in a game provided by an embodiment of the present application; Optionally, in step S202, adjusting the shooting viewing angle of the virtual camera according to the relative position relationship between the first game vehicle and the target second game vehicle may include:
[0063] S301. Determine offset information according to a relative position relationship between a first game vehicle and a target second game vehicle.
[0064] The offset information includes an offset angle and an offset direction.
[0065] According to the relative position relationship between the first game vehicle and the target second game vehicle, the offset information of the shooting angle of the virtual camera can be determined, and based on the offset information, the shooting angle of the virtual camera can be adjusted from the current angle to a new shooting angle.
[0066] The relative position relationship between the target second game vehicle and the first game vehicle determines the offset direction and the offset angle. For example, if the target second game vehicle is located on the left side relative to the first game vehicle, the offset direction can be on the left side. The offset angle can be calculated based on the specific positions of the target second game vehicle and the first game vehicle.
[0067] Figure 5 Another user interface diagram provided in the embodiment of the present application is as follows: Figure 5 As shown, taking the top-down angle in the game as an example, in the marked coordinate system, since the positions of the first game vehicle and the target second game vehicle are known, the horizontal and vertical coordinates of the first game vehicle, as well as the horizontal and vertical coordinates of the target second game vehicle are all known.
[0068] First, since the target second game vehicle is located on the right side of the first game vehicle, it can be determined that the offset direction is to the right; the offset angle θ can be calculated by trigonometric function. Among them, taking the location of the first game vehicle as the origin, the horizontal coordinate of the target second game vehicle as the length of the first side, and the vertical coordinate of the target second game vehicle as the length of the second side, the value of the offset angle θ can be obtained by trigonometric function calculation.
[0069] S302: Adjust the shooting angle of the virtual camera according to the offset information.
[0070] Then, based on the obtained offset information, the adjustment of the shooting angle of view of the virtual camera can be controlled, that is, the shooting angle of view of the virtual camera is offset according to the offset angle and the offset direction to obtain the adjusted shooting angle of view.
[0071] Optionally, in step S302, adjusting the shooting angle of the virtual camera according to the offset information includes: adjusting the shooting angle of the virtual camera according to the offset information and the offset angular velocity.
[0072] In some embodiments, when controlling the adjustment of the shooting angle of view of the virtual camera, the control can also be performed based on the offset angular velocity. The offset angular velocity determines the speed at which the shooting angle of view of the virtual camera is offset. The faster the offset angular velocity, the faster the speed at which the shooting angle of view of the virtual camera is offset, and the user will have a certain sense of dizziness. Therefore, a reasonable offset angular velocity can be set to control the offset speed of the shooting angle of view of the virtual camera.
[0073] Figure 6 A flowchart of another method for controlling viewing angle in a game provided by an embodiment of the present application; Optionally, in the above steps, adjusting the shooting viewing angle of the virtual camera according to the offset information and the offset angular velocity may include:
[0074] S401. Determine a target offset angle of a shooting axis of a virtual camera according to the offset angle, wherein the target offset angle has a preset proportional relationship with the offset angle.
[0075] Usually, the shooting angle of a virtual camera will extend to both sides based on the shooting axis of the virtual camera. Therefore, when the shooting angle of the virtual camera is offset, the offset angle is not limited to the calculated offset angle. When the final target offset angle is in a certain proportional relationship with the calculated offset angle, based on the extension characteristics of the shooting angle, the target second game vehicle to be observed can still be covered under the new shooting angle.
[0076] The target offset angle may be half or one third of the offset angle, or may be 1.5 times of the offset angle. Of course, the smaller the offset angle, the better the control efficiency. Optionally, the proportional relationship between the target offset angle and the offset angle may be determined based on the extended range of the shooting angle of the virtual camera. The larger the extended range, the smaller the proportion of the target offset angle to the offset angle.
[0077] S402, controlling the shooting axis of the virtual camera to rotate from the current position along the offset direction to the target offset angle according to the offset angular velocity.
[0078] Optionally, based on the determined target offset angle, the shooting axis of the virtual camera can be controlled to rotate from the current position along the offset direction. Specifically, the shooting axis of the virtual camera can be rotated to the target offset angle at the offset angular velocity and then stopped. When the scene is shot with the adjusted shooting axis position of the virtual camera, the adjusted shooting angle of view of the virtual camera can be obtained, thereby updating the game screen.
[0079] Figure 7 Another user interface schematic diagram provided in the embodiment of the present application is as follows: Figure 7 As shown in (a), assuming that the calculated offset angle is the target offset angle, after controlling the shooting angle of the virtual camera to rotate, the position of the shooting axis will coincide with the position of the target second game vehicle, and under the adjusted shooting angle (that is, the area covered by the shaded part in the figure), the target second game vehicle will be located at the center of the shooting angle of the virtual camera, and the player can clearly observe the target second game vehicle; in addition, based on the extension characteristics of the shooting angle of the virtual camera (the area formed by the first extension edge and the second extension edge in the figure is the range covered by the shooting angle of the virtual camera), under the adjusted shooting angle, the player can also observe other second game vehicles within the shooting angle, so as to grasp the situation of multiple second game vehicles located on the right side of the first game vehicle.
[0080] Of course, if half of the offset angle is used as the target offset angle, such as Figure 7 As shown in (b), after the shooting axis of the virtual camera is rotated by the target offset angle, the target second game vehicle is still within the shooting angle of the virtual camera, but is no longer located at the center of the shooting angle. However, the player can still observe the target second game vehicle in time under the adjusted shooting angle of the virtual camera.
[0081] Figure 8 A flowchart of another method for controlling a viewing angle in a game provided by an embodiment of the present application; Optionally, in step S101, at least one second game vehicle is determined according to an action instruction of the player, including:
[0082] S501. Determine the player's facial rotation information according to the player's facial rotation operation.
[0083] The facial rotation information includes: facial rotation angle and facial rotation direction.
[0084] In some embodiments, the player's action instruction may be a facial rotation instruction. The facial rotation operation of the player may be captured and recognized through a camera on a terminal device used by the player, thereby determining facial rotation information.
[0085] The player's facial rotation information is defined based on a set reference position.
[0086] Optionally, the positions of key points of the player's face may be acquired through facial recognition technology, thereby determining the player's facial rotation direction based on the positions of the key points of the face.
[0087] The angle between the preset reference direction and the face rotation direction is used as the player's face rotation angle.
[0088] Of course, in some embodiments, assuming that it is pre-defined that when the facial rotation angle α is less than 0, the player's face is turned to the left, and when the player's facial rotation angle α is greater than 0, the facial rotation angle α can be directly calculated based on the player's facial rotation operation, and the facial rotation direction can be directly determined based on the positive or negative value of α.
[0089] For example, when α is -30°, it can represent that the face is rotated 30° to the left, and when α is -30°, it can represent that the face is rotated 30° to the right.
[0090] Fig. 9 A schematic diagram of a game scene at a top-down angle provided in an embodiment of the present application, assuming that the player is facing the screen of the terminal device, when the player is looking directly at the screen, the player's facial rotation angle α is 0 degrees, and it is defined that when the player's facial rotation angle α is less than 0, the player's face is turned to the left, and when the player's facial rotation angle α is greater than 0, the player's face is turned to the right. Of course, it can also be reversed, and when the player's facial rotation angle α is less than 0, the player's face is turned to the right, and when the player's facial rotation angle α is greater than 0, the player's face is turned to the left, which can be flexibly set.
[0091] Fig. 9 (a) shows the player's face looking directly at the screen. Fig. 9 (b) shows the angle α formed when the player's face turns to the right. Fig. 9 (c) in the figure shows the angle α formed when the player's face is turned to the left.
[0092] Of course, in actual applications, the player's motion instructions can also be hand motion instructions. Different motion instructions can be input by sliding fingers or hands in different directions. The player's motion instructions can also be body motion instructions. The player's body rotation angle and rotation direction are different, and the input motion instructions are also different.
[0093] S502. Determine at least one second game vehicle corresponding to the facial rotation information according to the facial rotation information.
[0094] Optionally, the correspondence between different facial rotation information and different game areas in the game scene can be pre-constructed, so that based on the correspondence, it can be determined that the facial rotation information corresponds to the game area in the game scene, and the second game vehicle in the game area can be used as at least one second game vehicle corresponding to the facial rotation information.
[0095] Fig.10 A flowchart of another method for controlling viewing angle in a game provided by an embodiment of the present application; Optionally, in the above steps, the method for determining the offset angular velocity may include:
[0096] S601. Determine the player's face rotation angle according to the player's face rotation operation.
[0097] The implementation is the same as step S501 and will not be repeated here. Based on the player's facial rotation operation, the player's facial rotation angle can be determined.
[0098] S602: Determine a deviation angular velocity according to the facial rotation angle.
[0099] In some embodiments, the offset angular velocity can be determined according to the set linear coefficient n, the linear coefficient n and the player's facial rotation angle α. Wherein, the offset angular velocity ω=nα. The offset angular velocity is used to control the rotation speed of the shooting angle of the virtual camera when rotating, that is, the rotation speed.
[0100] In order to prevent players from feeling dizzy, the linear coefficient n can be set lower.
[0101] Optionally, the method of the present application may further include: continuously monitoring the player's facial rotation operation, and if the facial rotation angle is within a preset angle range, restoring the shooting angle of the virtual camera to the initial shooting angle.
[0102] In one feasible manner, in order to improve the precision of game operations, a tolerance angle range can be set. For example, a tolerance angle Δα is set. When α calculated based on the facial rotation operation is within the range of (-Δα, Δα), the method flow of this scheme is not started, that is, the shooting angle of the virtual camera is not adjusted. This can prevent players from triggering the adjustment operation of the shooting angle of the virtual camera due to slight facial movements, thereby improving the precision of the operation and avoiding accidental touches of the game operation.
[0103] When it is detected that the player's facial rotation angle exceeds (-Δα, Δα), the process of this method is started, and the adjustment of the shooting angle of the virtual camera is controlled according to the above method steps.
[0104] In addition, during the execution of this solution, the system will continue to monitor the player's facial rotation operation, and when the player's facial rotation angle returns to the range of (-Δα, Δα) again, that is, when the player's face returns to the state of facing the screen, the shooting angle of the virtual camera is restored to the initial shooting angle, and the player's observation angle is restored to the front of the first game vehicle. This design allows the player to naturally return to the state of facing the screen when he does not need to observe the surroundings of the first game vehicle, without additional operations, which greatly improves the usability of the game.
[0105] In summary, the in-game perspective control method provided by this embodiment includes: determining at least one second game vehicle according to the player's action instructions; and adjusting the shooting perspective of the virtual camera according to the relative position relationship between the first game vehicle and each second game vehicle. This method can determine at least one second game vehicle located around the first game vehicle controlled by the player through the player's action instructions, so that based on the relative position relationship between the first game vehicle and the second game vehicle, the shooting perspective of the virtual camera can be controlled to be adjusted, so that under the adjusted shooting perspective, the player can observe part or all of the second game vehicles located around the first game vehicle, so that the player's perspective is no longer limited to the front of the first game vehicle, and the surrounding situation can be observed dynamically and flexibly, thereby enhancing the game immersion and game experience.
[0106] Secondly, the rotation of the shooting angle of view of the virtual camera is controlled in combination with the offset angular velocity, so that the rotation of the shooting angle of view is smoother and the game experience of the player is improved.
[0107] Secondly, by setting the tolerance angle, accidental touches of game operations can be effectively avoided, thereby improving the precision of game operations.
[0108] Finally, by continuously monitoring the player's facial rotation operations and restoring the virtual camera's shooting angle to the initial shooting angle when the player returns to the state of facing the screen, the player can naturally return to looking straight ahead when there is no need to observe the surrounding situation, without the need for additional operations, which greatly improves the ease of use of the game.
[0109] The following describes the devices, equipment, storage media, etc. used to execute the perspective control method in the game provided by this application. The specific implementation process and technical effects are described above and will not be repeated below.
[0110] Fig.11A schematic diagram of a perspective control device in a game provided by an embodiment of the present application, wherein the functions implemented by the perspective control device in the game correspond to the steps performed by the above method. The device can be understood as the above terminal device, or server, or a processor of the server, or can be understood as a component independent of the above server or processor that implements the functions of the present application under the control of the server, and displays a game scene screen from the perspective of a virtual camera on the user interface of the terminal device, wherein the game scene screen includes a first game vehicle controlled by the player through the terminal device, and a second game vehicle, such as Fig.11 As shown, the device may include: a determination module 110 and an adjustment module 120;
[0111] A determination module 110, configured to determine at least one second game vehicle according to an action instruction of the player;
[0112] The adjustment module 120 is used to adjust the shooting angle of the virtual camera according to the relative position relationship between the first game vehicle and each second game vehicle.
[0113] Optionally, the adjustment module 120 is specifically configured to determine the target second game vehicle according to the relative position relationship between the first game vehicle and each second game vehicle;
[0114] Adjust the shooting angle of the virtual camera according to the relative position relationship between the first game vehicle and the target second game vehicle.
[0115] Optionally, the adjustment module 120 is specifically configured to determine the second game vehicle closest to the first game vehicle as the target second game vehicle according to the relative position relationship between the first game vehicle and each second game vehicle.
[0116] Optionally, the adjustment module 120 is specifically configured to determine the offset information according to the relative position relationship between the first game vehicle and the target second game vehicle, where the offset information includes: an offset angle and an offset direction;
[0117] According to the offset information, adjust the shooting angle of the virtual camera.
[0118] Optionally, the adjustment module 120 is specifically configured to adjust the shooting angle of view of the virtual camera according to the offset information and the offset angular velocity.
[0119] Optionally, the adjustment module 120 is specifically used to determine a target offset angle of the shooting axis of the virtual camera according to the offset angle, and the target offset angle has a preset proportional relationship with the offset angle;
[0120] The shooting axis of the virtual camera is controlled to rotate from the current position along the offset direction to the target offset angle according to the offset angular velocity.
[0121] Optionally, the determination module 110 is specifically configured to determine the player's facial rotation information according to the player's facial rotation operation; the facial rotation information includes: a facial rotation angle and a facial rotation direction;
[0122] At least one second game vehicle corresponding to the facial rotation information is determined according to the facial rotation information.
[0123] Optionally, the determination module 110 is further configured to determine the player's facial rotation angle according to the player's facial rotation operation;
[0124] According to the face rotation angle, the deviation angular velocity is determined.
[0125] Optionally, the adjustment module 120 is further used to continuously monitor the player's facial rotation operation, and if the facial rotation angle is within a preset angle range, restore the shooting angle of the virtual camera to the initial shooting angle.
[0126] The above modules may be one or more integrated circuits configured to implement the above methods, such as one or more application specific integrated circuits (ASIC), or one or more digital singnal processors (DSP), or one or more field programmable gate arrays (FPGA). For another example, when a module is implemented in the form of a processing element scheduling program code, the processing element may be a general-purpose processor, such as a central processing unit (CPU) or other processor that can call program code. For another example, these modules may be integrated together and implemented in the form of a system-on-a-chip (SOC).
[0127] The above modules can be connected or communicated with each other via a wired connection or a wireless connection. The wired connection may include a metal cable, an optical cable, a hybrid cable, etc., or any combination thereof. The wireless connection may include a connection in the form of a LAN, a WAN, Bluetooth, a ZigBee, or NFC, or any combination thereof. Two or more modules may be combined into a single module, and any one module may be divided into two or more units. Those skilled in the art will clearly understand that for the convenience and simplicity of description, the specific working process of the system and device described above can refer to the corresponding process in the method embodiment, and will not be repeated in this application.
[0128] Fig.12A schematic diagram of the structure of an electronic device provided in an embodiment of the present application, the electronic device may be a terminal device, and a game scene screen under the shooting angle of a virtual camera is displayed on the user interface of the terminal device, and the game scene screen includes a first game vehicle controlled by a player through the terminal device, and a second game vehicle. The electronic device may include: a processor 801, a storage medium 802 and a bus 803, the storage medium 802 stores machine-readable instructions executable by the processor 801, and when the electronic device runs a perspective control method in a game as in the embodiment, the processor 801 communicates with the storage medium 802 through the bus 803, and the processor 801 executes the machine-readable instructions to perform the following steps:
[0129] Determining at least one second game vehicle according to the player's action command;
[0130] The shooting angle of the virtual camera is adjusted according to the relative position relationship between the first game vehicle and each second game vehicle.
[0131] In a feasible implementation, when the processor 801 adjusts the shooting angle of the virtual camera according to the relative position relationship between the first game vehicle and each second game vehicle, it is specifically used to: determine the target second game vehicle according to the relative position relationship between the first game vehicle and each second game vehicle;
[0132] Adjust the shooting angle of the virtual camera according to the relative position relationship between the first game vehicle and the target second game vehicle.
[0133] In a feasible implementation, when the processor 801 is executing the determination of the target second game vehicle based on the relative position relationship between the first game vehicle and each second game vehicle, it is specifically used to: determine the second game vehicle closest to the first game vehicle as the target second game vehicle based on the relative position relationship between the first game vehicle and each second game vehicle.
[0134] In a feasible implementation, when the processor 801 adjusts the shooting angle of the virtual camera according to the relative position relationship between the first game vehicle and the target second game vehicle, it is specifically used to: determine the offset information according to the relative position relationship between the first game vehicle and the target second game vehicle, and the offset information includes: an offset angle and an offset direction;
[0135] According to the offset information, adjust the shooting angle of the virtual camera.
[0136] In a feasible implementation manner, when the processor 801 adjusts the shooting angle of the virtual camera according to the offset information, it is specifically used to: adjust the shooting angle of the virtual camera according to the offset information and the offset angular velocity.
[0137] In a feasible implementation, when the processor 801 adjusts the shooting angle of the virtual camera according to the offset information and the offset angular velocity, it is specifically configured to determine the target offset angle of the shooting axis of the virtual camera according to the offset angle, and the target offset angle has a preset proportional relationship with the offset angle;
[0138] Control the shooting axis of the virtual camera to rotate by the target offset angle along the offset direction from the current position at the offset angular velocity.
[0139] In a feasible implementation, when the processor 801 determines at least one second game vehicle according to the player's action instruction, it is specifically configured to: determine the player's face rotation information according to the player's face rotation operation; the face rotation information includes: the face rotation angle and the face rotation direction;
[0140] Determine at least one second game vehicle corresponding to the face rotation information according to the face rotation information.
[0141] In a feasible implementation, when the processor 801 executes the method for determining the offset angular velocity, it is specifically configured to: determine the player's face rotation angle according to the player's face rotation operation;
[0142] Determine the offset angular velocity according to the face rotation angle.
[0143] In a feasible implementation, the processor 801 is further configured to continuously monitor the player's face rotation operation, and if the face rotation angle is within a preset angle range, restore the shooting angle of the virtual camera to the initial shooting angle.
[0144] Wherein, the storage medium 802 stores program code, and when the program code is executed by the processor 801, the processor 801 is caused to execute the various steps in the game perspective control method according to various exemplary embodiments of the present application described in the above "Exemplary Method" section of this specification.
[0145] Processor 801 can be a general-purpose processor, such as a central processing unit (CPU), a digital signal processor (DigitalSignal Processor, DSP), an application-specific integrated circuit (Application Specific Integrated Circuit, ASIC), a field programmable gate array (Field Programmable Gate Array, FPGA) or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components, and can implement or execute the various methods, steps and logic block diagrams disclosed in the embodiments of the present application. A general-purpose processor can be a microprocessor or any conventional processor, etc. The steps of the method disclosed in conjunction with the embodiments of the present application can be directly embodied as a hardware processor to be executed, or a combination of hardware and software modules in the processor can be executed.
[0146] Storage medium 802, as a non-volatile computer-readable storage medium, can be used to store non-volatile software programs, non-volatile computer executable programs and modules. The memory may include at least one type of storage medium, such as flash memory, hard disk, multimedia card, card-type memory, random access memory (Random Access Memory, RAM), static random access memory (Static Random Access Memory, SRAM), programmable read-only memory (Programmable Read Only Memory, PROM), read-only memory (Read Only Memory, ROM), electrically erasable programmable read-only memory (Electrically Erasable Programmable Read-Only Memory, EEPROM), magnetic memory, disk, optical disk, etc. The memory is any other medium that can be used to carry or store a desired program code in the form of an instruction or data structure and can be accessed by a computer, but is not limited thereto. The storage medium 802 in the embodiment of the present application can also be a circuit or any other device that can realize a storage function, for storing program instructions and / or data.
[0147] Optionally, an embodiment of the present application further provides a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the processor performs the following steps:
[0148] Determining at least one second game vehicle according to the player's action command;
[0149] The shooting angle of the virtual camera is adjusted according to the relative position relationship between the first game vehicle and each second game vehicle.
[0150] In a feasible implementation, when the processor 801 adjusts the shooting angle of the virtual camera according to the relative position relationship between the first game vehicle and each second game vehicle, it is specifically used to: determine the target second game vehicle according to the relative position relationship between the first game vehicle and each second game vehicle;
[0151] Adjust the shooting angle of the virtual camera according to the relative position relationship between the first game vehicle and the target second game vehicle.
[0152] In a feasible implementation, when the processor 801 is executing the determination of the target second game vehicle based on the relative position relationship between the first game vehicle and each second game vehicle, it is specifically used to: determine the second game vehicle closest to the first game vehicle as the target second game vehicle based on the relative position relationship between the first game vehicle and each second game vehicle.
[0153] In a feasible implementation, when the processor 801 adjusts the shooting angle of the virtual camera according to the relative position relationship between the first game vehicle and the target second game vehicle, it is specifically used to: determine the offset information according to the relative position relationship between the first game vehicle and the target second game vehicle, and the offset information includes: an offset angle and an offset direction;
[0154] According to the offset information, adjust the shooting angle of the virtual camera.
[0155] In a feasible implementation manner, when the processor 801 adjusts the shooting angle of the virtual camera according to the offset information, it is specifically used to: adjust the shooting angle of the virtual camera according to the offset information and the offset angular velocity.
[0156] In a feasible implementation manner, when the processor 801 adjusts the shooting angle of the virtual camera according to the offset information and the offset angular velocity, it is specifically used to determine the target offset angle of the shooting axis of the virtual camera according to the offset angle, and the target offset angle has a preset proportional relationship with the offset angle;
[0157] The shooting axis of the virtual camera is controlled to rotate from the current position along the offset direction to the target offset angle according to the offset angular velocity.
[0158] In a feasible implementation, when the processor 801 determines at least one second game vehicle according to the action instruction of the player, it is specifically used to: determine the player's facial rotation information according to the facial rotation operation of the player; the facial rotation information includes: facial rotation angle and facial rotation direction;
[0159] At least one second game vehicle corresponding to the facial rotation information is determined according to the facial rotation information.
[0160] In a feasible implementation, when executing the method for determining the offset angular velocity, the processor 801 is specifically used to: determine the player's facial rotation angle according to the player's facial rotation operation;
[0161] According to the face rotation angle, the deviation angular velocity is determined.
[0162] In a feasible implementation manner, the processor 801 is also used to continuously monitor the player's facial rotation operation, and if the facial rotation angle is within a preset angle range, the shooting angle of the virtual camera is restored to the initial shooting angle.
[0163] In the embodiment of the present application, the computer program can also execute other machine-readable instructions when run by the processor to execute other methods described in the embodiment. For the specific execution method steps and principles, please refer to the description of the embodiment, which will not be repeated here.
[0164] In the several embodiments provided in the present application, it should be understood that the disclosed devices and methods can be implemented in other ways. For example, the device embodiments described above are only schematic. For example, the division of the units is only a logical function division. There may be other division methods in actual implementation, such as 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 devices or units, which can be electrical, mechanical or other forms.
[0165] 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 network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0166] In addition, each functional unit in each embodiment of the present application 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 hardware plus software functional units.
[0167] The above-mentioned integrated unit implemented in the form of a software functional unit can be stored in a computer-readable storage medium. The above-mentioned software functional unit 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.) or a processor (English: processor) to perform some steps of the method described in each embodiment of the present application. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (English: Read-Only Memory, abbreviated: ROM), random access memory (English: Random Access Memory, abbreviated: RAM), disk or optical disk and other media that can store program codes.
Claims
1. A method for controlling viewing angle in a game, characterized in that: Displaying a game scene screen under the shooting angle of a virtual camera on a user interface of a terminal device, wherein the game scene screen includes a first game vehicle and a second game vehicle controlled by a player through the terminal device, the method comprising: Determining at least one second game vehicle according to the player's action command; The shooting angle of the virtual camera is adjusted according to the relative position relationship between the first game vehicle and each of the second game vehicles.
2. The method according to claim 1, characterized in that The adjusting the shooting angle of the virtual camera according to the relative position relationship between the first game vehicle and each of the second game vehicles includes: Determining a target second game vehicle according to a relative position relationship between the first game vehicle and each of the second game vehicles; The shooting angle of the virtual camera is adjusted according to the relative position relationship between the first game vehicle and the target second game vehicle.
3. The method according to claim 2, characterized in that The step of determining a target second game vehicle according to the relative position relationship between the first game vehicle and each of the second game vehicles comprises: According to the relative position relationship between the first game vehicle and each of the second game vehicles, the second game vehicle closest to the first game vehicle is determined as the target second game vehicle.
4. The method according to claim 2, characterized in that: The adjusting the shooting angle of the virtual camera according to the relative position relationship between the first game vehicle and the target second game vehicle includes: Determine offset information according to the relative position relationship between the first game vehicle and the target second game vehicle, the offset information including: an offset angle and an offset direction; The shooting angle of view of the virtual camera is adjusted according to the offset information.
5. The method according to claim 4, characterized in that Adjusting the shooting angle of the virtual camera according to the offset information includes: The shooting angle of view of the virtual camera is adjusted according to the offset information and the offset angular velocity.
6. The method according to claim 5, characterized in that The adjusting the shooting angle of view of the virtual camera according to the offset information and the offset angular velocity includes: Determining a target offset angle of the shooting axis of the virtual camera according to the offset angle, wherein the target offset angle has a preset proportional relationship with the offset angle; The shooting axis of the virtual camera is controlled to rotate from the current position along the offset direction to the target offset angle according to the offset angular velocity.
7. The method according to claim 1, characterized in that The step of determining at least one second game vehicle according to the action command of the player includes: Determining the player's facial rotation information according to the player's facial rotation operation; the facial rotation information includes: a facial rotation angle and a facial rotation direction; At least one second game vehicle corresponding to the facial rotation information is determined based on the facial rotation information.
8. The method according to claim 5, characterized in that The method for determining the offset angular velocity includes: Determining a facial rotation angle of the player according to the facial rotation operation of the player; The deviation angular velocity is determined according to the facial rotation angle.
9. The method according to claim 7, characterized in that: Also includes: The face rotation operation of the player is continuously monitored, and if the face rotation angle is within a preset angle range, the shooting angle of the virtual camera is restored to the initial shooting angle.
10. A viewing angle control device in a game, characterized in that: Displaying a game scene screen under the shooting angle of a virtual camera on a user interface of a terminal device, wherein the game scene screen includes a first game vehicle and a second game vehicle controlled by a player through the terminal device, wherein the device includes: a determination module and an adjustment module; The determination module is used to determine at least one second game vehicle according to the player's action instruction; The adjustment module is used to adjust the shooting angle of the virtual camera according to the relative position relationship between the first game vehicle and each of the second game vehicles.
11. An electronic device, characterized in that: include: A processor, a storage medium and a bus, wherein the storage medium stores program instructions executable by the processor. When the electronic device is running, the processor and the storage medium communicate via the bus, and the processor executes the program instructions to execute the perspective control method in the game as described in any one of claims 1 to 9.
12. A computer-readable storage medium, characterized in that: The storage medium stores a computer program, and when the computer program is executed by a processor, the method for controlling the viewing angle in a game as described in any one of claims 1 to 9 is executed.
Citation Information
Patent Citations
Picture display method and device in virtual scene, computer equipment and storage medium
CN112870712A
Interaction method, device and equipment and computer readable storage medium
CN113867531A
Method for regulating sense of speed in video game device
JP2004141592A
Target-based mouse sensitivity recommendations
US20220203230A1