Lens visual angle control method and device, equipment and medium

By setting the viewpoint to control the dead zone and soft zone, the camera can be automatically and manually adjusted in different states, solving the problem of inflexible viewpoint when the character is flying and improving the game's visual experience and ease of operation.

CN121102882APending Publication Date: 2025-12-12GUANGZHOU KULUO SHUJIE TECH CO LTD
View PDF 6 Cites 0 Cited by

Patent Information

Application Number
CN202511306473.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-09-12
Publication Date
2025-12-12

AI Technical Summary

Technical Problem

In existing technologies, the camera angle cannot be flexibly adjusted when the character is flying. The difficulty in identifying directions caused by switching between manual and automatic camera angles affects the smoothness of the game and the ease of operation.

Method used

By setting the camera target as the center of view control, the dead zone and soft zone are controlled. The camera moves and rotates in different control states. Combined with the view touch operation, the automatic and manual modes are seamlessly connected to ensure that the camera is always aligned with the character's orientation.

Benefits of technology

It achieves a stable field of view and directional identification during flight, reducing player fatigue and the risk of getting disoriented, and enhancing the game's immersion and operational efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure 013CB339-6E5B-418D-B0BB-88588C87B4A8
    Figure 013CB339-6E5B-418D-B0BB-88588C87B4A8
  • Figure 3470090C-947C-4D51-A52C-4401ED298A05
    Figure 3470090C-947C-4D51-A52C-4401ED298A05
  • Figure 3F258DB3-241D-422F-A2A4-60A93C784DA0
    Figure 3F258DB3-241D-422F-A2A4-60A93C784DA0
Patent Text Reader

Abstract

The invention relates to a lens visual angle control method and device, equipment and a medium. The method comprises the following steps: determining a first control state when a lens target enters a flight state, setting a visual angle control dead zone taking the lens target as a center, and controlling a lens to move in the visual angle control dead zone based on visual angle touch operation; when the control conversion condition is met, switching the current lens control state from the first control state to a second control state, and determining a visual angle control soft area taking the lens target as the center; controlling the lens to rotate into the visual angle control soft area, and moving the lens to the soft area lens coordinate corresponding to the lens target based on the lens target orientation; and when the visual angle touch operation is received again, switching the current lens control state from the second control state to the first control state so as to control the lens to move in the visual angle control dead zone based on the visual angle touch operation. A flexible lens visual angle control mechanism is provided, and game immersion and operation convenience of players are improved.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of computer, in particular to a lens view angle control method and device, equipment and medium. BACKGROUND

[0002] In the field of role-playing games (RPG), with the continuous expansion of game scenes and the increasing richness of gameplay, players have increasingly high requirements for game experience. In particular, in the RPG games of large world exploration type, players hope to freely soar in the vast sky or complex terrain, and feel the immersive adventure experience. However, the operation experience of the existing technology for the role flying still needs to be improved.

[0003] The existing technology usually adopts two ways to handle the view angle problem when flying: one is to lock the camera at a fixed position behind or above the role, and the other is to allow the player to freely adjust the view angle, but the adjustment range and method are not limited. When the camera is locked in the fixed area, the player cannot freely adjust the view angle during flying, which limits the player's observation of the surrounding environment and the ability to avoid obstacles. For example, when the player is flying through a narrow valley or in a complex terrain, the player cannot better plan the flight path by adjusting the view angle, which easily leads to collision or disorientation. As for the case where the manual adjustment of the view angle is not limited, although the player can adjust the view angle as needed, in actual operation, if the view angle adjusted by the player is inconsistent with the direction of the role, it is difficult for the player to distinguish the current flight direction and destination of the role, which is particularly obvious when flying at high speed or needing accurate navigation, increasing the complexity of operation and the player's distress. Further, in some scenes, the player can enjoy the scenery around by manually adjusting the view angle, while in other scenes with elements of battle or challenge, the player needs to focus on operation and cannot adjust the view angle, so if the view angle setting operation is complicated in different scenes and cannot well adapt to the current scene, it will also have a negative impact on the player's operation experience.

[0004] And in the existing technology, when the player does not manually adjust the view angle, if the role changes the flight direction, the corresponding view angle will not automatically change, which makes the player need to manually adjust the view angle after changing the flight direction of the role to continue to observe the situation in front of the role, otherwise it will be difficult to judge the new flight direction because the view angle is inconsistent with the direction of the role, affecting the smoothness of the game and the convenience of the operation.

[0005] In summary, the existing game technology has obvious deficiencies in handling the view angle problem when the role is flying, and there is an urgent need for a solution that can intelligently adjust the view angle to improve the visual experience and operation convenience of the player during flying. SUMMARY

[0006] The present application aims to solve the above problems and provide a lens view angle control method and corresponding device, equipment, non-volatile readable storage medium, and computer program product.

[0007] According to one aspect of the present application, a lens view angle control method is provided, comprising: determining a first control state when a lens target enters a flight state, setting a view angle control dead zone centered on the lens target, and controlling the lens to move within the view angle control dead zone based on a view angle touch operation; when a preset control transformation condition is met, switching the current lens control state from the first control state to a second control state, and determining a view angle control soft zone centered on the lens target; controlling the lens to rotate into the view angle control soft zone, and moving the lens to a soft zone lens coordinate corresponding to the lens target based on the lens target orientation; when the view angle touch operation is received again, switching the current lens control state from the second control state to the first control state, and controlling the lens to move within the view angle control dead zone based on the view angle touch operation.

[0008] According to another aspect of the present application, a lens view angle control device is provided, comprising: a lens control module configured to determine a first control state when a lens target enters a flight state, set a view angle control dead zone centered on the lens target, and control the lens to move within the view angle control dead zone based on a view angle touch operation; a state transformation module configured to switch the current lens control state from the first control state to a second control state when a preset control transformation condition is met, and determine a view angle control soft zone centered on the lens target; a lens following module configured to control the lens to rotate into the view angle control soft zone, and move the lens to a soft zone lens coordinate corresponding to the lens target based on the lens target orientation; a touch response module configured to switch the current lens control state from the second control state to the first control state when the view angle touch operation is received again, and control the lens to move within the view angle control dead zone based on the view angle touch operation.

[0009] According to another aspect of the present application, a lens view angle control device is provided, comprising a central processing unit and a memory, the central processing unit being configured to invoke a computer program stored in the memory to execute the steps of the method described in the present application.

[0010] According to another aspect of the present application, a non-volatile readable storage medium is provided, which stores a computer program realized according to the lens view angle control method in the form of computer readable instructions, and the computer program is invoked and run by a computer to execute the steps included in the method.

[0011] According to another aspect of the present application, a computer program product is provided, which includes computer program / instructions, and the computer program / instructions realize the steps of the method when executed by a processor.

[0012] The present application effectively solves the problems of the unadjustable view angle in flight and the difficulty in direction recognition caused by manual and automatic view angle switching in the prior art, and achieves various beneficial effects, including but not limited to: Firstly, after the first control state of the lens target in the flight state is determined, the present application sets a view angle control dead zone centered on the lens target, and the lens can only move within the limited angle range corresponding to the view angle control dead zone according to the player's touch operation, avoiding the offset out of control caused by the unbounded sliding of the view angle in the prior art, so that the player always has a predictable and correctable control boundary when manually adjusting the lens view angle, significantly reducing the risk of the player's direction loss.

[0013] When the preset control transformation condition is met, the present application switches the lens control state to the second control state, and the moving range of the lens in the second control state is adjusted to the angle range corresponding to the view angle control soft zone. The view angle control soft zone also limits the upper limit of the lens offset by the angle range, ensuring that even if the lens target continuously turns by a large angle, the lens orientation will not exceed the soft zone boundary. At the same time, the lens automatically rotates and moves to the soft zone lens coordinate directly behind the lens target, so as to always keep consistent with the target orientation while maintaining a more reasonable distance from the lens target, thereby solving the defects of the prior art that the view angle cannot follow the change of the flight direction of the lens target and the lens excessively deviates, enabling the player to obtain a more stable flight view.

[0014] Further, the present application listens to the view angle touch operation in real time in the second control state, and immediately switches the lens control state back to the first control state as soon as the player actively triggers the view angle touch operation, so that the movable range of the lens is instantly adjusted to the view angle control dead zone and can be manually adjusted by the player. Thus, seamless connection between automatic following and manual fine adjustment of the lens is realized, which not only ensures the continuity of the view during the flight of the lens target, but also gives the player the initiative to automatically and manually adjust the lens at any time, thereby comprehensively improving the controllability of the flight view and the clarity of direction recognition of the lens target during the flight, and further comprehensively improving the view angle operation efficiency and immersion of the lens target during the flight. BRIEF DESCRIPTION OF DRAWINGS

[0015] Figure 1Fig. 1 is a schematic diagram of an exemplary network architecture for the present application; Figure 2 Fig. 2 is a top view of the lens target in flight according to an embodiment of the present application; Figure 3 Fig. 3 is a side view of the lens target in flight according to an embodiment of the present application; Figure 4 Fig. 4 is a flowchart of an embodiment of the lens perspective control method of the present application; Figure 5 Fig. 5 is a schematic diagram of the principle of the lens perspective control device of the present application; Figure 6 Fig. 6 is a schematic diagram of the structure of a lens perspective control device according to the present application. DETAILED DESCRIPTION

[0016] The technical solution of the present application can be deployed in various network architectures, Figure 1 An exemplary network architecture is shown. In this architecture, a game server 81 is connected to a plurality of player terminals 80 through a network, which are deployed with a computer program product implementing the lens perspective control method according to the present application, which is responsible for real-time processing of various events and interactions in the game when the computer program product is run. The game server 81 is responsible for receiving the perspective control operations triggered by the terminal devices, including the perspective control instructions corresponding to the touch screen operations such as dragging triggered by the game player on the terminal, and other data transmitted by the terminal. The player terminals 80 are in communication with the game server through the network, receiving game state information and sending operation instructions of the player.

[0017] In contemporary RPG games, the setting of having the ability to fly has become one of the most competitive gameplay. Characters can freely shuttle between the vast sky, valley or floating islands to perform exploration, combat or tasks. When the game character is flying, the game usually sets the way to follow the player through the lens to let the player obtain the perspective of the game character. The game character can also be called the lens target because it is always tracked by the target of the lens. In this application, the lens can obtain the perspective of the lens target through the form of virtual lens, that is, the lens can exist in the form of virtual camera in the game interface. Because it can be configured not to be displayed in the graphical user interface, it can make the player more immersed in the game playing process. In the game, the player not only expects the lens to always follow the character towards, but also wants to be able to freely adjust the perspective by manual touch to observe the environment, lock the target or avoid obstacles. The traditional game method either locks the lens perspective all the way, resulting in rigid field of view, or completely releases manual adjustment, which is easy to make the player lose direction because the lens drifts greatly, and the switching configuration of the operation mode is also cumbersome and inconvenient. The method of the present application can fill this gap in game experience by setting the lens control dead zone and the lens control soft zone and the perspective control cycle between the two.

[0018] Please refer to Figure 2 and Figure 3 , Figure 2 is a top view of the lens target in the flying process in an embodiment of the present application, which shows the free movement range of the lens between the left boundary and the right boundary of the Yaw interval based on the lens target orientation of the lens target. Figure 3 is a side view of the lens target in the flying process in an embodiment of the present application, which shows the free movement range of the lens between the left boundary and the right boundary of the Pitch interval based on the lens target orientation of the lens target.

[0019] The application can monitor whether the lens target is in a flight state in real time, and immediately activate the entire view angle control process as soon as it is confirmed that the lens target is in a flight state, thereby laying a foundation for subsequent control state switching. Then the application can set a view angle control dead zone centered on the character, strictly limit the lens offset to a preset angle range, and realize limited manual view angle fine adjustment to prevent excessive drift. The application can also continuously compare the flight speed and direction changes, output a state switching signal when the preset condition is triggered, switch the control state to the view angle control soft zone, and drive the lens to smoothly rotate to the soft zone lens coordinates corresponding to the current orientation of the character, thereby ensuring that the lens is always located behind the character and the offset is controllable. In the state where the lens control state is the view angle control soft zone, the application can also continuously monitor the view angle touch operation or scene events, and immediately issue a state back switching instruction as soon as the player actively touches the view angle control area or enters a special scene, so as to make the lens be limited to the part corresponding to the lens control dead zone again, and finally realize one-key return to manual fine adjustment.

[0020] As can be seen, the application can flexibly adjust the view angle within a certain range when the lens target is flying, can enable the player to experience rich game content, and can automatically adjust the lens when the lens target is flying, so that the player can focus on controlling the soaring function. Thus, the unreasonable camera view angle during the movement of the lens target is solved, that is, the application can enable the player to obtain a flight view angle experience that the lens can automatically follow and can be touched at any time, thereby reducing the operation fatigue and direction loss risk of the player and significantly improving the game immersion of the character when flying in the air.

[0021] Please refer to Figure 4 The lens view angle control method of the application includes the following steps in some embodiments: Step S3100, determining a first control state when the lens target enters a flight state, setting a view angle control dead zone centered on the lens target, and controlling the lens to move in the view angle control dead zone based on the view angle touch operation.

[0022] In this embodiment, the lens target can refer to a three-dimensional entity currently being continuously tracked by the game camera, usually a character controlled by the player, or a vehicle or a summoned creature. The criteria for determining whether the lens target enters the flight state are uniformly maintained by the game state machine. When the vertical speed component of the character is greater than zero and the height above the ground exceeds a threshold, or the flag bit indicating that the character has enabled the flight movement mode is set, it is determined that the character is in the flight state. Once any of the conditions is met, the terminal activates the subsequent view control process. The terminal first continuously monitors whether the character enters the flight state through the state system of the game engine. When the character takes off and enables the flight logic, it is determined that the lens target is in the flight state, and the first control state is activated. The first control state is a lens mode completely dominated by the player. In this mode, the system suspends all automatic rotation logic and only responds to the player's view adjustment request through touch input. This state gives the player the highest priority in directing the camera, allowing the player to finely observe the environment around the lens target or lock on to a target.

[0023] In the first control state, the terminal defines a view control dead zone in the three-dimensional spherical coordinate system with the current position of the lens target as the origin. The view control dead zone is a limited angle range defined in the spherical coordinate system with the current orientation of the lens target as the reference. Its boundaries are determined by two groups of angle values: in the horizontal direction, the forward direction of the character is 0°, and the left and right directions are each opened by θ degrees; in the vertical direction, the horizontal plane of the character is 0°, and the up and down directions are each opened by φ degrees. The specific values of θ and φ are defined in the configuration table, and common values are horizontal ±120° and vertical ±120°, which can be modified by the developer as needed. The direction vectors outside the dead zone are marked as invalid, ensuring that the lens does not deviate too much from the forward direction of the character.

[0024] The view angle touch operation refers to a continuous action of a player pressing and dragging a single finger in a view angle control area of a screen. A terminal registers a listener in a touch layer and acquires corresponding touch coordinates in real time. The touch coordinates are first mapped to a normalized two-dimensional displacement vector and then converted into a spherical direction vector with the lens target as the center. Subsequently, it is detected whether the direction vector falls within a dead zone angle range. If it falls within the range, it is directly used as the target direction. If it falls outside the range, it is clipped to the nearest dead zone boundary through spherical linear interpolation, so as to ensure that the lens is always limited to the dead zone. The lens movement is realized by updating an observation matrix. The terminal calculates a new camera position and orientation in real time according to the final direction vector and immediately applies it in the rendering pipeline. Meanwhile, a first-order low-pass filter is introduced for smooth transition, and the filter coefficient is dynamically adjusted according to the touch speed to ensure smooth and jitter-free pictures. During the whole process, the dead zone angle range is rotated in real time with the character orientation and is always bound to the front direction of the character, ensuring the intuitiveness and consistency of manual view angle adjustment. The boundary of the view angle control dead zone remains fixed during runtime and does not change due to character rotation or speed changes. When the character's own orientation rotates, the dead zone direction reference rotates synchronously to ensure that the dead zone is always bound to the front direction of the character. The angle range of the dead zone, the filter coefficient, and the size of the touch area can be read through a local configuration table, allowing hot updates without the need to restart the application.

[0025] In step S3200, when a preset control transformation condition is met, the current lens control state is switched from the first control state to the second control state, and a view angle control soft zone centered on the lens target is determined.

[0026] The control transformation condition in the present application refers to a single criterion for triggering the system to switch from the first control state to the second control state. The terminal starts timing from the last time an effective view angle touch operation is detected. When the silence duration corresponding to the effective view angle touch operation is not received and reaches a preset threshold, it is considered that the control transformation condition is established. The threshold is saved in milliseconds in the configuration table and can be set as a single fixed value or can be set by the player or the developer within the range of 300 ms to 2000 ms. During runtime, the terminal maintains a high-precision timer, which adds the time difference from the last touch event to the current frame every frame. When the accumulated value is greater than or equal to the threshold, the control switching flag is immediately set. In addition to the time threshold, the control transformation condition can also be triggered by other trigger sources, such as the player actively touching a specific control transformation area or inputting a specific control transformation instruction. However, only the silence timeout method is detailed here.

[0027] In this embodiment, when receiving the control switching instruction, the terminal immediately updates the lens control state from the first control state to the second control state. The determination of the state switching is completed by the terminal after setting the control switching flag. At the moment when the control switching flag is set, the terminal rewrites the lens control state variable from "MANUAL" to "AUTO", that is, the lens is switched from the manual control mode to the automatic control mode. At the same time, a synchronization signal is sent to the rendering pipeline, so that the observation matrix starts to use the soft zone logic in the next frame; the state variable takes effect after being written, without the need for an additional confirmation step. During the state switching, the terminal expands the dead zone angle range to the view angle control soft zone, and the expansion ratio is defined as a fixed percentage in the configuration table, for example, the dead zone horizontal ±80° is expanded to the soft zone horizontal ±60°, and the dead zone vertical ±90° is expanded to the soft zone vertical ±60°; the expansion ratio can also be set as a fixed difference, for example, horizontal-20° and vertical-30°. The expanded angle boundary is recalculated and cached in the spherical coordinate system, to ensure that the subsequent lens rotation is performed within the view angle control soft zone range with the lens target as the center.

[0028] In an embodiment, the view angle control soft zone is expanded outward by a fixed angle increment with the current orientation of the lens target as the center. The terminal first reads the front direction vector of the role and converts it to spherical coordinates to obtain the current Pitch and Yaw, where Pitch is the lens movement range in the side view lens target state, and Yaw is the lens movement range in the overhead lens target state. The lens movement range corresponding to Pitch and Yaw is the view angle control dead zone. The horizontal direction is expanded outward by Δθ based on Yaw, and the vertical direction is expanded outward by Δφ based on Pitch. There are two ways to determine the values of Δθ and Δφ: one is proportional expansion, which directly multiplies the dead zone angle by a coefficient of 1.2 to 1.5; the other is fixed increment, for example, the dead zone horizontal ±60° is expanded to horizontal ±80°, and the dead zone vertical ±45° is expanded to vertical ±60°. The expanded boundary vector forms a closed interval in the spherical coordinate system, which is cached by the terminal as a soft zone boundary set. The interpolation end point of the subsequent lens rotation must fall within this interval.

[0029] Step S3300, control the lens to rotate to the view angle control soft zone, and move the lens to the soft zone lens coordinate corresponding to the lens target based on the orientation of the lens target.

[0030] After the terminal confirms that the control state has switched from the first control state to the second control state, it immediately obtains the current orientation vector of the lens target, converts it into the pitch and yaw angles in the spherical coordinate system, and takes the orientation as the reference to calculate a new direction vector within the given soft zone angle range. The direction vector maintains a preset arm length from the character, and the arm length is set in the configuration file. The terminal calculates the three-dimensional coordinates above and behind the character as the soft zone lens coordinates based on the arm length. The terminal then obtains the angle difference between the current lens direction and the target direction, gradually rotates the lens within the configured time using the spherical linear interpolation algorithm, updates the observation matrix every frame during the interpolation, and makes the lens smoothly transition to the soft zone lens coordinates. If the lens target orientation continues to change, the terminal recalculates the pitch and yaw angles every frame and immediately refreshes the soft zone lens coordinates, so that the lens continuously eases to the new coordinates at a fixed following speed until the angle difference is zero. The entire rotation and easing process is completely completed locally without additional external input.

[0031] In the embodiment, when the lens target enters the second control state, the terminal immediately reads the current orientation vector of the lens target and normalizes it to obtain a unit forward vector F. The vector represents the front of the lens target in the three-dimensional world coordinate system, and is then converted into the pitch and yaw values in the spherical coordinate system, where pitch is the lens movement range in the side view of the lens target state, and yaw is the lens movement range in the top view of the lens target state. The lens movement ranges corresponding to pitch and yaw are the perspective control soft zone. Based on the two angles, the terminal calculates the soft zone lens coordinates. First, a point is taken as a candidate position at a fixed radius r behind and above the lens target, where r is determined by the arm length parameter in the configuration file. Then, the candidate position is rotated by θ degrees along the Yaw direction and by φ degrees along the Pitch direction, so that the lens is above and behind the character and maintains a safe distance. The values of θ and φ are determined by the soft zone angle interval, and the interval boundaries are written into the cache when the state is switched. The lens coordinates must fall within this interval. In this way, the lens can be controlled within the perspective control soft zone and moved to the soft zone lens coordinates corresponding to the lens target.

[0032] In an embodiment, the lens rotation can be completed locally by the terminal through an interpolation algorithm. After the terminal is triggered in the second control state, the terminal reads the target current orientation vector of the lens, normalizes it to obtain a unit forward vector, and immediately calculates the corresponding up-down pitch and left-right yaw. Subsequently, the terminal takes a point as the origin of the lens target in the opposite direction of the orientation according to a preset arm length r, as the starting point of the soft zone lens coordinates. The arm length r is given by the configuration file, and a typical value is 5-15 meters, which ensures that the character and the lens maintain a safe distance and do not penetrate the model. The soft zone lens coordinates are three-dimensional coordinates in the soft zone angle boundary based on the character's upper back as the reference, and the horizontal offset Δθ and the vertical offset Δφ are defined by the soft zone boundary. The two offsets are directly taken from the buffer interval written at the time of switching.

[0033] In an embodiment, the terminal drives the lens rotation using spherical linear interpolation, taking the current lens direction vector and the soft zone lens coordinate direction vector as interpolation endpoints, and the interpolation time is controlled by the millisecond value in the configuration table. The interpolation function uses quaternion spherical interpolation, which is updated once per frame until the error is less than 0.1 degrees. The interpolation process is performed by the local rendering pipeline, and the observation matrix takes effect immediately in the next frame. If the character orientation changes continuously in the air, the terminal recalculates the Pitch and Yaw values every frame and refreshes the soft zone lens coordinates in real time. The lens follows the new soft zone lens coordinates at a fixed following speed, which also comes from the configuration table, and is commonly used at 90 degrees per second, which can be adjusted between 60 and 180 degrees per second. The speed uses a linear speed and a cosine easing hybrid to ensure that the lens always follows the character orientation and the transition is smooth.

[0034] Step S3400, when the view angle touch operation is received again, the current lens control state is switched from the second control state to the first control state, to control the lens to move in the view angle control dead zone based on the view angle touch operation.

[0035] In the second control state, the terminal continuously monitors the screen for a perspective touch input. The monitoring area is pre-configured as a rectangular range in the center of the screen. When the operating system detects a single touch and displacement, it is considered as a valid perspective touch operation. At the event trigger moment corresponding to the valid perspective touch operation, the terminal changes the camera control state variable from the automatic mode to the manual mode. This change takes effect immediately and the next frame rendering starts to use the manual logic. After the change, the terminal reads the difference between the current touch coordinates and the previous frame coordinates to obtain a two-dimensional displacement vector. The displacement vector is normalized and multiplied by the dead zone angle threshold to obtain an expected angle offset. The angle offset is added to the current camera orientation, and the result is immediately sent to the dead zone boundary clipping function. If the added direction is outside the dead zone, the function projects it to the dead zone boundary along the shortest path on the sphere. The clipped direction is used as the target direction. Then, the terminal smoothly rotates the camera from the current direction to the target direction at a fixed interpolation time. During the interpolation, the observation matrix is updated every frame to ensure smooth picture flow. During the touch duration, the terminal can repeat the displacement collection, normalization, addition, clipping, and interpolation process every frame to make the camera follow the finger movement in real time and always be limited within the perspective control dead zone. When the touch is released, the terminal keeps the camera at the final position and waits for the next state switching condition.

[0036] In an embodiment, the terminal continuously monitors the touch input in the second control state. The monitoring area is a pre-marked perspective control area in the screen. The perspective control area can be described in pixel coordinates or normalized proportions in a configuration table. A typical range is 0.4 of the screen width horizontally and 0.5 of the screen height vertically in the center of the screen. The touch event is captured in real time through the operating system interface. When the number of touch points is equal to 1 and the touch pressure is greater than zero, it is considered as a valid perspective touch operation. The terminal immediately records the touch coordinates and generates a state back-switching instruction. The state back-switching instruction includes the touch coordinates, touch identifier, and current system frame number. After the state back-switching instruction is triggered, the terminal changes the camera control state variable from the second control state to the first control state. The change is completed within a single frame and takes effect in the next frame rendering. Then, the terminal converts the touch coordinates to a two-dimensional displacement vector. The displacement vector is first normalized to the [-1, 1] interval and then multiplied by the dead zone angle threshold to obtain an expected angle offset. The offset is added to the current camera direction vector, and the result is clipped by the dead zone boundary to ensure that the final direction vector always falls within the perspective control dead zone.

[0037] In one implementation, the clipping algorithm adopts spherical shortest arc projection, and if the superimposed direction vector exceeds the boundary of the dead zone, the spherical shortest path is projected to the nearest boundary vector; the projection path length is used as an interpolation parameter, and the interpolation time is controlled by a touch response coefficient, and a typical value is 50 ms to 150 ms, and a developer can adjust it in a configuration table in milliseconds. After interpolation is completed, the terminal updates the observation matrix, and the lens moves smoothly in the dead zone along with the touch displacement until the touch is released or the switching condition is met again.

[0038] From the above embodiments, it can be seen that the application dynamically adjusts the arm length and rotation of the camera by automatically adjusting the lens rotation, setting the angle of view control dead zone and angle of view control soft zone according to the motion direction and speed of the role and the information corresponding to the user input, solves the unreasonable situation of the lens target in the motion process, and solves the problem by automatically adjusting the lens offset and rotation to make the position of the lens target and the lens in the screen. The terminal can provide seamless angle of view cycle between manual adjustment and automatic adjustment for the player locally. After the role enters flight, the first control state restricts the lens to the angle of view control dead zone, and the player can finely adjust the angle of view within a limited angle with a single finger, avoiding the loss of direction caused by large drift; when the touch is silent for a set time, the control changes to the second control state after the control change condition is triggered, and the lens is smoothly rotated to the soft zone lens coordinate above the role in the angle of view control soft zone, ensuring that the role direction and the picture center maintain a reasonable relationship, and the player can focus on controlling the flight without manual intervention; once the player touches the screen again, the system instantly switches back to the first control state, and the lens immediately returns to the angle of view control dead zone and moves in real time with the finger, realizing sensitive touch response adjustment, and the entire process does not require server participation, has low computational complexity and minimal delay, can significantly reduce the operation fatigue of the player, and can well improve the immersion of the player in air exploration and battle.

[0039] On the basis of any embodiment of the method of the application, the first control state when the lens target enters the flight state is determined, and the angle of view control dead zone centered on the lens target is set, and the lens is controlled to move in the angle of view control dead zone based on the angle of view touch operation, including: Step S3110, when the current role state of the lens target is the flight state, the angle of view touch operation acting on the angle of view control region is responded to, and it is determined that the lens target is currently in the first control state.

[0040] In this embodiment, the terminal detects whether the character is in the flying state in real time through the state machine of the game engine. When the vertical speed component of the character is greater than zero and the takeoff height exceeds a threshold, or the flying mode flag of the character is set, it is determined that the camera target is in the flying state at this time, and the terminal immediately activates the touch control monitoring of the view control area. The view control area can be described in a pixel rectangle or a normalized scale in the configuration file. A typical range is a screen center point as a center, a horizontal screen width of 40%, and a vertical screen height of 50%. The view touch operation corresponding to the touch event can be captured through the operating system interface. When it is detected that the player continuously touches the game interface in the view control area and generates a directional drag, the terminal converts the corresponding touch coordinates into a two-dimensional displacement vector, multiplies the normalized angle threshold corresponding to the view control dead zone, obtains the expected angle offset, and superimposes the expected angle offset on the current camera orientation. The superposition result is cropped by the boundary of the view control dead zone to ensure that the final direction vector always falls within the view control dead zone.

[0041] In an embodiment, the clipping algorithm can use spherical shortest arc projection. If the superimposed direction exceeds the boundary of the dead zone, it is projected to the nearest boundary vector along the shortest path on the sphere. The clipped direction is used as the target direction, and the terminal smoothly rotates the camera to the target direction at a fixed interpolation time. The observation matrix is updated every frame during interpolation to ensure smooth picture flow. During the touch duration, the terminal repeats the above process every frame to make the camera follow the finger movement in real time and always be limited within the view control dead zone. When the touch is released, the terminal keeps the camera at the final position and waits for the next state switching condition.

[0042] In step S3120, the camera is controlled to move within the angle limit range of the view control dead zone based on the view touch operation, wherein the angle limit range is a camera boundary range set based on the camera target.

[0043] In this embodiment, when the camera is controlled to move based on the view touch operation, the terminal will first convert the user's touch operation into a corresponding angle offset. The angle offset represents the movement amount of the camera in the horizontal direction and the vertical direction relative to the current position. The angle limit range is pre-set, and is usually defined as a maximum angle interval that allows the camera to move with the current orientation of the camera target as the center. For example, the camera is allowed to shift 60 degrees left and right in the horizontal direction, and 45 degrees up and down in the vertical direction, to ensure that the camera does not deviate too much from the front of the camera target, thereby avoiding the loss of direction or control ability of the player due to excessive deviation of the view during operation.

[0044] In actual control process, the terminal will monitor the current position and offset of the lens in real time. If the calculated offset exceeds the preset angle limit range, the terminal will automatically clip the offset so that it is just on the boundary of the angle limit range. For example, if the current horizontal offset calculation result is +70 degrees, and the preset horizontal angle limit range is ±60 degrees, the terminal will adjust the offset to +60 degrees. In this way, the lens will be limited in the visual angle control dead zone and cannot further exceed the set boundary.

[0045] Through the above embodiments, the application can accurately identify the flight state and activate the visual angle control, providing players with flexible and stable visual angle adjustment experience. In the flight state, the terminal not only can monitor the flight state in real time, but also can quickly respond to the visual angle touch operation, ensuring that players can immediately adjust the visual angle, thereby enhancing the interactivity and immersion of the game, allowing players to explore the game world more freely. At the same time, by setting the angle limit range of the visual angle control dead zone, the terminal effectively prevents the visual angle from excessive offset, avoiding the sense of disorientation of players due to the loss of control of the visual angle. The boundary clipping and lens updating mechanism ensures smooth movement of the lens in the visual angle control dead zone, further improving the visual experience and operation stability of the game, making the visual angle adjustment flexible and controllable, and significantly improving the operation experience of the game.

[0046] On the basis of any embodiment of the method of the application, when the preset control transformation condition is met, the current lens control state is switched from the first control state to the second control state, and a visual angle control soft zone centered on the lens target is determined, including: Step S3210, monitoring whether the lens target currently meets the control transformation condition, wherein the control transformation condition includes that the flight speed of the lens target exceeds a set threshold, or the flight direction of the lens target changes by more than a preset angle, or any one or more of the visual angle touch operation is not responded within a preset touch duration.

[0047] The terminal first monitors the flight speed of the camera target in real time. The flight speed can be obtained through the speed vector provided by the physics engine or calculated through the continuous change of position. The threshold is a predetermined speed value, and when the size of the flight speed exceeds this value, the terminal considers that the speed condition for controlling the transformation is reached. The terminal can also monitor the change of the flight direction of the camera target. The change of the flight direction can be determined by calculating the angle difference between the current direction vector and the previous frame direction vector. The preset angle is a predetermined angle value, and if the calculated angle difference exceeds this value, the terminal considers that the direction condition for controlling the transformation is reached; when the terminal does not respond to the view control operation within the preset touch duration, a timer is started to record the time when the last view control operation is received. If no new view control operation is received within this touch duration, the terminal can also consider that the touch duration condition for controlling the transformation has been reached.

[0048] The terminal continuously monitors the above-mentioned control transformation conditions, and when any condition is met, triggers the transformation of the camera control state, ensuring that the camera can automatically adjust the control state according to different conditions during flight, thereby providing players with a smoother and more natural gaming experience.

[0049] Step S3220, when the camera target currently meets the control transformation condition, a control switching instruction is triggered to switch the current camera control state from the first control state to the second control state, and the angle limit range of the view control soft zone centered on the camera target is determined, wherein the view control soft zone is a corresponding camera boundary range with an angle limit range smaller than that of the view control dead zone.

[0050] When it is monitored that the camera target meets the control transformation condition, the terminal triggers a control switching instruction to switch the camera control state from the first control state to the second control state, which can be completed by updating internal state flags or variables to indicate that the current control state has changed. Subsequently, the terminal determines the angle limit range of the view control soft zone centered on the camera target. The view control soft zone is an angle range that can be larger or smaller than the view control dead zone, which defines the movement boundary of the camera in the automatic control mode.

[0051] In this embodiment, the angle limit range of the view angle control soft zone can be determined by the following manner: based on the terminal calculating the target current direction of the lens, according to a preset view angle control soft zone angle parameter which is smaller than the view angle control dead zone angle parameter, the maximum offset angle of the lens in horizontal and vertical directions is set. For example, if the angle limit range of the view angle control dead zone is horizontal ± 90° and vertical ± 60°, then the angle limit range of the view angle control soft zone is set to horizontal ± 60° and vertical ± 45°. In this way, the lens will be limited to move in a smaller range in the second control state, so as to achieve a closer following effect.

[0052] The above embodiments realize intelligent switching of the lens control state by monitoring the flight speed, flight direction change and touch duration of the lens target, etc. When the flight speed of the lens target exceeds the set threshold or the flight direction change exceeds the preset angle, the terminal can timely trigger the control switching instruction to switch the lens control state from the first control state to the second control state. This switching mechanism can ensure that when flying at high speed or making a large turn, the lens can be automatically adjusted to a more suitable view angle, avoid the observation blind area caused by fixed view angle, and enhance the immersion and smoothness of the game. At the same time, when the view angle touch operation is not responded within the preset touch duration, the terminal can also automatically switch to the second control state, avoiding the view angle deviation problem that may occur when the player does not operate the view angle for a long time, and improving the intelligence and user experience of the game. Further, in this embodiment, the angle limit range of the view angle control soft zone is smaller than that of the view angle control dead zone, so that in the second control state, the lens can follow the lens target more closely, providing more accurate view angle control, not only reducing the operation burden of the player when adjusting the view angle, but also making the lens more flexible to adapt to the changes of the flight state in the automatic control mode, improving the dynamic response ability of the game. Through this dynamic view angle control, the player can obtain a better visual experience in different flight scenes, whether it is high-speed sprint or fine observation, and effective view angle support can be obtained.

[0053] On the basis of any embodiment of the method of the application, the lens is controlled to rotate into the view angle control soft zone, and the lens is moved to the soft zone lens coordinate corresponding to the lens target based on the direction of the lens target, comprising: Step S3310, in response to the control switching instruction, monitoring the direction change of the direction of the lens target.

[0054] After receiving the control switching instruction, the terminal immediately enters the monitoring phase of the lens target orientation change, and the direction vector of the lens target is obtained in real time through the physical system of the game engine and the terminal. The direction vector is usually determined by the moving direction or orientation of the character, and the orientation change of the lens target can be detected by various physical parameters such as the angular velocity, rotation speed, etc. of the character, which are provided by the physical engine.

[0055] In one implementation, the system can calculate the rotation of the lens target in real time through the angular velocity data provided by the physical engine. If the angular velocity exceeds a certain threshold, it indicates that the lens target is rotating rapidly, and the system can adjust the orientation of the lens accordingly.

[0056] In another implementation, the system can periodically calculate the direction vector of the lens target and compare it with the direction vector of the previous frame. If the change of the direction vector exceeds a preset angle threshold, the system will consider that the orientation of the lens target has changed significantly and adjust the orientation of the lens accordingly.

[0057] In another implementation, when the character rotates, the physical engine updates the rotation matrix of the character. The system can monitor the change of the rotation matrix to determine whether the orientation of the lens target has changed.

[0058] After monitoring the change of the orientation of the lens target, the terminal adjusts the position and orientation of the lens according to the change to ensure that the lens is always within the soft zone of the view control and consistent with the orientation of the lens target. This real-time monitoring and adjustment mechanism enables the lens to smoothly follow the movement of the lens target, providing players with a more stable and natural visual experience.

[0059] Step S3320, determining the soft zone lens coordinates based on the lens target orientation, and rotating the lens to the soft zone lens coordinates within the soft zone of the view control, wherein the lens at the soft zone lens coordinates is always consistent with the orientation of the lens target orientation.

[0060] The terminal first obtains the current direction vector of the camera target, which represents the orientation of the camera target, and the current direction vector is usually determined by the moving direction or orientation of the character, which can be obtained from the character control terminal or physical terminal of the game engine. For example, if the character is flying forward, the current direction vector will point to the front of the character. Next, the terminal converts the current direction vector into the pitch angle and yaw angle in the spherical coordinate system, where the pitch angle represents the angle of the camera in the vertical plane, and the yaw angle represents the angle of the camera in the horizontal plane. The conversion process can be achieved by decomposing the direction vector into vertical and horizontal components. The terminal calculates the soft zone camera coordinates according to the preset soft zone angle range, which can be set as an angle range smaller than the visual angle control dead zone, defining the movement boundary of the camera in the automatic control mode. The terminal will calculate the soft zone boundary based on the current orientation of the camera target and determine the specific position where the camera can move.

[0061] In an embodiment, the terminal uses a spherical linear interpolation algorithm to smoothly transition the current position of the camera to the soft zone camera coordinates, ensuring that the camera moves along the shortest path on the sphere during rotation, thereby achieving a smooth and natural transition effect. The interpolation time (i.e. the time required for the camera to complete the rotation) can be configured as needed, usually between 200 milliseconds and 800 milliseconds.

[0062] During the camera rotation process, the terminal will update the orientation of the camera in real time to always coincide with the current orientation of the camera target, which can be achieved by recalculating the current direction vector of the camera target and updating the camera position every frame. If the orientation of the camera target changes, the terminal will immediately adjust the camera position to maintain consistent orientation.

[0063] Step S3330, adjusting the focal length and field of view range of the camera, and adjusting the distance between the soft zone camera coordinates and the camera coordinates based on the current flight speed of the camera target.

[0064] The terminal first acquires the current flight speed of the lens target, which is provided by the physical terminal of the game engine and represents the moving speed of the character in space. Based on the flight speed, the terminal adjusts the focal length and field of view range of the lens. When the flight speed increases, the terminal appropriately reduces the field of view range and makes the lens focal length longer, so that the player can focus more on the distant scenery and reduce visual blur caused by high-speed movement. Conversely, when the flight speed decreases, the terminal increases the field of view range and makes the lens focal length shorter, so that the player can observe the surrounding environment more comprehensively. At the same time, the terminal adjusts the distance between the lens and the soft zone lens coordinates according to the flight speed, which is determined by the arm length parameter of the lens, which refers to the distance between the lens and the lens target. When the flight speed increases, the terminal appropriately increases the arm length to make the distance between the lens and the target farther, so as to maintain visual stability and comfort. Conversely, when the flight speed decreases, the terminal reduces the arm length to make the lens closer to the target, so that the player can observe the details more clearly.

[0065] The synergy of the above embodiments enables the terminal to monitor the orientation change of the lens target and respond in real time, ensuring that the lens can smoothly follow the movement direction of the target, thereby providing a more stable and natural visual experience. After receiving the control switching instruction, the terminal quickly adjusts the lens to the soft zone lens coordinates, so that the lens always keeps consistent with the orientation of the lens target, avoiding the discomfort caused by the visual angle offset. At the same time, the terminal dynamically adjusts the focal length and field of view range of the lens, as well as the distance between the lens and the soft zone lens coordinates according to the flight speed, so that the player can obtain the best visual effect in different flight states, not only improving the visual expressiveness of the game, but also enhancing the player's operation experience, making the visual angle control during flight more flexible and accurate.

[0066] On the basis of any embodiment of the method of the present application, when the visual angle touch operation is received again, the current lens control state is switched from the second control state to the first control state to control the movement of the lens in the visual angle control dead zone based on the visual angle touch operation, comprising: Step S3410, when the current lens control state is the second control state, the visual angle touch operation acting on the visual angle control region is monitored in real time.

[0067] When the current lens control state is the second control state, the terminal continues to monitor the field of view control area for touch control. The field of view control area is a predefined area in the screen space, usually located at a specific position of the screen, such as the center of the bottom or both sides of the screen. The specific position and shape can be adjusted according to the game design and the player's operation habit. The terminal monitors the touch events in this area in real time through the input management module of the game engine. These events include but are not limited to finger pressing, dragging and releasing operations. When the terminal detects a touch operation on the field of view control area, the terminal will further determine whether the operation meets the pre-set trigger conditions, which can include the type, duration and intensity of the touch operation. For example, the terminal can define the dragging operation after a single finger long press operation as an effective field of view touch operation, or define the combination of quick click and drag as a trigger operation. During the monitoring process, the terminal will filter and analyze the touch events to distinguish between effective field of view touch operations and other irrelevant touch operations, such as accidental touches or operations outside the field of view control area.

[0068] Once it is determined that the touch operation meets the trigger condition, the terminal will generate a corresponding touch event and prepare to perform the operation related to the touch event, such as switching the lens control state or adjusting the field of view, ensuring that the terminal can respond to the player's operation intention immediately, allowing the player to quickly switch back to the first control state when needed, regaining direct control over the lens, and thus achieving flexible adjustment and precise operation of the lens.

[0069] Step S3420, when detecting that the field of view touch operation is triggered, a state back switching instruction is generated, the current lens control state is switched from the second control state to the first control state based on the state back switching instruction, and the lens is controlled to move within the angle limit range of the field of view control dead zone based on the field of view touch operation.

[0070] In this embodiment, the terminal will immediately execute the state back-switching instruction when it detects a view angle touch operation trigger, and the state back-switching instruction will switch the current lens control state from the second control state back to the first control state. When the terminal detects an effective touch operation of the player within the view angle control area, the terminal will recognize the effective touch operation as a trigger condition for state back-switching. The effective touch operation can include single-finger pressing, dragging, or releasing, etc. These actions are defined as effective view angle touch operations in the input management module of the game engine. After generating the state back-switching instruction, the terminal will execute the switching of the lens control state according to the instruction. During the switching process, the terminal will switch the lens from the second control state of automatic control back to the first control state of manual control. At this time, the terminal will control the movement of the lens based on the current view angle touch operation, calculate the corresponding angle offset according to the touch operation of the player, and combine the current position of the lens with the offset to make the lens move within the angle limit range of the view angle control dead zone. The angle limit range of the view angle control dead zone can be a pre-set parameter, which defines the maximum angle range that the lens can move in the manual control state. The maximum angle range can be set to ±60 degrees in the horizontal direction and ±45 degrees in the vertical direction. The terminal will ensure that the movement of the lens will not exceed this range, thereby preventing excessive view angle offset and maintaining the stable observation of the player on the game scene. Among them, the terminal can use a linear interpolation algorithm to smoothly adjust the position of the lens, so that it gradually moves to a new angle position. At the same time, the terminal will update the direction of the lens in real time to reflect the touch operation of the player, ensuring that the movement of the lens is consistent with the operation intention of the player.

[0071] During the state switching process of the lens control state, the terminal will continue to monitor the touch operation, so as to further adjust the position of the lens when needed, ensuring that the player can quickly switch the lens control state through simple touch operation and flexibly adjust the view angle in the manual control state, thereby obtaining a smoother and more natural game experience.

[0072] Through the above embodiments of the present application, it can be ensured that in the second control state, the terminal can monitor the touch operation of the view angle control area in real time, and quickly generate a state back-switching instruction to switch the lens control state back to the first control state when an effective operation is detected. The above mechanism allows the player to immediately restore the manual control of the lens when needed, enhancing the interactivity and flexibility of the game. By adjusting the movement of the lens within the view angle control dead zone based on the view angle touch operation, the terminal ensures the accuracy and stability of the movement of the lens, allowing the player to make fine view angle adjustments, while avoiding the loss of direction caused by excessive view angle offset. The combination of instant response and precise control can significantly improve the operation experience of the player and the immersion of the game.

[0073] On the basis of any embodiment of the method of the present application, before the step of determining the first control state when the lens target enters the flight state, further comprising: Step S3510, real-time state monitoring is performed on the lens target to identify whether it enters the flight state.

[0074] In the present embodiment, real-time state monitoring is performed on the lens target to identify whether it enters the flight state through the physical system and the state machine of the game engine. The terminal continuously monitors the physical state of the role, including the vertical speed and the height from the ground of the role at this time. When the vertical speed of the role exceeds zero and the height from the ground exceeds the preset flight threshold, the terminal determines that the role enters the flight state. In addition, the terminal also monitors the motion mode flag bit of the role. Once the flight mode is activated, it is also determined that the role is in the flight state, thereby ensuring that the game can respond to the change of the state of the role in time and trigger the corresponding view control process, laying a foundation for subsequent lens control operations.

[0075] Step S3520, initializing lens control parameters when the lens target is in the flight state, wherein the lens control parameters include the view control dead zone, the view control soft zone, and the state transition parameter for controlling the lens control state.

[0076] In the present embodiment, when it is confirmed that the lens target is in the flight state, the terminal initializes a series of lens control parameters. First, the terminal defines the view control dead zone, which is a three-dimensional angle range centered on the lens target. The maximum offset angle is usually set in the horizontal and vertical directions. This range limits the movement boundary of the lens in the first control state, ensuring that the lens will not deviate excessively when the player adjusts the view. The terminal also defines the view control soft zone, which has an angle range smaller than the view control dead zone. The view control soft zone is used to determine the activity range of the lens in the second control state, so that the lens can closely follow the orientation of the lens target while maintaining a certain visual stability.

[0077] Meanwhile, the terminal initializes state transition parameters, which include control transition conditions such as flight speed threshold, direction change threshold, and touch duration threshold, etc. The control transition conditions determine the switching timing of the lens control state between the first control state and the second control state. For example, when the flight speed of the lens target exceeds the set threshold, or the change of the flight direction exceeds the preset angle, or the visual angle touch operation is not detected within the preset touch duration, the terminal will switch the trigger state. The state transition parameters can be stored in a configuration file, and developers are allowed to adjust them according to the specific needs of the game. For example, in some games, a wider visual angle control dead zone may be needed to allow more flexible manual adjustment, or a narrower visual angle control soft zone may be needed to achieve a tighter automatic following effect. In this way, the terminal can flexibly adapt to different game designs and player experience needs.

[0078] Step S3530, based on the lens control parameters, determining that the initial lens control state is the second control state.

[0079] After the lens target enters the flight state and initializes the lens control parameters, the terminal determines the initial lens control state according to the lens control parameters. The terminal sets the initial lens control state as the second control state, i.e., the automatic control mode, so that in the initial stage of the character entering the flight state, the automatic control mode can ensure that the lens and the character orientation are consistent, reducing the operation burden that the player may have when manually adjusting the visual angle. In the second control state, the terminal will automatically adjust the position and direction of the lens according to the orientation of the lens target, and the movement range of the lens is limited within the visual angle control soft zone, ensuring that the lens can closely follow the movement direction of the character. For example, if the character suddenly changes direction during flight, the lens will automatically adjust so that the player can continuously focus on the front of the character without manually adjusting the visual angle. In addition, the terminal will dynamically adjust the distance between the lens and the character, as well as the focal length and field of view range of the lens according to the flight speed. When the flight speed increases, the lens will appropriately zoom out and zoom in so that the player can better observe the environment in the distance; when the flight speed decreases, the lens will zoom in so that the player can see the details around the character more clearly.

[0080] The above embodiments of the present application monitor the flight state of the lens target in real time and initialize the lens control parameters, ensuring that the automatic control mode can be quickly responded and switched when the character enters the flight state, and dynamically adjusting the focal length, field of view range, and distance from the character of the lens according to the flight speed, so that the lens always keeps consistent with the character orientation, reducing the burden of the player manually adjusting the visual angle. At the same time, by setting the switching mechanism of the visual angle control dead zone and the visual angle control soft zone, the terminal can flexibly adjust the lens behavior, enhance the visual stability and game immersion, and the above mechanisms collectively improve the visual experience and operation convenience of the player during flight, significantly optimizing the overall quality of the game.

[0081] On the basis of any embodiment of the method of the present application, when the lens control state is the second control state, further comprising: In step S3610, a target vector corresponding to the instantaneous movement speed of the lens target is obtained, and a spatial offset of the lens target in the game interface is calculated based on the target vector, wherein the spatial offset is a displacement difference value of the lens target relative to the screen center.

[0082] In this embodiment, the terminal reads the instantaneous movement speed of the lens target from the physical module of the game engine as a three-dimensional target vector, which directly gives the moving direction and speed of the lens target in the world coordinate system. Then, the target vector is projected to the screen space through the observation matrix of the current camera to obtain a two-dimensional screen speed vector, which is in units of pixels per second or normalized percentage per second. The origin of the screen space is set at the screen center. The projected vector is the real-time displacement speed of the lens target relative to the screen center. In order to obtain the spatial offset in a frame, the terminal can multiply the two-dimensional screen speed vector by the current frame time interval to obtain the displacement difference value of the lens target relative to the screen center in the frame, which is the spatial offset. If further smoothing is needed, the screen speed vector can be first low-pass filtered and then multiplied by the frame time; if the speed needs to be emphasized, the speed vector can be squared and amplified before calculating the offset. The spatial offset is directly used to drive the automatic offset of the lens in the screen space in the subsequent steps.

[0083] In step S3620, a coordinate value corresponding to the spatial offset is added to the soft area lens coordinate to form a lens offset coordinate with the coordinate in the offset state.

[0084] In this embodiment, the terminal regards the spatial offset as a two-dimensional vector, of which the horizontal component corresponds to the screen X-axis displacement and the vertical component corresponds to the screen Y-axis displacement. The two-dimensional vector is first scaled according to the normalized screen resolution and then multiplied by the proportionality coefficient in the configuration table to obtain an incremental value with the same unit as the soft area lens coordinate. The original value of the soft area lens coordinate is calculated from the character orientation and the fixed arm length and is stored in the world coordinate system. The terminal first converts the soft area lens coordinate to the screen coordinate and then directly adds the incremental value to the screen coordinate to obtain the lens offset coordinate. To avoid the lens exceeding the boundary, the terminal can also perform soft area boundary clipping on the superimposed coordinate, including hard boundary truncation, damping deceleration or elastic rebound. The clipped coordinate is immediately written back to the world coordinate system and takes effect in the next frame rendering, ensuring that the lens is always in the offset state and consistent with the character movement.

[0085] In step S3630, the lens is controlled to move towards the lens offset coordinate at a preset following speed until the spatial offset decays to zero.

[0086] After the terminal obtains the lens offset coordinates, it immediately regards the difference between the coordinates and the current lens position as a residual displacement vector, and performs frame-by-frame approximation at a preset follow-up speed. The follow-up speed is written in the configuration table in units of degrees per second or world units per second, and a typical value is set to ninety degrees per second or five meters per second. The developer can linearly adjust it, or use a segmented mapping: a lower speed is used in a low-speed interval to ensure a smooth transition, and a higher speed is used in a high-speed interval to quickly reset. The length of the residual displacement vector is calculated every frame. If the length is greater than the product of the speed and the frame time, the displacement vector is normalized, multiplied by the speed, and then multiplied by the frame time to obtain the frame displacement increment. If the length is less than or equal to the product, the lens position is directly set to the lens offset coordinates, and the moving logic is terminated. The spatial offset decreases frame by frame, and its decay adopts an exponential decay formula. The decay coefficient and the follow-up speed jointly determine the reset time, and a common setting is fifty percent decay per second, which ensures that the lens returns to the non-offset position within one second after the character stops moving. The entire slow motion process can be completed locally without additional network interaction, ensuring a smooth transition of milliseconds.

[0087] In an implementation, whether the lens control state is the second control state or not, when the terminal receives a moving instruction for the lens target, there is a displacement difference value of the lens target relative to the screen center, that is, there is a spatial offset, and the spatial offset will reach a corresponding threshold according to a preset offset speed. When the terminal does not receive a moving instruction for the lens target, the spatial offset will also gradually become zero in an interpolation manner according to a preset recovery speed. Thus, the terminal can calculate the spatial offset of the lens target according to the moving instruction for the lens target, and adjust the relative position of the lens target in the game interface based on the spatial offset.

[0088] In one embodiment, during the second control state, when the terminal receives a moving instruction for the lens target, the lens can move to a position coordinate opposite to the moving instruction at a preset moving speed according to a preset lens moving track, and then continue to move a certain distance, the lens moving track being a track on the lens control soft area boundary, and the final position of the lens on the lens control soft area boundary being determined based on the current lens orientation. The final position of the lens can be configured as a superposition vector formed by adding a superposition offset value to a direction vector of the position coordinate opposite to the current lens orientation, and the intersection point on the lens control soft area boundary. For example, when the flight orientation of the lens target is left, and the player receives a moving instruction of the lens target to the left, the lens behind the lens target will move to the back of the lens target along the lens moving track, and then continue to move at a preset speed along the track on the lens control soft area boundary, so that the lens orientation is to the front of the lens target and then to the left, so that when the flight orientation of the lens target is left, the lens orientation is more to the left of the lens target. The player can see the view more to the left than the normal view, so that the lens can provide the player with a clearer and wider motion view based on the orientation of the lens target.

[0089] Through the synergy of the above-mentioned embodiments, the application can convert the instantaneous motion speed into lens offset in real time during flight, and drive the lens to reset at a preset following speed. The terminal first calculates the displacement difference of the lens relative to the screen center according to the target vector, then adds the difference to the soft area lens coordinate to form an offset coordinate, and then guides the lens to smoothly approach at a fixed or segmented adjustable speed until the offset is exponentially attenuated to zero. The entire process does not require external intervention, the lens can be offset forward to expand the view during high-speed flight, and can quickly return to the original position after deceleration, which can provide more game details, significantly reduce the burden of manual adjustment of the player's view, and maintain the stability and immersion of the picture.

[0090] Please refer to Figure 5According to one aspect of the present application, a lens view angle control device is provided, which comprises a lens control module 4100, a state transformation module 4200, a lens following module 4300 and a touch response module 4400. The lens control module 4100 is configured to determine a first control state when a lens target enters a flight state, set a view angle control dead zone centered on the lens target, and control the lens to move within the view angle control dead zone based on a view angle touch operation. The state transformation module 4200 is configured to switch the current lens control state from the first control state to a second control state when a preset control transformation condition is met, and determine a view angle control soft zone centered on the lens target. The lens following module 4300 is configured to control the lens to rotate to the view angle control soft zone, and move the lens to a soft zone lens coordinate corresponding to the lens target based on the lens target orientation. The touch response module 4400 is configured to switch the current lens control state from the second control state to the first control state when the view angle touch operation is received again, and control the lens to move within the view angle control dead zone based on the view angle touch operation.

[0091] On the basis of any embodiment of the device of the present application, the lens control module 4100 comprises a state determination module configured to determine that the lens target is currently in the first control state in response to the view angle touch operation acting on the view angle control region when the current role state of the lens target is the flight state, and a lens limiting module configured to control the lens to move within an angle limiting range of the view angle control dead zone based on the view angle touch operation, wherein the angle limiting range is a lens boundary range set based on the lens target.

[0092] On the basis of any embodiment of the device of the present application, the state transformation module 4200 comprises a condition monitoring module configured to monitor whether the lens target currently meets the control transformation condition, wherein the control transformation condition comprises any one or more of that the flight speed of the lens target exceeds a set threshold, or that the flight direction of the lens target changes by more than a preset angle, or that the lens target does not respond to the view angle touch operation within a preset touch duration, and an instruction triggering module configured to trigger a control switching instruction to switch the current lens control state from the first control state to the second control state and determine an angle limiting range of a view angle control soft zone centered on the lens target when the lens target currently meets the control transformation condition, wherein the view angle control soft zone is a corresponding lens boundary range with an angle limiting range smaller than that of the view angle control dead zone.

[0093] On the basis of any embodiment of the device of the present application, the lens following module 4300 comprises: a direction monitoring module configured to monitor a direction change of the lens target direction in response to the control switching instruction; a lens rotating module configured to determine the soft zone lens coordinate based on the lens target direction, and rotate the lens to the soft zone lens coordinate within the visual angle control soft zone, wherein the lens at the soft zone lens coordinate is always consistent with the direction of the lens target direction; and a distance adjusting module configured to adjust the focal length and field of view range of the lens, and adjust the distance between the soft zone lens coordinate and the lens coordinate based on the current flight speed of the lens target.

[0094] On the basis of any embodiment of the device of the present application, the touch response module 4400 comprises: a touch monitoring module configured to monitor whether the visual angle touch operation acting on the visual angle control area is triggered in real time when the current lens control state is the second control state; and a state back switching module configured to generate a state back switching instruction when it is detected that the visual angle touch operation is triggered, switch the current lens control state from the second control state to the first control state based on the state back switching instruction, and control the lens to move within the angle limit range of the visual angle control dead zone based on the visual angle touch operation.

[0095] On the basis of any embodiment of the device of the present application, it further comprises: a flight identification module configured to monitor the state of the lens target in real time to identify whether it enters a flight state; a parameter configuration module configured to initialize lens control parameters when the lens target is in the flight state, wherein the lens control parameters comprise the visual angle control dead zone, the visual angle control soft zone, and state transformation parameters for controlling the lens control state; and a state switching module configured to determine that the initial lens control state is the second control state based on the lens control parameters.

[0096] On the basis of any embodiment of the device of the present application, it further comprises: an offset calculation module configured to obtain a target vector corresponding to the instantaneous motion speed of the lens target, and calculate a spatial offset of the lens target in the game interface based on the target vector, wherein the spatial offset is a displacement difference value of the lens target relative to the screen center; a coordinate calculation module configured to superimpose a coordinate value corresponding to the spatial offset to the soft zone lens coordinate to form a lens offset coordinate with a coordinate in an offset state; and a lens displacement module configured to control the lens to move towards the lens offset coordinate at a preset following speed until the spatial offset decays to zero.

[0097] Another embodiment of the present application also provides a lens visual angle control device. As shown in Figure 6As shown in the figure, the internal structure diagram of the lens view angle control device is shown. The lens view angle control device includes a processor, a computer readable storage medium, a memory and a network interface connected through a system bus. Among them, the computer readable non-volatile readable storage medium of the lens view angle control device stores an operating system, a database and computer readable instructions, the database can store information sequences, and the computer readable instructions are executed by the processor to enable the processor to realize a lens view angle control method.

[0098] The processor of the lens view angle control device is used to provide computing and control capability to support the operation of the entire lens view angle control device. The memory of the lens view angle control device can store computer readable instructions, which are executed by the processor to enable the processor to execute the lens view angle control method of the present application. The network interface of the lens view angle control device is used to connect and communicate with the terminal.

[0099] Those skilled in the art can understand that, Figure 6 The structure shown in the figure is only a block diagram of part of the structure related to the scheme of the present application, and does not constitute a limitation on the lens view angle control device to which the scheme of the present application is applied. The specific lens view angle control device can include more or fewer components than those shown in the figure, or combine certain components, or have a different component arrangement.

[0100] The processor in the embodiment is used to execute the specific functions of each module in Figure 5 The memory stores the program codes and various data required for executing the above-mentioned modules or sub-modules. The network interface is used to realize data transmission between the user terminal or the server. The non-volatile readable storage medium in the embodiment of the present application stores the program codes and data required for executing all modules in the lens view angle control device of the present application, and the server can call the program codes and data of the server to execute the functions of all modules.

[0101] The present application also provides a non-volatile readable storage medium storing computer readable instructions, which are executed by one or more processors to enable the one or more processors to execute the steps of the lens view angle control method of any embodiment of the present application.

[0102] The present application also provides a computer program product, including a computer program / instruction, which is executed by one or more processors to realize the steps of the method described in any embodiment of the present application.

[0103] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiments of the present application can be completed by a computer program instructing relevant hardware, and the computer program can be stored in a non-volatile readable storage medium. When the program is executed, it can include the processes of the above-mentioned embodiments of the method. The storage medium can be a computer readable storage medium such as a magnetic disc, an optical disc, a Read-Only Memory (ROM), or a Random Access Memory (RAM).

Claims

1. A method for controlling lens angle, characterized in that, include: Determine the first control state when the lens target enters the flight state, set the view control dead zone centered on the lens target, and control the lens to move within the view control dead zone based on view touch operation; When the preset control transformation conditions are met, the current lens control state is switched from the first control state to the second control state, and the view control soft area centered on the lens target is determined. Control the lens to rotate into the soft area of ​​the view control, and move the lens to the soft area lens coordinates corresponding to the lens target based on the lens target orientation; When the viewpoint touch operation is received again, the current lens control state is switched from the second control state to the first control state, so as to control the lens to move within the viewpoint control dead zone based on the viewpoint touch operation.

2. The lens angle control method according to claim 1, characterized in that, The first control state when the target enters flight mode is determined, a viewing angle control dead zone centered on the target is set, and the camera is controlled to move within the viewing angle control dead zone based on viewing angle touch operation, including: When the current character state of the camera target is in flight state, the camera target is determined to be in the first control state in response to the view touch operation applied to the view control area. Based on the aforementioned viewpoint touch operation, the lens is controlled to move within the angle limitation range of the viewpoint control dead zone, wherein the angle limitation range is the lens boundary range set based on the lens target.

3. The lens angle control method according to claim 2, characterized in that, When the preset control transformation conditions are met, the current lens control state is switched from the first control state to the second control state, and the viewpoint control soft area centered on the lens target is determined, including: Monitor whether the lens target currently meets the control transformation conditions, wherein the control transformation conditions include any one or more of the following: the flight speed of the lens target exceeds a set threshold, or the flight direction of the lens target changes by more than a preset angle, or the viewpoint touch operation is not responded to within a preset touch duration. When the lens target currently meets the control transformation condition, a control switching command is triggered to switch the current lens control state from the first control state to the second control state, and the angle limit range of the view control soft area centered on the lens target is determined. The view control soft area is the corresponding lens boundary range where the angle limit range is smaller than the angle limit range of the view control dead zone.

4. The lens angle control method according to claim 3, characterized in that, The step of controlling the rotation of the lens to the soft area of ​​the view control, and moving the lens to the soft area lens coordinates corresponding to the lens target based on the lens target orientation, includes: In response to the control switching command, monitor the orientation change of the lens target; The soft-area lens coordinates are determined based on the lens target orientation, and the lens is rotated to the soft-area lens coordinates within the view control soft area, wherein the lens located at the soft-area lens coordinates is always aligned with the orientation of the lens target orientation; Adjust the focal length and field of view of the lens, and adjust the distance between the soft-area lens coordinates and the lens coordinates based on the current flight speed of the target.

5. The lens angle control method according to claim 2, characterized in that, When the viewpoint touch operation is received again, the current lens control state is switched from the second control state to the first control state, so as to control the lens to move within the viewpoint control dead zone based on the viewpoint touch operation, including: When the current lens control state is the second control state, monitor in real time whether the view touch operation applied to the view control area is triggered. When the touch operation of the viewpoint is detected, a state switch command is generated accordingly. Based on the state switch command, the current lens control state is switched from the second control state to the first control state. Based on the touch operation of the viewpoint, the lens is controlled to move within the angle limit range of the viewpoint control dead zone.

6. The lens angle control method according to any one of claims 1-5, characterized in that, Before the step of determining the first control state when the camera target enters the flight state, the method further includes: Real-time status monitoring of the camera target is performed to identify whether it has entered flight mode; When the target in the lens is in flight, the lens control parameters are initialized, wherein the lens control parameters include the view control dead zone, the view control soft zone, and state transition parameters for controlling the lens control state. Based on the lens control parameters, the initial lens control state is determined to be the second control state.

7. The lens angle control method according to claim 6, characterized in that, When the lens control state is the second control state, it also includes: Obtain the target vector corresponding to the instantaneous motion velocity of the camera target, and calculate the spatial offset of the camera target within the game interface based on the target vector, wherein the spatial offset is the displacement difference of the camera target relative to the center of the screen; The coordinate values ​​corresponding to the spatial offset are superimposed on the soft-spot lens coordinates to form lens offset coordinates in an offset state. The lens is controlled to move toward the lens offset coordinate at a preset following speed until the spatial offset decays to zero.

8. A lens angle control device, characterized in that, include: The lens control module is set to the first control state when the lens target enters the flight state, and sets a view control dead zone centered on the lens target. The lens is controlled to move within the view control dead zone based on view touch operation. The state transition module is configured to switch the current lens control state from the first control state to the second control state when the preset control transition conditions are met, and to determine the view control soft area centered on the lens target. The camera following module is configured to control the rotation of the camera to the view control soft area, and to move the camera to the soft area camera coordinates corresponding to the camera target based on the camera target orientation; The touch response module is configured to switch the current lens control state from the second control state to the first control state when the view touch operation is received again, so as to control the lens to move within the view control dead zone based on the view touch operation.

9. A lens viewing angle control device, comprising a central processing unit and a memory, characterized in that, The central processing unit is used to invoke and run a computer program stored in the memory to perform the steps of the method as described in any one of claims 1 to 7.

10. A non-volatile readable storage medium, characterized in that, It stores, in the form of computer-readable instructions, a computer program implemented according to any one of claims 1 to 7, which, when invoked by a computer, executes the steps included in the corresponding method.

Citation Information

Patent Citations

  • Method and device for controlling virtual lens in game

    CN109847354A

  • Viewing angle control method and device, storage medium and electronic equipment

    CN110141855A

  • Lens switching method and device in game, and electronic equipment

    CN111803946A

  • Three-dimensional model rendering method and device, equipment and storage medium

    CN112933599A

  • Game view angle control method and device, electronic equipment and storage medium

    CN118807203A