Virtual flight object control method and device, electronic equipment and storage medium

CN122806067APending Publication Date: 2026-09-25GUANGZHOU BOGUAN TELECOMM TECH LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611044084.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-07-13
Publication Date
2026-09-25

AI Technical Summary

Technical Problem

[0003]有鉴于此,本申请提供了一种虚拟飞行对象的控制方法、装置、电子设备及存储介质,以解决虚拟飞行对象可控性不足的问题

Benefits of technology

[0017]本申请实施例提供的虚拟飞行对象的控制方法,通过获取虚拟飞行对象的当前状态参数与目标状态参数,并基于两者之间的参数差异来确定目标控制参数,使得控制过程直接针对实际偏差进行调节。在此基础上,依据该目标控制参数分别确定各个旋翼叶片的叶片驱动力以及尾翼的尾翼驱动力,实现了对飞行对象不同动力部件的独立、细化分配。利用所得到的叶片驱动力和尾翼驱动力控制虚拟飞行对象运动,从而形成一种从状态差异到部件驱动力再到运动执行的完整控制链路,使得虚拟飞行对象的运动更为精确和灵敏。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122806067A_ABST
    Figure CN122806067A_ABST
Patent Text Reader

Abstract

The application discloses a virtual flight object control method and device, electronic equipment and a storage medium, and relates to the technical field of computers. The method comprises the following steps: acquiring a current state parameter and a target state parameter of a virtual flight object; determining a target control parameter corresponding to the virtual flight object based on a parameter difference between the current state parameter and the target state parameter; determining a blade driving force of each rotor blade and a tail driving force of a tail wing of the virtual flight object based on the target control parameter; and controlling the virtual flight object to move by using the blade driving force and the tail driving force. Through implementation of the technical scheme of the application, the control parameter can be determined based on the state difference, the rotor and tail driving force can be generated, and accurate motion control of the virtual flight object can be realized.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of computer technology, specifically to control methods, devices, electronic equipment, and storage media for virtual flight objects. Background Technology

[0002] In applications such as virtual reality, game simulation, and drone simulation, the motion control of virtual flying objects (especially aircraft with multi-rotor and tail structures such as monoplane helicopters) places high demands on physical realism and interactive responsiveness. However, current control technologies for virtual flying objects generally have shortcomings: common direct input mapping methods directly map player operations to displacement or motion, ignoring inertia, gravity, and friction, resulting in stiff motion and physical distortion; predefined animation-driven schemes cannot dynamically adapt to environmental changes and require a large amount of manual animation resources, leading to high development costs; while quasi-physical model methods introduce some physical laws, the accuracy and detail of their simulation results still fall short of application requirements. These shortcomings make virtual flying objects lack controllability and fail to provide users with a good flight experience. Summary of the Invention

[0003] In view of this, this application provides a method, apparatus, electronic device and storage medium for controlling virtual flying objects, so as to solve the problem of insufficient controllability of virtual flying objects.

[0004] In a first aspect, this application provides a control method for a virtual flying object, comprising: acquiring current state parameters and target state parameters of the virtual flying object; determining target control parameters corresponding to the virtual flying object based on the parameter differences between the current state parameters and the target state parameters; determining the blade driving force of each rotor blade and the tail driving force of the virtual flying object based on the target control parameters; and controlling the virtual flying object to move using the blade driving force and the tail driving force.

[0005] In some optional implementations, the current state parameters include the current position and current hovering angle of the virtual flight object, and the target state parameters include the target position and target hovering angle of the virtual flight object. Based on the parameter differences between the current state parameters and the target state parameters, the target control parameters corresponding to the virtual flight object are determined, including: determining the altitude control value and target speed corresponding to the virtual flight object based on the position difference between the current position and the target position; determining the rotation control value based on the target parameter differences matched by the target speed; and determining the heading control value corresponding to the virtual flight object based on the hovering angle difference between the current hovering angle and the target hovering angle. The target control parameters include the altitude control value, the rotation control value, and the heading control value.

[0006] In some optional implementations, the current state parameters also include the current velocity, current attitude, and current angular velocity of the virtual flight object; determining the rotation control value based on the target parameter difference matched by the target velocity includes: determining the target attitude corresponding to the virtual flight object based on the velocity difference between the current velocity and the target velocity; determining the target angular velocity corresponding to the virtual flight object based on the attitude difference between the current attitude and the target attitude; and determining the rotation control value corresponding to the virtual flight object based on the angular velocity difference between the current angular velocity and the target angular velocity.

[0007] In some optional implementations, the altitude control value and target speed of the virtual flight object are determined based on the positional difference between the current position and the target position, including: determining the altitude control value based on the vertical component of the positional difference; and determining the target speed based on the horizontal component of the positional difference.

[0008] In some optional implementations, the blade driving force of each rotor blade of the virtual flight object is determined based on the target control parameters, including: for any rotor blade, obtaining the target orientation of the rotor blade; determining the dot product result between the rotation control value and the target orientation; and obtaining the blade driving force of the rotor blade based on the fusion result between the dot product result and the altitude control value.

[0009] In some alternative implementations, the tail fin driving force of the virtual flight object's tail fin is determined based on the target control parameters, including: determining the heading control value as the tail fin driving force.

[0010] In some optional implementations, the physical components and physical constraint information corresponding to the virtual flight object are obtained; based on the physical constraint information, the range of motion of the physical components is determined; and based on the range of motion and the physical components, a physical model of the virtual flight object is generated.

[0011] In some optional implementations, the physical components include a rotor component and a tail component; obtaining physical constraint information corresponding to the virtual flight object includes: in response to a constraint setting operation for the rotor component, determining first constraint information, the first constraint information being used to control the rotor component to rotate about a vertical axis; in response to a constraint setting operation for the tail component, determining second constraint information, the second constraint information being used to control the tail component to rotate about a horizontal axis; wherein the physical constraint information includes the first constraint information and the second constraint information.

[0012] In some alternative implementations, the collision component corresponding to the virtual flying object is obtained; a collision model of the virtual flying object is generated based on the collision component; wherein the collision model is attached to the physical model.

[0013] Secondly, this application provides a control device for a virtual flight object, comprising: a first acquisition module for acquiring current state parameters and target state parameters of the virtual flight object; a first determination module for determining target control parameters corresponding to the virtual flight object based on the parameter differences between the current state parameters and the target state parameters; a second determination module for determining the blade driving force of each rotor blade and the tail driving force of the virtual flight object based on the target control parameters; and a control module for controlling the virtual flight object to move using the blade driving force and the tail driving force.

[0014] Thirdly, this application provides an electronic device, including: a memory and a processor, which are communicatively connected to each other. The memory stores computer instructions, and the processor executes the computer instructions to perform the control method of the virtual flight object of the first aspect or any corresponding embodiment described above.

[0015] Fourthly, this application provides a computer-readable storage medium storing computer instructions for causing a computer to execute the control method for a virtual flight object of the first aspect or any corresponding embodiment described above.

[0016] Fifthly, this application provides a computer program product, including computer instructions for causing a computer to execute a control method for a virtual flight object according to the first aspect or any corresponding embodiment described above.

[0017] The virtual flight object control method provided in this application obtains the current state parameters and target state parameters of the virtual flight object, and determines the target control parameters based on the parameter differences between the two, enabling the control process to directly adjust for actual deviations. Based on this, the blade driving force of each rotor blade and the tail driving force of the tail fin are determined according to the target control parameters, achieving independent and refined allocation of different power components of the flight object. The obtained blade driving force and tail driving force are used to control the motion of the virtual flight object, thus forming a complete control link from state differences to component driving forces to motion execution, making the motion of the virtual flight object more precise and sensitive. Attached Figure Description

[0018] To more clearly illustrate the technical solutions in the specific embodiments or related technologies of this application, the drawings used in the description of the specific embodiments or related technologies will be briefly introduced below. Obviously, the drawings described below are some embodiments of this application. For those skilled in the art, other drawings can be obtained from these drawings without creative effort.

[0019] Figure 1 This is a schematic diagram illustrating an application scenario according to an embodiment of this application; Figure 2 This is a schematic flowchart of a first method for controlling a virtual flight object according to an embodiment of this application; Figure 3 This is a second flowchart illustrating a control method for a virtual flight object according to an embodiment of this application; Figure 4 This is a schematic diagram of the proportional-integral-derivative (PID) control algorithm according to an embodiment of this application. Figure 5 This is a block diagram of a cascaded PID system according to an embodiment of this application; Figure 6 This is a block diagram of the hovering angle PID system according to an embodiment of this application; Figure 7 This is a force analysis diagram of a virtual flying object according to an embodiment of this application; Figure 8 This is a schematic diagram illustrating the driving mechanism of a virtual flight object during forward movement, according to an embodiment of this application. Figure 9 This is a schematic diagram illustrating the driving mechanism of a virtual flying object during rightward movement according to an embodiment of this application. Figure 10 This is a schematic diagram of a rotating virtual flight object according to an embodiment of this application; Figure 11 This is a simplified physical model diagram of a virtual flight object according to an embodiment of this application; Figure 12 This is a schematic diagram of the rotor physical constraint settings according to an embodiment of this application; Figure 13 This is a schematic diagram of the rotor rotation plane according to an embodiment of this application; Figure 14 This is a schematic diagram of the physical constraint settings of the tail fin according to an embodiment of this application; Figure 15 This is a schematic diagram of the tail fin rotation plane according to an embodiment of this application; Figure 16 This is a collision model diagram of a virtual flying object according to an embodiment of this application; Figure 17 This is a structural block diagram of a control device for a virtual flight object according to an embodiment of this application; Figure 18 This is a schematic diagram of the hardware structure of an electronic device according to an embodiment of this application. Detailed Implementation

[0020] To make the objectives, technical solutions, and advantages of the embodiments of this application clearer, the technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.

[0021] It should be noted that the information (including but not limited to user input information, such as information entered by the user into input boxes), data (including but not limited to data used for analysis, stored data, and displayed data, such as context code, all code of the current project, the service pressure corresponding to operations performed on all code of the current project, and the code development status of the current project), and signals involved in this application are all authorized by the user or fully authorized by all parties, and the collection, use, and processing of related data must comply with relevant laws, regulations, and standards. For example, the context code, operations performed on all code of the current project, the corresponding service pressure, and the code development status involved in this application were all obtained with full authorization.

[0022] The terms "first" and "second" are used for descriptive purposes only and should not be construed as indicating or implying relative importance or implicitly specifying the number of technical features indicated. Therefore, a feature defined as "first" or "second" may explicitly or implicitly include one or more of that feature. In the description of this application, "multiple" means two or more, unless otherwise explicitly specified.

[0023] As one optional application scenario in this application embodiment, Figure 1 This diagram illustrates an application scenario of a control system for a virtual flying object. For example... Figure 1 As shown, the system may include at least one terminal device and at least one server. Figure 1 The system is illustrated in the example, which includes a computer 101, a mobile terminal 102, and a server 103, and the terminal devices such as the computer 101 and the mobile terminal 102 are connected to the server 103 through a network 110.

[0024] Specifically, the terminal device can be a smartphone, tablet, laptop, PDA, desktop computer, game console, smart TV, smart wearable device, in-vehicle terminal, VR (Virtual Reality) device, AR (Augmented Reality) device, etc. Server 103 can be a standalone physical server, a server cluster, a distributed system, or a cloud server providing cloud services. Network 110 can be a wired or wireless network, examples of which include, but are not limited to, the Internet, corporate intranet, local area network, wide area network, mobile communication network, and combinations thereof.

[0025] Taking flight simulation games as an example, a terminal device has a flight simulation game application installed. By running this application, a corresponding virtual scene can be rendered and displayed to the player using the terminal device's graphical user interface. For example, the virtual scene can be part or all of a simulated three-dimensional (3D) virtual space; for example, the virtual scene displayed to the player can be a scene observable from the perspective of a virtual flying object controlled by the player (such as a monoplane helicopter). The virtual scene can include environmental factors such as mountains, rivers, and buildings, as well as other player-controlled flying objects or non-player flying units.

[0026] Furthermore, the graphical user interface can also display an operation interface, which includes controls for player interaction, such as elevation control controls, direction control controls, and speed adjustment controls. Players can use the elevation control controls to make the virtual flying object climb or descend; players can use the direction control controls to make the virtual flying object turn or move horizontally; and players can use the speed adjustment controls to control the flight speed of the virtual flying object.

[0027] In traditional flight simulation games, the motion control of virtual flight objects often employs methods such as direct input mapping, predefined animation-driven approaches, or quasi-physical models. Direct input mapping directly maps player button or joystick inputs to the displacement or rotation of virtual objects, ignoring gravity, inertia, and air resistance, resulting in stiff motion, physical distortion, and visual errors such as clipping. Predefined animation-driven methods drive aircraft movement by playing pre-made animation sequences; input only triggers animation switching, failing to dynamically adapt to real-time changes in the game environment such as wind and collisions, creating a disconnect with player interaction, and requiring the manual creation of numerous animation resources, leading to high development costs and storage overhead. Quasi-physical models, which combine physical laws with animation, strike a balance between realism and controllability, but require coordinating two separate physics and animation systems, making implementation complex, parameter adjustment difficult, and increasing the computational load on the Central Processing Unit (CPU), resulting in additional performance overhead. All these methods struggle to achieve dynamic coupling between player input and physical feedback, especially in complex environments where motion distortion easily occurs, severely impacting the immersion and gameplay experience of flight simulation games.

[0028] The virtual flight object control method provided in this application obtains the current state parameters and target state parameters of the virtual flight object, and directly determines the target control parameters based on the parameter differences between the two. This eliminates the rigid approach of directly mapping player input to displacement or rotation, enabling motion control to dynamically respond to the deviation between the actual state and the desired state. This avoids physical distortion and clipping risks caused by ignoring gravity, inertia, etc. Based on the target control parameters, the blade driving force of each rotor blade and the tail fin driving force are determined respectively, and these driving forces are used to directly drive the motion of the virtual flight object. This process does not rely on pre-made animation sequences, so there is no need to manually create and store animation resources, nor is there a need for complex coordination between the animation system and the physical system. This eliminates the problems of predefined animation-driven systems being unable to dynamically adapt to the environment and having high development costs, as well as the difficulty in parameter adjustment and additional performance overhead caused by the need for two systems to work together for quasi-physical models. By independently controlling the force on each rotor blade and tail fin, purely physical motion feedback is achieved, enabling virtual flying objects to adaptively adjust their flight attitude and trajectory according to real-time state differences. This achieves dynamic coupling between player operation and physical feedback, effectively enhancing the realism and flexibility of motion control.

[0029] According to an embodiment of this application, a control method for a virtual flying object is provided. It should be noted that the steps shown in the flowchart in the accompanying drawings can be executed in a computer system such as a set of computer-executable instructions. Furthermore, although a logical order is shown in the flowchart, in some cases, the steps shown or described may be executed in a different order than that shown here.

[0030] This embodiment provides a method for controlling a virtual flying object, which can be used in electronic devices such as computer 101, mobile terminal 102, etc. Figure 2 This is a flowchart of a control method for a virtual flight object according to an embodiment of this application, such as... Figure 2 As shown, the process includes the following steps: Step S201: Obtain the current state parameters and target state parameters of the virtual flight object.

[0031] A virtual flight object refers to a controllable, physics-driven aircraft model in a game, such as a monoplane helicopter. Current state parameters refer to the actual motion state of the virtual flight object at the current moment, while target state parameters refer to the desired state the virtual flight object should achieve. Specifically, the game engine can read the motion data of the virtual flight object in the virtual world in real time, such as its position, orientation, movement speed in each direction, and rotation speed in three-dimensional space. This data is updated and maintained every frame by the underlying physics simulation module and can be obtained directly by calling the corresponding interface. The target state parameters are obtained by the electronic device based on the desired goals set by the game logic (such as automatic hovering, mission point tracking, etc.) or the player's input commands (such as pushing the joystick), such as the desired position, heading, and other target values.

[0032] Step S202: Based on the parameter differences between the current state parameters and the target state parameters, determine the target control parameters corresponding to the virtual flight object.

[0033] Parameter difference refers to the difference between the target state parameters and the current state parameters of a virtual flight object. This difference reflects the degree of deviation between the current motion state and the desired motion state of the virtual flight object. Target control parameters are the core control quantities used to directly drive the motion of various components of the virtual flight object, calculated by a preset control algorithm based on the difference between the current and target states. Specifically, the difference between the current state parameters and the target state parameters is determined; this difference reflects the degree of deviation between the current and desired motion states of the virtual flight object. Then, this difference is input into a preset feedback control mechanism. This mechanism performs a series of standardization processes on the difference based on the control requirements of the virtual flight object in different motion dimensions, generating corresponding control commands step by step. Finally, the mechanism outputs a set of comprehensive target control parameters. These parameters directly guide the intensity and direction of the actions that the various driving components of the virtual flight object (such as the main rotor and tail fin) should produce, thereby enabling the virtual flight object to gradually approach and maintain the desired motion state.

[0034] Step S203: Based on the target control parameters, determine the blade driving force of each rotor blade and the tail driving force of the virtual flight object.

[0035] A rotor blade refers to a single blade on the main rotor of a virtual flight object. Blade driving force refers to the force acting on each rotor blade, used to drive the virtual flight object to produce movements such as heave, forward movement, backward movement, and lateral movement. The tail fin refers to the structure at the tail of the virtual flight object used to control its heading. Tail fin driving force is the force acting on the tail fin, used to control the horizontal rotation (heading) of the fuselage, thereby achieving steering or directional stability. Specifically, after obtaining the target control parameters, these parameters are mapped to different driving components of the virtual flight object. For each blade on the main rotor, based on the spatial orientation of each blade at the current moment, combined with the components in the target control parameters related to heave and attitude adjustment, the driving force that each blade should generate at that instant is determined, so that the blades generate differentiated driving forces at different orientations, thus creating an overall effect of changing the spatial attitude of the virtual flight object. For the tail fin, the driving force that the tail fin should generate is determined based on the components in the target control parameters related to direction control.

[0036] Step S204: Use the driving force of the blades and the driving force of the tail fin to control the movement of the virtual flying object.

[0037] After determining the driving force of each rotor blade and the tail fin, these forces are applied to the corresponding physical components of the virtual flight object. Specifically, in each physics update cycle, the calculated blade driving force is applied to each rotor blade, and the calculated tail fin driving force is applied to the tail fin. These forces work together on the overall dynamics system of the virtual flight object, changing its translational and rotational states, and thus affecting its position and orientation in the virtual world. Because the magnitude and direction of the forces on each driving component are dynamically adjusted in real time according to the current motion deviation, the virtual flight object can continuously correct its motion, gradually approaching and maintaining the desired motion state, achieving flexible and physically consistent movement and turning.

[0038] The virtual flight object control method provided in this application obtains the current state parameters and target state parameters of the virtual flight object, and determines the target control parameters based on the parameter differences between the two, enabling the control process to directly adjust for actual deviations. Based on this, the blade driving force of each rotor blade and the tail driving force of the tail fin are determined according to the target control parameters, achieving independent and refined allocation of different power components of the flight object. The obtained blade driving force and tail driving force are used to control the motion of the virtual flight object, thus forming a complete control link from state differences to component driving forces to motion execution, making the motion of the virtual flight object more precise and sensitive.

[0039] This embodiment provides a method for controlling a virtual flying object, which can be used in electronic devices such as computer 101, mobile terminal 102, etc. Figure 3 This is a flowchart of a control method for a virtual flight object according to an embodiment of this application, such as... Figure 3 As shown, the process includes the following steps: Step S301: Obtain the current state parameters and target state parameters of the virtual flight object. For details, please refer to [link to relevant documentation]. Figure 2 Step S201 of the illustrated embodiment will not be described again here.

[0040] Step S302: Based on the parameter differences between the current state parameters and the target state parameters, determine the target control parameters corresponding to the virtual flight object.

[0041] Specifically, the current state parameters include the current position and current hovering angle of the virtual flight object, and the target state parameters include the target position and target hovering angle of the virtual flight object; the above step S302 includes: Step S3021: Based on the positional difference between the current position and the target position, determine the altitude control value and target speed corresponding to the virtual flight object.

[0042] The current position refers to the spatial coordinates of the virtual flying object at the current moment. The target position refers to the spatial coordinates of the desired location of the virtual flying object. The altitude control value refers to the control quantity used to control the ascent or descent of the virtual flying object. The target speed refers to the speed that the virtual flying object is expected to reach in the horizontal direction. Specifically, the spatial difference between the current position and the target position of the virtual flying object is calculated, reflecting the degree of offset between the current position and the desired location. Then, based on the characteristics of the motion control of the virtual flying object, this spatial difference is mapped to two different dimensions of control requirements: one is the altitude control value that directly controls the ascent and descent of the virtual flying object, and the other is the target speed that controls the horizontal movement speed of the virtual flying object.

[0043] In some optional implementations, step S3021 includes: determining a height control value based on the vertical component of the position difference; and determining a target speed based on the horizontal component of the position difference.

[0044] The vertical component of the positional difference refers to the height difference between the target position and the current position in the vertical direction. Specifically, this height difference is used as input, and a height control value is calculated through a preset proportional mapping relationship. Simply put, if the virtual flight object's current height is lower than the target height, the vertical component is positive, and the height control value is a positive force or acceleration command, driving the virtual flight object to accelerate upwards; conversely, if the current height is higher than the target height, the height control value is a negative command, driving the virtual flight object to descend. The magnitude of the height control value is usually proportional to the magnitude of the height difference: the larger the height difference, the larger the generated height control value, thus enabling the virtual flight object to quickly approach the target height; as the height difference gradually decreases, the height control value also decreases accordingly to avoid overshoot.

[0045] The horizontal component of positional discrepancy refers to the offset vector between the target position and the current position on the horizontal plane (front-back, left-right). This horizontal offset vector is considered a "positional error," which is expected to be eliminated through velocity. Specifically, the magnitude and direction of the horizontal component are proportionally transformed to generate a desired horizontal velocity vector, i.e., the target velocity. The direction of the target velocity is consistent with the horizontal offset direction (i.e., pointing to the horizontal projection of the target position), and its magnitude is proportional to the horizontal offset distance: the greater the distance, the greater the target velocity; as the virtual flying object approaches the horizontal projection of the target position, the target velocity gradually decreases to zero. In this way, the target velocity does not directly instruct the virtual flying object to fly to a certain point, but serves as an intermediate expected value to guide the virtual flying object to gradually reduce its horizontal positional deviation.

[0046] In the above implementation, by decomposing the positional difference between the current position and the target position into vertical and horizontal components, and using the vertical component to directly determine the height control value and the horizontal component to determine the target speed, the decoupling of lifting control and horizontal motion control is achieved. This component-independent processing method ensures that the control of the vertical and horizontal dimensions does not interfere with each other, and can independently adjust for height changes and horizontal movement, simplifying the control logic and improving response accuracy.

[0047] Step S3022: Determine the rotation control value based on the difference in target parameters matched with the target speed.

[0048] To achieve a smooth transition from positional deviation to attitude adjustment for a virtual flight object, a hierarchical recursive control architecture is employed. This architecture uses the difference between the desired and actual states of the virtual flight object at adjacent control levels as the input error for each level, generating control quantities step by step. Based on this, the target parameter difference refers to the difference between the desired and actual states at the aforementioned adjacent control levels, which may include differences in velocity, attitude, and angular velocity. Its function is to serve as the input error value for each control stage, driving the virtual flight object to smoothly transition from its current state to the target state. The rotation control value refers to the control quantity used to control the rotation of the virtual flight object's fuselage, affecting its attitude changes. Specifically, the target velocity is taken as a desired motion command. To transition from the current motion state to this desired velocity, the virtual flight object needs to adjust the distribution of driving forces in its various components, thereby changing its spatial orientation and generating effective horizontal thrust. This adjustment process relies on a comprehensive parameter difference, which is not obtained through a single comparison but reflects a series of dynamic changes required to reach the target velocity from the current velocity. Based on this comprehensive parameter difference, a rotation control value is directly calculated.

[0049] In some optional implementations, the current state parameters also include the current velocity, current attitude, and current angular velocity of the virtual flight object; step S3022 includes: Step a1: Determine the target attitude of the virtual flying object based on the speed difference between the current speed and the target speed.

[0050] Among them, the speed difference is the error corresponding to the speed control level in the target parameter difference.

[0051] Current speed refers to the linear velocity (linear speed) of the virtual flying object at the current moment. Specifically, it is calculated as the difference between the target speed and the current actual speed, i.e., the speed difference. This speed difference reflects the deviation between the virtual flying object's actual horizontal speed and its desired horizontal speed. To eliminate this deviation, the virtual flying object needs to change its spatial orientation (i.e., tilt), thereby generating horizontal acceleration. Based on the magnitude and direction of the speed difference, a desired spatial orientation, i.e., the target attitude, is determined through a preset mapping relationship (e.g., proportional control). For example, if the virtual flying object needs to accelerate forward, the target attitude will instruct the fuselage to tilt forward; if it needs to move to the right, the target attitude will instruct the fuselage to tilt to the right.

[0052] Step a2: Based on the attitude difference between the current attitude and the target attitude, determine the target angular velocity corresponding to the virtual flight object.

[0053] Among them, the attitude difference is the error corresponding to the attitude control level in the difference of target parameters.

[0054] The current attitude refers to the spatial orientation of a virtual flying object at the current moment, usually represented by Euler angles or quaternions. The target attitude refers to the desired spatial orientation of the virtual flying object. Specifically, after obtaining the target attitude, it is compared with the current actual attitude to obtain the attitude difference. This attitude difference reflects the angular deviation between the virtual flying object's current orientation and the desired orientation. To smoothly transition from the current attitude to the target attitude, the virtual flying object needs to rotate at a certain angular velocity. Based on the magnitude and direction of the attitude difference, a desired rotation rate, i.e., the target angular velocity, is determined through a preset mapping relationship. Generally, the greater the attitude difference, the greater the target angular velocity, to quickly correct the orientation; as the virtual flying object approaches the target attitude, the target angular velocity gradually decreases to avoid overshoot.

[0055] Step a3: Based on the angular velocity difference between the current angular velocity and the target angular velocity, determine the rotation control value corresponding to the virtual flight object.

[0056] Among them, the angular velocity difference is the error corresponding to the angular velocity control level in the target parameter difference.

[0057] The current angular velocity refers to the rotational speed of the virtual flight object at the current moment. The target angular velocity refers to the desired rotational speed that the virtual flight object is expected to achieve. Specifically, the target angular velocity is compared with the current actual angular velocity to obtain the angular velocity difference. This angular velocity difference reflects the deviation between the current rotational rate and the desired rotational rate of the virtual flight object. To eliminate this deviation, a rotational torque acting on the fuselage needs to be generated. Based on the magnitude and direction of the angular velocity difference, a final rotational control value is calculated through a preset mapping relationship. This rotational control value is a comprehensive command used to adjust the driving force distribution of each rotor blade, enabling the virtual flight object to generate the required net torque, thereby changing its angular velocity. As the angular velocity difference gradually decreases to zero, the rotational control value also tends to stabilize, and the attitude of the virtual flight object is maintained near the target attitude, thus achieving the desired horizontal speed.

[0058] In the above implementation, the target attitude is obtained by sequentially calculating the speed difference between the current speed and the target speed, the attitude difference between the current attitude and the target attitude is obtained by obtaining the target angular velocity, and the angular velocity difference between the current angular velocity and the target angular velocity is output to output the final rotation control value. This forms a three-level series difference recursive link of speed, attitude, and angular velocity. This step-by-step mapping method ensures that each level of control target is based on the error of the previous level, which can smoothly convert macroscopic speed commands into microscopic angular velocity adjustments, effectively suppressing abrupt changes and oscillations in the control process, and improving the stability and response continuity of the rotational motion of the virtual flight object.

[0059] Step S3023: Based on the hovering angle difference between the current hovering angle and the target hovering angle, determine the heading control value corresponding to the virtual flight object.

[0060] The target control parameters include altitude control values, rotation control values, and heading control values.

[0061] The current hovering angle refers to the current rotation angle of the virtual flight object in the Z-axis direction, i.e., the orientation angle around the vertical direction. The target hovering angle refers to the desired rotation angle of the virtual flight object in the Z-axis direction. The heading control value refers to the control quantity used to control the horizontal turning of the virtual flight object. Specifically, the difference between the current hovering angle and the target hovering angle reflects the deviation angle between the virtual flight object's current horizontal orientation and the desired orientation. This angle difference is directly calculated (usually taking the direction of minimum rotation) and used as input to generate the heading control value through a preset control relationship (such as proportional mapping). The magnitude of the heading control value is proportional to the angle deviation: the larger the deviation, the larger the heading control value, driving the tail to generate greater lateral thrust, causing the fuselage to quickly turn towards the target orientation; when the deviation decreases, the heading control value also decreases, avoiding overshoot. The direction of the heading control value determines the direction of the turn (left or right).

[0062] The virtual flight object control method provided in this application converts the difference between the current position and the target position into an altitude control value and a target speed. Then, it uses the parameter difference matched with the target speed to determine the rotation control value. At the same time, it independently determines the heading control value based on the difference between the current hovering angle and the target. This decouples the ascent, descent, attitude rotation, and heading control of the virtual flight object into three distinct control channels. This layered difference processing method makes the control logic clear and the channels do not interfere with each other. It can make precise adjustments for different motion dimensions, effectively improving the stability and response accuracy of flight control.

[0063] In some optional implementations, the aforementioned step-by-step recursive control architecture is specifically implemented based on a PID (Proportional-Integral-Derivative) control algorithm. In this PID control architecture, the difference in the target parameter is the input error value of each PID controller. Specifically, this architecture reuses a general basic PID module, such as... Figure 4 As shown, this module first calculates the error between the target input value and the actual system output value. Then, it performs proportional, integral, and derivative operations on this error, and finally sums the three results to obtain the final control signal. The proportional term is the error multiplied by a proportional coefficient. The integral term is the integral value of the error multiplied by the integral coefficient. The differential term is the differential value of the error multiplied by the differential coefficient. The three coefficients together determine the controller's response characteristics: Affects response speed Used to eliminate static errors This acts as a damper to suppress oscillations. In actual debugging, there is no fixed combination of parameters; they are usually adjusted based on the effect. For example, if the response is not fast enough, increase... If shaking occurs, adjust accordingly. If continuous external interference is encountered, adjust accordingly. This basic PID module serves as the core component and is reused across five control levels: position, velocity, attitude, angular velocity, and hovering angle.

[0064] like Figure 5 As shown, the information flow is transmitted in the following order: The first level is a position PID, which takes the position error between the current actual position and the target position as input, and outputs two components—the Z-axis component as the altitude control value (directly controlling ascent and descent), and the XY-axis component as the target velocity. The second level is a velocity PID, which takes the velocity error between the current actual velocity and the target velocity as input, and outputs the target attitude. The third level is an attitude PID, which takes the attitude error between the current actual attitude and the target attitude as input, and outputs the target angular velocity. The fourth level is an angular velocity PID, which takes the angular velocity error between the current actual angular velocity and the target angular velocity as input, and outputs the final fuselage rotation value, which is directly used to change the fuselage's tilt state. These four levels, connected in series, constitute the main control link, responsible for the translation and rotation of the virtual flight object in three-dimensional space.

[0065] like Figure 6 As shown, the fifth level is the hover angle PID (running independently as an outer loop). It takes the angle error between the current hover angle (the orientation angle around the Z-axis) and the target hover angle as input and outputs the heading control value. It is specifically used to control the horizontal orientation of the virtual flight object.

[0066] In the above implementation, by reusing the basic PID module for five control levels—position, velocity, attitude, angular velocity, and hovering angle—and transmitting information in series according to the main links of position, velocity, attitude, and angular velocity, while using the hovering angle PID as an independent outer loop specifically for controlling horizontal orientation, a clear hierarchical recursive control architecture is formed. The position PID directly separates the altitude control value from the target velocity, and each subsequent level only needs to process the single target variable output by the previous level until the final fuselage rotation and heading control values ​​are obtained. This step-by-step decoupling design simplifies the implementation of control logic and parameter tuning, while ensuring the independence and coordination between each motion dimension. This significantly improves the stability and flexibility of the virtual flight object in altitude, translation, rotation, and heading control, while also simplifying the system parameter adjustment process and significantly improving development efficiency.

[0067] Step S303: Based on the target control parameters, determine the blade driving force of each rotor blade and the tail driving force of the virtual flight object.

[0068] like Figure 7 As shown, Figure 7 The force analysis of the rotor blades and tail of the virtual flight object is shown. Each rotor blade of the main rotor generates different lift in its own direction, and these differences in lift drive the virtual flight object to move forward, backward, left, right, and up and down; the thrust generated by the tail is mainly used to counteract the anti-torque caused by the rotation of the main rotor, while controlling the horizontal heading of the fuselage.

[0069] Specifically, based on the target control parameters, the blade driving force of each rotor blade of the virtual flight object is determined, including: Step b1: For any rotor blade, obtain the target orientation of the rotor blade.

[0070] The target orientation refers to the direction each rotor blade points at its current rotation angle. Specifically, during the control of a virtual flight object, each rotor blade continuously rotates around its axis of rotation. To calculate the driving force that blade should generate at the current moment, it is necessary to know the direction the blade is pointing at that moment, i.e., the target orientation. This orientation is not a fixed value set by the user, but is naturally determined by the blade's current rotation angle. The orientation vector in its local coordinate system is obtained by reading the real-time rotation state of the blade component in the virtual environment. Because the blade continuously changes its orientation during rotation, the target orientation changes dynamically over time; each blade has its own target orientation in each physics update cycle. The method for obtaining this orientation is usually by calling the interface provided by the physics engine to directly obtain the current orientation vector of the blade component.

[0071] Step b2: Determine the dot product between the rotation control value and the target orientation.

[0072] The dot product result refers to the vector dot product between the rotation control value and the target blade orientation. Specifically, the rotation control value is a comprehensive command used to guide the virtual flight object to change its attitude; it is typically represented by a three-dimensional vector, indicating the desired fuselage tilt direction or moment distribution. The target orientation is the spatial orientation vector of the blade at the current moment. To calculate the amount of driving force the blade should generate, the rotation control value and the target orientation are multiplied. The dot product is a vector operation, and its result reflects how close the two vectors are in direction: when the blade orientation and the rotation control value are in the same direction, the dot product result is large; when they are perpendicular, the dot product result is zero; and when they are opposite, the dot product result is negative. Through this calculation, different driving force magnitudes can be allocated according to the position of the blade relative to the fuselage attitude adjustment requirements in different orientations, thereby achieving fuselage tilting or turning.

[0073] Step b3: Based on the fusion result between the dot product result and the altitude control value, the blade driving force of the rotor blade is obtained.

[0074] The dot product reflects the contribution of blade orientation to attitude adjustment, while the altitude control value is a general command (usually a scalar representing the desired lift) used to control the ascent and descent of the virtual flight object. To obtain the final driving force of each blade, the dot product result is fused with the altitude control value. The fusion method typically involves adding the two: the dot product provides the force component added due to attitude requirements (which can be positive or negative), and the altitude control value provides the basic lift component (usually positive). The sum is the driving force that the blade should generate at the current moment. If the fused result is positive, it indicates that the blade generates upward thrust; if it is negative, it generates downward thrust (rare in actual physics, but theoretically possible to achieve negative lift). Through this fusion, the driving force of each blade carries both the basic lift required to maintain altitude and the differentiated force required to adjust attitude, thus collaboratively driving the virtual flight object to complete ascent, descent, and horizontal movement. The specific formula is shown below:

[0075] in, For rotation control values, The target orientation of the blade. This is the height control value.

[0076] The control method for virtual flight objects provided in this application obtains the target orientation of each rotor blade, calculates the dot product between the rotation control value and the target orientation, and fuses the dot product with the altitude control value to obtain the blade driving force. This results in the blade driving force including both the basic lift force for altitude control and the directional adjustment component distributed by the rotation control value according to the blade orientation. This dot product fusion mechanism can dynamically allocate the additional thrust of different blades according to the real-time orientation difference of each blade in the plane of rotation, thereby accurately realizing the attitude changes of the virtual flight object such as tilting, forward tilting or side tilting, and effectively driving it to move horizontally and turn.

[0077] Specifically, based on the target control parameters, the blade driving force of each rotor blade of the virtual flight object is determined, including: determining the heading control value as the tail fin driving force.

[0078] The heading control value is a scalar calculated by a control algorithm from the deviation between the current hovering angle and the target hovering angle. It indicates the strength of the virtual flight object's left or right turn. The tail fin is a component specifically designed to control heading. Its function is to overcome the main rotor's counter-torque and change the nose direction by generating lateral thrust. Therefore, the heading control value is directly used as the driving force command that the tail fin needs to generate. Specifically, the sign of the heading control value determines the direction of the tail fin thrust (e.g., a positive value corresponds to leftward thrust, and a negative value corresponds to rightward thrust), and its absolute value determines the magnitude of the thrust. By assigning the heading control value to the tail fin driving force, closed-loop heading adjustment is achieved. The specific formula is shown below:

[0079] in, This is the heading control value.

[0080] The control method for virtual flight objects provided in this application realizes the simplest mapping from heading control commands to tail wing execution forces by directly determining the heading control value as the tail wing driving force. This direct assignment method avoids additional computational overhead, enabling an instantaneous and clear correspondence between the yaw response and hovering angle error of the virtual flight object, thereby effectively improving the real-time performance and execution efficiency of heading control.

[0081] In some alternative implementations, when the virtual flight object needs to move forward, the lift increases when the main rotor blades rotate to the rearward direction and decreases when rotating to the forward direction, causing the fuselage to tilt forward and thus generating a forward horizontal component force, such as... Figure 8 As shown; when a rightward shift is required, the lift increases when the blades face left and decreases when they face right, causing the fuselage to tilt to the right, thus achieving a rightward translation, as... Figure 9 As shown; when a left turn is required, the tail fin's driving force increases, generating additional lateral thrust, which counteracts the main rotor torque and pushes the nose to the left, as... Figure 10 As shown. These force logics ensure that the virtual flying object can respond to player actions and perform flexible and aerodynamic movements.

[0082] Step S304: The virtual flying object is controlled to move using the driving force of the blades and the tail fin. For details, please refer to [link to details]. Figure 2 Step S204 of the illustrated embodiment will not be described again here.

[0083] Specifically, the control method for the aforementioned virtual flight object also includes: Step c1: Obtain the physical components and physical constraints information corresponding to the virtual flight object.

[0084] Physical components refer to the movable parts that constitute the physical model of a virtual flight object, such as fuselage components, rotor components (main rotor), and tail components. For example, Figure 11 As shown, the fuselage component is simplified to a cube that ignores collisions and only simulates weight; the rotor component is simplified to a shaft with four cuboid blades, also ignoring collisions and only simulating weight; the tail is simplified to a thin cuboid sheet. This simplified model significantly reduces computational complexity while maintaining physical response. Physical constraint information refers to information used to limit the range of motion of physical components. Specifically, during the virtual environment initialization or model building phase, developers set constraint parameters (such as rotation axes, angle limits, etc.) for each component of the virtual flight object through an editor or code. Then, at runtime, the physical management interface provided by the virtual environment is called to read these pre-set component references and constraint parameters. Specifically, linear and angular constraint information can be extracted from the constraint components (such as physical joints) on the virtual flight object. The obtained information includes the motion type of each component (e.g., free, locked, restricted, etc.), rotation axis direction, maximum / minimum angle, etc.

[0085] In some optional implementations, the physical components include rotor components and tail components; obtaining the physical constraint information corresponding to the virtual flight object includes: Step d1: In response to the constraint setting operation for the rotor component, first constraint information is determined, which is used to control the rotor component to rotate about the vertical axis.

[0086] The rotor component refers to the main rotor part of the virtual flight object, responsible for generating lift and attitude control; it can also be called the wing. The first constraint information refers to the constraint settings for the rotor component, used to control its rotation around the vertical axis. Specifically, during the model building phase of the virtual flight object, developers perform constraint settings on the rotor component through an editor interface or code interface. This operation typically includes selecting the connection type between the rotor and the fuselage (e.g., a hinge joint), locking all translational degrees of freedom to prevent rotor displacement relative to the fuselage, and specifying the allowed rotational degrees of freedom. Figure 12 As shown, to control the rotor component to rotate only around the vertical axis, the developers set the rotation around the vertical axis (usually the Z-axis) to "free" in the constraint settings interface, while setting the rotation around other axes to "locked". In response to these settings, corresponding first constraint information is generated. This information, recorded in the form of a data structure, includes the direction of the rotation axis (vertical axis), the rotation range (e.g., unlimited or limited angle), and other physical parameters (such as damping coefficient, elastic limit, etc.). This first constraint information is then stored in the rotor component's physical components and used at runtime to restrict the rotor's movement, ensuring it can only rotate around the vertical axis, thereby simulating the continuous rotation characteristics of a real virtual flight object's main rotor.

[0087] like Figure 13 As shown, the rotor component and the fuselage have locked displacement degrees of freedom, retaining only rotation about the vertical axis (usually the Z-axis), and its rotation range is limited to a red plane about the Z-axis.

[0088] Step d2, in response to the constraint setting operation for the tail fin component, determines the second constraint information, which is used to control the rotation of the tail fin component about the horizontal axis.

[0089] The physical constraint information includes first constraint information and second constraint information.

[0090] The tail assembly refers to the rotor or control surface component at the tail of the virtual flight object, responsible for directional control. The second constraint information refers to the constraint settings for the tail assembly, used to control its rotation around the horizontal axis. Specifically, similar to the rotor, the constraint settings for the tail assembly are also completed through an editor or code. Developers select the connection type between the tail and the fuselage (e.g., a hinge joint), lock all translational degrees of freedom, and set the rotational degrees of freedom. For example... Figure 14 As shown, to enable the tail fin to rotate around a horizontal axis (typically around the Y-axis, i.e., the left-right axis), the developers set the rotation around this horizontal axis to "free" or limit it to a range of angles (e.g., 45 degrees) in the constraint settings interface, while setting the rotation around other axes to "locked." In response to these operations, a second constraint is generated, explicitly specifying the rotation axis as the horizontal axis, the range of rotation angles (minimum and maximum angles), and possible limit spring parameters or damping settings. This second constraint is applied to the tail fin component at runtime, allowing it to swing only within a specified angle around the horizontal axis, thus simulating the pitch or steering function of the tail fin in a virtual flight object to balance the main rotor torque and control heading.

[0091] like Figure 15 As shown, the tail fin component has its displacement freedom locked between itself and the fuselage, retaining only rotation about the horizontal axis (usually the Y-axis), and its rotation range is limited to a plane about the Y-axis.

[0092] In the above embodiments, by setting independent constraint information for the rotor component and the tail component respectively, wherein the first constraint information limits the rotor to rotate around the vertical axis and the second constraint information limits the tail component to rotate around the horizontal axis, the respective degrees of freedom of motion of the two key components are clearly defined; this separate constraint definition makes the rotor's heave and rotation and the tail's yaw physically independent, avoiding motion interference, and providing a clear and accurate physical basis for subsequent calculation of blade driving force and tail driving force respectively.

[0093] Step c2: Determine the range of motion of the physical components based on the physical constraint information.

[0094] The range of motion refers to the range of angles within which each physical component can rotate, determined by physical constraints. Specifically, the physical constraints explicitly specify the axis and angle limits that each physical component can rotate on. By parsing this information, the range of motion for each component can be determined. For example, for a rotor component, the constraints specify that it can only rotate around the vertical axis, and there is usually no upper limit to the angle (it can rotate continuously); the range of motion is infinite rotation around that axis. For a tail fin component, the constraints specify that it can only rotate around the horizontal axis, and there is usually a limited range of angles (e.g., 30 degrees to the left and right); the range of motion is the interval from the minimum angle to the maximum angle. These ranges are stored as parameters and used in subsequent physical simulations to limit the rotation of components and prevent motion that exceeds the laws of reality. Simultaneously, these ranges of motion are also used in the driving force calculation to determine whether additional damping or limiting forces are needed.

[0095] Step c3: Generate a physical model of the virtual flight object based on the range of motion and physical components.

[0096] A physical model is a virtual flight object model used for physical simulation, constructed from physical components and physical constraint information. Specifically, after obtaining the physical components and their respective ranges of motion, this information is combined to build a complete physical model. First, a rigid body component is created to represent the fuselage, and then rotors and tail fins are attached as sub-rigid bodies or constraint bodies. For each movable component, corresponding physical constraint joints (such as hinge joints) are set according to its range of motion, unnecessary degrees of freedom are locked, and angle limitations are set. Simultaneously, physical properties such as mass and inertia are assigned to each component. Finally, these components and constraints are assembled into a hierarchical physical model that can respond to external forces and move within a preset range of motion.

[0097] The virtual flight object control method provided in this application obtains the physical components of the virtual flight object and their corresponding physical constraint information, determines the motion range of each component based on the constraint information, and generates a complete physical model based on the motion range and components, thus realizing physical-driven modular modeling. This approach allows the motion behavior of the virtual flight object to be naturally derived from the underlying physical rules without relying on predefined animations or manually adjusting complex parameters, thereby improving the flexibility and configurability of model building, and laying an accurate structural foundation for subsequent motion control based on real physical laws.

[0098] Specifically, the control method for the aforementioned virtual flight object also includes: Step e1: Obtain the collision component corresponding to the virtual flight object.

[0099] Collision components are simplified geometric shapes used to define the shape of a virtual flight object for collision detection, such as boxes, spheres, and capsules. Specifically, to obtain these collision components, it's first necessary to access the physical model of the virtual flight object within the virtual environment. Typically, during the model import or construction phase, developers add collision components to different parts of the virtual flight object (such as the fuselage, rotor blades, and tail). At runtime, these collision components are obtained by calling standard interfaces provided by the virtual environment (e.g., retrieving all components on the virtual flight object, searching for components by type, or retrieving by preset tag names). Specifically, one can iterate through the child objects of the main virtual flight object, filtering out components marked as collision components, or directly read a pre-stored list of collision components. The obtained collection of collision components contains information such as the shape type, size parameters, relative position, and orientation of each component.

[0100] Step e2: Generate a collision model of the virtual flying object based on the collision components.

[0101] The collision model is attached to the physics model.

[0102] A collision model is a collision detection model generated from collision components and attached to a physical model to achieve realistic collision feedback with objects in the environment. Specifically, after acquiring all collision components, these components are combined into a complete collision model. The collision model is a data structure used for collision detection in physical simulations, typically composed of multiple basic colliders to approximate the real shape of a virtual flying object. Specifically, a corresponding collider instance is created for each collision component, generating geometric data based on its shape parameters (such as the length, width, and height of a box, and the radius of a sphere), and setting its local position and orientation (relative to the main physical body of the virtual flying object). Then, these colliders are attached to the main physical body of the virtual flying object to form a composite collision model. In some virtual environments, it is also necessary to set the relative transformation relationships between colliders so that the collision model can move along with the motion of the virtual flying object. The final generated collision model is registered in the physical simulation system for collision detection and response with other objects in the environment. This collision model is usually attached to the previously generated physical model, and the two work together: the physical model is responsible for kinematic and dynamic calculations, and the collision model is responsible for collision detection, jointly achieving realistic physical interaction.

[0103] like Figure 16 As shown, the collision model has been meticulously designed to match the overall shape of the virtual flying object, thereby achieving realistic collision feedback with objects in the game environment and avoiding visual errors such as clipping.

[0104] The virtual flight object control method provided in this application obtains the collision component corresponding to the virtual flight object and generates a collision model based on the component, and attaches the collision model to the physical model, thereby realizing the separation of the collision detection layer and the physical motion layer. This layered attachment structure enables the virtual flight object to generate realistic collision feedback when interacting with the environment, without affecting the motion calculation accuracy of the underlying physical drive, and also facilitates independent adjustment of the fineness of the collision model, thereby effectively improving the accuracy of collision response and development flexibility while ensuring the realism of motion.

[0105] In the following embodiment, the control method of the above-mentioned virtual flight object will be illustrated by taking the "mountain search and rescue" level in a flight simulation game as an example.

[0106] After the game starts, a virtual flight object—a monoplane helicopter—is automatically created based on the level configuration. First, the helicopter is constructed using a simplified physics model: the fuselage is simplified to a cube with mass (collision ignored), the main rotor to a shaft with four cuboid blades (collision ignored, mass only simulated), and the tail to a thin cube. Through physics constraints, the X / Y translation and X / Y axis rotation of the wing are locked, retaining only the rotational degree of freedom around the Z-axis (vertical axis); the tail is locked to translation and X / Z axis rotation, retaining only the rotational degree of freedom around the Y-axis (horizontal axis), with each rotation range restricted. Simultaneously, a refined collision model is loaded, enabling the helicopter fuselage, rotor, and tail to accurately detect collisions with environmental objects such as rock walls and trees.

[0107] Players input ascent, lateral movement, and steering commands via the game controller's joystick. The game's backend acquires real-time status parameters of the helicopter, including its current position, speed, attitude, angular velocity, and hovering angle. Simultaneously, it analyzes the target position and hovering angle based on joystick offset. The differences between the current and target states are sequentially fed into a fifth-order cascaded PID control loop: the position PID outputs altitude control values ​​and target speed based on the position difference; the speed PID outputs target attitude based on the speed difference; the attitude PID outputs target angular velocity based on the attitude difference; the angular velocity PID outputs rotation control values ​​based on the angular velocity difference; and the hovering angle PID independently outputs heading control values.

[0108] After obtaining the rotation control value and altitude control value, for each blade of the main rotor, the dot product of the rotation control value and the current orientation of the blade is calculated, and then added to the altitude control value to serve as the driving force for that blade; at the same time, the heading control value is directly used as the tail rotor driving force. These forces are applied to the corresponding blades and tail rotor in each physical update cycle, causing the helicopter to produce realistic forward tilt, roll, ascent, descent, and yaw movements.

[0109] This embodiment also provides a control device for a virtual flight object, which is used to implement the above embodiments and preferred embodiments; details already described will not be repeated. As used below, the term "module" can refer to a combination of software and / or hardware that implements a predetermined function. Although the device described in the following embodiments is preferably implemented in software, hardware implementation, or a combination of software and hardware, is also possible and contemplated.

[0110] This embodiment provides a control device for a virtual flight object, such as... Figure 17 As shown, it includes: The first acquisition module 1701 is used to acquire the current state parameters and target state parameters of the virtual flight object; The first determining module 1702 is used to determine the target control parameters corresponding to the virtual flight object based on the parameter difference between the current state parameters and the target state parameters; The second determining module 1703 is used to determine the blade driving force of each rotor blade and the tail driving force of the virtual flight object based on the target control parameters. The control module 1704 is used to control the movement of a virtual flying object using blade driving force and tail fin driving force.

[0111] In some optional implementations, the current state parameters include the current position and current hovering angle of the virtual flight object, and the target state parameters include the target position and target hovering angle of the virtual flight object; the first determining module 1702 includes: The first determination submodule is used to determine the altitude control value and target speed of the virtual flight object based on the position difference between the current position and the target position; The second determining submodule is used to determine the rotation control value based on the difference in target parameters matched with the target speed; The third determination submodule is used to determine the heading control value corresponding to the virtual flight object based on the difference between the current hovering angle and the target hovering angle; The target control parameters include altitude control values, rotation control values, and heading control values.

[0112] In some optional implementations, the current state parameters also include the current velocity, current attitude, and current angular velocity of the virtual flight object; the second determining submodule includes: The first determining unit is used to determine the target attitude corresponding to the virtual flight object based on the speed difference between the current speed and the target speed; The second determining unit is used to determine the target angular velocity corresponding to the virtual flight object based on the attitude difference between the current attitude and the target attitude; The third determining unit is used to determine the rotation control value corresponding to the virtual flight object based on the angular velocity difference between the current angular velocity and the target angular velocity.

[0113] In some alternative implementations, the first determining submodule includes: The fourth determining unit is used to determine the height control value based on the vertical component of the positional difference; The fifth determining unit is used to determine the target velocity based on the horizontal component of the position difference.

[0114] In some alternative implementations, the second determining module 1703 includes: The acquisition submodule is used to acquire the target orientation of any rotor blade. The fourth determination submodule is used to determine the dot product result between the rotation control value and the target orientation; The fifth determination submodule is used to obtain the blade driving force of the rotor blade based on the fusion result between the dot product result and the altitude control value.

[0115] In some alternative implementations, the second determining module 1703 further includes: The sixth determination submodule is used to determine the heading control value as the tail wing driving force.

[0116] In some alternative implementations, the control device for the virtual flight object further includes: The second acquisition module is used to acquire the physical components and physical constraint information corresponding to the virtual flight object; The third determining module is used to determine the range of motion of physical components based on physical constraint information; The first generation module is used to generate a physical model of a virtual flight object based on the range of motion and physical components.

[0117] In some alternative implementations, the physical components include a rotor component and a tail component; the second acquisition module includes: The seventh determination submodule is used to determine the first constraint information in response to the constraint setting operation for the rotor component. The first constraint information is used to control the rotor component to rotate about the vertical axis. The eighth determining submodule is used to determine the second constraint information in response to the constraint setting operation for the tail fin component. The second constraint information is used to control the rotation of the tail fin component about the horizontal axis. The physical constraint information includes first constraint information and second constraint information.

[0118] In some alternative implementations, the control device for the virtual flight object further includes: The third acquisition module is used to acquire the collision components corresponding to the virtual flight object; The second generation module is used to generate collision models of virtual flying objects based on collision components; The collision model is attached to the physics model.

[0119] The control device for the virtual flight object provided in this application can execute the control method for the virtual flight object provided in any embodiment of this application, and has the corresponding functional modules and beneficial effects for executing the method. Further functional descriptions of the various modules and units described above are the same as those in the corresponding embodiments described above, and will not be repeated here.

[0120] Figure 18 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application.

[0121] The following is a detailed reference. Figure 18 The diagram illustrates a structural schematic suitable for implementing the electronic device described in the embodiments of this application. The electronic device may include a processor (e.g., a central processing unit, graphics processor, etc.) 1801, which can perform various appropriate actions and processes according to a program stored in read-only memory (ROM) 1802 or a program loaded from memory 1808 into random access memory (RAM) 1803. The RAM 1803 also stores various programs and data required for the operation of the electronic device. The processor 1801, ROM 1802, and RAM 1803 are interconnected via a bus 1804. An input / output (I / O) interface 1805 is also connected to the bus 1804.

[0122] Typically, the following devices can be connected to the I / O interface 1805: input devices 1806 including, for example, a touchscreen, touchpad, keyboard, mouse, camera, microphone, accelerometer, gyroscope, etc.; output devices 1807 including, for example, a liquid crystal display (LCD), speaker, vibrator, etc.; memory devices 1808 including, for example, magnetic tape, hard disk, etc.; and communication devices 1809. Communication devices 1809 allow electronic devices to communicate wirelessly or wiredly with other devices to exchange data. Although Figure 18 Electronic devices with various devices are shown, but it should be understood that it is not required to implement or have all of the devices shown, and more or fewer devices may be implemented or have instead.

[0123] Specifically, according to embodiments of this application, the processes described above with reference to the flowcharts can be implemented as computer software programs. For example, embodiments of this application include a computer program product comprising a computer program carried on a non-transitory computer-readable medium, the computer program containing program code for performing the methods shown in the flowcharts. In such embodiments, the computer program can be downloaded and installed from a network via a communication device 1809, or installed from a memory 1808, or installed from a ROM 1802. When the computer program is executed by the processor 1801, it performs the functions defined in the virtual flight object control method of embodiments of this application.

[0124] Figure 18 The electronic device shown is merely an example and should not impose any limitation on the functionality and scope of use of the embodiments of this application.

[0125] This application also provides a computer-readable storage medium. The methods described in this application can be implemented in hardware or firmware, or implemented as recordable on a storage medium, or implemented as computer code downloaded over a network and originally stored on a remote storage medium or a non-transitory machine-readable storage medium and then stored on a local storage medium. Thus, the methods described herein can be processed by software stored on a storage medium using a general-purpose computer, a dedicated processor, or programmable or dedicated hardware. The storage medium can be a magnetic disk, optical disk, read-only memory, random access memory, flash memory, hard disk, or solid-state drive, etc.; further, the storage medium can also include combinations of the above types of memory. It is understood that computers, processors, microprocessor controllers, or programmable hardware include storage components capable of storing or receiving software or computer code. When the software or computer code is accessed and executed by the computer, processor, or hardware, the control method for the virtual flight object shown in the above embodiments is implemented.

[0126] A portion of this application can be applied as a computer program product, such as computer program instructions, which, when executed by a computer, can invoke or provide the methods and / or technical solutions according to this application through the operation of the computer. Those skilled in the art will understand that the forms in which computer program instructions exist in a computer-readable medium include, but are not limited to, source files, executable files, installation package files, etc. Correspondingly, the ways in which computer program instructions are executed by a computer include, but are not limited to: the computer directly executing the instructions, or the computer compiling the instructions and then executing the corresponding compiled program, or the computer reading and executing the instructions, or the computer reading and installing the instructions and then executing the corresponding installed program. Here, the computer-readable medium can be any available computer-readable storage medium or communication medium accessible to a computer.

[0127] Although embodiments of this application have been described in conjunction with the accompanying drawings, those skilled in the art can make various modifications and variations without departing from the spirit and scope of this application, and all such modifications and variations fall within the scope defined by the appended claims.

Claims

1. A method for controlling a virtual flying object, characterized in that, The method includes: Obtain the current state parameters and target state parameters of the virtual flight object; Based on the parameter difference between the current state parameters and the target state parameters, the target control parameters corresponding to the virtual flight object are determined; Based on the target control parameters, determine the blade driving force of each rotor blade and the tail driving force of the virtual flight object. The virtual flying object is controlled to move by using the driving force of the blades and the driving force of the tail fin.

2. The method according to claim 1, characterized in that, The current state parameters include the current position and current hovering angle of the virtual flight object, and the target state parameters include the target position and target hovering angle of the virtual flight object; The step of determining the target control parameters corresponding to the virtual flight object based on the parameter difference between the current state parameters and the target state parameters includes: Based on the positional difference between the current position and the target position, determine the altitude control value and target speed corresponding to the virtual flight object; The rotation control value is determined based on the difference in target parameters matched with the target speed; Based on the hovering angle difference between the current hovering angle and the target hovering angle, determine the heading control value corresponding to the virtual flight object; The target control parameters include the altitude control value, the rotation control value, and the heading control value.

3. The method according to claim 2, characterized in that, The current state parameters also include the current speed, current attitude, and current angular velocity of the virtual flight object; Determining the rotation control value based on the difference in target parameters matched by the target speed includes: Based on the speed difference between the current speed and the target speed, the target attitude corresponding to the virtual flight object is determined; Based on the attitude difference between the current attitude and the target attitude, the target angular velocity corresponding to the virtual flight object is determined; Based on the angular velocity difference between the current angular velocity and the target angular velocity, the rotation control value corresponding to the virtual flight object is determined.

4. The method according to claim 2, characterized in that, The step of determining the altitude control value and target speed corresponding to the virtual flight object based on the position difference between the current position and the target position includes: The height control value is determined based on the vertical component of the positional difference; The target velocity is determined based on the horizontal component of the positional difference.

5. The method according to claim 2, characterized in that, Based on the target control parameters, the blade driving force of each rotor blade of the virtual flight object is determined, including: For any of the rotor blades, obtain the target orientation of the rotor blade; Determine the dot product between the rotation control value and the target orientation; The blade driving force of the rotor blade is obtained based on the fusion result between the dot product result and the altitude control value.

6. The method according to claim 2 or 5, characterized in that, Based on the target control parameters, the tail fin driving force of the virtual flight object is determined, including: The heading control value is determined as the tail fin driving force.

7. The method according to claim 1, characterized in that, The method includes: Obtain the physical components and physical constraints information corresponding to the virtual flight object; Based on the physical constraint information, the range of motion of the physical component is determined; Based on the range of motion and the physical components, a physical model of the virtual flight object is generated.

8. The method according to claim 7, characterized in that, The physical components include rotor components and tail fin components; Obtaining the physical constraint information corresponding to the virtual flight object includes: In response to a constraint setting operation for the rotor component, first constraint information is determined, the first constraint information being used to control the rotor component to rotate about a vertical axis; In response to a constraint setting operation for the tail fin component, second constraint information is determined, the second constraint information being used to control the rotation of the tail fin component about a horizontal axis; The physical constraint information includes the first constraint information and the second constraint information.

9. The method according to claim 7, characterized in that, The method further includes: Obtain the collision component corresponding to the virtual flight object; A collision model of the virtual flying object is generated based on the collision components; The collision model is attached to the physical model.

10. A control device for a virtual flight object, characterized in that, The device includes: The first acquisition module is used to acquire the current state parameters and target state parameters of the virtual flight object; The first determining module is used to determine the target control parameters corresponding to the virtual flight object based on the parameter difference between the current state parameters and the target state parameters; The second determining module is used to determine the blade driving force of each rotor blade and the tail driving force of the virtual flight object based on the target control parameters. The control module is used to control the movement of the virtual flying object by utilizing the driving force of the blades and the driving force of the tail fin.

11. An electronic device, characterized in that, include: A memory and a processor are communicatively connected, the memory stores computer instructions, and the processor executes the computer instructions to perform the control method of the virtual flight object according to any one of claims 1 to 9.

12. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores computer instructions for causing the computer to execute the control method for the virtual flight object according to any one of claims 1 to 9.