Movement control method for virtual object, and device, medium and computer program product

By calculating the movement parameters of virtual objects on the client, the problem of stiff trajectory and speed transition when virtual objects move is solved, and the server computing burden is reduced, achieving smooth movement and authenticity of virtual objects is improved.

WO2025118432A1PCT designated stage expired Publication Date: 2025-06-12LILITH TECH (SHANGHAI) CO LTD
View PDF 5 Cites 0 Cited by

Patent Information

Application Number
PCT/CN2024/081906
Authority / Receiving Office
WO · WO
Patent Type
Applications
Current Assignee / Owner
Priority Date
2023-12-08
Filing Date
2024-03-15
Publication Date
2025-06-12

AI Technical Summary

Technical Problem

In the game, when virtual objects go from hovering to moving state, it will cause stiff trajectory transition and speed transition, and when a large number of virtual objects move at the same time, the server computing burden is too heavy.

Method used

By calculating the movement parameters of virtual objects on the client, including instantaneous speed and angular speed, the smoothness of the movement process is ensured, and the processing of movement instructions is simplified on the server side, reducing the burden of server computing.

Benefits of technology

It realizes smooth movement of virtual objects, reduces the burden of server computing, and improves the authenticity of movement in the game.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN2024081906_12062025_PF_FP_ABST
    Figure CN2024081906_12062025_PF_FP_ABST
Patent Text Reader

Abstract

The present invention particularly relates to a movement control method for a virtual object, and a device, a medium and a computer program product. The method of the present invention comprises: a determination step, involving: determining a relative azimuth parameter between a first virtual object and a second virtual object and a second movement parameter of the second virtual object, wherein the relative azimuth parameter comprises an instantaneous distance and an instantaneous angle difference between the first virtual object and the second virtual object, and the second movement parameter comprises a second instantaneous velocity of the second virtual object; a calculation step, involving: calculating a first movement parameter of the first virtual object on the basis of the instantaneous distance, the instantaneous angle difference and the second instantaneous velocity, wherein the first movement parameter comprises a first instantaneous velocity and a first instantaneous angular velocity of the first virtual object; and a display step, involving: on the basis of the first instantaneous velocity and the first instantaneous angular velocity, controlling the first virtual object to move towards the second virtual object. The present invention can make full use of the performance of a client, relieve the computational burden on a server, and can support smooth movement of a virtual object.
Need to check novelty before this filing date? Find Prior Art

Description

Method, device, medium and computer program product for controlling movement of virtual objects Technical Field

[0001] The present invention relates to the field of game design technology, and in particular to a method and device for controlling the movement of a virtual object, a computer-readable storage medium, and a computer program product. Background Art

[0002] Virtual objects in a game can be in a first state before moving and in a second state while moving. For example, in a strategy game, a virtual object hovers around a certain location while stationary and then enters a moving state from a hovering state upon receiving a movement command. However, when a virtual object transitions from a hovering state to a moving state, the angle change can cause stiff trajectory and speed transitions. Furthermore, when a large number of virtual objects simultaneously transition from a hovering state to a moving state, relying on the server to issue virtual object movement parameters can place an excessive computational burden on the server. Therefore, it is necessary to provide a motion control method that fully utilizes client performance to reduce the server's computational burden and support smooth virtual object state switching and movement processes.

[0003] Summary of the Invention

[0004] The purpose of the present invention is to provide a method, device, computer-readable storage medium and computer program product for controlling the movement of virtual objects, which can fully utilize the performance of the client, reduce the computing burden of the server, and support smooth movement of virtual objects, thereby more realistically restoring the posture of virtual objects in real scenes.

[0005] The present invention discloses a method for controlling movement of a virtual object, which is used in an electronic device. The method comprises:

[0006] a determining step of determining a relative orientation parameter between the first virtual object and the second virtual object and a second movement parameter of the second virtual object, the relative orientation parameter including an instantaneous distance and an instantaneous angle difference between the first virtual object and the second virtual object, and the second movement parameter including a second instantaneous speed of the second virtual object;

[0007] a calculating step of calculating first movement parameters of the first virtual object based on the instantaneous distance, the instantaneous angular difference, and the second instantaneous speed, the first movement parameters including a first instantaneous speed and a first instantaneous angular speed of the first virtual object;

[0008] A display step is performed, controlling the first virtual object to move toward the second virtual object based on the first instantaneous velocity and the first instantaneous angular velocity.

[0009] Optionally, the calculation step further includes calculating the first instantaneous speed based on the following formula: first instantaneous speed = second instantaneous speed + instantaneous distance * acceleration coefficient, and the acceleration coefficient is used as a configuration parameter to adjust the first instantaneous speed.

[0010] Optionally, the relative orientation parameter further includes a following distance between the first virtual object and the second virtual object, and wherein the calculation step further includes calculating the first instantaneous speed based on the following formula: first instantaneous speed = second instantaneous speed + (instantaneous distance - following distance) * acceleration coefficient, and the following distance is used as a configuration parameter to adjust the first instantaneous speed.

[0011] Optionally, the determining step further includes determining a first constraint parameter of the first virtual object, the first constraint parameter including a maximum first instantaneous speed of the first virtual object, and wherein the calculating step further includes calculating the first instantaneous speed based on the following formula: first instantaneous speed = second instantaneous speed + min{(instantaneous distance - following distance) * acceleration coefficient, (maximum first instantaneous speed - second instantaneous speed)}.

[0012] Optionally, the first constraint parameter further includes a minimum first instantaneous speed of the first virtual object, and wherein the calculation step further includes calculating the first instantaneous speed based on the following formula: first instantaneous speed = max{[second instantaneous speed + min{(instantaneous distance - following distance) * acceleration coefficient, (maximum first instantaneous speed - second instantaneous speed)}], minimum first instantaneous speed}.

[0013] Optionally, the calculation step further includes calculating the first instantaneous angular velocity based on the following formula: first instantaneous angular velocity=instantaneous angle difference*steering coefficient, and the steering coefficient is used as a configuration parameter to adjust the first instantaneous angular velocity.

[0014] Optionally, the determining step further includes determining a first constraint parameter of the first virtual object, the first constraint parameter including a maximum first instantaneous angular velocity of the first virtual object, and wherein the calculating step further includes calculating the first instantaneous angular velocity based on the following formula: first instantaneous angular velocity = min{instantaneous angle difference*steering coefficient, maximum first instantaneous angular velocity}.

[0015] Optionally, the calculation step further includes calculating a first tilt parameter of the first virtual object based on the first instantaneous angular velocity, the first tilt parameter including a first instantaneous tilt angle of the first virtual object, and wherein the display step further includes controlling the first virtual object to tilt toward the second virtual object based on the first instantaneous tilt angle.

[0016] Optionally, the calculation step further includes calculating the first instantaneous tilt angle based on the following formula: first instantaneous tilt angle = min{first instantaneous angular velocity*tilt coefficient, 90°}, and the tilt coefficient is used as a configuration parameter to adjust the first instantaneous tilt angle.

[0017] The present invention discloses a movement control system for a virtual object, the system comprising:

[0018] a determining unit configured to determine a relative orientation parameter between a first virtual object and a second virtual object and a second movement parameter of the second virtual object, the relative orientation parameter comprising an instantaneous distance and an instantaneous angle difference between the first virtual object and the second virtual object, and the second movement parameter comprising a second instantaneous speed of the second virtual object;

[0019] a calculation unit, configured to calculate first movement parameters of the first virtual object based on the instantaneous distance, the instantaneous angular difference, and the second instantaneous speed, the first movement parameters including a first instantaneous speed and a first instantaneous angular speed of the first virtual object;

[0020] The presentation unit controls the first virtual object to move toward the second virtual object based on the first instantaneous velocity and the first instantaneous angular velocity.

[0021] Optionally, the calculation unit further includes calculating the first instantaneous speed based on the following formula: first instantaneous speed=second instantaneous speed+instantaneous distance*acceleration coefficient, and the acceleration coefficient is used as a configuration parameter to adjust the first instantaneous speed.

[0022] Optionally, the relative orientation parameter further includes a following distance between the first virtual object and the second virtual object, and wherein the calculation unit further includes calculating the first instantaneous speed based on the following formula: first instantaneous speed = second instantaneous speed + (instantaneous distance - following distance) * acceleration coefficient, and the following distance is used as a configuration parameter to adjust the first instantaneous speed.

[0023] Optionally, the determination unit further includes determining a first constraint parameter of the first virtual object, the first constraint parameter including a maximum first instantaneous speed of the first virtual object, and wherein the calculation unit further includes calculating the first instantaneous speed based on the following formula: first instantaneous speed = second instantaneous speed + min{(instantaneous distance - following distance) * acceleration coefficient, (maximum first instantaneous speed - second instantaneous speed)}.

[0024] Optionally, the first constraint parameter further includes a minimum first instantaneous speed of the first virtual object, and wherein the calculation unit further includes calculating the first instantaneous speed based on the following formula: first instantaneous speed = max{[second instantaneous speed + min{(instantaneous distance - following distance) * acceleration coefficient, (maximum first instantaneous speed - second instantaneous speed)}], minimum first instantaneous speed}.

[0025] Optionally, the calculation unit further includes calculating the first instantaneous angular velocity based on the following formula: first instantaneous angular velocity=instantaneous angle difference*steering coefficient, and the steering coefficient is used as a configuration parameter to adjust the first instantaneous angular velocity.

[0026] Optionally, the determination unit further includes determining a first constraint parameter of the first virtual object, the first constraint parameter including a maximum first instantaneous angular velocity of the first virtual object, and wherein the calculation unit further includes calculating the first instantaneous angular velocity based on the following formula: first instantaneous angular velocity = min{instantaneous angle difference*steering coefficient, maximum first instantaneous angular velocity}.

[0027] Optionally, the calculation unit further includes calculating a first tilt parameter of the first virtual object based on the first instantaneous angular velocity, the first tilt parameter including a first instantaneous tilt angle of the first virtual object, and wherein the display unit further includes controlling the first virtual object to tilt toward the second virtual object based on the first instantaneous tilt angle.

[0028] Optionally, the calculation unit further includes calculating the first instantaneous tilt angle based on the following formula: first instantaneous tilt angle = min{first instantaneous angular velocity*tilt coefficient, 90°}, and the tilt coefficient is used as a configuration parameter to adjust the first instantaneous tilt angle.

[0029] The present invention discloses an electronic device, which comprises a processor and a memory storing computer-executable instructions. The processor is configured to execute the instructions to implement a method for controlling movement of a virtual object.

[0030] The present invention discloses a computer-readable storage medium on which computer-executable instructions are stored. The instructions are executed by a processor to implement a method for controlling movement of a virtual object.

[0031] The present invention discloses a computer program product comprising computer executable instructions, wherein the instructions are executed by a processor to implement a method for controlling movement of a virtual object.

[0032] Compared with the prior art, the main differences and effects of the embodiments of the present invention are:

[0033] According to the movement control method of a virtual object according to an embodiment of the present invention, for a movement instruction to move a first virtual object circling a first position to a second position, on the one hand, the execution result of the movement instruction at the server can be simplified to moving the second virtual object directly from the first position to the second position, without considering the state switching of the first virtual object and the trajectory transition process and speed transition process brought about by it. The computing burden of the server is greatly reduced, and the communication data between the server and the client is greatly reduced. On the other hand, the execution result of the movement instruction at the client can be understood as controlling the first virtual object to move toward the second virtual object (it can also be understood as controlling the first virtual object to chase the second virtual object), and ensuring that the trajectory transition process and the speed transition process are as smooth as possible during the movement process. BRIEF DESCRIPTION OF THE DRAWINGS

[0034] 1 is a flow chart of a method for controlling movement of a virtual object according to an embodiment of the present invention;

[0035] FIG2 is a schematic diagram of a movement control function of a virtual object according to an embodiment of the present invention;

[0036] 3 is a structural diagram of a mobile control system for a virtual object according to an embodiment of the present invention;

[0037] FIG4 is a block diagram of the hardware structure of an electronic device that implements the method for controlling movement of a virtual object according to an embodiment of the present invention. DETAILED DESCRIPTION

[0038] To make the purpose and technical solutions of the embodiments of the present invention more clear, the technical solutions of the embodiments of the present invention will be clearly and completely described below in conjunction with the accompanying drawings of the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the described embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0039] FIG1 is a flow chart of a method for controlling movement of a virtual object according to an embodiment of the present invention. As shown in FIG1 , a first embodiment includes:

[0040] In determining step S101, a relative orientation parameter between the first virtual object and the second virtual object and a second movement parameter of the second virtual object are determined, the relative orientation parameter including an instantaneous distance and an instantaneous angle difference between the first virtual object and the second virtual object, and the second movement parameter including a second instantaneous speed of the second virtual object.

[0041] A first virtual object can refer to a controllable object in a game program executed on a client, including virtual characters, virtual props, and the like. For example, in a war game, a single fighter jet or a group of fighter jets operating in a unified manner can be selected as a first virtual object via an input device of a client electronic device (also referred to herein as a "client"), such as a touchscreen display of a smartphone. Upon receiving a movement command, such as to move the fighter jet or the group of fighter jets, the client can determine that the fighter jet or the group of fighter jets is the first virtual object to be moved. For simplicity, the following description will be based on movement control for a single fighter jet, but it should be understood that a group of fighter jets operating in a unified manner can also be similarly controlled, and this description will not be repeated here. Before the movement, the first virtual object can be in a first state, and during the movement, the first virtual object can be in a second state. For example, before the movement, the fighter jet can be in a circling state, i.e., a state in which it moves in a circle around a certain location on the map, and during the movement, the fighter jet can be in a moving state, i.e., when a movement command is received, the fighter jet is controlled to move from its current position to a target position.

[0042] The second virtual object may refer to a logical object on the server, corresponding to a controllable object in the game program executed on the client. The server may determine the position of the second virtual object based on a determination rule preset in the game program executed on the client. The position of the second virtual object is also referred to as a logical position in the present invention. For example, the determination rule may be that when a fighter jet is circling, the second virtual object is located at the center of the circle in which the fighter jet is circling, i.e., the center of the circle is the logical position when the fighter jet is circling.

[0043] When a movement instruction for a first virtual object is received, for example, a user operates the first virtual object on the client to move it to the target position, the client sends the movement instruction to the server; in response to the movement instruction, the server determines the second orientation parameter and second movement parameter of the second virtual object, moves the second virtual object, and sends the second orientation parameter and second movement parameter of the second virtual object to the client; the client determines the relative orientation parameter between the first virtual object and the second virtual object based on the second orientation parameter and second movement parameter of the second virtual object, further calculates the first movement parameter of the first virtual object, and moves the first virtual object. In this case, for the movement instruction to move the first virtual object circling around the first position to the second position, on the one hand, the execution result of the movement instruction at the server can be simplified to directly moving the second virtual object from the first position to the second position, without considering the state switching of the first virtual object and the trajectory transition process and speed transition process it brings. As can be seen from this, the computing burden of the server is greatly reduced.

[0044] At each moment, the server may determine a second instantaneous position and a second instantaneous velocity of the second virtual object, wherein the second instantaneous position of the second virtual object is included in a second orientation parameter of the second virtual object, and the second instantaneous velocity of the second virtual object is included in a second movement parameter of the second virtual object.

[0045] Preferably, the second virtual object moves from the first position to the second position at a constant speed, so that the second instantaneous speed of the second virtual object is the same at different times. The server may determine the second instantaneous speed based on a determination rule preset in the game program executed on the client. For example, the determination rule may be such that the reference movement speeds of different types of fighter jets are determined as the corresponding second instantaneous speeds.

[0046] In addition, the server can periodically or irregularly send the second instantaneous position and second instantaneous velocity of the second virtual object at the current moment to the client, thereby significantly reducing the communication data between the server and the client, thereby preventing the client from being unable to smoothly control the movement of the virtual object due to network delays. Preferably, parameter synchronization between the server and the client can be performed on a frame basis, that is, data synchronization is performed once per frame, and the duration of each frame can be defined according to the specific application scenario, such as 1 millisecond, 10 milliseconds, 1 second, etc.

[0047] It is understandable that the server can use an existing path-finding algorithm to determine the movement route from the first position to the second position, so that the second virtual object moves from the first position to the second position at a constant speed, which will not be repeated here.

[0048] On the other hand, the execution result of this movement instruction on the client can be understood as controlling the first virtual object to move toward the second virtual object (or controlling the first virtual object to chase the second virtual object), and ensuring that the trajectory transition and speed transition process are as smooth as possible during the movement. This calculation process is implemented and displayed on the client, thereby reducing the computing burden on the server and presenting a smooth and intuitive movement trajectory to the user on the client.

[0049] Figure 2 is a schematic diagram of a virtual object movement control function according to an embodiment of the present invention. As shown in Figure 2 , first, at each moment, the client can determine the first instantaneous position and first instantaneous orientation of the first virtual object. The first instantaneous orientation refers to the orientation of the first virtual object's head. For example, if the first virtual object is a fighter jet, the orientation of the fighter jet's head is the first instantaneous orientation. The first instantaneous position and first instantaneous orientation of the first virtual object are included in the first orientation parameter of the first virtual object.

[0050] The client then determines the instantaneous distance and relative instantaneous orientation between the first virtual object and the second virtual object based on the first instantaneous position of the first virtual object and the second instantaneous position of the second virtual object at the current moment. The instantaneous distance refers to the straight-line distance or Euclidean distance between the first virtual object and the second virtual object, and the relative instantaneous orientation refers to the orientation formed by a straight line connecting the first virtual object and the second virtual object. The instantaneous distance and relative instantaneous orientation between the first virtual object and the second virtual object are included in the relative orientation parameter between the first virtual object and the second virtual object.

[0051] The client then determines an instantaneous angular difference between the first virtual object and the second virtual object based on the first instantaneous orientation of the first virtual object and the relative instantaneous orientation between the first virtual object and the second virtual object at the current moment. The instantaneous angular difference refers to the angle formed by the first instantaneous orientation and the relative instantaneous orientation. The instantaneous angular difference between the first virtual object and the second virtual object is included in the relative orientation parameter between the first virtual object and the second virtual object.

[0052] In the calculation step S103 , first movement parameters of the first virtual object are calculated based on the instantaneous distance, the instantaneous angular difference, and the second instantaneous velocity. The first movement parameters include a first instantaneous velocity and a first instantaneous angular velocity of the first virtual object.

[0053] Optionally, calculating step S103 further includes calculating the first instantaneous speed based on the following formula: first instantaneous speed = second instantaneous speed + instantaneous distance * acceleration factor, where the acceleration factor serves as a configuration parameter for adjusting the first instantaneous speed. As can be seen, when the second instantaneous speed and the acceleration factor remain unchanged, the first instantaneous speed of the first virtual object decreases linearly as the instantaneous distance between the first and second virtual objects decreases, causing the first virtual object to approach the second virtual object from faster to slower speeds, thereby smoothing the speed transition. In this embodiment, the fighter jet approaches the logical position of the logical object from faster to slower speeds.

[0054] Optionally, the relative orientation parameter further includes a following distance between the first virtual object and the second virtual object. The client may determine the following distance based on a determination rule preset in a game program executed on the client. For example, the determination rule may be that when a fighter jet hovers, the radius of the hovering is determined as the following distance.

[0055] In this case, calculation step S103 further includes calculating the first instantaneous speed based on the following formula: first instantaneous speed = second instantaneous speed + (instantaneous distance - following distance) * acceleration coefficient, where the following distance is used as a configuration parameter to adjust the first instantaneous speed. As can be seen, while the second instantaneous speed and the acceleration coefficient remain unchanged, the first instantaneous speed of the first virtual object linearly slows as the instantaneous distance between the first and second virtual objects approaches the following distance. This causes the first virtual object to approach the second virtual object from fast to slow, thereby smoothing the speed transition process and aligning the first virtual object's preparation with subsequent actions after the movement is completed, thereby smoothing the trajectory transition process. In this embodiment, the fighter plane approaches the logical position of the logical object from fast to slow, and the fighter plane's preparation is aligned with the action of circling around the logical position after the movement is completed.

[0056] Optionally, determining step S101 further includes determining a first constraint parameter of the first virtual object, where the first constraint parameter includes a maximum first instantaneous speed of the first virtual object. The client may determine the maximum first instantaneous speed based on a determination rule preset in a game program executed on the client. For example, the determination rule may be such that the maximum movement speed of different types of fighter jets is determined as the corresponding maximum first instantaneous speed.

[0057] In this case, calculation step S103 further includes calculating the first instantaneous speed based on the following formula: first instantaneous speed = second instantaneous speed + min{(instantaneous distance - following distance) * acceleration coefficient, (maximum first instantaneous speed - second instantaneous speed)}. In other words, the smaller value between (instantaneous distance - following distance) * acceleration coefficient and maximum first instantaneous speed - second instantaneous speed is selected and added to the second instantaneous speed to obtain the first instantaneous speed. The upper limit of the first instantaneous speed is set so that the first virtual object does not move too quickly, thereby smoothing the speed transition process.

[0058] Optionally, the first constraint parameter further includes a minimum first instantaneous speed of the first virtual object. The client may determine the minimum first instantaneous speed based on a predetermined determination rule within the game program executed on the client. For example, the determination rule may be such that the minimum movement speeds of different types of fighter jets are determined to be the corresponding minimum first instantaneous speeds. If the first instantaneous speed of a fighter jet is less than the corresponding minimum first instantaneous speed, the fighter jet will exhibit a hovering-like posture due to being too slow.

[0059] In this case, calculating step S103 further includes calculating the first instantaneous speed based on the following formula: first instantaneous speed = max{[second instantaneous speed + min{(instantaneous distance - following distance) * acceleration coefficient, (maximum first instantaneous speed - second instantaneous speed)}], minimum first instantaneous speed}. In other words, the larger value between the second instantaneous speed + min{(instantaneous distance - following distance) * acceleration coefficient, (maximum first instantaneous speed - second instantaneous speed)} and the minimum first instantaneous speed is selected to obtain the first instantaneous speed. The lower limit of the first instantaneous speed is limited so that the fighter does not exhibit a hover-like attitude, thereby smoothing the speed transition process.

[0060] Optionally, the calculation step S103 further includes calculating the first instantaneous angular velocity based on the following formula: first instantaneous angular velocity=instantaneous angle difference*steering coefficient, where the steering coefficient is used as a configuration parameter to adjust the first instantaneous angular velocity.

[0061] As can be seen, while the steering coefficient remains constant, the first instantaneous angular velocity of the first virtual object decreases linearly as the instantaneous angular difference between the first and second virtual objects decreases, causing the first virtual object to rotate from fast to slow toward the second virtual object, thereby smoothing the trajectory transition. In this embodiment, the fighter plane rotates from fast to slow toward the logical position of the logical object.

[0062] Optionally, determining step S101 further includes determining a first constraint parameter of the first virtual object, where the first constraint parameter includes a maximum first instantaneous angular velocity of the first virtual object. The client may determine the maximum first instantaneous angular velocity based on a determination rule preset in a game program executed on the client. For example, the determination rule may be such that the maximum rotational angular velocity of different types of fighter jets is determined as the corresponding maximum first instantaneous angular velocity.

[0063] In this case, calculating step S103 further includes calculating the first instantaneous angular velocity based on the following formula: First Instantaneous Angular Velocity = min{Instantaneous Angle Difference * Steering Coefficient, Maximum First Instantaneous Angular Velocity}. In other words, the smaller value between the instantaneous angle difference * steering coefficient and the maximum first instantaneous angular velocity is selected to obtain the first instantaneous angular velocity. The upper limit of the first instantaneous angular velocity is set to prevent the first virtual object from rotating too quickly, thereby smoothing the trajectory transition process.

[0064] In step S105 , the first virtual object is controlled to move toward the second virtual object based on the first instantaneous velocity and the first instantaneous angular velocity.

[0065] Returning to Figure 2, the client controls the movement of the first virtual object toward the second virtual object based on the first instantaneous velocity and first instantaneous angular velocity of the first virtual object at the current moment. This enables smooth object movement, thereby more realistically reproducing the object's posture in the real scene. For example, the speed and trajectory of a fighter jet transitioning from a hovering state to a moving state achieves a smooth and natural transition, reproducing the fighter jet's flight posture in the real scene.

[0066] Optionally, the calculating step S103 further includes calculating a first tilt parameter of the first virtual object based on the first instantaneous angular velocity, where the first tilt parameter includes a first instantaneous tilt angle of the first virtual object.

[0067] In this case, the presenting step S105 further includes controlling the first virtual object to tilt toward the second virtual object based on the first instantaneous tilt angle.

[0068] In this embodiment, the fighter jet tilts at a certain angle while moving toward the logical position of the logical object. The angle changes in real time according to the first instantaneous angular velocity of the fighter jet, which can restore the turning posture of the fighter jet in the real scene and save additional animation resources. There is no need to prepare animations with different tilt angles in advance.

[0069] Optionally, the first instantaneous tilt angle is calculated based on the following formula: First instantaneous tilt angle = min{first instantaneous angular velocity * tilt coefficient, 90°}, where the tilt coefficient serves as a configuration parameter for adjusting the first instantaneous tilt angle. In other words, if the first instantaneous angular velocity * tilt coefficient is greater than 90°, the first instantaneous tilt angle can only be 90°, preventing the first virtual object from tilting excessively, thereby more realistically reproducing the fighter jet's turning posture in real-world scenarios.

[0070] In summary, according to the movement control method of a virtual object according to an embodiment of the present invention, for a movement instruction to move a first virtual object circling around a first position to a second position, on the one hand, the execution result of the movement instruction at the server can be simplified to moving the second virtual object directly from the first position to the second position, without considering the state switching of the first virtual object and the trajectory transition process and speed transition process brought about by it. The computing burden of the server is greatly reduced, and the communication data between the server and the client is greatly reduced. On the other hand, the execution result of the movement instruction at the client can be understood as controlling the first virtual object to move toward the second virtual object (it can also be understood as controlling the first virtual object to chase the second virtual object), and ensuring that the trajectory transition process and the speed transition process are as smooth as possible during the movement process.

[0071] FIG3 is a block diagram of a virtual object movement control system according to an embodiment of the present invention. As shown in FIG3 , the second embodiment includes:

[0072] A determining unit 301 is configured to determine a relative orientation parameter between a first virtual object and a second virtual object and a second movement parameter of the second virtual object, wherein the relative orientation parameter includes an instantaneous distance and an instantaneous angle difference between the first virtual object and the second virtual object, and the second movement parameter includes a second instantaneous speed of the second virtual object.

[0073] The calculation unit 303 calculates a first movement parameter of the first virtual object based on the instantaneous distance, the instantaneous angular difference, and the second instantaneous velocity, where the first movement parameter includes a first instantaneous velocity and a first instantaneous angular velocity of the first virtual object.

[0074] The display unit 305 controls the first virtual object to move toward the second virtual object based on the first instantaneous velocity and the first instantaneous angular velocity.

[0075] Optionally, the calculation unit 303 further includes calculating the first instantaneous speed based on the following formula: first instantaneous speed = second instantaneous speed + instantaneous distance * acceleration coefficient, and the acceleration coefficient is used as a configuration parameter to adjust the first instantaneous speed.

[0076] Optionally, the relative orientation parameter further includes a following distance between the first virtual object and the second virtual object, and wherein the calculation unit 303 further includes calculating the first instantaneous speed based on the following formula: first instantaneous speed = second instantaneous speed + (instantaneous distance - following distance) * acceleration coefficient, and the following distance is used as a configuration parameter to adjust the first instantaneous speed.

[0077] Optionally, the determination unit 301 further includes determining a first constraint parameter of the first virtual object, the first constraint parameter including a maximum first instantaneous speed of the first virtual object, and wherein the calculation unit 303 further includes calculating the first instantaneous speed based on the following formula: first instantaneous speed = second instantaneous speed + min{(instantaneous distance - following distance) * acceleration coefficient, (maximum first instantaneous speed - second instantaneous speed)}.

[0078] Optionally, the first constraint parameter further includes a minimum first instantaneous speed of the first virtual object, and wherein the calculation unit 303 further includes calculating the first instantaneous speed based on the following formula: first instantaneous speed = max{[second instantaneous speed + min{(instantaneous distance - following distance) * acceleration coefficient, (maximum first instantaneous speed - second instantaneous speed)}], minimum first instantaneous speed}.

[0079] Optionally, the calculation unit 303 further includes calculating the first instantaneous angular velocity based on the following formula: first instantaneous angular velocity=instantaneous angle difference*steering coefficient, and the steering coefficient is used as a configuration parameter to adjust the first instantaneous angular velocity.

[0080] Optionally, the determination unit 301 further includes determining a first constraint parameter of the first virtual object, the first constraint parameter including the maximum first instantaneous angular velocity of the first virtual object, and wherein the calculation unit 303 further includes calculating the first instantaneous angular velocity based on the following formula: first instantaneous angular velocity = min{instantaneous angle difference*steering coefficient, maximum first instantaneous angular velocity}.

[0081] Optionally, the calculation unit 303 further includes calculating a first tilt parameter of the first virtual object based on the first instantaneous angular velocity, the first tilt parameter including a first instantaneous tilt angle of the first virtual object, and wherein the display unit 305 further includes being configured to control the first virtual object to tilt toward the second virtual object based on the first instantaneous tilt angle.

[0082] Optionally, the calculation unit 303 further includes calculating the first instantaneous tilt angle based on the following formula: first instantaneous tilt angle = min{first instantaneous angular velocity*tilt coefficient, 90°}, and the tilt coefficient is used as a configuration parameter to adjust the first instantaneous tilt angle.

[0083] The first embodiment is a method implementation corresponding to this embodiment, and this embodiment can be implemented in conjunction with the first embodiment. The relevant technical details mentioned in the first embodiment are still valid in this embodiment and are not repeated here to reduce repetition. Accordingly, the relevant technical details mentioned in this embodiment can also be applied to the first embodiment.

[0084] FIG4 is a block diagram of the hardware structure of an electronic device that implements the method for controlling movement of a virtual object according to an embodiment of the present invention.

[0085] As shown in Figure 4, the electronic device 400 may include one or more processors 402, a system motherboard 408 connected to at least one of the processors 402, a system memory 404 connected to the system motherboard 408, a non-volatile memory (NVM) 406 connected to the system motherboard 408, and a network interface 410 connected to the system motherboard 408.

[0086] The processor 402 may include one or more single-core or multi-core processors. The processor 402 may include any combination of general-purpose processors and special-purpose processors (e.g., graphics processors, application processors, baseband processors, etc.). In an embodiment of the present invention, the processor 402 may be configured to execute one or more embodiments according to the various embodiments shown in FIG. 1 .

[0087] In some embodiments, system board 408 may include any suitable interface controller to provide any suitable interface to at least one of processors 402 and / or any suitable device or component in communication with system board 408 .

[0088] In some embodiments, the system board 408 may include one or more memory controllers to provide an interface to the system memory 404. The system memory 404 may be used to load and store data and / or instructions. In some embodiments, the system memory 404 of the electronic device 400 may include any suitable volatile memory, such as a suitable dynamic random access memory (DRAM).

[0089] NVM 406 may include one or more tangible, non-transitory computer-readable media for storing data and / or instructions. In some embodiments, NVM 406 may include any suitable non-volatile memory such as flash memory and / or any suitable non-volatile storage device, such as at least one of an HDD (Hard Disk Drive), a CD (Compact Disc) drive, and a DVD (Digital Versatile Disc) drive.

[0090] NVM 406 may include a portion of storage resources installed on a device of electronic device 400, or it may be accessible to the device but not necessarily part of the device. For example, NVM 406 may be accessed over a network via network interface 410.

[0091] In particular, system memory 404 and NVM 406 may respectively include a temporary copy and a permanent copy of instructions 420. Instructions 420 may include instructions that, when executed by at least one of processors 402, cause electronic device 400 to implement the method illustrated in FIG1 . In some embodiments, instructions 420, hardware, firmware, and / or software components thereof may additionally or alternatively be located in system board 408, network interface 410, and / or processor 402.

[0092] The network interface 410 may include a transceiver for providing a radio interface for the electronic device 400, thereby communicating with any other suitable devices (e.g., a front-end module, an antenna, etc.) via one or more networks. In some embodiments, the network interface 410 may be integrated with other components of the electronic device 400. For example, the network interface 410 may be integrated with at least one of the processor 402, the system memory 404, the NVM 406, and a firmware device (not shown) having instructions. When at least one of the processors 402 executes the instructions, the electronic device 400 implements one or more of the various embodiments shown in FIG. 1 .

[0093] The network interface 410 may further include any suitable hardware and / or firmware to provide a multiple-input multiple-output radio interface. For example, the network interface 410 may be a network adapter, a wireless network adapter, a telephone modem, and / or a wireless modem.

[0094] In one embodiment, at least one of the processors 402 may be packaged together with one or more controllers for the system board 408 to form a system-in-package (SiP). In one embodiment, at least one of the processors 402 may be integrated on the same die with one or more controllers for the system board 408 to form a system-on-chip (SoC).

[0095] Electronic device 400 may further include an input / output (I / O) device 412 connected to system board 408. I / O device 412 may include a user interface to enable a user to interact with electronic device 400; peripheral component interfaces may also be designed to enable peripheral components to interact with electronic device 400. In some embodiments, electronic device 400 may also include a sensor for determining at least one of environmental conditions and location information related to electronic device 400.

[0096] In some embodiments, I / O device 412 may include, but is not limited to, a display (e.g., a liquid crystal display, a touch screen display, etc.), speakers, a microphone, one or more cameras (e.g., a still image camera and / or a video camera), a flashlight (e.g., an LED flash), and a keyboard.

[0097] In some embodiments, the peripheral component interface may include, but is not limited to, a non-volatile memory port, an audio jack, and a power interface.

[0098] In some embodiments, the sensors may include, but are not limited to, a gyroscope sensor, an accelerometer, a proximity sensor, an ambient light sensor, and a positioning unit. The positioning unit may also be part of or interact with the network interface 410 to communicate with components of a positioning network (e.g., a Global Positioning System (GPS) satellite).

[0099] It should be understood that the structure illustrated in the embodiment of the present invention does not constitute a specific limitation on the electronic device 400. In other embodiments of the present application, the electronic device 400 may include more or fewer components than shown, or may combine or separate certain components, or arrange the components differently. The components shown in the figure may be implemented in hardware, software, or a combination of software and hardware.

[0100] Program code can be applied to input instructions to perform the functions described herein and generate output information. The output information can be applied to one or more output devices in a known manner. For the purposes of this application, a system for processing instructions including processor 402 includes any system having a processor such as a digital signal processor (DSP), a microcontroller, an application specific integrated circuit (ASIC), or a microprocessor.

[0101] Program code can be implemented with a high-level programming language or an object-oriented programming language to communicate with the processing system. Where necessary, program code can also be implemented in assembly language or machine language. In fact, the mechanism described in the present invention is not limited to the scope of any particular programming language. In either case, the language can be a compiled language or an interpreted language.

[0102] One or more aspects of at least one embodiment may be implemented by instructions stored on a computer-readable storage medium. When the instructions are read and executed by a processor, the electronic device can implement the method of the embodiment described in the present invention.

[0103] The present invention also provides a computer-readable storage medium having computer-executable instructions stored thereon, which are executed by a processor to implement the above-described method for controlling movement of a virtual object.

[0104] The present invention further provides a computer program product, which includes computer-executable instructions. The instructions are executed by a processor to implement the above-described method for controlling movement of a virtual object.

[0105] While the present invention has been shown and described with reference to certain preferred embodiments thereof, it will be understood by those skilled in the art that various changes in form and details may be made therein without departing from the spirit and scope of the invention.

Claims

1. A method for controlling movement of a virtual object, used in an electronic device, characterized in that: The method comprises: A determining step of determining a relative orientation parameter between the first virtual object and the second virtual object and a second movement parameter of the second virtual object, wherein the relative orientation parameter includes an instantaneous distance and an instantaneous angle difference between the first virtual object and the second virtual object, and the second movement parameter includes a second instantaneous speed of the second virtual object; A calculation step, based on the instantaneous distance, the instantaneous angular difference and the second instantaneous speed, calculating a first movement parameter of the first virtual object, the first movement parameter comprising a first instantaneous speed and a first instantaneous angular speed of the first virtual object; A display step is performed, based on the first instantaneous velocity and the first instantaneous angular velocity, controlling the first virtual object to move toward the second virtual object.

2. The method according to claim 1, characterized in that The calculation step further includes calculating the first instantaneous speed based on the following formula: first instantaneous speed=second instantaneous speed+instantaneous distance*acceleration coefficient, and the acceleration coefficient is used as a configuration parameter to adjust the first instantaneous speed.

3. The method according to claim 2, characterized in that The relative orientation parameters further include a following distance between the first virtual object and the second virtual object, and wherein the calculation step further includes calculating the first instantaneous speed based on the following formula: first instantaneous speed = second instantaneous speed + (instantaneous distance - following distance) * acceleration coefficient, and the following distance is used as a configuration parameter to adjust the first instantaneous speed.

4. The method according to claim 3, characterized in that: The determining step further includes determining a first constraint parameter of the first virtual object, the first constraint parameter including a maximum first instantaneous speed of the first virtual object, and wherein the calculating step further includes calculating the first instantaneous speed based on the following formula: first instantaneous speed = second instantaneous speed + min{(instantaneous distance - following distance) * acceleration coefficient, (maximum first instantaneous speed - second instantaneous speed)}.

5. The method according to claim 4, characterized in that The first constraint parameters further include a minimum first instantaneous speed of the first virtual object, and wherein the calculation step further includes calculating the first instantaneous speed based on the following formula: first instantaneous speed = max{[second instantaneous speed + min{(instantaneous distance - following distance) * acceleration coefficient, (maximum first instantaneous speed - second instantaneous speed)}], minimum first instantaneous speed}.

6. The method according to claim 1, characterized in that The calculation step further includes calculating the first instantaneous angular velocity based on the following formula: first instantaneous angular velocity=instantaneous angle difference*steering coefficient, and the steering coefficient is used as a configuration parameter to adjust the first instantaneous angular velocity.

7. The method according to claim 6, characterized in that The determining step further includes determining a first constraint parameter of the first virtual object, the first constraint parameter including a maximum first instantaneous angular velocity of the first virtual object, and wherein the calculating step further includes calculating the first instantaneous angular velocity based on the following formula: first instantaneous angular velocity = min{instantaneous angle difference*steering coefficient, maximum first instantaneous angular velocity}.

8. The method according to claim 1, characterized in that The calculation step further includes calculating a first tilt parameter of the first virtual object based on the first instantaneous angular velocity, the first tilt parameter including a first instantaneous tilt angle of the first virtual object, and wherein the display step further includes controlling the first virtual object to tilt toward the second virtual object based on the first instantaneous tilt angle.

9. The method according to claim 8, characterized in that The calculation step further includes calculating the first instantaneous tilt angle based on the following formula: first instantaneous tilt angle=min{first instantaneous angular velocity*tilt coefficient, 90°}, and the tilt coefficient is used as a configuration parameter to adjust the first instantaneous tilt angle.

10. An electronic device, characterized in that: The electronic device comprises a processor and a memory storing computer executable instructions, wherein the processor is configured to execute the instructions to implement the movement control method of the virtual object according to any one of claims 1 to 9.

11. A computer-readable storage medium having computer-executable instructions stored thereon, characterized in that: The instructions are executed by a processor to implement the movement control method of a virtual object according to any one of claims 1 to 9.

12. A computer program product comprising computer executable instructions, characterized in that: The instructions are executed by a processor to implement the movement control method of a virtual object according to any one of claims 1 to 9.

Citation Information

Patent Citations

  • Control method and device for virtual character in game, electronic equipment and storage medium

    CN111905370A

  • Virtual object control method and device, terminal, storage medium and program product

    CN114425163A

  • Virtual object loading method and device in game and electronic equipment

    CN116077930A

  • Movement control method and device for virtual object, medium and computer program product

    CN117618910A

  • Method for providing virtual space, method for providing virtual experience, program and recording medium

    JP2018014084A