A mobile phone somatosensory game visual angle control method based on direct mapping of a gyroscope

By filtering and fusing data from gyroscopes and accelerometers, dynamically adjusting sensitivity and dead zone, and combining virtual mapping movement circles and dynamic radar maps, the problems of insufficient view control precision and poor operational adaptability in motion-sensing games are solved, achieving efficient view control and an immersive experience.

CN121891769BActive Publication Date: 2026-06-16上海屏云科技有限公司

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
上海屏云科技有限公司
Filing Date
2026-03-23
Publication Date
2026-06-16

AI Technical Summary

Technical Problem

Existing gyroscope control methods in motion-sensing games lack adaptability to user operation intentions and game scenarios, resulting in insufficient precision in viewpoint control, poor operational adaptability, and difficulties in multi-device collaboration, as well as a lack of spatial and directional feedback.

Method used

By reading gyroscope and accelerometer data at high frequency, combining it with camera feature points, filtering and data fusion are performed to dynamically adjust sensitivity and dead zone threshold, configure nonlinear sensitivity coefficient and dynamic dead zone, and combine virtual mapping motion circle and dynamic radar map to achieve precise view control and position feedback.

🎯Benefits of technology

It significantly improves the precision and smoothness of view control, enhances the intuitiveness and immersion of operation, improves team collaboration under multi-device coordination, and provides clear sense of direction and position feedback.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121891769B_ABST
    Figure CN121891769B_ABST
Patent Text Reader

Abstract

The application relates to a mobile phone motion sensing game visual angle control method based on direct mapping of a gyroscope, wherein the method comprises the following steps: high-frequency reading of three-axis angular velocity data of a mobile phone gyroscope and three-axis acceleration data of an accelerometer through a game engine; time integration of processed angular velocity data to obtain absolute rotation angles of the mobile phone on a yaw and a pitch axis, and direct mapping of the absolute rotation angles into rotation of a visual angle in the game through an adjustable nonlinear sensitivity coefficient; setting of a dynamically adjustable dead zone threshold, and mapping of roll axis data into specific operations; real-time application of the rotation amount to a camera model for updating a picture by the game engine, and mapping of real movement of a user to a virtual movement circle, so that a position relationship is visualized through a dynamic radar map; and the visual angle change in the game is highly synchronized with actual operation of the player, and intuitiveness and a sense of immersion of the operation are improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of motion-sensing input technology based on body movement, specifically relating to a mobile phone motion-sensing game perspective control method based on direct mapping of a gyroscope. Background Technology

[0002] Early motion-sensing games typically multiplied the angular velocity or integrated angle of the gyroscope by a fixed sensitivity coefficient and then mapped it to the game's viewpoint. This method was simplistic and crude, lacking adaptability to user intentions and game scenarios. To reduce interference from minor hand movements, a fixed dead zone was set. However, this dead zone was a one-size-fits-all approach, unable to accommodate the varying precision requirements of different game characters or the dynamic changes in the sensor's own bias.

[0003] Fixed sensitivity and dead zone cannot simultaneously achieve precise aiming and rapid turning. Turning is difficult at low sensitivity, while aiming is unstable at high sensitivity. Fixed dead zone either fails to filter out minute movements or causes a "sticky" feeling in operation. Gyroscope zero-point drift causes spontaneous field of view drift; accelerometer gravitational component interference leads to inaccurate motion detection.

[0004] Players have limited movement in real-world space, which, when directly mapped to an infinite virtual world, leads to the awkward situation of "being unable to move forward once they reach a wall." There's a lack of spatial awareness and directional feedback. Players need to manually press buttons to correct the camera angle; in multi-device online play, each player's physical orientation differs, causing confusion in team coordination within the game. Summary of the Invention

[0005] To address the aforementioned problems in the existing technology, this invention provides a mobile phone motion-sensing game perspective control method based on gyroscope direct mapping. The objective of this invention can be achieved through the following technical solution:

[0006] A method for controlling the viewpoint of a mobile motion-sensing game based on direct gyroscope mapping includes:

[0007] S1: The game engine synchronously reads the three-axis angular velocity data from the gyroscope and the three-axis acceleration data from the accelerometer from the phone's built-in inertial measurement unit at high frequency, and fuses them with the feature point movement data captured by the camera; low-pass filtering is applied to the angular velocity data, and high-pass filtering is used to dynamically compensate the integrated angular velocity data to eliminate the gyroscope's zero-point drift; the acceleration data is processed, and the gravitational acceleration component is separated and eliminated through a filtering algorithm to obtain the device's linear acceleration in space;

[0008] S2: Integrate the processed angular velocity data over time to obtain the absolute rotation angle of the phone relative to an initial spatial anchor point on the yaw and pitch axes; map the absolute rotation angle directly to the rotation of the in-game viewpoint using a non-linearly adjustable sensitivity coefficient to establish a correspondence between physical motion and virtual viewpoint.

[0009] S3: Configure dynamic dead zone to ignore unintended view shaking when the phone's physical rotation angle does not exceed the dead zone threshold; the dead zone threshold is dynamically adjusted according to different game characters or weapon types; set the roll axis mapping rules to map roll axis data to view control operations;

[0010] S4: The game engine applies the rotation amount of the absolute rotation angle to the camera model in the game and updates the rendered screen in real time; it maps the user's movement in real space to a virtual mapping movement circle; and it uses a dynamic radar map in the game interface to visualize the relative relationship between the player's current device position and the origin of the mapping movement circle in real time.

[0011] Specifically, the method for dynamically generating the nonlinearly adjustable sensitivity coefficient is as follows:

[0012] A sensitivity curve library is pre-established, which contains preset nonlinear mapping curves. Each curve corresponds to a sensitivity characteristic parameter. The angular velocity amplitude and duration of the absolute rotation angle are monitored in real time. If the angular velocity amplitude exceeds the preset dynamic threshold and the duration exceeds the time window threshold, it is determined that the user intends to rotate the viewpoint, and the sensitivity coefficient is adjusted.

[0013] Based on the current game scene type or weapon parameters, the system matches the corresponding target mapping curve from the sensitivity curve library and calculates the sensitivity coefficient in real time based on the feature parameters of the target mapping curve. When the absolute rotation angle is less than the minimum angle threshold, the sensitivity coefficient decreases exponentially as the angle decreases, suppressing minor shaking. When the absolute rotation angle is greater than the maximum angle threshold, the sensitivity coefficient saturates logarithmically as the angle increases, avoiding excessive rotation of the viewpoint.

[0014] The sensitivity coefficient is multiplied by the absolute rotation angle to obtain the final view rotation amount, which is then clamped to the maximum rotation speed allowed by the game engine to ensure smooth rendering at different frame rates.

[0015] Specifically, the method for configuring and adjusting the dynamic dead zone is as follows:

[0016] During the game startup phase, the angular velocity of the three axes of the gyroscope is collected when the mobile phone is stationary on a horizontal plane. The initial dead zone threshold is set by the static zero bias mean and standard deviation to cover the inherent zero bias of the device and the micro vibration of the desktop.

[0017] Once in a match, the mean and standard deviation of the current holding value of the phone are statistically analyzed in real time using a sliding window, and then multiplied by the corresponding dead zone multiplier factor according to the character / weapon type to obtain the real-time dead zone threshold.

[0018] The real-time dead zone threshold is applied to the yaw axis and pitch axis respectively: only when the absolute rotation angle is greater than the real-time dead zone threshold for two consecutive frames is it determined to be a valid view input; otherwise, the frame data is discarded.

[0019] During the transition period after the real-time dead zone threshold is updated, a first-order low-pass filter is used to smoothly interpolate the dead zone threshold to avoid screen stuttering caused by threshold jumps.

[0020] Specifically, the execution process of the roll axis mapping rule is as follows:

[0021] Map the roll angular velocity to in-game camera control to enable the side-peek function;

[0022] The polarity of the roll axis angular velocity is applied separately to record right roll events and left roll events; after an event is triggered, a lock window is built in, and no new roll events will be responded to in the window to prevent multiple accidental triggers from a single large roll.

[0023] The right roll event is mapped to a right PEEK operation, and the left roll event is mapped to a left PEEK operation; the character's side-stepping and peeking action is simulated by adjusting the position and angle of the in-game camera model.

[0024] Specifically, the roll rate is not involved in the calculation of any viewpoint rotation, but is directly used to control the amplitude and speed of PEEK operations, ensuring the coordination between viewpoint control and tactical actions.

[0025] Specifically, in step S4, the method for mapping the user's real-world movement to a virtual mapped movement circle and displaying it in real time includes:

[0026] By performing a calibration process before the game starts, the position of the human body's center of gravity is calculated by fusing the movement of camera feature points with data from the gyroscope and accelerometer, and used as the two-dimensional origin of the mapped movement circle.

[0027] By combining the processed linear acceleration data from the accelerometer and the feature point data from the camera, and through double integration and coordinate transformation, the two-dimensional displacement vector of the device relative to the origin on the horizontal plane is calculated.

[0028] An elliptical boundary region is defined for the mapped movement circle, and a circular dead zone is set near the origin. When the device moves within the circular dead zone, the output displacement vector is zero to prevent accidental movement caused by turning, PEEK, or natural body swaying.

[0029] The elliptical boundary region contains two state circles: a blue state circle and a red state circle, each corresponding to a different movement state. When the calculated two-dimensional displacement vector approaches the red state circle, the character's center of mass is attracted to the red state circle, and the character moves at a walking speed. When the displacement vector approaches the blue state circle, the center of mass is attracted to the blue state circle, and the character moves at a running speed. When translating left or right, the displacement vector is reduced by a factor to adapt to the actual stride difference.

[0030] On the dynamic radar map in the corner of the game interface, a fixed icon represents the origin of the mapped movement circle, and a directional arrow represents the real-time position and orientation of the current device; the relative position and distance between the arrow and the origin correspond in real time to the relative displacement of the device and the initial anchor point in real space; the dynamic radar map supports two modes: follow orientation rotation mode and fixed direction mode, which users can choose according to their needs.

[0031] Specifically, the interaction and display method of the dynamic radar map includes:

[0032] A fan-shaped field of view is overlaid on the dynamic radar map. The central angle of the fan-shaped field of view is associated with the current field of view of the in-game camera model, and its orientation is synchronized in real time with the direction of the directional arrow.

[0033] In fixed orientation mode, the directions of the radar chart (north, south, east, west) are fixed at the start of the game, and the direction of movement must correspond to the actual direction; in orientation rotation mode, the direction of movement is always consistent with the orientation of the phone.

[0034] Specifically, the method also includes a viewpoint correction mechanism:

[0035] When the phone is detected to remain stationary in space for more than a preset time threshold, and the angular velocities of the three axes of the gyroscope are all lower than the alignment judgment threshold, the view alignment logic is triggered.

[0036] Reset the current phone orientation as the new spatial anchor point and reset the in-game view to the default forward view;

[0037] During the repositioning process, a smooth interpolation algorithm is used to transition the current viewpoint to the new anchor point viewpoint, avoiding screen jumps.

[0038] Specifically, the synchronization method in S1 for reading data from the inertial measurement unit and subsequent processing with the game engine rendering frames includes:

[0039] In the game engine, a high-priority data acquisition thread, independent of the rendering thread, is created to poll the sensor data of the inertial measurement unit at a fixed ultra-high frequency and store it in a thread-safe first-in-first-out data queue.

[0040] At the start of each frame rendering callback, the latest sensor data packet for the current moment is retrieved from the data queue. If there are multiple data packets in the queue, the old data is discarded and only the latest data packet is used for the view control calculation of that frame.

[0041] Specifically, when the mapping motion circle is enabled, it monitors the magnitude of the processed linear acceleration vector in real time; when the magnitude is detected to be continuously lower than the motion judgment threshold for a first preset time, it determines that the user is in a stationary state and triggers zero-speed update calibration.

[0042] During zero-speed updates, the sliding window mean of the current linear acceleration data is used as the new instantaneous drift, and the reference value of the high-pass filter used to separate gravitational acceleration is updated accordingly.

[0043] Simultaneously, the calculated two-dimensional displacement vector is reset to zero, and the current position of the mapped movement circle is reset to the two-dimensional origin to suppress displacement drift caused by sensor integration accumulation.

[0044] Specifically, the virtual perspective employs a multi-device collaborative perspective synchronization mechanism:

[0045] In local area network online games, each device node packages the locally calculated spatial anchor point quaternion, the coordinates of the origin of the mapped movement circle, and the relative displacement vector of the current device within the circle into an attitude synchronization frame at a preset period.

[0046] The attitude synchronization frame is broadcast to all peer nodes in the room via a reliable UDP transmission channel, and the frame header includes a local high-precision game clock and sensor sampling sequence number.

[0047] After each node receives the attitude synchronization frame from the other end, it jointly estimates the anchor point deviation between itself and the other end, as well as the drift of the origin of the movement circle, to obtain a globally consistent spatial reference frame.

[0048] Before rendering, the local view and the virtual character position are remapped according to the global consistent reference system to ensure that the physical orientation of all players in the same room in real space is synchronized with the in-game view.

[0049] The multi-device collaborative view synchronization mechanism is mutually exclusive with the view alignment mechanism and the zero-speed update calibration process: if the local device is performing alignment or zero-speed update, the broadcast of attitude synchronization frames will be paused until the local device re-enters a stable state.

[0050] Specifically, the mapped movement circle also includes a manual reset mechanism and a back-down assist mechanism:

[0051] The game interface provides interactive virtual buttons or supports specific gesture recognition. When the user triggers the virtual button or completes the specific gesture, the current position of the device in the real space is immediately set as the new origin of the mapped movement circle, and the two-dimensional displacement vector is reset to zero. At the same time, the position of the directional arrow in the dynamic radar map is updated to match the new origin.

[0052] When a user is detected to have the intention to move backward, i.e., the displacement vector exceeds the dead zone and moves in the opposite direction of the origin, the red status circle and the origin will generate a pulling force, pulling the player's movement state back to walking or stopping. At the same time, the origin of the mapped movement circle will be automatically refreshed and adjusted according to the relative position relationship.

[0053] The beneficial effects of this invention are as follows:

[0054] The above methods effectively solve the problems of insufficient viewpoint control precision, poor operational adaptability, and difficulties in multi-device collaboration in traditional motion-sensing games. The introduction of a non-linear adjustable sensitivity coefficient and dynamic dead zone configuration significantly improves the user's operational experience in different game scenarios, ensuring both the stability of precise aiming and the smoothness required for rapid turning. Simultaneously, the roll axis's functional mapping design avoids misoperation, enhancing the intuitiveness and convenience of game operation. Furthermore, by combining a virtual mapped movement circle with a dynamic radar map, not only is a reasonable mapping from the limited real-world space to the infinite virtual world achieved, but players are also provided with a clear sense of direction and positional feedback, greatly improving the immersive experience. The concept of a virtual mapped movement circle is introduced, setting an elliptical boundary and dynamically adjusting it, providing a dynamic radar map that displays position and orientation in real time. A clamping mechanism converts infinite movement into precise control within a limited range. A multi-device collaborative viewpoint synchronization mechanism further optimizes team collaboration in multiplayer scenarios, ensuring that all players' physical orientation remains consistent with the in-game viewpoint, thereby enhancing the overall realism and interactivity of the game. In summary, this invention provides an efficient and flexible viewpoint control solution for mobile motion-sensing games, with broad application prospects and technical value. Attached Figure Description

[0055] To facilitate understanding by those skilled in the art, the present invention will be further described below with reference to the accompanying drawings.

[0056] Figure 1 This is a flowchart illustrating a mobile phone motion-sensing game perspective control method based on gyroscope direct mapping according to the present invention.

[0057] Figure 2 This is a schematic diagram of the sensor data processing flow in this invention;

[0058] Figure 3 This is a schematic diagram of the nonlinear sensitivity control process in this invention;

[0059] Figure 4 This is a schematic diagram of real-world movement mapping to virtual movement in this invention. Detailed Implementation

[0060] Example embodiments will now be described more fully with reference to the accompanying drawings. However, example embodiments can be implemented in many forms and should not be construed as limited to the examples set forth herein; rather, these embodiments are provided to make this disclosure more comprehensive and complete, and to fully convey the concept of example embodiments to those skilled in the art. Furthermore, the described features, structures, or characteristics can be combined in any suitable manner in one or more embodiments. In the following description, numerous specific details are provided to give a full understanding of embodiments of this disclosure. However, those skilled in the art will recognize that the technical solutions of this disclosure can be practiced without one or more of the specific details, or other methods, components, apparatuses, steps, etc., can be employed. In other instances, well-known methods, apparatuses, implementations, or operations are not shown or described in detail to avoid obscuring aspects of this disclosure. The blocks shown in the drawings are merely functional entities and do not necessarily correspond to physically independent entities. That is, these functional entities can be implemented in software, in one or more hardware modules or integrated circuits, or in different network and / or processor devices and / or microcontroller devices. The flowcharts shown in the drawings are merely illustrative and do not necessarily include all contents and operations / steps, nor do they necessarily have to be performed in the order described. For example, some operations / steps can be broken down, while others can be combined or partially combined. Therefore, the actual execution order may change depending on the actual situation.

[0061] To further illustrate the technical means and effects of the present invention in achieving its intended purpose, the following detailed description of the specific implementation methods, structures, features, and effects of the present invention, in conjunction with the accompanying drawings and preferred embodiments, is provided.

[0062] Please see Figure 1-4 ,in, Figure 2 The entire process of sensor data acquisition, preprocessing, and computation is shown in detail. Figure 3 The dynamic generation and decision-making logic of the nonlinear sensitivity coefficient are presented in the form of a flowchart. Figure 4 The diagrams visually illustrate how a user's movement in real space is mapped to a virtual "mapped movement circle," corresponding to different in-game movement states.

[0063] A method for controlling the viewpoint of a mobile motion-sensing game based on direct gyroscope mapping includes:

[0064] S1: The game engine synchronously reads the three-axis angular velocity data from the gyroscope and the three-axis acceleration data from the accelerometer from the phone's built-in inertial measurement unit at high frequency, and fuses them with the feature point movement data captured by the camera; low-pass filtering is applied to the angular velocity data, and high-pass filtering is used to dynamically compensate the integrated angular velocity data to eliminate the gyroscope's zero-point drift; the acceleration data is processed, and the gravitational acceleration component is separated and eliminated through a filtering algorithm to obtain the device's linear acceleration in space;

[0065] like Figure 2 The diagram shows a detailed schematic of the sensor data processing flow in this invention. The flow begins with the game engine synchronously reading raw gyroscope three-axis angular velocity data and accelerometer three-axis acceleration data from the phone's IMU at high frequency, while simultaneously fusing feature point movement data from the camera to provide a foundation for subsequent multi-sensor fusion positioning. In the data preprocessing stage, the raw data enters two processing links. For angular velocity data, a low-pass filter unit is first used to suppress high-frequency noise. Then, the angular velocity is integrated over time to obtain the angle, and a high-pass filter is applied to the integration result to achieve dynamic zero-point drift compensation, thereby effectively eliminating errors caused by gyroscope temperature drift and long-term integration. For acceleration data, the core processing logic is the gravity acceleration separation unit. This unit uses algorithms such as complementary filtering or Kalman filtering, combined with the attitude calculated by the gyroscope, to accurately remove the gravity component from the raw acceleration, outputting a pure linear acceleration that reflects the device's true motion in space.

[0066] The preprocessed, clean angular velocity data is fed into the attitude calculation module, where integration is used to obtain the absolute rotation angles of the phone relative to the initial spatial anchor point on the yaw and pitch axes. Simultaneously, the processed linear acceleration, along with camera feature point data, is fed into the displacement calculation module. Through double integration and coordinate transformation, the two-dimensional displacement vector of the device on the horizontal plane is calculated. These two calculation results—the "absolute rotation angle" and the "two-dimensional displacement vector"—are ultimately output to the upper-level logic of the game engine to drive the rotation of the in-game viewpoint and the movement of the character, thereby accurately establishing the correspondence between physical motion and virtual response.

[0067] S2: Integrate the processed angular velocity data over time to obtain the absolute rotation angle of the phone relative to an initial spatial anchor point on the yaw and pitch axes; map the absolute rotation angle directly to the rotation of the in-game viewpoint using a non-linearly adjustable sensitivity coefficient to establish a correspondence between physical motion and virtual viewpoint.

[0068] S3: Configure dynamic dead zone to ignore unintended view shaking when the phone's physical rotation angle does not exceed the dead zone threshold; the dead zone threshold is dynamically adjusted according to different game characters or weapon types; set the roll axis mapping rules to map roll axis data to view control operations;

[0069] S4: The game engine applies the rotation amount of the absolute rotation angle to the camera model in the game and updates the rendered screen in real time; it maps the user's movement in real space to a virtual mapping movement circle; and it uses a dynamic radar map in the game interface to visualize the relative relationship between the player's current device position and the origin of the mapping movement circle in real time.

[0070] Specifically, the method for dynamically generating the nonlinearly adjustable sensitivity coefficient is as follows:

[0071] A sensitivity curve library is pre-established, which contains preset nonlinear mapping curves. Each curve corresponds to a sensitivity characteristic parameter. The angular velocity amplitude and duration of the absolute rotation angle are monitored in real time. If the angular velocity amplitude exceeds the preset dynamic threshold and the duration exceeds the time window threshold, it is determined that the user intends to rotate the viewpoint, and the sensitivity coefficient is adjusted.

[0072] Based on the current game scene type or weapon parameters, the system matches the corresponding target mapping curve from the sensitivity curve library and calculates the sensitivity coefficient in real time based on the feature parameters of the target mapping curve. When the absolute rotation angle is less than the minimum angle threshold, the sensitivity coefficient decreases exponentially as the angle decreases, suppressing minor shaking. When the absolute rotation angle is greater than the maximum angle threshold, the sensitivity coefficient saturates logarithmically as the angle increases, avoiding excessive rotation of the viewpoint.

[0073] The sensitivity coefficient is multiplied by the absolute rotation angle to obtain the final view rotation amount, which is then clamped to the maximum rotation speed allowed by the game engine to ensure smooth rendering at different frame rates.

[0074] like Figure 3 This further elucidates the dynamic decision-making and generation process of the nonlinear sensitivity coefficient in this invention. The core of this mechanism is the establishment of a sensitivity curve library containing multiple preset nonlinear mapping curves. In actual operation, the system monitors the user's rotational intentions in real time. When the angular velocity amplitude and duration of the absolute rotation angle both exceed preset dynamic thresholds, it is determined that the user intends to rotate the viewing angle, and sensitivity adjustment is triggered.

[0075] After the adjustment is triggered, the system intelligently matches the most suitable target mapping curve from the sensitivity curve library based on the current game scene type and weapon parameters. Then, based on the characteristic parameters of this curve, a dynamic sensitivity coefficient is calculated and output in real time. The core of this coefficient lies in its non-linear characteristics: in the small absolute rotation angle range, the coefficient decreases exponentially, effectively suppressing view shake caused by slight hand movements and achieving precise aiming; while in the large rotation angle range, the coefficient saturates logarithmically, effectively preventing overshoot due to rapid turning and ensuring operational stability. Finally, the generated sensitivity coefficient is multiplied by the absolute rotation angle to obtain the final view rotation amount, which is clamped before being output to the game engine to ensure a smooth visual experience at different rendering frame rates.

[0076] Specifically, the method for configuring and adjusting the dynamic dead zone is as follows:

[0077] During the game startup phase, the angular velocity of the three axes of the gyroscope is collected when the mobile phone is stationary on a horizontal plane. The initial dead zone threshold is set by the static zero bias mean and standard deviation to cover the inherent zero bias of the device and the micro vibration of the desktop.

[0078] Once in a match, the mean and standard deviation of the current holding value of the phone are statistically analyzed in real time using a sliding window, and then multiplied by the corresponding dead zone multiplier factor according to the character / weapon type to obtain the real-time dead zone threshold.

[0079] The real-time dead zone threshold is applied to the yaw axis and pitch axis respectively: only when the absolute rotation angle is greater than the real-time dead zone threshold for two consecutive frames is it determined to be a valid view input; otherwise, the frame data is discarded.

[0080] During the transition period after the real-time dead zone threshold is updated, a first-order low-pass filter is used to smoothly interpolate the dead zone threshold to avoid screen stuttering caused by threshold jumps.

[0081] Specifically, the execution process of the roll axis mapping rule is as follows:

[0082] Map the roll angular velocity to in-game camera control to enable the side-peek function;

[0083] The polarity of the roll axis angular velocity is applied separately to record right roll events and left roll events; after an event is triggered, a lock window is built in, and no new roll events will be responded to in the window to prevent multiple accidental triggers from a single large roll.

[0084] The right roll event is mapped to a right PEEK operation, and the left roll event is mapped to a left PEEK operation; the character's side-stepping and peeking action is simulated by adjusting the position and angle of the in-game camera model.

[0085] Specifically, the roll rate is not involved in the calculation of any viewpoint rotation, but is directly used to control the amplitude and speed of PEEK operations, ensuring the coordination between viewpoint control and tactical actions.

[0086] Specifically, in step S4, the method for mapping the user's real-world movement to a virtual mapped movement circle and displaying it in real time includes:

[0087] By performing a calibration process before the game starts, the position of the human body's center of gravity is calculated by fusing the movement of camera feature points with data from the gyroscope and accelerometer, and used as the two-dimensional origin of the mapped movement circle.

[0088] By combining the processed linear acceleration data from the accelerometer and the feature point data from the camera, and through double integration and coordinate transformation, the two-dimensional displacement vector of the device relative to the origin on the horizontal plane is calculated.

[0089] An elliptical boundary region is defined for the mapped movement circle, and a circular dead zone is set near the origin. When the device moves within the circular dead zone, the output displacement vector is zero to prevent accidental movement caused by turning, PEEK, or natural body swaying.

[0090] The elliptical boundary region contains two state circles: a blue state circle and a red state circle, each corresponding to a different movement state. When the calculated two-dimensional displacement vector approaches the red state circle, the character's center of mass is attracted to the red state circle, and the character moves at a walking speed. When the displacement vector approaches the blue state circle, the center of mass is attracted to the blue state circle, and the character moves at a running speed. When translating left or right, the displacement vector is reduced by a factor to adapt to the actual stride difference.

[0091] On the dynamic radar map in the corner of the game interface, a fixed icon represents the origin of the mapped movement circle, and a directional arrow represents the real-time position and orientation of the current device; the relative position and distance between the arrow and the origin correspond in real time to the relative displacement of the device and the initial anchor point in real space; the dynamic radar map supports two modes: follow orientation rotation mode and fixed direction mode, which users can choose according to their needs.

[0092] like Figure 4 The diagram illustrates the mapping relationship between real-world spatial displacement and a virtual "mapped movement circle." In this model, the user's initial calibration position in real space is set as the two-dimensional origin of the mapped movement circle. As the user moves around this origin in reality, the system calculates the device's two-dimensional displacement vector relative to the origin by processing sensor data.

[0093] The mapped movement circle logically defines three key virtual regions:

[0094] Circular dead zone: Located near the origin. When the displacement vector falls within this area, the system determines it as unconscious movement by the user and outputs zero displacement, thus preventing accidental drifting of the character in the game.

[0095] Red Status Circle: Located outside the dead zone. When the user's displacement vector enters this area, the in-game character will move at a "walking" speed. At this time, the system will apply a suction effect to the character's center of mass, stabilizing its position at the boundary of the red area and ensuring a constant movement speed.

[0096] Blue Status Circle: Located at the outermost boundary of the mapped movement circle. When the user moves and causes the displacement vector to enter this area, the character's speed will increase to "running". Similarly, the character's center of mass will be attracted to the blue boundary.

[0097] Specifically, the interaction and display method of the dynamic radar map includes:

[0098] A fan-shaped field of view is overlaid on the dynamic radar map. The central angle of the fan-shaped field of view is associated with the current field of view of the in-game camera model, and its orientation is synchronized in real time with the direction of the directional arrow.

[0099] In fixed orientation mode, the directions of the radar chart (north, south, east, west) are fixed at the start of the game, and the direction of movement must correspond to the actual direction; in orientation rotation mode, the direction of movement is always consistent with the orientation of the phone.

[0100] Specifically, the method also includes a viewpoint correction mechanism:

[0101] When the phone is detected to remain stationary in space for more than a preset time threshold, and the angular velocities of the three axes of the gyroscope are all lower than the alignment judgment threshold, the view alignment logic is triggered.

[0102] Reset the current phone orientation as the new spatial anchor point and reset the in-game view to the default forward view;

[0103] During the repositioning process, a smooth interpolation algorithm is used to transition the current viewpoint to the new anchor point viewpoint, avoiding screen jumps.

[0104] In this embodiment, the core hardware requirement is that the device has a built-in inertial measurement unit, including a three-axis MEMS gyroscope and a three-axis accelerometer with a sampling rate of not less than 100Hz. The processor needs to have quad-core or higher computing power and support the OpenGL ES 3.0+ graphics rendering standard to ensure smooth real-time data processing and graphics rendering. The sensor data acquisition layer calls the SensorManager API on the Android platform and the CoreMotion framework on the iOS platform, respectively. The network communication module uses a reliable UDP-based transmission protocol to achieve low-latency data synchronization between multiple devices.

[0105] The entire system adopts a multi-threaded architecture, separating the three core components: sensor data acquisition, data processing, and game rendering. The high-priority data acquisition thread polls the IMU sensor at a frequency of 200Hz, the intermediate processing layer implements various filtering algorithms and motion calculations, and the final output layer keeps synchronized with the game engine's rendering frame rate.

[0106] Upon system startup, static sensor calibration is first performed, collecting 100 gyroscope data samples with the phone stationary, and calculating the mean and standard deviation of zero bias for each axis. After formal operation, the data processing pipeline includes the following steps:

[0107] Gyroscope signal processing chain:

[0108] A second-order Butterworth low-pass filter with a cutoff frequency of 10Hz is used to eliminate high-frequency noise; a high-pass filter with a time constant of 0.01 seconds is used to dynamically offset the integrated angular velocity; and zero drift is estimated and eliminated in real time using the sliding window mean method.

[0109] Accelerometer signal processing chain:

[0110] Complementary filters are applied to separate gravitational acceleration and linear acceleration; quaternion attitude calculation is used to improve the accuracy of gravity vector estimation; and pure linear acceleration is output for displacement integral calculation.

[0111] The system has a built-in configurable sensitivity curve library, with each curve corresponding to a specific game scene or weapon type. The sensitivity calculation engine monitors the angular velocity amplitude of the absolute rotation angle in real time. When it detects that the angular velocity exceeds 2.0 radians / second for 0.3 seconds, it determines that the user intends to make a rapid viewpoint rotation and automatically switches to high sensitivity mode.

[0112] The specific mapping rules adopt a piecewise function design:

[0113] Micro-operation area (rotation angle < 0.1 radians): Sensitivity decreases with a square law as the angle decreases, effectively suppressing physiological hand tremors.

[0114] Linear region (0.1-1.0 radians): Smoothly maps according to the preset animation curve to maintain the linearity of the operation.

[0115] Saturation region (>1.0 radians): Sensitivity saturates logarithmically as the angle increases, limiting the maximum rotational speed to no more than 3.0 radians / second.

[0116] The dead zone management system adopts a two-level calibration strategy: static calibration is based on the zero-bias characteristics of the sensor collected at startup, and dynamic calibration uses a 30-frame sliding window to statistically analyze the noise characteristics in the current grip state in real time.

[0117] The roll axis is handled completely independently of the view control system; angular velocity data is not involved in any rotation calculations. Event detection employs a dual-threshold comparison method: when the absolute value of the roll angular velocity exceeds 0.8 radians / second, it is determined as a left or right roll event based on its polarity. After an event is triggered, a 0.5-second lockout window is activated, during which subsequent roll inputs are ignored to prevent multiple false triggers from a single large movement. The mapping strategy is decoupled from the game logic through the game event system.

[0118] The displacement mapping system uses the game's startup calibration position as the two-dimensional origin and calculates horizontal displacement through double integration using accelerometers. The movement boundary adopts an elliptical model, with the ratio of the major and minor axes dynamically adjusted according to the character's posture: standing (1.2:1.0), crouching (1.0:0.8), and crawling (0.7:0.5), corresponding to different movement flexibility requirements.

[0119] When displacement exceeds the elliptical boundary, the system clamps the current position to the nearest point on the boundary, ensuring controllable operation. The radar map displays the device's relative position to the origin in real time: a fixed icon represents the origin, and directional arrows indicate the current device position and orientation. The fan-shaped field of view is linked to the in-game camera's field of view (FOV), with the central angle range reflecting the current field of view's openness in real time.

[0120] Specifically, the synchronization method in S1 for reading data from the inertial measurement unit and subsequent processing with the game engine rendering frames includes:

[0121] In the game engine, a high-priority data acquisition thread, independent of the rendering thread, is created to poll the sensor data of the inertial measurement unit at a fixed ultra-high frequency and store it in a thread-safe first-in-first-out data queue.

[0122] At the start of each frame rendering callback, the latest sensor data packet for the current moment is retrieved from the data queue. If there are multiple data packets in the queue, the old data is discarded and only the latest data packet is used for the view control calculation of that frame.

[0123] Specifically, when the mapping motion circle is enabled, it monitors the magnitude of the processed linear acceleration vector in real time; when the magnitude is detected to be continuously lower than the motion judgment threshold for a first preset time, it determines that the user is in a stationary state and triggers zero-speed update calibration.

[0124] During zero-speed updates, the sliding window mean of the current linear acceleration data is used as the new instantaneous drift, and the reference value of the high-pass filter used to separate gravitational acceleration is updated accordingly.

[0125] Simultaneously, the calculated two-dimensional displacement vector is reset to zero, and the current position of the mapped movement circle is reset to the two-dimensional origin to suppress displacement drift caused by sensor integration accumulation.

[0126] Specifically, the virtual perspective employs a multi-device collaborative perspective synchronization mechanism:

[0127] In local area network online games, each device node packages the locally calculated spatial anchor point quaternion, the coordinates of the origin of the mapped movement circle, and the relative displacement vector of the current device within the circle into an attitude synchronization frame at a preset period.

[0128] The attitude synchronization frame is broadcast to all peer nodes in the room via a reliable UDP transmission channel, and the frame header includes a local high-precision game clock and sensor sampling sequence number.

[0129] After each node receives the attitude synchronization frame from the other end, it jointly estimates the anchor point deviation between itself and the other end, as well as the drift of the origin of the movement circle, to obtain a globally consistent spatial reference frame.

[0130] Before rendering, the local view and the virtual character position are remapped according to the global consistent reference system to ensure that the physical orientation of all players in the same room in real space is synchronized with the in-game view.

[0131] The multi-device collaborative view synchronization mechanism is mutually exclusive with the view alignment mechanism and the zero-speed update calibration process: if the local device is performing alignment or zero-speed update, the broadcast of attitude synchronization frames will be paused until the local device re-enters a stable state.

[0132] Specifically, the mapped movement circle also includes a manual reset mechanism and a back-down assist mechanism:

[0133] The game interface provides interactive virtual buttons or supports specific gesture recognition. When the user triggers the virtual button or completes the specific gesture, the current position of the device in the real space is immediately set as the new origin of the mapped movement circle, and the two-dimensional displacement vector is reset to zero. At the same time, the position of the directional arrow in the dynamic radar map is updated to match the new origin.

[0134] When a user is detected to have the intention to move backward, i.e., the displacement vector exceeds the dead zone and moves in the opposite direction of the origin, the red status circle and the origin will generate a pulling force, pulling the player's movement state back to walking or stopping. At the same time, the origin of the mapped movement circle will be automatically refreshed and adjusted according to the relative position relationship.

[0135] In this embodiment, the zero-speed update calibration method is as follows: continuously monitor the linear acceleration modulus; when the acceleration is continuously below 0.1 m / s² for 1.0 second, the device is determined to be in a stationary state. The system automatically calculates the average acceleration of the most recent 10 frames as the new drift reference, resets the displacement integral to zero, and effectively suppresses long-term wandering errors.

[0136] The viewpoint correction mechanism is implemented as follows: when the gyroscope's three-axis angular velocity is below 0.05 radians / second for two consecutive seconds, automatic correction is triggered. The system sets the current attitude as the new anchor point and smoothly transitions to the default viewpoint within 0.5 seconds through spherical linear interpolation, avoiding screen jumps.

[0137] In LAN multiplayer mode, each device broadcasts attitude synchronization frames at a frequency of 10Hz, containing spatial anchor quaternions, the coordinates of the origin of the movement circle, and the relative displacement vector. The frame header embeds a high-precision timestamp and sensor serial number, and the receiver jointly estimates global reference frame consistency using extended Kalman filtering. A coordinate remapping engine ensures that the physical orientation of all players in the same virtual space maintains sub-millisecond synchronization accuracy with the game viewpoint.

[0138] The sensor acquisition thread runs independently at the highest priority, using a lock-free queue to ensure safe data exchange with the rendering thread. During rendering frame callbacks, only the latest data packet is retrieved, discarding intermediate accumulated data to guarantee a control response latency of less than 16ms.

[0139] Complex filtering algorithms run on a dedicated mathematical coprocessor, and vector operations are parallelized using SIMD instructions. Calculation accuracy is dynamically adjusted: full-precision mode is used in combat scenarios, while the menu interface is downgraded to a fast approximation algorithm.

[0140] The sampling frequency is dynamically adjusted based on the game status: 200Hz for active combat, 100Hz for exploration mode, and 10Hz for paused gameplay. Sensor batch processing mode is enabled to reduce the number of system wake-ups.

[0141] The game interface provides a virtual reset button, which supports a two-finger long press gesture to trigger a map origin reset. During manual reset, the system updates the radar map reference frame in real time to maintain spatial continuity. The scrolling operation provides haptic feedback, with different vibration patterns corresponding to different mapping events, enhancing the sense of control confirmation.

[0142] The system continuously records player operating habits and gradually optimizes sensitivity curve parameters. Independent parameter configuration files are created for different game modes (such as Arena and Survival modes), supporting one-click switching of control schemes. A detailed gamepad comparison mode is provided to help traditional players smoothly transition to motion control.

[0143] This embodiment achieves a high-precision, low-latency, and adaptive mobile phone motion-sensing game perspective control system through the above technical solution, which greatly improves the sense of immersion and operation comfort while ensuring the requirements of competitiveness.

[0144] The above description is merely a preferred embodiment of the present invention and is not intended to limit the present invention in any way. Although the present invention has been disclosed above with reference to preferred embodiments, it is not intended to limit the present invention. Any person skilled in the art can make some modifications or alterations to the above-disclosed technical content to create equivalent embodiments without departing from the scope of the present invention. Any simple modifications, equivalent changes and alterations made to the above embodiments based on the technical essence of the present invention without departing from the scope of the present invention shall still fall within the scope of the present invention.

Claims

1. A method for controlling the viewpoint of a mobile phone motion-sensing game based on direct mapping of a gyroscope, characterized in that, include: S1: The game engine synchronously reads the three-axis angular velocity data from the gyroscope and the three-axis acceleration data from the accelerometer from the phone's built-in inertial measurement unit at high frequency, and fuses them with the feature point movement data captured by the camera; low-pass filtering is applied to the angular velocity data, and high-pass filtering is used to dynamically compensate the integrated angular velocity data to eliminate the gyroscope's zero-point drift; the acceleration data is processed, and the gravitational acceleration component is separated and eliminated through a filtering algorithm to obtain the device's linear acceleration in space; S2: Integrate the processed angular velocity data over time to obtain the absolute rotation angle of the phone relative to an initial spatial anchor point on the yaw and pitch axes; map the absolute rotation angle directly to the rotation of the in-game viewpoint through a non-linearly adjustable sensitivity coefficient to establish a correspondence between physical motion and virtual viewpoint. The method for dynamically generating the nonlinearly adjustable sensitivity coefficient is as follows: A sensitivity curve library is pre-established, which contains preset nonlinear mapping curves. Each curve corresponds to a sensitivity characteristic parameter. The angular velocity amplitude and duration of the absolute rotation angle are monitored in real time. If the angular velocity amplitude exceeds the preset dynamic threshold and the duration exceeds the time window threshold, it is determined that the user intends to rotate the viewpoint, and the sensitivity coefficient is adjusted. Based on the current game scene type or weapon parameters, the system matches the corresponding target mapping curve from the sensitivity curve library and calculates the sensitivity coefficient in real time based on the feature parameters of the target mapping curve. When the absolute rotation angle is less than the minimum angle threshold, the sensitivity coefficient decreases exponentially as the angle decreases, suppressing minor shaking. When the absolute rotation angle is greater than the maximum angle threshold, the sensitivity coefficient saturates logarithmically as the angle increases, avoiding excessive rotation of the viewpoint. The sensitivity coefficient is multiplied by the absolute rotation angle to obtain the final view rotation amount, which is then clamped to the maximum rotation speed allowed by the game engine to ensure smooth rendering at different frame rates. S3: Configure dynamic dead zone to ignore unintended view shaking when the phone's physical rotation angle does not exceed the dead zone threshold; the dead zone threshold is dynamically adjusted according to different game characters or weapon types; set the roll axis mapping rules to map roll axis data to view control operations; S4: The game engine applies the rotation amount of the absolute rotation angle to the camera model in the game and updates the rendered screen in real time; it maps the user's movement in real space to a virtual mapping movement circle; and it uses a dynamic radar map in the game interface to visualize the relative relationship between the player's current device position and the origin of the mapping movement circle in real time.

2. The method according to claim 1, characterized in that, The method for configuring and adjusting the dynamic dead zone is as follows: During the game startup phase, the angular velocity of the three axes of the gyroscope is collected when the mobile phone is stationary on a horizontal plane. The initial dead zone threshold is set by the static zero bias mean and standard deviation to cover the inherent zero bias of the device and the micro vibration of the desktop. Once in a match, the mean and standard deviation of the current holding value of the phone are statistically analyzed in real time using a sliding window, and then multiplied by the corresponding dead zone multiplier factor according to the character / weapon type to obtain the real-time dead zone threshold. The real-time dead zone threshold is applied to the yaw axis and pitch axis respectively: only when the absolute rotation angle is greater than the real-time dead zone threshold for two consecutive frames is it determined to be a valid view input; otherwise, the frame data is discarded. During the transition period after the real-time dead zone threshold is updated, a first-order low-pass filter is used to smoothly interpolate the dead zone threshold to avoid screen stuttering caused by threshold jumps.

3. The method according to claim 1, characterized in that, The execution process of the roll axis mapping rule is as follows: Map the roll angular velocity to in-game camera control to enable the side-peek function; The polarity of the roll axis angular velocity is applied separately to record right roll events and left roll events; after an event is triggered, a lock window is built in, and no new roll events will be responded to in the window to prevent multiple accidental triggers from a single large roll. The right roll event is mapped to a right PEEK operation, and the left roll event is mapped to a left PEEK operation; the character's side-stepping and peeking action is simulated by adjusting the position and angle of the in-game camera model.

4. The method according to claim 3, characterized in that, The roll rate is not involved in the calculation of any viewpoint rotation, but is directly used to control the amplitude and speed of PEEK operations, ensuring the coordination between viewpoint control and tactical actions.

5. The method according to claim 1, characterized in that, The method for mapping the user's real-world movement to a virtual mapping movement circle and displaying it in real time in step S4 includes: By performing a calibration process before the game starts, the position of the human body's center of gravity is calculated by fusing the movement of camera feature points with data from the gyroscope and accelerometer, and used as the two-dimensional origin of the mapped movement circle. By combining the processed linear acceleration data from the accelerometer and the feature point data from the camera, and through double integration and coordinate transformation, the two-dimensional displacement vector of the device relative to the origin on the horizontal plane is calculated. An elliptical boundary region is defined for the mapped movement circle, and a circular dead zone is set near the origin. When the device moves within the circular dead zone, the output displacement vector is zero to prevent accidental movement caused by turning, PEEK, or natural body swaying. The elliptical boundary region contains two state circles: a blue state circle and a red state circle, each corresponding to a different movement state. When the calculated two-dimensional displacement vector approaches the red state circle, the character's center of mass is attracted to the red state circle, and the character moves at a walking speed. When the displacement vector approaches the blue state circle, the center of mass is attracted to the blue state circle, and the character moves at a running speed. When translating left or right, the displacement vector is reduced by a factor to adapt to the actual stride difference. On the dynamic radar map in the corner of the game interface, a fixed icon represents the origin of the mapped movement circle, and a directional arrow represents the real-time position and orientation of the current device; the relative position and distance between the arrow and the origin correspond in real time to the relative displacement of the device and the initial anchor point in real space; the dynamic radar map supports two modes: follow orientation rotation mode and fixed direction mode, which users can choose according to their needs.

6. The method according to claim 1, characterized in that, The interaction and display methods of the dynamic radar map include: A fan-shaped field of view is overlaid on the dynamic radar map. The central angle of the fan-shaped field of view is associated with the current field of view of the in-game camera model, and its orientation is synchronized in real time with the direction of the directional arrow. In fixed orientation mode, the directions of the radar chart (north, south, east, west) are fixed at the start of the game, and the direction of movement must correspond to the actual direction; in orientation rotation mode, the direction of movement is always consistent with the orientation of the phone.

7. The method according to claim 1, characterized in that, The method also includes a viewpoint correction mechanism: When the phone is detected to remain stationary in space for more than a preset time threshold, and the angular velocities of the three axes of the gyroscope are all lower than the alignment judgment threshold, the view alignment logic is triggered. Reset the current phone orientation as the new spatial anchor point and reset the in-game view to the default forward view; During the repositioning process, a smooth interpolation algorithm is used to transition the current viewpoint to the new anchor point viewpoint, avoiding screen jumps.

8. The method according to claim 1, characterized in that, The method for synchronizing data reading from the inertial measurement unit and subsequent processing with the game engine rendering frames in S1 includes: In the game engine, a high-priority data acquisition thread, independent of the rendering thread, is created to poll the sensor data of the inertial measurement unit at a fixed ultra-high frequency and store it in a thread-safe first-in-first-out data queue. At the start of each frame rendering callback, the latest sensor data packet for the current moment is retrieved from the data queue. If there are multiple data packets in the queue, the old data is discarded and only the latest data packet is used for the view control calculation of that frame.

9. The method according to claim 1, characterized in that, When the mapping motion circle is enabled, it monitors the magnitude of the processed linear acceleration vector in real time. When the magnitude is detected to be continuously lower than the motion judgment threshold for a first preset time, it is determined that the user is in a stationary state and a zero-speed update calibration is triggered. During zero-speed updates, the sliding window mean of the current linear acceleration data is used as the new instantaneous drift, and the reference value of the high-pass filter used to separate gravitational acceleration is updated accordingly. Simultaneously, the calculated two-dimensional displacement vector is reset to zero, and the current position of the mapped movement circle is reset to the two-dimensional origin to suppress displacement drift caused by sensor integration accumulation.

10. The method according to claim 1, characterized in that, The virtual perspective utilizes a multi-device collaborative perspective synchronization mechanism: In local area network online games, each device node packages the locally calculated spatial anchor point quaternion, the coordinates of the origin of the mapped movement circle, and the relative displacement vector of the current device within the circle into an attitude synchronization frame at a preset period. The attitude synchronization frame is broadcast to all peer nodes in the room via a reliable UDP transmission channel, and the frame header includes a local high-precision game clock and sensor sampling sequence number. After each node receives the attitude synchronization frame from the other end, it jointly estimates the anchor point deviation between itself and the other end, as well as the drift of the origin of the movement circle, to obtain a globally consistent spatial reference frame. Before rendering, the local view and the virtual character position are remapped according to the global consistent reference system to ensure that the physical orientation of all players in the same room in real space is synchronized with the in-game view. The multi-device collaborative view synchronization mechanism is mutually exclusive with the view alignment mechanism and the zero-speed update calibration process: if the local device is performing alignment or zero-speed update, the broadcast of attitude synchronization frames will be paused until the local device re-enters a stable state.

11. The method according to claim 1, characterized in that, The mapped movement circle also includes a manual reset mechanism and a back-off assistance mechanism: The game interface provides interactive virtual buttons or supports specific gesture recognition. When the user triggers the virtual button or completes the specific gesture, the current position of the device in the real space is immediately set as the new origin of the mapped movement circle, and the two-dimensional displacement vector is reset to zero. At the same time, the position of the directional arrow in the dynamic radar map is updated to match the new origin. When a user is detected to have the intention to move backward, i.e., the displacement vector exceeds the dead zone and moves in the opposite direction of the origin, the red status circle and the origin will generate a pulling force, pulling the player's movement state back to walking or stopping. At the same time, the origin of the mapped movement circle will be automatically refreshed and adjusted according to the relative position relationship.